I simulated 20 years of AI taking jobs. The rich countries lose first.
Most articles about AI and jobs give you one number ("300 million jobs exposed!") and no way to check it. I wanted the opposite: a model where every figure can be traced back to its data and assumptions, and where anyone can change those assumptions and see what happens. That turned into three brow

Most articles about AI and jobs give you one number ("300 million jobs exposed!") and no way to check it. I wanted the opposite: a model where every figure can be traced back to its data and assumptions, and where anyone can change those assumptions and see what happens.
That turned into three browser simulators and a free book, The ReplaceMind. This post is about how the tools are built.
The core is a macroeconomic model in plain Python and NumPy: about 1,500 lines that simulate three regions (advanced, emerging and low-income economies) from 2026 to 2046, with AI and robot adoption curves, labor demand, wages, unemployment and public finances.
I didn't want a server, so the Economy Model page loads Pyodide (CPython compiled to WebAssembly), installs NumPy, fetches the model's.py files and imports them like a normal package:
The third tool asks a question the model doesn't answer directly: where will replacing human work create the most social pressure?
The rule is deliberately simple and written on the page:
It's drawn with d3 and topojson: 207 countries, the 50 US states plus DC weighted by their own job mix (BLS data), and large cities for China, Russia, Canada, Australia, Brazil and India.
The result surprised me. The biggest increases are not in fragile states but in rich ones, where machines replace the most work:
[IMMAGINE: social_tension_2046_US_EN.png]
It's an index, not a forecast of riots, and the page says so. But it makes a point that single headline numbers hide: the effect depends on where the machines actually go.
The part that took the most discipline: the book, the simulators and the analysis all read the same JSON files produced by the same Python module. If I change an assumption, I regenerate the outputs, and the book's tables, the job simulator and the map all change together. No numbers typed by hand into a chapter.
The model has assumptions I'm not sure about, and I'd rather hear criticism now:
Try it: thereplacemind.com The book (free, PDF and EPUB, Italian and English): thereplacemind.com/book Code and data: github.com/0xENX/aimodel_replication