Chapter 1

The Mechanics of the Simulation

The primary objective of this project is to generate quantifiable data for discussion rather than relying on subjective opinions. Cammelot is a digital representation of a Dutch town that operates directly within a web browser; it follows the lives of forty-five citizens with names, ages, and medical histories drawn from CBS and RIVM datasets. As these digital citizens move through the town, they develop illnesses, visit general practitioners, and wait for specialist referrals. When the healthcare system fails to process them in time, these agents experience health declines that are recorded and measured.

Every event within Cammelot is traceable and backed by real-world figures. Consultation costs are taken from the NZa tariff tables, and waiting times are checked against the Treeknorm, which is the legal standard for care access in the Netherlands. By keeping the population small at forty-five citizens and three GPs, the simulation allows us to track every individual outcome while still producing enough data to see clear patterns across 200 separate runs.

The Town Environment

The simulation map is a grid of 64 by 48 tiles where buildings are placed in fixed positions. There are three GP practices spread across the town and one regional hospital where specialists work. I chose a 16-bit “retro” visual style similar to a Super Nintendo game because it prevents the user from being distracted by high-end graphics; instead, the focus remains entirely on how the system behaves. You can watch the town much like an ant farm, where the goal is to observe patterns such as clusters of citizens forming queues around a building when the system becomes overloaded.

64×48
Tile Grid
16px
Tile Size
4
Buildings

The Citizens as Autonomous Agents

Each citizen in the town is an “agent” with a persistent identity and a memory of their own experiences. They have specific jobs, family structures, and personalities that influence their behavior. Their health profiles are built using RIVM data, which means the likelihood of a citizen having a condition like type 2 diabetes or dementia is based on their age to match current Dutch population trends.

These citizens are more than just data points in a spreadsheet; they are state machines that remember every GP visit and every week spent on a waiting list. Disease progression is managed through a Markov chain, which is a mathematical model that determines how a patient moves from being “healthy” to “mildly ill” and eventually “critical.”

To give an example of how this works, consider a citizen who has both COPD and heart disease. The simulation uses “relative risk multipliers” from medical research to show how these two conditions interact. Having both illnesses makes each one progress faster, which means that a long wait for a specialist is more dangerous for this person than for a citizen with only one health issue.

Attribute Source How It’s Used
Age distributionCBS 202420% are 65+, matching Dutch vergrijzing
Disease prevalenceRIVM 202496% of 75+ have ≥1 chronic condition
ComorbidityRIVM 202445% of 75+ have ≥2 conditions
Mortality by ageCBS 2024Baseline natural mortality: ~48/year per 5,000
Life expectancyCBS 2024M: 80.5 years, F: 83.2 years

The Healthcare Providers

The simulation includes three GP practices and one hospital with departments for cardiology, endocrinology, and pulmonology. These providers are also agents with their own capacity limits and administrative burdens.

Provider Type Capacity Source
Dr. de JongGP2,400 patientsLHV normpraktijk
Dr. BakkerGP2,000 patientsLHV normpraktijk
Dr. VisserGP1,800 patientsLHV normpraktijk
CardiologySpecialist12/weekNZa capacity norms
EndocrinologySpecialist15/weekNZa capacity norms
PulmonologySpecialist10/weekNZa capacity norms

Every interaction has a financial value. A regular GP consult is priced at €12.43, while a day in the hospital costs roughly €850. These are not estimates; they are the actual rates used in the Dutch healthcare system.

How Time and the Simulation Loop Work

The simulation moves forward in “ticks,” which are small steps of the internal clock. Every tick represents a moment where the system checks the state of every citizen and provider. During each tick, several things happen at once:

Per-tick simulation loop
  1. The system checks if a citizen’s disease has progressed based on the Markov probabilities.
  2. If a citizen is waiting for care longer than the Treeknorm allows, their health points begin to drain.
  3. Citizens who feel sick decide to walk to their GP.
  4. GPs see patients and send referrals to the hospital via digital messages.
  5. Specialists process their queues in the order that patients arrived, provided they have the capacity.
  6. Any citizen whose health points reach zero is removed from the active simulation and replaced with a grey “ghost” sprite.

What the Simulation Measures

We collect four main types of data that match the indicators used by the IZA (Integraal Zorgakkoord) to judge healthcare performance.

☠️
Mortality
⏱️
Wait Times
Costs
⚖️
Fairness

Mortality: We track how many deaths are caused specifically by system delays. We look at how many weeks a patient waited beyond the legal limit and which specific bottleneck caused the fatal delay.

Wait Times: Every wait is measured against the Treeknorm standards, such as the four-week limit for diagnostics and the seven-to-twelve-week limit for treatments.

Costs: The system calculates the total cost of all consultations and hospital stays. It also calculates how much money is saved when a hospitalization is prevented, which is estimated at €5,845 per case.

Fairness: We look for structural bias by checking if certain groups, such as the elderly or people with multiple conditions, are getting worse results than others.

The Importance of 200 Simulation Runs

A single run of the simulation can tell a specific story, but running it two hundred times is necessary to find a reliable pattern. Because the simulation uses “stochastic” elements, which means it involves random chance, every run is slightly different. One citizen might survive in one run because they were lucky enough to be at the front of a queue, but they might die in the next run because the doctor was on sick leave.

By running the scenario 200 times, we can use standard statistics like means and confidence intervals to see the “signal” through the “noise.” This allows us to say with confidence whether a change, such as adding an AI scribe, actually improves the system or if the results were just a matter of luck. This methodology is the minimum required to make credible claims about how system-level changes affect the health of a population.

Why 200? With 45 citizens per run, individual variation is high. At N=200 runs, the standard error of the mean is small enough to detect effect sizes of 0.3 or larger at p<0.05. This is the minimum needed to make credible claims about system-level changes.

Data Sources & References

  1. CBS - 172 duizend mensen overleden in 2024 (mortality statistics)
  2. CBS - Bijna een derde werktijd zorg gaat op aan administratie (~31% admin burden)
  3. CBS / AZW - Ziekteverzuim in zorg en welzijn 2024 (7.3–8.9% sick leave)
  4. CBS / VZinfo - Levensverwachting per leeftijd en geslacht (M: 80.5, V: 83.3 jaar)
  5. RIVM / VZinfo - Chronische aandoeningen en multimorbiditeit (96% of 75+ has ≥1 chronic condition)
  6. ABF Research / VWS - Prognosemodel Zorg en Welzijn (301,000 worker shortage by 2035)
  7. NZa - Maximumtarieven huisartsenzorg 2025 (€12.43 regulier consult, BR/REG-25136)
  8. NZa / Staat van VenZ - Overschrijding Treeknorm wachttijden (specialist wait time violations)
  9. LHV - Peiling Administratieve lasten huisartsen 2023 (GP admin burden survey)
  10. IZA / Rijksoverheid - Integraal Zorgakkoord 2023–2026 (€2.8B transformation budget)
  11. Chen et al. - Risk of cardiovascular comorbidity in COPD: systematic review. Lancet Respir Med 2015; OR 2.46 for CVD.
  12. ESC - 2021 ESC Guidelines on CVD Prevention in Clinical Practice. Eur Heart J 2021;42(34):3227–3337. Diabetes RR≈2.0, Hypertension RR≈1.8.
  13. Park et al. - Generative Agents: Interactive Simulacra of Human Behavior. Stanford/Google, 2023.