Skip to content
← All work

The Veil · El Velo

A playable Rawls experiment: legislate from behind the veil, then be born into your own society.

Private build ReactTypeScriptZustandCapacitor
The Veil · El Velo: A playable Rawls experiment: legislate from behind the veil, then be born into your own society.

Build complete and playable. Public release pending. Code private.

The idea

Rawls’ veil of ignorance is a thought experiment: design a society without knowing who you will be inside it. The Veil makes you play it. You set six policy levers from behind the veil, then you are born at random into the society you wrote, and you live that life. Then another. Rulesets that protect you wherever you land are the ones that win, and the difference principle stops being a lecture and starts being a strategy you discover.

What I built

The model came first and the interface came last. The simulation is a pure TypeScript engine that runs headless in Node and imports nothing from the UI. Before any screen existed, a Monte Carlo harness had to prove the design thesis: balanced, difference-principle rulesets must beat both pure equality and pure laissez-faire, with a real interior sweet spot. The rule I built by: if an extreme wins, the model is wrong. Only after that gate passed did the game get a face.

The face it got is deliberately editorial: serif typography, quiet motion, Spanish first with a natural English version. React and Zustand on top of the engine, an error boundary and reduced-motion support because polish is part of the argument, and Capacitor wrapping the same build for native, with share and haptics behind a platform check.

The hard parts

01

Making philosophy falsifiable

Encoding “the difference principle wins” as a testable, quantitative claim forced every vague intuition about fairness into a number that could fail the build.

02

The model is the soul

Keeping the engine import-free from the UI means the same simulation that passed the mathematical gate is the one you play, byte for byte. No “demo physics.”

03

Feeling, not lecturing

The game never tells you what is right. The repetition of lives does the arguing, and the design job was resisting every urge to add a moral in text form.

What’s next

A public web release under my own domain, then richer interactions between the levers.