Gödels machine
The previous version of this site: a small program draws on a screen. A search compares possible rewrites, accepting a higher score when it can, or trying a new configuration near its best.
A sentence about itself
In 1931 Kurt Gödel, a logician in his mid-twenties in Vienna, found a blind spot in arithmetic. Any consistent set of rules strong enough for ordinary arithmetic, rules a machine could check, leaves true statements about numbers it can never prove.
His way in was a sentence that talks about itself, roughly: "this sentence has no proof under these rules". If the rules proved it, they could also check that proof, contradicting what the sentence says. So if the rules are consistent, it stays unproved, which is what it says. True, and out of reach.
The hard part was making arithmetic, which only talks about numbers, say "this sentence". Gödel turned every formula into a number. Give each symbol a code: say 0 is 1 and = is 2. The formula 0 = 0 becomes the codes 1, 2, 1. Raise the first prime to the first code, the second prime to the second, and so on, then multiply: 2¹ · 3² · 5¹ = 90. A number splits into primes in only one way, so 90 reads back as 0 = 0. Formulas become numbers, and maths can talk about maths.
A machine that waits for a proof
In 2003 Jürgen Schmidhuber pointed the same trick at a program. His Gödel machine may rewrite any part of its own code, including the part that searches for proofs, but only once it has proved that the rewrite raises its utility: a score written, with a description of its hardware, into its starting axioms. The paper calls this globally optimal relative to its utility and axioms: the machine must prove that switching now beats continuing its proof search.
Gödel is in it twice: the machine reasons about its own code, as his formulas reason about formulas, and his theorem is its limit. Some changes that would help have no proof it can find, so it never makes them.
The idea came back in 2025 with the proof swapped out. Sakana AI and the University of British Columbia described the Darwin Gödel Machine: coding agents that modify their own code and are evaluated on programming benchmarks. It keeps an archive of agents, including branches that may help later without scoring better at once. A test instead of a proof. The tools that build this site make the same trade: an agent may change the code, but the change lands only after the tests pass and a model from another family has reviewed it. Not proof, but a gate.
What the old site did
I thought it would be fun to turn the theory into something you could see and play with in the browser.
The previous version of this site simulated a Gödel machine. It started deliberately dismal: two instructions, a near-black fill and a dim green band. PROVE started a search; unless the visitor asked for reduced motion, the machine also searched by itself every nine seconds. The prover listed every rewrite it could imagine (add a shape, tune or nudge one, remove one, add a colour, name a run of instructions as a motif and place it elsewhere) and tried them likeliest first, showing its checks for the first few failures and the accepted move: is it well formed, can this browser afford it, does the score rise, has the machine been here before. The first rewrite to pass every check changed the program, sometimes changing the drawing too.
The score, u, was a formula: detail, colours actually painted with, motion and reuse, minus predicted drawing time and a tax on every instruction. Detail and motion level off, so more is not always better. A motif was stored once and taxed at half rate, so naming things pays.
When no candidate rewrite both raised the score and passed the other checks, the search tried a weaker goal: stay no more than 0.35 below the best recorded score and avoid the last 256 remembered configurations. Every search still tried improving moves first. If neither kind of move passed, the program stayed put. Not better, only different.
When browser storage was available, it saved the program, logbook and recent history, so returning visitors could resume the run. Screens lit up as it went, among them a logbook it wrote about its own run and a prime-power number whose digits flowed through a portrait of Gödel. The multiplication followed Gödel's numbering idea, but this encoding discarded some program information.
The "proofs" were checks. A true Gödel machine must prove a claim about expected utility, accounting for the cost of continuing its search. This one calculated two scores and compared them.
The struggle
The code keeps notes of what went wrong. When motifs could hold full-width bands, stamped copies flooded the screen with flat colour, which the formula rewarded and which looked like damage. Nesting dithers four deep froze the renderer. Without the novelty check during the climb, it climbed back into states it had drifted from and swung between two for ever. So a motif became a shape, not a backdrop, and novelty came to bind in both phases.
The hardest part for me was making it look and feel as if it was learning: how much of the loop to show, and when.
It was the site for about three months, a placeholder until I had somewhere to keep writing. It still runs, so watch it yourself (opens in a new tab).
The machine had its own line about Gödel: "He proved that some true things cannot be proved. I only do what I can prove. We were never going to get along."
Sources
- program instructions and motifs
- the screen pixels, flat fills
- u: detail, colour, motion, reuse, minus cost and size
- prover
- program instructions and motifs leads to the screen pixels, flat fills: expand, interpret
- program instructions and motifs leads to u: detail, colour, motion, reuse, minus cost and size: score
- prover leads to program instructions and motifs: rewrite while u can rise, then drift near the best
- u: detail, colour, motion, reuse, minus cost and size leads to prover
- Run
- program instructions and motifs
- the screen pixels, flat fills
- Two instructions, two colours
- Pixels, a 3×5 font, flat fills
- Score checks, then novelty checks
- Its program, in your browser
- Program symbols as a prime-power number
The climb ends; the machine does not.