Atomic Games

Playable explanations of real systems

Prose tells you the rules. A simulation lets you poke them. Only a game makes you commit to a belief and pay for being wrong — and that payment is where conceptual understanding actually comes from.

Each game here takes one system, finds the part of it you cannot see, puts a lever on it, and then makes winning impossible without understanding it. They are single HTML files: no build step, no network, no tracking, no storage. Open one and it runs.

The games

Inside the Encoder →

What H.264, HEVC and AV1 actually decide, and why two files at the same bitrate can look nothing alike. Seven levels running a real block-based codec written into the page — a genuine 8×8 DCT, deadzone quantizer, Exp-Golomb entropy coder, motion compensation against reconstructed references, and a rate–distortion mode decision. Every bit count and every decibel you see was produced by actually encoding something.

video compression · rate–distortion · ~25 minutes

How they are built

With the generalized Atomic Intrinsic Integration method. The original was defined by Echeverría, Barrios, Nussbaum, Améstica and Leclerc for games teaching conceptual physics, fusing intrinsic integration (Habgood & Ainsworth) with an atomic analysis of game structure (Koster, Cousins, Cook), and validated experimentally against a non-AII version of the same game. This repository uses a generalization of it from physical laws to arbitrary systems — codecs, protocols, markets, caches, supply chains.

The short version:

  1. Model the system — levers, mechanisms, readouts, coupling, and the conserved quantity nobody can conjure more of.
  2. Write down the misconceptions. They are the real specification: a level that cannot be lost by someone holding the wrong belief is not attacking anything.
  3. Atomize — one lever per low-level atom, one readout per mechanism, the coupling drawn beside its parts.
  4. Put the learning on the critical path to winning. Optional learning is skipped learning.
  5. Scaffold the invisible state, then fade it — present, degraded, absent, inverted. Scaffolding left in place is a trap: players beat the game by trial and error and learn nothing.
  6. Charge a Reflection Tax. A challenge is doing its job when a wrong action costs more than a moment of thought.

Two rules these games keep

Source: github.com/alejandroechev/atomic-games. Every game is one self-contained file you can download and open offline.