Two Worlds: Simulate a Policy Before It Becomes Reality
Inspiration
What if you could test a policy before the real world has to live with it?
From transportation and urban planning to public spending and infrastructure, policy decisions affect thousands of people, yet their consequences are difficult to predict before implementation. For example, Ontario's 2024 move to remove protected bike lanes on Bloor, Yonge, and University raised concerns about the cost of reversing existing infrastructure, estimated at more than $48 million across the three corridors.
We built Two Worlds, a policy simulation platform that transforms natural language questions into interactive 3D simulations. Users can compare a baseline world with one modified by a proposed policy, observing how individual decisions and economic outcomes change.
Unlike AI systems that simply describe hypothetical outcomes, Two Worlds uses a rule checked simulation engine, traceable event records, and explicit uncertainty labels. Our goal is to make policy experimentation more transparent, reproducible, and accessible.
What it does
Ask a question. Change the world. See what happens.
1. Translate policy questions into simulations
Users describe a proposed policy in plain English. A GLM 5.3 flash model hosted on Vultr Serverless Inference compiles the prompt into structured JSON representing supported simulation parameters.
A shared experiment engine allows different interventions to run through the same pipeline rather than requiring a separate simulator for every question. Our current transportation environment supports changes to transit fares, cycling infrastructure, car lanes, parking, traffic signals, and subway frequency. Unsupported questions are flagged as speculative / not estimable instead of producing fabricated results.
2. Simulate two versions of the world
Two Worlds runs baseline and policy scenarios using the same synthetic population, starting conditions, and random seed, making their outcomes directly comparable.
Our initial environment models a 619 metre stretch of Bloor Street West in Toronto, incorporating 925 buildings, 243 businesses, mapped crossings, cycling infrastructure, TTC schedules, and background traffic calibrated against City turning movement counts.
Within this environment, 19 synthetic people make decisions about commuting, errands, budgets, and travel options. An explicit scoring rule determines their choices, while a game master validates movements, signal waits, transit boardings, payments, and business visits. Every action becomes a committed event that can be audited and replayed.
The experiment.v2 engine supports reproducible runs and versioned sensitivity tests, with 87 automated tests covering the world, engine, compiler, and API.
3. Visualize and measure the impact
An interactive Three.js visualization replays the simulation's actual events, letting users follow individuals and compare their behaviour across both worlds. See Impact highlights people whose decisions changed under the proposed policy.
The visualization, charts, and economic report consume the same RunResult, ensuring they reflect a consistent execution. Household spending, business receipts, and transit revenue are calculated from recorded events and reconcile within the model.
Sensitivity reruns test whether conclusions hold across different assumptions. When outcomes change direction or conflict with published evidence, the system flags the discrepancy. For example, one transit fare experiment produced an estimated response five to twelve times stronger than published estimates. Rather than presenting it as a reliable forecast, Two Worlds flagged the result. Effects beyond the model's capabilities, such as injury rates and citywide impacts, are labelled not estimable.
4. Evaluate potential public reactions
Two Worlds also includes 100 persona agents based on real survey respondents. Each rates a policy from 1 to 5 and explains its reasoning.
We developed a human supervised research loop to tune persona instructions against Twin 2K 500 survey data. On combined policy and pricing questions, the final agents matched respondents' answers 80.8% of the time, compared with 75.6% for the untuned baseline and 74.4% for the most common answer.
These survey style reactions supplement the analysis but do not influence the simulation outcomes.
How we built it
The world (James): Integrated City of Toronto open data, 3D building massing, OpenStreetMap, and TTC GTFS to construct the street environment. Background traffic was calibrated against June 25, 2025 turning movement counts, with a reported daily fit within 0.6% at both ends.
The simulation engine (Meet): Built experiment.v2 for paired experiments, legal action validation, event based metrics, deterministic replays, and versioned sensitivity reruns. The system has 87 automated tests.
The persona autoresearcher (Steven): Developed a human supervised loop that tunes Claude Haiku persona instructions using individual hypothesis tests, repeated run noise estimates, code computed checks, and human approval. Research annotations from Papiers informed selected rounds.
The experience (Aadit): Engineered the end to end interface using JavaScript and Three.js, integrating natural language policy inputs, event driven 3D replays, synchronized baseline versus policy comparisons, impact tracking, and economic reports generated from a shared RunResult.
Infrastructure Vultr: Cloud Compute hosts the application and runs experiments and sensitivity sweeps, with browser side execution as a fallback. Serverless Inference runs GLM 5.3 flash for structured policy compilation. Vultr Clef independently reviewed 448 trip decisions, with 91% agreement and zero errors across 340 live calls. Its judgments are recorded separately and do not determine simulation outcomes.
Challenges we ran into
Building a shared engine: Supporting different interventions through one pipeline without hard coding a separate simulator for each policy.
Maintaining consistency: Ensuring every visible agent action corresponds to a validated event and that visualizations and economic reports use the same underlying results.
Handling uncertainty: Testing sensitivity to assumptions and identifying when internally consistent outputs conflict with external evidence.
Evaluating AI personas: Improving simulated responses without overfitting to evaluation data or mistaking random variation for progress.
Accomplishments we're proud of
Built an end to end pipeline connecting natural language prompts, structured policy parameters, validated agent behaviour, interactive 3D replays, and event based economic reporting.
Created a shared simulation engine supporting multiple policy interventions within one environment, with traceable metrics and reproducible experiments.
Developed a human supervised persona research loop evaluated against real survey responses.
Integrated Vultr Cloud Compute, Serverless Inference, and Clef into a working application.
What we learned
A simulation is only as useful as its willingness to admit what it cannot predict.
Our experiments showed that a model can enforce rules and produce internally consistent results while still misestimating real world behaviour. Sensitivity analysis and comparisons against published evidence help identify these limitations. We believe trustworthy simulations should communicate not only their results, but also the assumptions and uncertainty behind them.
What's next for Two Worlds
Expand the range of supported policies and environments, add more Toronto streets, integrate Papiers research directly into the simulation workflow, and validate behavioural rules against real travel diaries. Over time, we aim to make the same architecture reusable across more policy domains as the necessary data and validated models become available.
Built with
JavaScript, Node.js 22, Three.js, Python, Claude Haiku 5.5, Claude Opus 5.5, Vultr Cloud Compute, Vultr Serverless Inference (GLM 5.3 flash and Clef), Papiers, Caddy, City of Toronto Open Data, TTC GTFS, OpenStreetMap, and Twin 2K 500.
Built With
- anthropic-api
- caddy
- claude
- glm-5.3-flash
- gtfs
- javascript
- node.js
- openstreetmap
- papiers
- python
- three.js
- toronto-open-data
- vultr
- vultr-clef

Log in or sign up for Devpost to join the conversation.