Pulse
A living-city simulation where about 150 residents keep living whether you watch or not.
- Role
- Developer on a team project: simulation engine, server and 3D web client (every commit so far)
- Dates
- Nov 2026 – present
- Status
- In development · team project
- Stack
- TypeScript, three.js, Fastify · deterministic engine
Pulse, screen by screen
In short
Deterministic by design
The random-number state lives inside the world, so cloning it forks an identical future; experiments and forecasts compare branches that differ only by the intervention.
AI at the edges, never in charge
A model turns plain English into commands from a 33-action allowlist, validated with Zod and executed atomically with rollback; the offline rules parser covers the same vocabulary.
Every event knows its causes
Major events record their causal parents, so “Why is Maya unhappy?” walks the real chain, and a theft investigation draws its evidence from what the simulation recorded.
The problem
City games usually stop when you look away, and their residents are props: you cannot ask why something happened or trust that a what-if changed only what you changed.
- A simulation people watch needs a world that is interesting without scripted events.
- A what-if is only meaningful if the two futures share the same randomness.
- Language models are useful for interpretation and voice but cannot be trusted to own state.
Results
- tests passing, including the brief’s 20 acceptance tests
- 52
- allow-listed World Console actions
- 33
- fastest simulation speed
- 120×
Measured on 9 November 2026 on a local build.
Full engineering notes
Summary
Pulse is a living-city simulation set in Meridian, a fictional city of about 150 residents. Each person has a job, a home, money, family, feelings, memories and a daily routine, and the city keeps running whether anyone watches. The city sits in a whole simulated country: its other cities trade with Meridian, sending produce, fish, timber and imports by truck and ship along real routes, and residents can move away. You can open any life, change the world through a plain-English World Console, ask why something happened and walk the real chain of causes, solve a theft that actually happened in the simulation, and fork the city to test a what-if. The engine is deterministic: the random state lives inside the world, so a forked future differs only because of the change you made. Each visitor gets a private world saved in their own browser. Language models are optional and sit at the edges: they turn a request into allow-listed commands and phrase text from facts, but never write state, and every feature has a rules-based twin that works offline.
My role
What I owned
- The deterministic engine: world generation, utility-AI decisions, needs, memory and reflection, social life, economy, weather, ecology, life course, and the event log with causes.
- The server: authoritative 100 ms loop at 1× to 120×, Fastify and Socket.IO, SQLite saves and checkpoints, and the optional AI gateway with rules fallbacks.
- The 2.5D three.js city and the React panels: People, Investigations, Experiment lab, Director and Studio film export.
What I did not own
- Pulse is a team project; the commit history so far is mine.
- Open-source libraries (three.js, React, Fastify, Socket.IO, Drizzle, Zod) and the optional Google Gemini models.
Stack and release record
Platforms
Web (live prototype)
Built with
TypeScript, React 19, Vite, three.js, Tailwind CSS 4, Zustand, Fastify, Socket.IO, SQLite with Drizzle, Zod, Google Gemini (optional), Vitest, Playwright, Google Cloud Run
Testing and delivery
Vitest covers the brief’s 20 acceptance tests, 7 demo scenarios, a realism report and the HTTP API (59 tests); Playwright runs the city, inspector, console, investigation and Studio export against the production build in installed Chrome.
Status in full
Working prototype, live on Google Cloud Run. Each visitor gets a private world saved in their own browser; the first load after a quiet spell can take a few seconds. The World Console uses Google Gemini on the free tier and falls back to built-in rules when its limits are hit. Source is private.
Hiring interns for January 2027?
I’m available full-time from 25 January to 23 April 2027, and for graduate roles in Malaysia or overseas from August 2027. Email is the quickest way to reach me.
- Subang Jaya, Malaysia
- local time
yousofselim2@gmail.com
