An AGI-Powered Strategic Forecaster for Complex Agricultural Crises
Live Demo • Our Journey • Key Features • Tech Stack • Contribute
Click the badge above or follow this link to interact with the live application: https://ritviks21-maharashtra-oracle-app-forivi.streamlit.app/
The Sahyadri Strategist is a state-of-the-art strategic forecasting tool built to simulate the complex, cascading effects of overlapping crises on a regional agricultural system. By fusing an interactive classical model, a quantum simulation engine, and a powerful generative AI, this project moves beyond simple prediction to provide actionable, strategic advice for policymakers.
This project evolved through three distinct phases, each teaching a valuable lesson about building intelligent systems.
V1: The Simple Calculator - A Deterministic Start
Our first version was a classical model that could only handle single, isolated events. It was a simple `if-this-then-that` calculator.
💡 **Lesson Learned:** Real-world crises are complex, overlapping, and unpredictable. A simple calculator cannot capture the "ripple effect."
V2: The Quantum Leap - Seeing the Ripple Effect
We rebuilt the core using **Qiskit** to create a "Quantum Battlefield." By entangling variables like Monsoon, Yield, and Demand, we could finally simulate the cascading impact of multiple, simultaneous events. The model became powerful, but its output was raw probability data—difficult for a human to interpret.
💡 **Lesson Learned:** Powerful simulation is useless without powerful interpretation. Data needs a storyteller to become wisdom.
V3: The AGI Strategist - The Final, Intelligent Core
This final version integrated **Google's Gemini** not as a simple reporter, but as an autonomous strategic advisor. The AI's task is to receive the complex probabilistic data from the quantum simulation and translate it into a high-level strategic briefing, complete with risk analysis and policy recommendations.
✅ **The Result:** A true strategic tool that doesn't just predict the future but helps you shape it, demonstrating a complete pipeline from user-defined scenario to actionable, AI-generated strategy.
- Interactive Scenario Builder: Set initial conditions using historical data presets or manually define a custom baseline with interactive widgets.
- Complex Crisis Simulation: A multi-select interface allows for combining multiple, overlapping events into a single simulation.
- Quantum "Ripple Effect" Engine: Uses a Qiskit-based quantum circuit to model the non-linear, second-order effects of crises.
- AI-Powered Strategic Briefings: The final output is a full strategic report containing an executive summary, risk analysis, and actionable policy recommendations.
| Streamlit | Qiskit | Gemini | Python | Pandas |
|---|---|---|---|---|
Click here for instructions to run this project yourself.
-
Clone the Repository
git clone [https://github.com/Ritviks21/maharashtra-oracle.git](https://github.com/Ritviks21/maharashtra-oracle.git) cd maharashtra-oracle -
Install Dependencies
pip install -r requirements.txt
-
Set Up API Key Create a
.streamlit/secrets.tomlfile and add your Google Gemini API key:GEMINI_API_KEY = "YOUR_API_KEY_HERE"
-
Run the App
streamlit run app.py
Contributions are always welcome! This project demonstrates a unique proof-of-concept, and there are many ways to expand on it.
- Expand the Quantum Model: Add more qubits to represent new variables (e.g.,
Transportation,Global Prices) and design their entangled relationships. - Integrate Real-Time Data: Connect the app to a live weather API to set the initial monsoon state based on real-time data.
- Enhance the AI's "Tools": Give the AI more "tools" to call, such as a function to look up historical data or current market prices, to enrich its strategic analysis.
