Watching the substrate run

Generated 2026-09-06 19:02 UTC from revision f15ede4 by scripts/render_lattice_page.py · working tree had uncommitted changes when this was generated. Self-contained: no server, no network, no fonts or scripts from anywhere else. Re-run the script to rebuild it.

What am I looking at? — what this project is doing, and how to read every mark on this page

What we are working on

This project is trying to work out, from the outside, what a system is for — what would count as its goal, and how much of what it does deserves to be called competence rather than coincidence. That is the current phase: goal and competence discovery.

Everything in the phase now runs on one piece of shared machinery, and this page is that machinery running. It is a line of positions, each holding at most one item. Items follow rules that can only ever look at their immediate neighbours. Nothing anywhere in it knows what the line is supposed to end up looking like.

The sorting runs are asking one question. A jumbled line of numbers puts itself in order. There are two very different stories about that, and they look identical if you only check the ending. Either the system is in some real sense pursuing order — in which case damaging it should show it recovering, and it should get there by more than one route — or it is only rolling downhill into the nearest resting place, the way water finds a drain, with nothing goal-like about it at all.

Telling those two apart is the work. The runs below are the beginning of it: the same task under three different control arrangements, the same task again with parts of the system broken, and the same machinery doing something that is not sorting at all.

How to read these pictures

One column
One position on the line. The leftmost position is drawn on the left. There are 24 of them in the sorting runs and 121 in the cellular-automaton runs.
One row
The whole line at one moment. The top row is the starting arrangement.
Downwards
Time. Reading a picture from top to bottom is watching the line change. The pictures fill in as they play.
Colour
Which item is sitting in that position. Colour follows the item's number, low to high, along this ramp:
item 0item 23
So a fully sorted line is one smooth left-to-right sweep of colour, and a jumbled line is speckled. In the cellular-automaton runs there are only two possible states, drawn filled and empty.
The horizontal line
Drawn across a sorting picture at the first moment the line was completely in order. Runs continue past it, because most of these controllers have no way of knowing they have arrived.
An operation
One evaluation of a rule: one moment where the machinery looks at a small neighbourhood and decides something. Looking costs the same as acting, so a supervisor that patrols and finds nothing still runs the meter up. That is deliberate — it is what makes the operation count a price tag on an arrangement rather than a measure of how fast it is.
Pairs out of order
Also called inversions: how many pairs of items are the wrong way round anywhere in the line, counting distant pairs too. It is zero exactly when the line is sorted. No single item could work this number out from its own neighbourhood; only an outside observer can.

Sorting, under three different control arrangements

The same 24 items, the same starting shuffle, and the same local rule — swap us if we are the wrong way round. Only the arrangement that decides who acts next differs. Each row is the line after every 8 interactions; 800 interactions are shown.

Decentralized

Nobody is in charge. A neighbouring pair is picked at random, and one of the two items in it decides whether that pair should swap. It never stops and never announces that it is finished.

 

Watchdog

A supervisor walks the line left to right, over and over, checking every pair before it acts. It is charged for each check, including the ones that find nothing wrong, so its meter keeps climbing.

 

Closed loop

The same supervisor, except it stops once a complete pass finds nothing to do. Cheapest of the three, and blind afterwards: whatever goes wrong later happens with nobody watching.

 

Watch the operation counters rather than the pictures. All three arrangements reach the same sorted line. They do not pay the same price for it, and two of them go on paying after they have arrived.

The same substrate, differently configured

These are elementary cellular automata, and they are not a separate program. They run on the same lattice, the same fault model, the same operation currency and the same observation rules as the sorting runs above. Three settings differ: items are no longer conserved (a cell's state is rewritten rather than moved), the neighbourhood is the three cells centred on a position rather than an adjacent pair, and every position updates at once instead of one at a time. That is the whole difference. Each starts from a single filled cell in the middle of a ring of 121 cells; each row is one synchronous update of the whole ring, costing 121 operations — one for every cell.

Rule 90

Draws the Sierpinski triangle. Its rows are binomial coefficients modulo 2 — a result worked out on paper long before this code existed, which is what makes it usable as a check.

 

Rule 110

Capable, in principle, of running any computation at all, given the right starting line. From a single filled cell it produces this drifting, repeatedly interrupted texture.

 

Rule 30

The standard chaotic one. Its left half settles into a repeating pattern and its right half does not, and a small change to the starting line changes all of it.

 

The point of this section is negative, and it is the reason the substrate is worth having: it is not a sorting program with extra options. The sorting behaviour above is one configuration of a general machine, so a claim about what the sorting runs are doing has to survive the machine also being able to do this.

What damage costs

Across 25 different starting shuffles, the undamaged runs needed a median of 629 operations to first put the line fully in order, and the damaged runs 1,010 — about 1.6 times as many for the same result. The two pictures below are one of those 25 shuffles, animated; a single pair of runs is not the measurement, because the failures and the schedule are drawn from the same random stream and one damaged run can finish sooner than one clean run by luck. Both runs below use the decentralized arrangement — the one with nobody in charge — with the same starting shuffle. A frozen item still gets moved when a neighbour is the one that acts, so it is a drag on the line rather than a wall across it; the outline on it lets you follow where it ends up. Each row is the line after every 12 interactions; 1,200 interactions are shown.

Undamaged

Nothing is broken. Every item acts when it is asked to, and every attempted action succeeds.

 

Damaged

Three in ten attempted actions fail outright, and item 5 (outlined) never acts on its own initiative.

 

The damaged line still gets there. That is the finding that makes the opening question sharp rather than rhetorical: recovering from damage is exactly what you would expect from something pursuing a goal, and it is also exactly what you would expect from a ball rolling to the bottom of a bowl you keep nudging. Distinguishing the two needs damage the bowl cannot absorb, and that is what the phase is building towards.