Inspiration

196 countries signed the Paris Agreement. Emissions are still rising. The reason is not ignorance — it is structure. Cooperating on climate is collectively rational but individually irrational for almost every country on earth. No existing tool puts decision-makers inside that trap. ClimateSim is built to change that.


What it does

ClimateSim simulates global climate negotiations across 8 nations using real 2025 economic data. Each round, countries simultaneously choose Conservation, Renewable Investment, or Fossil Expansion. A Claude-powered consequence engine then generates outcomes — the same policy choice produces completely different consequences depending on who made it, because Nigeria's fossil expansion is fiscal survival while Russia's is strategic exploitation of a warming Arctic. After every round country delegates see short-term effects, long-term trajectories, UN SDG gap analysis, and a suggested policy for the next round based on what everyone else just chose.


How I built it

Built in vanilla JavaScript with no framework dependencies. Country data — GDP, CO₂, vulnerability scores, energy mix, Paris pledges — is sourced from IMF WEO 2025, EDGAR 2025, IEA 2024, and ND-GAIN 2023, stored in a separate countries.json file. Each round sends the full state to Claude (claude-sonnet-4-20250514) which returns structured JSON consequences unique to that simulation's history. Carbon budget and temperature mechanics are pure JS math calibrated against IPCC AR6 figures so the simulation matches real-world timelines.


Challenges I ran into

Getting Claude to reason genuinely differently per country took significant prompt engineering — early versions produced structurally similar consequences regardless of who made the choice. Making long-term renewable investment not always positive required explicitly modelling India's financing trap, Russia's stranded asset problem, and Saudi Arabia's dependency on oil revenues to fund its own transition. Verifying every data point against primary sources caught several errors in the vulnerability scores that needed correcting before they could be passed into the AI prompt.


Accomplishments that I'm proud of

The suggested policy engine gives Russia and Nigeria structurally different recommendations under identical global conditions because their economic constraints are structurally different — without hardcoding any country-specific rules. And building something honest about its own limitations: the README explicitly states what the demo version cannot do that the live AI version can.


What I learned

Individually rational decisions can produce collectively catastrophic outcomes — and no report communicates that as clearly as being inside the simulation when it happens. The most important design decision in an AI application is not that AI is used but what it is actually doing. Here it is the consequence engine. Remove it and the product does not exist. On the technical side, I learned that prompt engineering for structured JSON output requires more than just asking for JSON — the model needs explicit field-level instructions, example consequence directions (pos/neg/neu), and hard constraints on reasoning style or it defaults to generic commentary. I learned that separating the data layer (countries.json) from the application logic (index.html) makes the codebase significantly easier to verify and update — a pattern I will use in every data-driven project going forward. I also learned that calibrating simulation mechanics against real-world data (IPCC AR6 carbon budgets, ND-GAIN vulnerability scores) requires going back to primary sources rather than trusting aggregated datasets — several numbers I initially used were wrong until I verified them directly.


What's next for ClimateSim — AI Climate Negotiation Platform

Multiplayer mode — one country per player, creating genuine prisoner's dilemma tension between real people. A negotiation phase before submission where countries can propose deals or threaten sanctions. A live data pipeline replacing the static JSON with World Bank and EDGAR API feeds. Long-term, a standard pre-negotiation stress-testing tool for COP delegations.

Built With

Share this project:

Updates