🌍 Climate Policy Simulator

🔥 Inspiration

Our project was inspired by the urgent need for better policy-making tools in the face of climate change. We recognized that effective climate policies require understanding diverse perspectives — from policymakers and scientists to community members. Traditional policy discussions often lack real-time engagement and fail to capture the complexity of stakeholder interactions.

We wanted to create a platform that could simulate these complex discussions using AI, allowing for more informed and inclusive policy design.


🤖 What It Does

The Climate Policy Simulator uses AI personas to model a town hall meeting discussing a carbon tax proposal. Our system creates three distinct personas:

  • 👨‍💼 Mayor Johnson (policy maker)
  • 👩‍🔬 Dr. Sarah Chen (climate scientist)
  • 👩 Maria Rodriguez (community resident)

These personas engage in a structured discussion, with a real-time conversation display showing their interactions as they happen. Users can adjust the number of discussion steps and watch the AI personas debate policy trade-offs, providing insights into how different stakeholders might respond to climate initiatives.


🛠️ How We Built It

Our technical implementation combines several key components:

  • AI Framework:
    Used the TinyTroupe library with gpt-oss models via Langchain GROQ for persona creation and simulation.

  • Real-time Display:
    Implemented WebSocket communication between a FastAPI backend and Next.js frontend for live conversation streaming.

  • Alternative Solution:
    Created a JSON-based polling mechanism to ensure conversation updates even in challenging network conditions.

  • Multiple Interfaces:
    Developed command-line, Streamlit, and web interfaces to cater to different user preferences.

  • Analysis Tools:
    Built visualization dashboards to analyze stakeholder positions and policy outcomes.


🧩 Challenges We Faced

  • Real-time Streaming:
    Initially, all conversation messages were displayed at once after simulation completion. We restructured the simulation to capture and stream messages live.

  • Token Counting Error:
    Encountered issues with token counting in the tinytroupe library for the gpt-oss-20b model. We implemented workarounds to suppress error messages while maintaining functionality.

  • WebSocket Communication:
    Ensured reliable real-time communication between backend and frontend by handling connection states and error conditions carefully.

  • Message Extraction:
    Parsing conversation data from AI-generated text required robust pattern matching to correctly identify speakers and their messages.


📚 What We Learned

  • Multi-agent AI Potential:
    We saw how effectively AI personas can simulate complex human interactions and policy debates when given detailed backgrounds and motivations.

  • Real-time UI Design:
    Learned the importance of providing immediate feedback in simulation interfaces to maintain user engagement and understanding.

  • Open Source Models:
    Gained valuable experience working with open-source AI models for complex reasoning tasks — showing their viability for policy applications.

  • Modular Architecture:
    Reinforced the value of modular design for complex systems, allowing us to add new interfaces and features without disrupting core functionality.


🏆 Accomplishments We're Proud Of

  • Real-time Conversation Display
    Successfully implemented live streaming of AI persona interactions, creating an engaging user experience.

  • Multiple Interface Support
    Created three different interfaces: CLI, Streamlit, and Web, making the tool accessible to a wide audience.

  • Robust Persona Design
    Developed detailed, realistic personas with distinct perspectives that produce meaningful policy discussions.

  • Hackathon Innovation
    Demonstrated an unexpected application of gpt-oss models in the policy domain, showing their versatility beyond traditional use cases.


🚀 Future Directions

We envision expanding the simulator to:

  • 🌱 Support additional policy domains beyond climate change
  • 📊 Integrate more sophisticated analysis tools for policy impact prediction
  • 🧑‍🤝‍🧑 Add support for larger group discussions with more personas
  • 🧑‍💻 Implement user interaction capabilities to allow humans to participate in the simulations
  • 📱 Develop mobile interfaces for broader accessibility

Built With

Share this project:

Updates