comp-minds research
Research blog·

Divisible Agency Emerges in a 1,058-Weight Neural Cellular Automaton Programmed Directly by an AI Agent

AuthorArash Moaddel PhD
The agent that wrote the weightsClaude Opus 5.5 (Anthropic), in Claude Code

A grid of identical cells, each seeing only its eight neighbours, can behave like a small creature: a yellow blob that smells food through a maze, walks to it, stretches into single file to squeeze through a gap narrower than itself, eats, grows, and explores when there is nothing to smell. We asked an AI agent to make a neural cellular automaton do this by writing its weights directly. Nothing was trained, no data was used and no gradient was computed. Of the 47,083 numbers in the network, 1,058 are non-zero. No cell is told where the food is or where the body is; each blob cell decides for itself, four times in every 48-step period, whether to move. So there is no "the blob" to cut: slice the body in two and each half sets off for the food nearest it. In 456 recorded behaviour runs, not one cell was ever lost or created except by eating. We also report, with numbers, where it fails: bodies of six or more cells keep coming apart, and it never weighs one pile of food against another.

a, a small maze with a yellow blob and a red food pile; b, the field the cells compute, in green rings around the pile, and the trail in violet; c, one blob cell's 3 by 3 neighbourhood with its registers; d, the 48 counts of one period coloured by what happens on each.
Figure 1. The whole idea. a, the page writes only two things: the world (wall, ground and food at three grey levels in channel 0) and the blob (the register F). b, everything else the cells compute themselves: a field that is highest on the food and falls by one step per square of route (green rings), and a trail of where the blob has been (violet). c, a blob cell reads its own registers and those of its neighbours, and nothing else; twelve registers per cell. d, one period of 48 steps, the same count in every cell: four blocks of twelve, one for each direction, in which the field steps on, the blob cells decide, the intent travels back along the body, and the blob moves.

A neural network is a program whose instructions are numbers, and those numbers are almost always found by gradient descent. A new line of work, which its authors call weight-space programming, asks language-model agents to write the numbers instead[1]. Agent-written networks have been reported for small algorithmic tasks[2,3], and this week an AI agent wrote every weight of a looped transformer that solves mazes, while gradient descent on the same architecture did not find a solution in their runs[4]. These are blog posts and repositories from the last few weeks, not peer-reviewed papers, but the direction is clear.

So far, those programs compute an answer: a path, a sum, a sorted list. This article builds something of a different kind: an agent. It has a body, it has a goal, and its behaviour unfolds in a world that the reader can change while it runs. It is built as a neural cellular automaton. A cellular automaton is a grid of cells that all apply the same small rule, again and again, using only what their neighbours hold. Any such rule can be written exactly as a small convolutional network[5], and a neural cellular automaton is one whose rule is that network, normally trained by gradient descent[6]. Here the network is an existing neural-cellular-automaton graph used unchanged[5,6]: a 3 × 3 convolution, a ReLU, a 1 × 1 layer, another ReLU and a final 1 × 1 layer added to the state of every live cell. An AI agent programmed its weights directly in weight space.

Moving creatures in cellular automata are not new. Conway's glider has a long line of descendants, among them the self-propelling lifeforms of Lenia[7], and researchers have searched, by diversity search, curricula and gradient descent, for cellular-automaton creatures that move, react to obstacles and keep their integrity[8]. The blob here does related things, but nothing about it was found by search. It also has a goal, food, and it conserves its mass exactly: a cell moves only by passing itself to the square beside it.

It is tempting to call it a slime mould, and the comparison runs through this article. A Physarum plasmodium famously finds the shortest route through a maze between two food sources[9]. The blob shares some of that behaviour and none of the mechanism, and where the two differ, we say so. You can run it below. Every frame is the network itself, computed from its 1,058 non-zero weights in your browser.

Figure 2. The blob at work. A 31 × 31 maze with a 2 × 2 pile of food (red) and a 2 × 2 blob (yellow) as far apart as the maze allows. The green shading is the field the cells flood from the food, and the violet is the trail. Paint walls, ground, food or more blob onto the world while it runs, rub part of the blob out, or open an empty room; change the speed, switch on noise (σ = 0.02), or mark the cells that say GO. The status line gives the count of the period, the cells and pieces (counted by the page, never by the cells), the piles eaten, and how far the pile is, read off the field under the blob. With ⌕ Inspect, click any cell: the panel on the right shows its 3 × 3 neighbourhood, a plain reading of what it decides this step from the network's own numbers (the field step, the five conditions of a move ticked or crossed, the intent passed back, give and take, eating), all twelve registers before and after, and the units that fire, grouped by program part. A blob cell is selected and followed as the blob moves.

No cell can see the food, the maze or the blob. A cell knows its own twelve registers and those of its eight neighbours. Yet the blob finds the pile at a steady two periods per square of route, wherever it is put, and when the pile is eaten it turns to exploring the ground it has been away from longest. The page draws the colours, but the numbers come from the cells.

1,058non-zero weights, of 47,083 numbers
29 / 29piles reached, in open rooms and mazes
2.0periods per square of route, median
0cells lost or gained without eating, in 456 behaviour runs

1.Inside one cell, in 3D

Figure 3 draws the weight file as a network you can walk around: the 3 × 3 neighbourhood of twelve channels, the first-layer and second-layer units, the eleven outputs and the residual update, with every non-zero weight drawn as a wire. Click any unit to read what it computes.

Figure 3. One cell's network. Drawn from the weights: input, 3 × 3 gather, two hidden layers, outputs and residual update, each unit labelled with the program part it belongs to. Drag to orbit, scroll to zoom, click a node for a plain-language explanation. It loads three.js from a CDN when you click. Open it full screen ↗.

2.How a lump of cells finds food

Imagine a smell spreading from a pile of food. It runs along every corridor at the same speed and never goes through a wall, so the strength of the smell at any square says how far the food is by the route you would have to walk. A creature that keeps stepping onto the square where the smell is strongest walks the shortest route to the food. That is the whole strategy. The difficulty is that here there is no creature, only cells, each of which sees one square in every direction, and the creature has to arise out of them.

The agent split the job into a few ideas, each a small, named piece of the network:

Figure 4 shows the period. Every behaviour in this article is these few rules, applied by every cell, every step.

Figure 4. One period, 48 steps. Four blocks of twelve counts, one block per direction in the fixed order up, down, left, right. In each block: two counts for the readings to catch up with the last move, one count in which the field and the trail take a step, one in which the blob cells decide, seven in which the intent travels one cell back along the body, and one in which the blob moves. Hover a count to read what happens on it; the marker follows the live blob's clock in Figure 2.

3.The program, line by line

The network has 12 channels per cell, 224 first-layer units and 96 second-layer units, of which 213 and 59 carry any weight. Channel 0 is the world and is never written by the network, so the network has 11 outputs. Wall cells are not cells at all: the runtime updates only squares whose channel 0 is above 0.1.

ChannelNameWhat it holds
0IMGthe world: wall 0.0, ground 0.5, food 1.0. Written only by the page
1SCthe field: 40,000 on uneaten food, 40 less per square of route
2PUBwhat this cell broadcasts as a source: its field, or its forgotten-ground value, minus a dip under the blob
3SCNthe largest PUB of the four neighbours
4Fthe blob: 1 where a blob cell stands, 0 elsewhere
5MVa countdown: a cell that has just arrived may not decide to leave for two periods
6GO"I am going, now"
7CLKthe count of the period, 0 to 47 (stored in units of 10)
8TRLthe trail: 20,000 under the blob, 40 less at every field update since
9VSwhat this square is worth to move onto
10MXSthe largest VS of the four neighbours
11EATa food square that has been reached latches this and becomes body

The 1,058 non-zero weights fall into ten program parts and one part that does nothing, and the colours in every figure below follow them. The largest parts are the move itself (179 weights), the field (156) and the clock (146).

FIELD · 156   TRAIL · 87   WORLD · 22

Where is the food?

The one flooded field, pinned at 40,000 on food; the trail that fades over 500 field updates; and the reads of channel 0 that say whether a square is open ground or food.
WORTH · 104   DECIDE · 94

Which way, and is it my turn?

What each square is worth to move onto, with the footprint bonus and surface tension, the best of the four, and the five conditions of a move.
FOLLOW · 104   HANDOVER · 179   COUNTDOWN · 26   EATING · 36   CLOCK · 146

Move without tearing

The intent passed back along the body; the move as one decision read from both sides; the two-period countdown; eating; and the shared count with its windows.

The field: a maximum from ReLUs, with the blob in a hole

A ReLU unit computes max(0, x), which is enough to take the larger of two numbers, because max(a, b) = b + ReLU(a − b). Two layers of such units give the largest of four, which is what the field needs. Two details make it work as a smell for a moving body. First, a square the blob stands on is a worse source than its neighbours: the blob always stands in a dip three steps deep that it digs itself. So anywhere it can reach is worth more than where it is, and it never stops. Second, the trail is subtracted from what a square is worth as a source, never from the field flowing through it, so the blob's own trail cannot wall off the smell of food behind it.

The math

With STEP = 40, BIG = 40,000, TBIG = 20,000 and DIG = 80 (two steps), and F = 1 on a blob cell:

PUB = max(SC, TBIG − TRL) − DIG·F what this square broadcasts SCN = max(PUB_up, PUB_down, PUB_left, PUB_right) the best neighbour's broadcast SC ← max(PUB, SCN) − STEP off food SC ← BIG on uneaten food (a two-sided pin)

So the field is BIG − STEP per square from the nearest uneaten food, or TBIG − STEP per square from the nearest ground the blob has forgotten, whichever is higher. Food always wins while it is within 500 squares, and the field can reach BIG / STEP = 1,000 squares. Taking the cell's own PUB into the maximum makes a field whose food has gone fade evenly, one step per update, instead of flickering. The maximum of four uses the same construction as a maximum of two, applied twice, with an offset K = 50,000 that keeps every intermediate positive; a large constant MUTE = 200,000, switched by the clock and by the food marker, holds the field still between updates and on food. The field updates only on counts 2, 14, 26 and 38, so it advances four squares a period.

What a square is worth, and the decision

Each square publishes VS, what it is worth to move onto: its own broadcast, with the blob's dip given back where a cell stands, so an occupied square reads what it would read empty. Two bonuses are added. A square the blob has just stepped off, with two blob neighbours still beside it, is worth two steps more, so the cell behind closes up into the leader's footprint. An empty square touching the body on two sides or more is worth half a step more: surface tension. Each cell then takes MXS, the largest VS of its four neighbours.

On the decide count of a direction, a blob cell writes GO = 1 if five things hold: the square in that direction is open, it is empty, it is the best of the four (its VS equals MXS), it is worth more than the square the cell stands on, and the cell's countdown MV has run out. That is all a cell ever decides.

The math
VS = PUB + OCC·F + FB·[just left ∧ empty ∧ ≥ two blob neighbours] + COH·[empty ∧ ≥ two blob neighbours] MXS = max of the four neighbours' VS GO_d = AND( count = decide(d), open(ahead), empty(ahead), VS(ahead) = MXS, VS(ahead) > VS(here), MV = 0 ) AND(q1 … qk) = ReLU(q1 + … + qk − (k − 1))

OCC = 80, the occupied-square credit, gives a square the blob stands on its dip back; FB = 80 (two steps) and COH = 20 (half a step); a wall is pushed down by PEN = 1,000,000. Every value a cell publishes is a whole multiple of LAT = 20, and each comparison sits halfway between two multiples, so every test comes out exactly 0 or 1 and no register drifts to a fractional value. "Just left" is read off the trail: the footprint bonus lasts for FRESH = 6.5 steps of trail, long enough for the cell behind to get its turn and short enough to run out before the cell that left may move again, so the leader can never turn round into its own footprint.

The design inequality that matters most is COH < STEP. A tension bonus per blob neighbour was tried while the program was written and dropped: with three neighbours it outranked a step of the field, and the blob held itself together so hard it never reached the pile.

The move: one decision, read from both sides

A move has two halves. The cell that goes must clear its F, and the square it points at must set its F. If the two halves were decided separately, they could disagree, and the blob would lose or gain a cell. So there is only one decision: the cell that goes writes GO, and on the move count both squares read that same GO, the mover as "I am going" and the target as "the cell behind me is going". Give and take cannot disagree. Only the direction whose turn it is can hand anything over, so two cells can never land on one square. The follow rule uses the same trick: during the seven counts after the decision, a cell whose front neighbour has said GO in the live direction writes GO too, so the intent travels back along a file of cells and the whole file shifts on the move count.

The math
on the move count of direction d, with the square ahead in direction d and the one behind opposite to it: F_here ← F_here − GO_here give F_here ← F_here + GO_behind take (GO_behind is the same register the giver wrote) GO_here ← GO_ahead · F_here on the seven follow counts: the cell behind a going cell goes too MV ← 2 on arrival, minus 1 per period; a cell with MV > 0 may not decide, but may follow

The mass of the blob therefore changes only by eating, by construction rather than by luck. This is the same reason particle number is conserved in partitioning cellular automata, where each update is a rearrangement inside a block[13], and in number-conserving rules generally[14]. Both halves are also gated on the move count, so junk written into GO from outside cannot move anything at any other time.

The constants

ConstantValueWhy
STEP40one square of route; the quantum of everything else, large enough that a step stays readable through the runtime's noise
BIG40,000the field on uneaten food; BIG / STEP = 1,000 squares of reach
TBIG20,000the trail under the blob, and the worth of ground never visited; half of BIG, so food outranks exploring
DIG80the dip under the blob, two steps; one step would be cancelled exactly by a fading field, and the blob could freeze
FB80the footprint bonus, two steps, enough to turn round the step a just-left square has lost
COH, LAT20surface tension, half a step, and the lattice every published value lies on
K50,000keeps the intermediates of the two maximum-of-four circuits positive
MUTE, MPIN200,000switch the field off on food and between updates, and the food pin off everywhere else
OCC80the occupied-square credit: a square the blob stands on gets its dip back, so it reads about what it would read empty
PEN, MT1,000,000a wall or an occupied square is worth nothing to move onto; switches the trail off between updates
PER, CU48, 10steps per period, and the clock's unit

4.All 1,058 weights

Because every unit was written for a reason, the whole network fits on one canvas. Figure 5 shows every non-zero weight. Hover a square for what that weight does, or click a unit to follow it from its inputs to its outputs.

Figure 5. The weight explorer. W1, the 3 × 3 convolution, drawn as its 40 used rows (channel × neighbour) by the 213 used first-layer units; b1; W2, the 59 used second-layer units by the same 213 columns; b2; W3 (59 × 11) and b3. Colour shows sign and size, and bands on the unit axes mark the program parts. Click a square or a band to list one unit's incoming and outgoing weights, or filter by part.
Figure 6. How empty the network is. Non-zero against all numbers in each tensor, on a log scale: W1 has 295 non-zero entries of 24,192, b1 187 of 224, W2 473 of 21,504, b2 38 of 96, W3 64 of 1,056 and b3 1 of 11. The 1,058 split by program part, and heat maps of which channels each part reads in W1 and which part feeds which in W2. 2.2% of the numbers are non-zero, and only 78 distinct values occur.

One part is honest dead weight. 36 of the 213 used first-layer units, 104 of the 1,058 numbers, were built for a landing test that is no longer in the program: they are computed at every step and read by nothing. They are also the only units that read the corners of the 3 × 3 neighbourhood. Everything the blob does, it does with four neighbours.

5.Walking to food

Figure 7 follows one walk through a 21 × 21 maze, period by period. The blob crawls rather than slides: the front cells move, the cells behind follow, and the countdown keeps a cell that has just arrived from leaving again for two periods. In corridors two squares wide, the body strings out and gathers again as it turns corners.

Figure 7. A walk, period by period. A 21 × 21 maze run in your browser when the figure scrolls into view, 220 periods. Drag the slider or press play to scrub through the world, with field and trail. The chart gives the distance to the pile read off the field under the blob, the cells and the pieces against the period, with the moment it eats.

We measured the time to food in 29 runs: open 15 × 41 rooms with a 1-cell and a 4-cell blob at route lengths from 4 to 30 squares, two-wide mazes from 15 × 15 to 25 × 25, and two one-wide mazes. The pile was reached in all 29, at routes up to 133 squares. The time is close to a straight line in the route length: a median of 2.0 periods per square (from 1.9 to 2.75), and a fitted slope of 1.94 periods per square. Two periods per square is the countdown: a cell may move once every two periods, which is 96 steps per square.

Figure 8. Time to food is a straight line in the route. Periods until the first pile square is eaten against the breadth-first route from the nearest blob cell to the nearest pile square, for 29 runs in open rooms, two-wide mazes and one-wide mazes, with the fitted line. Hover a dot for the run and how many pieces the body was in on the way.

6.Squeezing through a gap

Leukocytes squeeze through gaps smaller than themselves while following a chemokine gradient round obstacles[15]. The blob does the same in its own way: the cells file through one at a time. In a 17 × 45 room split by a wall with a centred gap, a 3 × 3 blob put its first cell through a one-square gap at period 34 and had all nine through at period 51. On the way it stretched from 3 squares to 10 squares end to end. A 4 × 4 blob took from period 49 to period 83, stretching to 18 squares. Bodies of every size and every gap width from 1 to 5 got through and ate.

Figure 9. Squeezing through a gap. Left: a live run with a gap of 1 to 5 squares (or no wall) and a 2 × 2, 3 × 3 or 4 × 4 blob, in the 17 × 45 world of the measurement. Right: the measured run of the same choice: its length end to end, the cells through the wall, the pieces, with the transit shaded. Below: the sweep of every gap and size, first cell through and whole body through. Click a point to run it.

The surface tension has to be weak enough to let this happen, and that is its cost. A 2 × 2 blob through a gap two or more squares wide stays in one piece and is compact again at once. For the 9-cell and 16-cell bodies, it never happens: in none of the 12 runs did the body re-form a single compact piece between getting through and eating. They arrive in two to five pieces.

7.Cut it, tempt it, crowd it

A walk to a single pile says little about what kind of agent this is. So we did to it what one does to an organism: cut it, moved its food, gave it two piles, put two blobs in one room, built walls and traps, and took the food away. These experiments use the page's own tools only (the blob brush, the rubber, the wall, ground and food tools), applied at a period boundary. Nothing steers the blob. Runs are noise-free, the page's default, so the automaton is deterministic; each condition is repeated over blob sizes, offsets, pile placements and all four rotations of the layout. Rotation matters, because the clock serves the four directions in a fixed order.

456behaviour runs, mass conserved in every one
12 / 12halves of a cut bar ate the pile nearest them
41 / 44runs ate a newly painted, nearer pile first
29% vs 12%of an empty room covered, against a random walker

Every replay below is a recorded run. Press play or drag the slider, switch tabs for the other scenarios, and click a chart to jump to that period. Each piece of the body has its own colour. Run it live loads the same world, blob and edits into the engine, which reproduces the recording exactly, and then lets you paint onto it.

Each piece is its own agent

Since every cell decides for itself from the one field, there is no "the blob", only cells, and cutting it should make two blobs. It does. A 2 × 9 bar cut in two with the rubber, with a pile on each side, ate both piles, and the piece nearest each pile ate it in 12 of 12 cases. For a 6 × 6 square cut in two the figure is 11 of 12. With only one pile, both halves go to it; they touch there and become one piece again in 3 of 6 runs for each body shape. A wall dropped through the body leaves the far piece to go round the wall's end, which it does, and the pile was eaten in 6 of 6 runs for each shape.

A one-square cut closes again at once (6 of 6), because the gap square touches the body on two sides and surface tension fills it. A three-square cut never closes when there is nothing to eat (0 of 12): the two halves explore apart and avoid each other's trail.

Figure 10. Fragmentation. A 2 × 9 bar cut in two with a pile on each side; the same bar with one pile above; a wall dropped through the bar with one pile on the left; a 6 × 6 square cut in four with a pile in each corner; and a 6 × 6 square left whole with nothing to eat. Charts: pieces, cells and food eaten over the periods, and the route from each piece to each pile.
Four rows of snapshots: a bar cut in two with a pile each side, a bar cut in two with one pile above, a wall dropped through a bar, and a square cut in four with a pile per corner; the last column traces each piece's centroid. Left: most pieces at once and pieces at period 160 for each fragmentation condition. Right: the period the last pile is reached, for every run.
Figure 11. What the pieces do. Top: four runs as snapshots, with each piece in its own colour and, on the right, the track of each piece's centre. Bottom left: the most pieces at once and the pieces at period 160, per condition. Bottom right: the period at which the last pile is reached. Every pile is eaten in every run, but the bodies break into many more pieces than the cut made.

The bottom left of Figure 11 is the honest part. A big body does not stay one body even when nobody cuts it. A 25 to 49 cell square left whole, with nothing to eat, is in a median of 5.5 pieces over 160 periods, and 12 at most. Pieces split and merge constantly: a median of 109 merges and 114 splits in one uncut square's run. When a 6 × 6 square is cut in four with a pile in each corner, all four piles are eaten in 6 of 6 runs, but only 54% of the quarters eat the pile nearest them, because the quarters break up further on the way. Leukocytes whose microtubules are disrupted also lose coherence and fragment[15]. What the blob lacks is anything that tells the cells how large the body is: holding a large body together would need information to travel over the whole body and back, a convergecast[16], and nothing in a 3 × 3 rule run once per step does that.

Goal switching: the turn comes when the smell arrives

While a blob heads for pile A, we paint pile B at period 24, behind it, to either side, or ahead and to one side, 4 to 28 squares away. The blob goes for whichever pile is nearer by the route. B was nearer in 44 runs and was eaten first in 41 of them. All three exceptions were piles painted behind the blob that were only 1 to 3 squares nearer: turning the whole body round costs more than that margin. In the 13 runs where B was farther, A was eaten first every time, and B afterwards every time.

The timing follows the smell. The field floods four squares a period, so B's smell reaches the blob about d / 4 periods after the paint, for a route of d squares. The measured turn came a median of 3 periods after the paint (interquartile range 1 to 4, at most 6), a median of 0.25 periods after d / 4. A straight-line fit gives 0.30 periods per square of route (r = 0.82), close to the predicted 0.25. Turns towards "down" are a period or two slower than towards "up", because of the clock's order. The blob never takes a heading in between two piles: the field is a maximum over the piles, not a sum. When pile A is rubbed out mid-route, the blob goes on towards the empty site for a median of 2 more squares over 3 periods, while the slope of the field disappears from the squares nearest the pile outward, and then it turns to exploring. It never reached the site (0 of 8).

Figure 12. Goal switching. Pile B painted at period 24 while the blob heads for A: 12 squares behind it, 16 to the side, or farther than A; or A rubbed out at period 28. The chart gives the route from the largest piece to A and to B.
Figure 13. The turn waits for the smell. Periods from the paint until the body turns towards a nearer pile B, against the route to B, with the d / 4 line at which B's smell arrives and the fitted line. Hover a point for its run.

Two piles: nearest wins, and the clock breaks ties

With two or three piles, the blob does not choose in any rich sense. It goes to the nearer pile by route, ignores how big the piles are, and settles exact ties by the order in which the clock serves directions. With equal piles on opposite sides, the pile eaten first was always the one to the left (for left against right) or above (for up against down), with one split in 16 runs. Up beat left and up beat right every time. Equal piles at right angles that do not involve up, down with left or down with right, split every time: the body tore in two and ate both at once. Over the whole equal-at-right-angles condition, 8 of 16 runs split.

One square of difference does not beat the clock; four squares do. With A 6 squares away and B on the opposite side, the share of runs that ate the nearer pile first was 4 of 8 at one square of difference, 6 of 8 at two, and 7 of 8 at four or six. The mechanism is commitment: the first direction served after both smells arrive moves the body one square, and that square makes the pile it moved towards the nearer one. Every pile was eaten in all 136 choice runs, and three equal piles were eaten one after another (a median of 47.5 periods for all three), never all at once.

This is where the slime mould comparison ends. Physarum spreads over several food sources at once and joins three of them with a tube network close to a Steiner tree or a fault-tolerant cycle[17], and given two patches, it picks the better one[18]. The blob does neither. Every pile pins the field to the same height, so it has no notion of quality; it keeps no connection between piles; and it eats them in sequence, nearest first. The one Physarum-like moment is the split at right angles, where two parts of one body exploit two sources at once. Here that is a tear, not a network, and the parts do not stay linked.

Figure 14. Two or three piles. Equal piles on opposite sides; equal piles at right angles (the body splits); piles 6 and 8 squares away; three equal piles.
Figure 15. How much nearer is nearer enough. For each layout (opposite or at right angles, A at 6 or 10 squares, B 0 to 6 squares farther), the share of 8 runs that ate the nearer pile first, the farther first, and the runs that split.

Several blobs

Two blobs and one pile, one blob 4, 8 or 12 squares nearer: the nearer blob ate the pile in 11 of 12 runs. With three blobs, the nearest ate it in 4 of 4. The winner eats all four squares; the pile is never shared. The loser walks on into the eaten pile's fading smell, which still points at where the pile was, and reaches the winner there in 9 of 16 runs. But the two then spend only about half the periods in one piece. With nothing to eat, two blobs met in only 2 of 6 runs in 300 periods, and when they touched they parted again at once. The trail is a register of the square, not of the blob, so ground the other blob has just covered counts as visited, and the two blobs avoid each other. In the symmetric starts they sweep the room in mirrored lanes.

Figure 16. Several blobs. Two blobs and one pile, one of them 4 squares nearer; two blobs at equal distance; three blobs and one pile; two blobs with nothing to eat. The chart gives the closest squares between the two blobs.
Left: share of runs the nearer blob eats the pile, against how much nearer it starts. Middle: closest squares between two blobs with nothing to eat, over 300 periods. Right: the same for two blobs and one pile, 16 runs.
Figure 17. Who eats, and do they meet? Left: the share of 4 runs in which the nearer blob eats the single pile, against how much nearer it starts (at 0, the same starting slot of the layout won in 3 of the 4 rotations). Middle: with nothing to eat, the gap between two blobs oscillates between about 30 and 5 squares as they sweep the room. Right: with one pile, the gap after the pile is eaten.

Obstacles, traps and exploring

A wall between the blob and the pile, 5 to 23 squares long and shifted by up to 4: the pile was reached in 24 of 24 runs, and the blob went round the shorter end in 16 of 16 runs where one end was shorter. With the wall centred, it always went over the top (8 of 8): the clock again. A dead end pointing at the pile, which would trap anything that climbs a straight-line gradient, never caught it: it entered the cup in 0 of 12 runs. The field is a route distance, so there is no trap to fall into. Started inside the cup against its back, it backed out in 11 to 48 periods and ate the pile in 6 of 6 runs.

A full wall with one gap, 1 to 3 squares wide, for bodies of 4 to 25 cells: the pile was eaten in 48 of 48 runs. Bodies of 4 and 9 cells got through whole in 23 of 24 runs. Bodies of 16 got through whole in 5 of 12. Bodies of 25 got through whole in only 1 of 12. The front file goes through and eats; what is left behind loses the scent when the pile is eaten and stays on the near side, a permanent split over the 300 periods recorded.

Figure 18. Obstacles. A 17-square wall with one end nearer; a wall of 16 cells with a gap one square wide; a dead end pointing at the pile; and a start inside that dead end.
Left: period the pile is reached against the route round a wall, for blobs of 4 and 9, with a 2 periods per cell line. Middle: a table of gap width by body size, how many got through whole. Right: period the pile is reached for starts outside and inside a dead end.
Figure 19. Walls, gaps and dead ends, measured. Left: time to the pile against the shortest route round the wall, near the line of two periods per square. Middle: of four runs per gap width and body size, how many got the whole body through one gap, the median transit and the most pieces at once. Right: starting outside a dead end that points at the pile, or inside it against the back.

Take the food away and the trail takes over. A slime mould avoids ground it has already covered by sensing its own extracellular slime, which lets it escape a U-shaped trap where following a gradient would not, and it stops avoiding the slime once no unexplored ground is left[19]. The blob's trail does the same job: with nothing to smell, the field floods from the ground the blob has been away from longest. In 25 × 25 rooms and mazes over 300 periods, the blob was never still for more than one period and never deadlocked. A one-cell blob stood on 29% of an empty room (24% of a maze), against 12% (8%) for a random walker making the same number of moves: 2.5 to 3 times the coverage. A 4-cell blob sweeps an empty room in parallel lanes, like a lawnmower, and stays in one piece throughout (4 of 4). Bigger bodies cover more but come apart: 16 cells covered 92% of the room in a median of 4 pieces.

Figure 20. Exploring with nothing to eat. Four cells in an empty room, sweeping it in parallel lanes; sixteen cells; four cells in a maze.
Figure 21. Coverage. The share of the open squares stood on over 300 periods, for blobs of 1, 4, 9 and 16 cells, against a random walker with the same number of moves. Toggle between the empty room and the maze.

8.Holding together, and keeping every cell

The follow rule, the footprint bonus and surface tension exist to keep the body in one piece. They work for small bodies. In an empty 21 × 21 room with nothing to smell, over 120 periods, a 2 × 2 body was in one piece throughout, and a 1 × 4 bar in one piece 98% of the time. From six cells up they do not: bodies of 6 to 25 cells were in a median of 2 to 4 pieces, and in one piece only 15 to 25% of the time. Taking rules out shows which ones matter. Without the follow rule, a 1 × 6 bar was in a median of 4 pieces instead of 2; without surface tension or without the occupied-square credit, a 2 × 3 body was in 3 instead of 2.

Figure 22. How well it holds together. Pieces over 120 periods for eight bodies from 2 × 2 to 5 × 5 in an empty room with nothing to smell (toggle shapes), the median and maximum per body, and the same 1 × 6 and 2 × 3 bodies with surface tension, the occupied-square credit and the follow rule taken out of the weights, one at a time and all together.

The mass, on the other hand, is exact. Lattice models that conserve particles usually get it from the structure of the update[13,14], and Flow-Lenia made the continuous Lenia mass-conservative for the same reason, to keep its creatures localised[20]. Here it comes from the one-decision handover. Over three long runs, 1,500 periods (72,000 steps) in a 21 × 21 maze, 1,000 periods in an empty room and 900 periods in the page's 41 × 41 maze, the blob never had a cell fewer than the period before, and never gained a cell except by eating. In all 456 behaviour runs, after the last outside edit, the cell count never fell and rose by no more than the food squares eaten.

Figure 23. Every cell accounted for. Cells and pile squares eaten over three long runs of 1,500, 1,000 and 900 periods. Tiles: steps run, periods in which a cell was lost (none), and cells gained without eating (none).

9.Noise, lazy cells and edits

The page can add Gaussian noise of standard deviation σ to every register update at every step; it offers σ = 0.02. On a 21 × 21 maze with a 67-square route, with four noise seeds at each level, the blob ate the pile at period 131 or 135 at every σ up to 0.05, the same as without noise, and no cell was lost at any noise level tested. From σ ≈ 0.07 a different failure appears: phantom eating. A pile square asks "is the blob here or beside me" by summing five F registers, and when the noise on that sum crosses one half, the pile latches EAT before the blob could have walked there. That happened in 1 of the 4 runs at σ = 0.07 and in all 4 at σ = 0.1, within 2 to 5 periods.

Unlike the maze automaton of the earlier article, this one does need a common clock. If each cell updates only with probability p at each step, a cell that skips a step falls a count behind for good, and the move's two halves stop meeting. With p = 0.999 the blob was gone within 11 periods. With p = 0.99 it survived the 30 periods measured, but its cells were on 17 different counts by then, and with p = 0.95, 0.9 and 0.8 it was gone within 11, 6 and 7 periods. Partitioning automata avoid the same problem by updating whole blocks at once[13].

Edits from the page are a different matter, because the page applies them cleanly. A cell the page opens is given the clock count of the rest of the world; without that copy, the new cell's count was still 5 counts off three periods later. Moving the pile after 60 periods to a square 39 squares away: the blob reached it 73 periods later. A wall drawn across its route: it did not cross the wall, and after the wall was removed it ate 54 periods later. Registers filled with junk of σ = 5,000: the field rebuilt itself and the blob ate at period 139, against 131 clean, the kind of return to a legal state from an arbitrary one that distributed systems call self-stabilisation[21]. Two cells painted onto a 4-cell blob became part of it, and the count stayed at 6.

Figure 24. Noise and lazy cells. Left: periods to eat against noise σ, four seeds each, with lost cells and phantom eating marked. Right: cells over time when each cell is updated with probability p < 1. Tiles: the page's edits mid-run (clock copy, pile moved, junk registers, wall drawn, cells painted on).

10.What it costs

A creature that moves one square every two periods is slow, and every one of its steps is a full pass of the network at every open square. A dense pass costs 46,752 multiply-adds per cell update. Skipping the zeros, it costs 832, and 764 if the dead-end units are skipped too. A cell moves one square per 96 steps at best. On the 21 × 21 maze, with 214 open cells, one period is 10,272 cell updates and one square of blob movement is 20,544; on the 41 × 41 maze it is 97,152. The clock changes at every open cell on every step; Figure 25 shows how few cells change anything else on each count.

Figure 25. What a step costs. Multiply-adds per cell update (dense, non-zero, live), and steps per cell moved; which cells change on each of the 48 counts, on a log scale; cell updates per period on four maze sizes.

Weight-space programming. The method is that of Looped Weight-Space Programming[4] and the posts that named the field[1,2,3]: an AI agent writes the weights directly, with no training. An earlier article in this series used it to make a neural cellular automaton solve mazes. What is different here is what the program is. It is not a function from a problem to an answer but an agent that keeps behaving, in a world that changes under it. Setting weights by analysis is old[22]; what is new is who does it, and at what scale of behaviour.

Moving cellular-automaton creatures. Lenia's lifeforms move because the rule redraws the pattern a little further on[7]; Flow-Lenia conserves their mass[20]; Hamon and colleagues found, by search and training, creatures that move, react to obstacles and keep their integrity[8]. The blob shows related behaviours, programmed into a fixed neural-cellular-automaton graph rather than found, on a discrete lattice, with exact mass conservation and a goal. Trained neural cellular automata grow a shape and regrow it after damage[6]; the blob keeps its mass instead of a shape.

Robots on a lattice. Lattice self-reconfigurable robots have long been moved by local rules inspired by cellular automata, with modules moving over the surface of the group to make the whole robot locomote, and correctness proofs for many of the rule sets[23]. The blob is a lattice body that locomotes by local moves; its rule set is expressed as neural-network weights.

Leaders and followers. In the classic analysis of nearest-neighbour coordination, followers converge to the heading of a single designated leader[24]. The blob has no designated leader: each cell follows the one in front, and whichever cells are at the front, and so smell the food first, steer the rest, much as a few informed individuals can steer a group without anyone knowing who they are[25]. The cells also do not average anything. They agree because they read the same field and the same clock.

Fields and tension. The field is a grid wavefront[10,12] rather than a classic potential field of attractive and repulsive terms[11], so its only maxima are food or forgotten ground. Surface tension is a local, deterministic stand-in for the boundary term of the cellular Potts model, in which lattice sites are copied between cells to lower an energy with an adhesion term[26], after the observation that cell aggregates behave like liquids with a surface tension[27].

Slime moulds and cells. The blob shares behaviours with Physarum, not mechanisms: it walks the shortest route rather than filling a maze and retracting[9], it avoids its own trail as the slime mould avoids its slime[19], and it lacks the slime mould's choice between food sources[17,18]. Its squeezing, and its fragmenting, recall leukocytes[15]. What counts as "the blob" is whatever cells happen to be connected, which makes it a toy illustration of how a collective of cells can, and cannot, hold together as one self[28].

Conclusion

A creature in 1,058 numbers.An AI agent wrote a goal-seeking, deformable, eating blob into the weights of an unchanged neural-cellular-automaton graph, with no training, no data and no gradient. Every non-zero weight belongs to a named program part.
Cut it in half and both halves hunt.Because each cell decides for itself from one shared field, a piece of the blob is a blob. The halves of a cut bar ate the pile nearest them in 12 of 12 cases.
It reacts at the speed of its own smell.A newly painted, nearer pile was eaten first in 41 of 44 runs; the turn came a median of 3 periods after the paint, as the field's spread of four squares a period predicts.
Every cell accounted for.The move is one decision read from both sides, so in 456 behaviour runs and three long runs of up to 1,500 periods, the blob never lost a cell or gained one except by eating.
Honest about what it is not.It does not hold large bodies together, it does not weigh one pile against another, and it needs every cell to step together.

A network this small, whose every unit has a stated meaning, is also a natural test bed for interpretability methods, in the spirit of compiled models with known circuits[29]. Any method that claims to find how a network moves a body towards food can be checked here against the program that was actually written.

Limits

Large bodies come apart. Bodies of six or more cells in an empty room spend most of the time in a median of 2 to 4 pieces; uncut squares of 25 to 49 cells were in a median of 5.5 pieces. After squeezing through a gap, the 9-cell and 16-cell bodies never re-formed a single compact piece before eating, and bodies of 25 got through a gap whole in only 1 of 12 runs. There is no real choice between food: the nearest pile by route wins, ties are settled by the clock's order of up, down, left, right, with one square of difference on opposite sides the nearer pile was eaten first in only 4 of 8 runs, and pile size is ignored. Noise of σ ≈ 0.07 and above makes piles latch as eaten before the blob arrives. The automaton is fragile under asynchronous updates: with each cell updating with probability 0.999, the blob is gone within 11 periods. 36 first-layer units, 104 of the 1,058 non-zero numbers, are computed at every step and read by nothing. Each cell update costs 832 multiply-adds skipping zeros, and 46,752 dense, and a cell moves at most one square every 96 steps. The behaviour runs are noise-free and deterministic, and the sizes we tested are small: rooms and mazes up to 41 × 41. And because no network was trained on this task with the same graph, nothing here compares written weights with learned ones.

What's next

The clearest gap is a sense of the body's size: a convergecast over the body[16], so that a large blob could know it is splitting and pull back. Food quality could enter as the height of the pin, letting a bigger pile outrank a nearer one, which would make the comparison with Physarum's patch choice[18] a real one. Making the move robust to cells that skip a step would remove the global clock's hold. And the same graph trained by gradient descent, including training that starts from the written weights, would say whether these behaviours are findable or only writable.

Citation

If you use this work, please cite it as follows.

@misc{moaddel2026blob,
  title  = {{Divisible Agency Emerges in a 1,058-Weight Neural Cellular Automaton Programmed Directly by an AI Agent}},
  author = {Moaddel, Arash},
  year   = {2026},
  month  = nov,
  note   = {Article, ibiLAB, Copenhagen}
}

References

  1. Takehi, R., Teoh, J., Zhang, A. & Khattab, O. Sparks of weight-space programming: LLMs can natively read & write neural network weights. Blog post, MIT CSAIL, 2 November 2026. rikiyat.github.io/blog/weight-space-programming
  2. Singh, C. Weight-space programming from scratch on simple tasks. Web report, 2 November 2026. csinva.io
  3. Chaubard, F. & Astra (GPT-6 Astra). Weight-space programming and gradient optimization on nonconvex algorithmic tasks. GitHub repository Fchaubard/WSP-for-turing-complete (2026).
  4. Elsayed, A., Heakl, A., Shaker, A., Khan, F., Khan, S. & Claude Opus 5.5. Looped weight-space programming: LLM-written transformers for long algorithmic reasoning. Blog post, MBZUAI, 23 November 2026. mbzuai-oryx.github.io/LoopedWSP
  5. Gilpin, W. Cellular automata as convolutional neural networks. Phys. Rev. E 100, 032402 (2019). doi:10.1103/PhysRevE.100.032402
  6. Mordvintsev, A., Randazzo, E., Niklasson, E. & Levin, M. Growing neural cellular automata. Distill 5, e23 (2020). doi:10.23915/distill.00023
  7. Chan, B. W.-C. Lenia: biology of artificial life. Complex Syst. 28, 251–286 (2019). doi:10.25088/ComplexSystems.28.3.251; preprint at arXiv:1812.05433.
  8. Hamon, G., Etcheverry, M., Chan, B. W.-C., Moulin-Frier, C. & Oudeyer, P.-Y. Discovering sensorimotor agency in cellular automata using diversity search. Sci. Adv. 11, eadp0834 (2025). doi:10.1126/sciadv.adp0834
  9. Nakagaki, T., Yamada, H. & Tóth, Á. Maze-solving by an amoeboid organism. Nature 407, 470 (2000). doi:10.1038/35035159
  10. Lee, C. Y. An algorithm for path connections and its applications. IRE Trans. Electron. Comput. EC-10, 346–365 (1961). doi:10.1109/TEC.1961.5219222
  11. Khatib, O. Real-time obstacle avoidance for manipulators and mobile robots. Int. J. Robot. Res. 5(1), 90–98 (1986). doi:10.1177/027836498600500106
  12. Barraquand, J., Langlois, B. & Latombe, J.-C. Numerical potential field techniques for robot path planning. IEEE Trans. Syst. Man Cybern. 22, 224–241 (1992). doi:10.1109/21.148426
  13. Margolus, N. Physics-like models of computation. Physica D 10, 81–95 (1984). doi:10.1016/0167-2789(84)90252-5
  14. Boccara, N. & Fukś, H. Cellular automaton rules conserving the number of active sites. J. Phys. A 31, 6007–6018 (1998). doi:10.1088/0305-4470/31/28/014
  15. Renkawitz, J. et al. Nuclear positioning facilitates amoeboid migration along the path of least resistance. Nature 568, 546–550 (2019). doi:10.1038/s41586-019-1087-5
  16. Segall, A. Distributed network protocols. IEEE Trans. Inf. Theory 29, 23–35 (1983). doi:10.1109/TIT.1983.1056620
  17. Nakagaki, T., Kobayashi, R., Nishiura, Y. & Ueda, T. Obtaining multiple separate food sources: behavioural intelligence in the Physarum plasmodium. Proc. R. Soc. B 271, 2305–2310 (2004). doi:10.1098/rspb.2004.2856
  18. Latty, T. & Beekman, M. Food quality and the risk of light exposure affect patch-choice decisions in the slime mold Physarum polycephalum. Ecology 91, 22–27 (2010). doi:10.1890/09-0358.1
  19. Reid, C. R., Latty, T., Dussutour, A. & Beekman, M. Slime mold uses an externalized spatial "memory" to navigate in complex environments. Proc. Natl Acad. Sci. USA 109, 17490–17494 (2012). doi:10.1073/pnas.1215037109
  20. Plantec, E., Hamon, G., Etcheverry, M., Oudeyer, P.-Y., Moulin-Frier, C. & Chan, B. W.-C. Flow-Lenia: towards open-ended evolution in cellular automata through mass conservation and parameter localization. Preprint at arXiv:2212.07906 (2022).
  21. Dijkstra, E. W. Self-stabilizing systems in spite of distributed control. Commun. ACM 17, 643–644 (1974). doi:10.1145/361179.361202
  22. McCulloch, W. S. & Pitts, W. A logical calculus of the ideas immanent in nervous activity. Bull. Math. Biophys. 5, 115–133 (1943). doi:10.1007/BF02478259
  23. Butler, Z., Kotay, K., Rus, D. & Tomita, K. Generic decentralized control for lattice-based self-reconfigurable robots. Int. J. Robot. Res. 23, 919–937 (2004). doi:10.1177/0278364904044409
  24. Jadbabaie, A., Lin, J. & Morse, A. S. Coordination of groups of mobile autonomous agents using nearest neighbor rules. IEEE Trans. Autom. Control 48, 988–1001 (2003). doi:10.1109/TAC.2003.812781
  25. Couzin, I. D., Krause, J., Franks, N. R. & Levin, S. A. Effective leadership and decision-making in animal groups on the move. Nature 433, 513–516 (2005). doi:10.1038/nature03236
  26. Graner, F. & Glazier, J. A. Simulation of biological cell sorting using a two-dimensional extended Potts model. Phys. Rev. Lett. 69, 2013–2016 (1992). doi:10.1103/PhysRevLett.69.2013
  27. Steinberg, M. S. Reconstruction of tissues by dissociated cells. Science 141, 401–408 (1963). doi:10.1126/science.141.3579.401
  28. Levin, M. The computational boundary of a "self": developmental bioelectricity drives multicellularity and scale-free cognition. Front. Psychol. 10, 2688 (2019). doi:10.3389/fpsyg.2019.02688
  29. Lindner, D. et al. Tracr: compiled transformers as a laboratory for interpretability. Preprint at arXiv:2301.05062 (2023).