The Synthetic Civilization Simulator is a deterministic world simulation engine focused on how large-scale structures emerge from local behavior.
Instead of scripting outcomes, the simulator models interacting systems where trade, migration, cooperation, and conflict arise naturally from pressure and incentives. If something breaks down in the world, it’s because the conditions allowed it not because an event was injected.
I started building this because I wanted a way to pause a simulation, inspect a settlement, and understand why it’s struggling or growing instead of just watching things happen randomly.
| Deterministic | Bottom-Up Emergence | System Depth |
|---|---|---|
| Same seed, same history. Useful for debugging and long-run analysis. | Nations and borders are not predefined they appear when agents cluster and interact. | Systems track pressure, demographics, influence, economy, and internal stability signals. |
The simulator includes a built-in UI for inspecting the world in real time.
- Trade Routes: Links grow or shrink depending on activity and stability.
- Stress Signals: Economic, Security, Social, and Environmental factors help explain internal health.
- Era History: The engine identifies longer periods like expansion or crisis based on system trends.
The engine follows a layered model where no system has full global knowledge.
-
Agents (Micro)
Act on local information. They look for safety, resources, and opportunity. -
Settlements (Meso)
Aggregate agent behavior into metrics like pressure and stability. -
Civilizations (Macro)
Shape incentives through policy, diplomacy, and cultural alignment. -
The Loop
Micro → Meso → Macro → Feedback → Micro
Every simulation tick follows a consistent order so runs remain reproducible:
World Update → Agent Interactions → System Processing → Civilization Updates → Snapshot
git clone https://github.com/sajidurdev/SyntheticCiv.git
cd SyntheticCiv
npm installnpm startOpen:
http://localhost:3000
For additional diagnostics:
SIM_DEBUG=1 npm start- Deterministic RNG
- Spatial indexing for agent proximity
- Dynamic trade route formation
- Settlement-level market pricing (local, emergent)
- Price-aware barter valuation
- Route arbitrage / price-gap coupling
- Civilization diplomacy matrix
- Culture
- Deterministic market update ordering
- Settlement market inspector panel
- Merchant arbitrage agents (planned)
- Cross-settlement price diffusion (planned)
If you’re interested in simulations, systems modeling, or performance work, contributions are welcome.
Good areas to explore:
- UI improvements
- simulation performance
- new systemic mechanics
- debugging and visualization tools
Try to keep changes deterministic and avoid introducing hidden randomness into the tick loop.
This is one of the most ambitious projects I’ve worked on so far. I’ve always been curious about how small local changes can ripple outward and reshape an entire world, and this simulator is my attempt to explore that idea in a structured way.
The project is still evolving, and I’m continuously refining systems as I learn more. If something feels unclear or could be improved, feel free to open an issue or share feedback thoughtful suggestions genuinely help push this forward.
Thanks for taking the time to check it out.

