Two Hundred Years With No Score
Population without a stopping score
The birth chapter ended on columns pointing in opposite directions: a roster that grew ninefold inside one year, falling standing plant mass, and one founding lineage left in command. Run one valley until nothing in it is changing any more, then change only the ground rule that the run proves wrong.
The bench prints the population once a year while there is something to count and once a decade after that. If the answer the valley found is one nobody wanted, the page changes the ground it stands on and runs it again; it does not rename the answer as success.
Six years are too short for this system. The previous table still had births, deaths and plant mass moving, so its last row could not answer whether the rule was stable.
Two hundred years are the first run long enough to catch the failure that matters here. With no pressure from the ground, one body plan can make the whole valley cheap enough to crowd itself into a corner.
The chapter builds a harness for the long run, reads the no-score result, then adds a single ground pressure rule and repeats the same two centuries. The second table is allowed to win only because it was measured the same way as the first.
The 200-year valley harness
The birth chapter's wide valley cannot be the one this page runs, and it fails on two separate counts that anybody running two centuries of anything will hit.
The first is that it does not keep its own matter. The terrarium volume ran two centuries
of its own and pulled the result apart, and what it found was that the seeds which clear
the rim carry their minerals out of the world for good, and that what rots onto bare rock
or into the pond lies in cells no root will ever reach. It built two repairs for that: a rim a seed cannot cross, so nothing leaves,
and a sideways sweep that lets a cell hand a share of its nutrient to the cells beside it,
so what rots on rock can travel back to a root. Both of them are fields on
terra.Valley, both sit at nought until something sets them, and no creature
chapter in this book has ever had a reason to. Six years of valley does not care. Two
hundred does, and the first exercise at the foot of this page is the same ground with
both of them switched back off. The same chapter also cracked the rocky rim into pockets
only a narrow root can anchor in, and this ground is stood up with those as well:
forty-eight of its hundred and seventy-two rootable cells are pockets in the rock rather
than open soil.
The second is arithmetic about a machine, and it settles the size of the ground. Two centuries is 720,000 ticks, and every one of them walks every plant in the valley: a root disc read, a crown written into the light field, an income worked out and an upkeep charged. What a tick costs is set by how much is standing on the ground, and measuring that before committing to a run costs a great deal less than measuring it after.
// cmd/lines/main.go
// pace is the question asked before the run: what does a century of a
// valley cost, on three grounds, with nothing walking about in it. One
// year of each is measured and the rate is what the page reasons with.
func pace(w world) {
fmt.Printf("lines: one year of a filled valley, timed, on three grounds,\n")
fmt.Printf(" with nothing walking about in any of them\n\n")
for _, g := range [][2]int{{12, 8}, {16, 12}, {48, 32}} {
q := w
q.cols, q.rows, q.crowd = g[0], g[1], 0
v := q.stand()
// Time a year of a valley that has filled, not a year of a
// valley that is still filling: a cell with nothing standing
// on it costs a tick almost nothing, and every ground here
// ends up with something on nearly all of them.
for open := v.Now; v.Now-open < 4*terra.Year; {
v.Tick()
}
mass, _ := v.Standing()
fmt.Printf(" %dx%d: %d cells, %d a root can live in, %d plants standing at %.1f grams\n",
v.Grid.W, v.Grid.H, v.Grid.W*v.Grid.H, v.Cells, len(v.Stands), mass)
was, at := v.Now, time.Now()
for v.Now-was < terra.Year {
v.Tick()
}
took := time.Since(at)
fmt.Printf(" %d ticks in %s, %.0f ticks a second (measured here; yours will differ)\n\n",
v.Now-was, took.Round(time.Millisecond), float64(v.Now-was)/took.Seconds())
}
fmt.Printf(" two hundred years is %d ticks of whichever of those a run picks\n", 200*terra.Year)
}
$ go run ./cmd/lines -mode pace
lines: one year of a filled valley, timed, on three grounds,
with nothing walking about in any of them
12x8: 96 cells, 75 a root can live in, 44 plants standing at 3055.5 grams
3600 ticks in 204ms, 17660 ticks a second (measured here; yours will differ)
16x12: 192 cells, 172 a root can live in, 122 plants standing at 7132.1 grams
3600 ticks in 615ms, 5855 ticks a second (measured here; yours will differ)
48x32: 1536 cells, 1516 a root can live in, 1312 plants standing at 76272.2 grams
3600 ticks in 6.227s, 578 ticks a second (measured here; yours will differ)
two hundred years is 720000 ticks of whichever of those a run picks
Sixteen times the cells, thirty times the cost of a tick, because the plants fill whatever room they are given. The wide valley the birth chapter used holds thirteen hundred of them once it has been left four years to fill with nothing walking on it, and at the rate above — one goroutine of an eight-core Ryzen 7 3700X, which is the machine every "measured here" line in this volume was measured on and is not the machine you have — 720,000 ticks of it is about twenty minutes of arithmetic with nothing alive in it at all; put a growing population on top, each animal casting nine rays and running a 378-weight network every tick, and it is very much worse. The sixteen-by-twelve valley does the same two centuries empty in about two minutes, which is the difference between a run you can afford to do twice and a run you can afford to do once, badly.
Everything below happens on a sixteen-by-twelve ground with the rim walled and the nutrient creeping, and the birth chapter's runs happened on a forty-eight-by-thirty-two ground with neither. They are two different worlds off one seed, in exactly the sense the arena's two breeding loops were. No count, digest or curve on this page may be set beside one from that one: the terrain is different, the plants are different, the herd that lands on it off stream 12 is a different herd, and the first thing that happens is different. What carries across is the machinery, which is unchanged to the line.
The 200-year run
The bench founds the ground, scatters a herd on stream 12 exactly as the creature chapters do, registers the pool's breeding pass into the roster's seam, and then does nothing but tick and count. It keeps one thing of its own, because the world will not: how far each animal has walked.
// tramp is one creature's travelling: where it was standing when the
// last phase closed, how far it has walked since it was born, and how
// many creature-ticks it has been handed. It is kept by the bench and
// not by the creature, because nothing in the world charges an animal
// for the distance it has covered in its life and nothing in the world
// reads it.
type tramp struct {
from, last field.Vec2
dist, far float64
ticks int
born, stood int
}
// walked adds this phase's step to every living creature's tally.
func (h *herd) walked() {
for _, b := range h.r.Live {
t, ok := h.feet[b.ID]
if !ok {
h.feet[b.ID] = &tramp{from: b.Pos, last: b.Pos, born: b.Born}
continue
}
t.dist += math.Hypot(b.Pos.X-t.last.X, b.Pos.Y-t.last.Y) / terra.Tile
if far := math.Hypot(b.Pos.X-t.from.X, b.Pos.Y-t.from.Y) / terra.Tile; far > t.far {
t.far = far
}
t.last = b.Pos
t.ticks++
t.stood = h.v.Now
}
}
$ go run ./cmd/lines -mode curve -years 200 -every 20 | head -39
lines: 16x12 valley, tick 901, year 1 summer, 90 plants standing at 4654.1 grams
172 cells a root can live in, 48 of them pockets cracked into the rim,
the rim walled, 0.0010 of a cell's nutrient creeping into its neighbours a tick
25 creatures founded on stream 12, each stamped from an identity genome,
given a brain off stream 14 and a store of 200.0000
a creature breeds when its store closes a tick at or above 360.0000
a cell of ground carries one body: no
year alive born refused nowhere gone lines deepest plants standing walked
2 5 17 2 0 37 5 3 94 6705.9 0.00439
3 13 40 5 0 52 4 6 123 7470.4 0.00094
4 18 79 14 0 86 3 9 124 7293.5 0.00320
5 21 124 19 0 128 2 10 124 6660.8 0.00382
6 32 195 32 0 188 2 15 123 7235.2 0.00570
7 21 326 48 0 330 2 18 124 7323.5 0.01091
8 78 518 71 0 465 2 20 124 7083.3 0.00820
9 206 947 134 0 766 2 31 123 5976.5 0.00452
10 498 1999 342 0 1526 2 41 124 4003.8 0.00311
11 1173 4271 922 0 3123 2 49 124 96.3 0.00167
12 1631 6668 1572 0 5062 2 53 119 0.0 0.00100
13 1742 8717 2128 0 7000 2 54 0 0.0 0.00053
14 124 8718 2128 0 8619 2 42 0 0.0 0.00030
15 2 8718 2128 0 8741 1 32 0 0.0 0.00001
16 0 8718 2128 0 8743 0 0 0 0.0 0.00000
17 0 8718 2128 0 8743 0 0 0 0.0 0.00000
18 0 8718 2128 0 8743 0 0 0 0.0 0.00000
19 0 8718 2128 0 8743 0 0 0 0.0 0.00000
20 0 8718 2128 0 8743 0 0 0 0.0 0.00000
21 0 8718 2128 0 8743 0 0 0 0.0 0.00000
41 0 8718 2128 0 8743 0 0 0 0.0 0.00000
61 0 8718 2128 0 8743 0 0 0 0.0 0.00000
81 0 8718 2128 0 8743 0 0 0 0.0 0.00000
101 0 8718 2128 0 8743 0 0 0 0.0 0.00000
121 0 8718 2128 0 8743 0 0 0 0.0 0.00000
141 0 8718 2128 0 8743 0 0 0 0.0 0.00000
161 0 8718 2128 0 8743 0 0 0 0.0 0.00000
181 0 8718 2128 0 8743 0 0 0 0.0 0.00000
201 0 8718 2128 0 8743 0 0 0 0.0 0.00000
Read the alive column down the page. Five animals at the end of the second
year, out of twenty-five stood up; thirteen, eighteen, twenty-one, thirty-two; a dip
back to twenty-one in the seventh year; and then 78, 206, 498, 1173, 1631, 1742. The
population goes up by a factor of eighty in six years. The lines column
beside it says this is one family doing it: five founding lineages left at the end of
the second year, two by the fifth, and those two hold the valley for the whole boom.
Now read the two columns on the right, which are the same six years told from the
ground's side. The standing crop sits between six and a half and seven and a half
thousand grams for eight years, which is what a hundred and twenty-odd plants on a
hundred and seventy-two cells comes to, and reads 5976.5 in the ninth. In the tenth
year it is 4003.8. In the eleventh it is 96.3.
In the twelfth it is nothing at all, and the plants column is still reading
119, which means a hundred and nineteen plants are standing there holding no measurable
tissue between them. In the thirteenth year the plant count reaches zero as well.
The animals go a year later and all at once: 1,742 alive in the thirteenth year, 124 in the fourteenth, two in the fifteenth, none in the sixteenth. Every row after that is the same row, for another hundred and eighty-five years.
The counts underneath say what the run cost the pool, and they carry the number the generation-time question is answered from.
$ go run ./cmd/lines -mode curve -years 200 -every 20 | head -68 | tail -28
25 founded, 8718 born, 8743 struck off, 0 still walking after 719550 ticks
10846 creatures were asked for a child: 8718 made one, 2128 could not pay for the
one they described and 0 had nowhere to put it
the pass spent 12895894 numbers, which is 1189 for every creature it asked
the generation time, which nothing anywhere set
births it is measured over 8718
ticks between a parent's birth and its child's 2201.8
the quickest quarter of them, up to 249.0
the middle one 1579.0
the slowest quarter of them, from 3586.0
years that mean is, at 3600 ticks a year 0.6
generations two centuries of it holds 327.0
what the ground paid for, over every creature this valley stood up
how many mean ticks mean cells cells a tick
made at least one child 3870 2698.0 6.5730 0.002436
never made one 4873 3049.3 5.9333 0.001946
the creature that outlasted every other one in this valley
which one it was 689
generations from a founder 15
the tick it was born on 26644
creature-ticks it was handed 18650
years that is 5.2
cells of ground it walked in all of them 39.0503
the furthest it ever got from where it began 7.8768
cells a tick, which is its whole travelling 0.002094
Eight thousand seven hundred and eighteen animals were born into a valley that never once said what a good animal was. Two thousand one hundred and twenty-eight more were described and could not be paid for, which is the refusal the birth chapter built: about one ask in five ended with a parent holding a child it had made and could not carry. Every one of the 10,846 asks cost the same 1,189 numbers, and the pass spent 12,895,894 of them without one comparison between two creatures anywhere in it.
Nothing in this world has a generation in it. There is no breeding season, no clutch, no age of majority and no schedule: an animal makes a child on the first tick its store closes over the price of one, and that is all. So the length of a generation is not a setting to be looked up. It is a measurement, and the pedigree is what it is measured off.
Numbers first, on a made-up family of four, so the arithmetic is visible. A founder stands up on tick 900 and its child is born on tick 4,200: that link took 4200 − 900 = 3,300 ticks. The next child arrives on tick 4,900, which is 700 ticks. The third link takes 1,100. Three links, 3300 + 700 + 1100 = 5,100 ticks between them, and 5100 ÷ 3 = 1,700 ticks for an average one. That is the whole calculation, and the bench does it over every birth the run made instead of over three.
Write the tick a creature was born on b, and write p(c) for
the parent of creature c. One link of one chain is
g(c) = b(c) − b(p(c))
and the generation time is that averaged over every birth in the run:
T = ( ∑ g(c) ) ÷ N, N births in all
The run above gives T = 2,201.8 ticks over 8,718 births. A year is 3,600
ticks, so a generation here is 0.6 of a year, and two centuries at that rate holds
720000 ÷ 2201.8 = 327 of them. Nobody chose 0.6 of a year. It fell out of how
long it takes an animal of these sizes to put the price of a child into its store, on a
valley of this brightness, at this crowding, and it would be a different number on a
dimmer valley without one line of code changing.
The three quartiles are the more interesting reading, because the mean hides them. A quarter of all births in this run happened within 249 ticks of the parent's own birth, which is under a third of a season: an animal barely out of its own opening store making a child of its own. The middle birth waited 1,579. The slowest quarter waited 3,586 ticks and up, a whole year and more. One valley, one seed, mostly one lineage, with a generation time that runs by a factor of fourteen from end to end of it.
One cross-check to do by hand, because it catches a mistake that is easy to make. The deepest living creature in the eleventh year stands 49 generations from a founder, and the herd had been standing about 36,900 ticks by then. Divide: 36900 ÷ 49 = 753 ticks a generation, which is nothing like the 2,201.8 the mean says. Both are right. The deepest chain in a pedigree is by construction the chain of quickest births, so it runs at the fast end of that quartile table and not at the middle of it. A mean over all births and the depth of the luckiest line are two different questions, and reading the second as an answer to the first will give you a generation time three times too short.
Two centuries of no-score evolution
Two blocks of that run are the chapter's finding. The first answers a question the valley was never asked: every animal is put in one of two lists, the ones that made at least one child and the ones that never did, and both lists are read for how long they stood there and how far they walked. The reading is flat. The ones that bred walked 0.002436 cells a tick over their lives and the ones that never bred walked 0.001946, a fifth of a difference on a quantity that runs over four orders of magnitude between one animal and another, and the ones that never bred lived longer: 3,049 creature-ticks against 2,698. Walking bought nothing whatever in this valley, and the animals worked that out.
Creature 689 was born on tick 26,644, fifteen generations from anything a founding put there, and it was handed 18,650 creature-ticks before its store reached nothing: five years and two months, in a valley whose average birth-to-birth gap is seven months. It outlasted every one of the eight thousand seven hundred and forty-two other animals that ever stood on that ground. In those five years it covered 39.0503 cells of ground, which is 0.002094 of a cell in a tick, and it never at any point got further than 7.8768 cells from the place it was set down. The valley is sixteen cells across. This animal was born, ate what was in reach of where it happened to land, made children that were set down beside it, and died within eight cells of the spot, and it did better at all of that than anything else in two hundred years.
$ go run ./cmd/lines -mode curve -years 200 -every 20 | tail -36
the ten body factors of the last 100 genomes this valley made, against 1.00 in every founder
i gene lowest mean highest the row now
0 Bulk 0.2500 0.2516 0.3404 10.0648
1 Full 0.5747 0.7568 1.0000 302.7009
2 Basal 0.4460 0.9143 2.1608 0.0037
3 Work 0.4491 0.8572 2.5925 0.5143
4 Bite 0.7071 2.2948 3.6207 0.5737
5 Convert 0.4652 0.9453 1.1054 3.7814
6 Reach 0.3513 1.0311 2.2238 1.0311
7 Sight 0.9124 1.1013 1.9940 13.2153
8 Top 0.5212 1.0494 3.5707 0.4722
9 Swing 0.6532 1.2434 3.5541 0.1036
how far apart those genomes are 0.1193
the books in grams
the valley opened with 67.000000 plants founded on the first tick
built out of light 1365912.260228 every gram the leaves ever fixed
creatures stood up 1000.000000 bodies the run opened with
built out of a store 98820.682683 grams a parent minted into a child
in 1465799.942911
standing 0.000000 living plant tissue
walking 0.000000 living creature bodies
in the air 0.000000 seeds still flying
in the bank 0.000000 seeds waiting in the ground
lying dead 0.000000 litter: plants and carcasses together
burned as upkeep 793630.986201 grams a plant spent on standing there
rotted 114713.174002 grams the litter has burned off
blown away 0.000000 seeds that left over the rim
eaten 557455.782710 grams a mouth took and a store spent
out 1465799.942913
difference -0.000002 -1.803e-06, which is the last bits of the adding
719550 ticks in 52.206s, 13783 ticks a second (measured here; yours will differ)
The body table says the same thing in the other currency. Bulk reads 0.2516
across the last hundred genomes the valley made, and the lowest of them reads exactly
0.2500, which is the bottom of the range the genome chapter clamped body factors into. The
gene is pinned against its own floor and the copies are still pushing. Stamped onto the
founding row that is an animal of 10.0648 grams, a quarter of the forty-gram browser the
valley was founded with, and the hundred it made last run from 0.2500 to 0.3404, which is
between ten and fourteen grams of animal and nothing else.
Work out why and there is no mystery in it, only arithmetic that the volume before this
one wrote down for reasons that had nothing to do with evolution. A standing body is charged
Bulk × Basal every tick it exists. A child costs Bulk ×
Convert to build. Travelling costs Work × Bulk × v².
Three of the valley's bills are proportional to bulk and not one of its incomes is: a
mouthful is Bite × Convert and the store holds Full, and
neither of those knows how big the animal carrying it is. Being small is free in this
world, and free things run to their clamp. Bite went the other way for the
same reason, up to 2.2948, which is a mouthful of 0.5737 grams against the founding
quarter gram: more in per bite, less out per tick, and nothing anywhere had to be told
that this was the thing to want.
And the books close on all of it. The valley opened with 67 grams of plant and 1,000 grams
of creature, fixed 1,365,912.260228 grams out of light over two centuries, minted
98,820.682683 grams of newborn out of parents' stores, and finished holding
nothing. Standing 0.000000. Walking 0.000000. In the bank 0.000000. Lying dead
0.000000. The blown-away line reads 0.000000 too, because the rim was walled, so not one
gram left the valley: every gram it ever had is on the burned, rotted and eaten lines,
which is to say it went through something's metabolism and came out as heat. The two
totals differ by -1.803e-06, printed instead of rounded away, which is what
several hundred million additions taken in two orders costs.
The in the bank line is the one that says this is permanent. A valley whose
plants have all been eaten can come back, because the bank is full of buried seed waiting
for a warm spring, and the terrarium volume built the bank for exactly that. This bank
holds nothing. Stop the same run at the twelfth year and it reads 1.500000 grams of seed;
stop it at the thirteenth and it reads 0.000000, which is where the plant count reaches
zero too. Sixteen hundred mouths took every seedling that came up on the tick it came up,
until there was nothing left underground to come up. The last animal starved three years
later onto ground that could not grow anything, and a hundred and eighty-five years of
sunlight fell on it: built out of light reads 1365912.260228 at the twentieth
year and the same figure at the two hundred and first.
Why a wall fails as pressure
The terrarium volume drew this diagram once already, for the plants, and its conclusion carries over without a word changed. Follow the loop the animals run. A store buys a child; the child is an animal; the animal eats; eating fills a store. Every arrow on that ring reads more of this gives more of that, and nothing on it falls as the animals crowd in, so the loop does not slow down at any population whatever.
What it runs into decides everything. A brake lowers the rate at which the loop feeds itself as the quantity grows, and a braked loop settles where the gain is exactly one. A wall takes units of the quantity away from outside the loop, so the loop goes on demanding growth at full strength while the surplus is killed. Braked systems settle; walled systems pile up against the wall and die there, and the register is the receipt: 8,743 struck off, 8,718 of them born into a valley that could not feed them. Grazing looks like a brake and works like a wall, because past a certain crowding it takes standing tissue below the mass a plant needs to hold itself up, and the plant it was slowing down against stops being a plant. That is the whole of what happened between the tenth year and the thirteenth.
The ground is asked before birth
Something has to change, and the temptation is to change the animal: charge it for sitting still, pay it for covering ground, cap how small a body may get. Each of those is a term in a fitness function in different clothes, and the previous chapter took the last such term out of this world on one argument: a search inside a score can only ever find the opinion the person who wrote the score put there.
So look at the ground instead, and at what it has never said. The terrarium volume decided, for reasons of its own that had nothing to do with animals, that a cell of soil carries one root: a seed landing on a cell something is already rooted in does not germinate there, and the whole of that valley's competition for space comes out of that one sentence. Nothing was ever decided about bodies. In the thirteenth year of the run above there were 1,742 animals standing on a hundred and ninety-two cells of ground, nine to a cell, and not a line of code anywhere had an opinion about it.
A cell of ground carries one body. A child drawn onto ground somebody is already standing on is not born; the ground is asked before the birth spends a number, so a creature with no open cell within reach of the placement draw is not asked at all; and every number a birth that happens anyway does spend is spent.
Read that back and check it against the thing the volume is protecting. It compares no two creatures: there is no ranking, no tournament, no board and no column to sort. It reads nothing an animal did with its life: not its speed, not its store, not the ground it covered, not how long it stood there. It cannot be tuned to prefer an outcome, because it has exactly one setting and that setting is one, the same number the soil has been using for roots since the terrarium was built. An animal that never moves is not charged for not moving. The ground beside it fills up with its own children, and the ground will not take another.
// internal/gene/birth.go — inside Pool.Breed, before anything is drawn
// The ground is asked before any generator is, for the reason
// the store is: a creature the valley has nowhere to put a
// child of costs this pass a handful of comparisons and not a
// single number. A child is set down inside a cell of its
// parent, so the ground it could land on is the parent's own
// cell and the eight touching it, and a creature with all nine
// of them carrying a body is not asked.
if p.Room && !p.Late && !p.space(b, v) {
p.Full++
continue
}
p.Asked++
// space reports whether this valley has anywhere to set a child of this
// creature down: an open cell among the nine the placement draw can
// reach, which is the cell the parent is standing on and the eight
// round it. Open water is not ground and a cell already carrying a body
// is not open.
func (p *Pool) space(b *beast.Beast, v *terra.Valley) bool {
at := b.Underfoot(v.Bed)
for dy := -1; dy <= 1; dy++ {
for dx := -1; dx <= 1; dx++ {
c := at.Offset(dx, dy)
if !v.Bed.In(c) || v.Bed.Kind(c) == sim.Water {
continue
}
if !p.stood[c] {
return true
}
}
}
return false
}
// internal/gene/birth.go — inside Pool.Breed, after the price is met
// The ground is asked last, because a child that cannot be
// paid for is never set down anywhere. A cell already carrying
// a body has no room for a second, and a birth with nowhere to
// go does not happen: no gram is minted, the store keeps the
// price, and every one of the numbers the birth spent is spent.
if p.Room {
cell := under(at, v.Bed)
if p.stood[cell] {
p.Nowhere++
p.Log = append(p.Log, e)
continue
}
p.stood[cell] = true
}
The rule is asked twice because there are two questions. Before anything is drawn: could this animal put a child anywhere at all, which is nine lookups over the nine cells the placement can reach. After the draws: is the cell the placement named free, which is the rule itself, and it refuses exactly the way the birth chapter's refusal for want of a store refuses. The numbers stay spent, the event goes in the log, and nothing about the streams depends on the answer. There is no redraw, for the reason there has never been one anywhere in this volume: a birth that asks the generator again when it dislikes the first answer spends a count of numbers that depends on the numbers.
$ go test ./internal/gene/ -run 'TheGroundIsAsked|AnAskEnds' -v
=== RUN TestTheGroundIsAskedBeforeABirthDrawsAnything
--- PASS: TestTheGroundIsAskedBeforeABirthDrawsAnything (0.00s)
=== RUN TestAnAskEndsOneOfThreeWaysAndCostsTheSameEitherWay
--- PASS: TestAnAskEndsOneOfThreeWaysAndCostsTheSameEitherWay (0.00s)
PASS
ok theworld/internal/gene 0.006s
Both stand twenty-five creatures on a five-by-five block of ground, which is the smallest arrangement where some of them have a body on all nine cells in reach and the rest do not. The first demands that every one of the twenty-five was either asked or skipped, that some were skipped, and that the numbers spent come to the price of a birth times the number asked. The second runs eight phases and demands that every ask ended in exactly one of the three ways, that all three cost the same, and that the grams the pool minted are the bodies of the births that went ahead and nothing else.
The first version of this had one check and not two, and the one it had was the second one. It is the obvious way to write it: make the child, price it, draw where it goes, and then refuse it if that cell is taken. The rule it implements is word for word the rule above. The valley it produces is a different valley, it takes forty times as many asks to produce it, and it spends two thousand two hundred million random numbers on eight years of ground that could have been settled with a comparison.
// internal/gene/birth.go — inside type Pool struct
// Late is the room rule asked in the wrong place: the ground
// questioned after the birth has drawn its numbers instead of
// before, so a creature standing on full ground is asked for a
// child it cannot be given, over and over, and spends the whole
// price of a birth in numbers every time. It is kept behind a flag
// so what that costs can be run instead of described, and it is
// false in every pool this book ships.
Late bool
$ go run ./cmd/lines -mode late -years 8
lines: one rule about the ground, asked in two places, 8 years each
born asks numbers
asked before the birth spends anything 917 46705 55532245
28800 ticks in 9.163s, 3143 ticks a second (measured here; yours will differ)
asked after the birth has spent its 1189 898 1852277 2202357353
28800 ticks in 34.916s, 825 ticks a second (measured here; yours will differ)
The reasoning from symptom to cause starts at the asks column. In a valley
whose ground is full, a great many animals sit above the breeding threshold for years at
a time: they have paid for nothing, so their stores stay full, so they clear the price
of a child on every single tick of their lives. With the ground asked first, each of
them costs the pass nine comparisons a tick and no numbers. With it asked last, each of
them is a full birth every tick: a mate drawn off stream 18, 396 numbers off 17, 790 off
16 and two off 20, a genome deep-copied, crossed and mutated, and then thrown away
because the cell it was aimed at has somebody on it. That is 1,852,277 asks against
46,705 for the same eight years.
The part that matters more than the speed is the born column: 917 against
898. Those are two different valleys. Every one of those wasted births moved four
generators along, so the mate every later birth chooses, the genes it inherits and the
cell it lands on are all drawn from different places in the sequence. The birth chapter
pinned this as canon in one sentence, and it is the sentence that was broken here: a
creature that cannot breed must cost the pass nothing at all, because the moment it
costs a draw it has changed the world for everybody after it.
The ground-pressure rerun
Same seed, same ground, same twenty-five founders off stream 12, same identity genomes and the same brains off stream 14, same price for a child and the same threshold. One sentence added to what the ground will carry.
$ go run ./cmd/lines -mode room -years 200 -every 20
lines: 16x12 valley, tick 901, year 1 summer, 90 plants standing at 4654.1 grams
172 cells a root can live in, 48 of them pockets cracked into the rim,
the rim walled, 0.0010 of a cell's nutrient creeping into its neighbours a tick
25 creatures founded on stream 12, each stamped from an identity genome,
given a brain off stream 14 and a store of 200.0000
a creature breeds when its store closes a tick at or above 360.0000
a cell of ground carries one body: yes
year alive born refused nowhere gone lines deepest plants standing walked
2 7 14 5 29 32 4 2 90 6544.5 0.00607
3 9 29 17 69 45 1 5 121 7163.4 0.00371
4 17 56 30 135 64 1 9 123 6465.7 0.00251
5 22 144 136 779 147 1 15 124 7318.8 0.00368
6 69 322 1066 5356 278 1 20 124 6820.2 0.00281
7 207 667 3115 24190 485 1 25 123 4402.7 0.00141
8 264 849 3842 35630 610 1 25 124 3306.5 0.00143
9 244 914 4007 41721 695 1 27 124 3131.4 0.00085
10 252 965 4198 44842 738 1 27 124 2802.6 0.00060
11 254 988 4278 47036 759 1 27 123 2612.6 0.00043
12 256 1008 4395 49589 777 1 27 123 2582.7 0.00033
13 256 1027 4620 53707 796 1 27 123 2411.5 0.00027
14 259 1037 4717 57566 803 1 27 124 2346.4 0.00023
15 258 1040 4761 58961 807 1 28 124 2303.2 0.00020
16 265 1048 4872 61820 808 1 29 124 2238.1 0.00019
17 263 1050 4872 61850 812 1 29 124 2249.8 0.00017
18 263 1050 4872 61850 812 1 29 121 2145.8 0.00017
19 261 1050 4872 61850 814 1 29 121 2243.0 0.00017
20 260 1051 4877 62225 816 1 29 124 2272.2 0.00016
21 259 1051 4877 62225 817 1 29 122 2233.1 0.00014
41 268 1094 5212 67695 851 1 30 124 2092.2 0.00007
61 268 1133 5473 72877 890 1 30 122 2059.7 0.00005
81 274 1184 5626 77811 935 1 30 123 2010.1 0.00003
101 278 1206 5747 80538 953 1 30 119 1873.2 0.00003
121 278 1272 7498 101874 1019 1 30 123 2090.8 0.00002
141 282 1280 7498 101909 1023 1 30 120 1944.6 0.00002
161 281 1292 7660 105136 1036 1 30 123 2013.8 0.00002
181 281 1292 7660 105136 1036 1 30 121 1924.5 0.00001
201 283 1298 7665 105216 1040 1 30 119 1839.4 0.00001
25 founded, 1298 born, 1040 struck off, 283 still walking after 719550 ticks
114179 creatures were asked for a child: 1298 made one, 7665 could not pay for the
one they described and 105216 had nowhere to put it
181851522 were over the threshold on ground with no open cell and were not asked
the pass spent 135758831 numbers, which is 1189 for every creature it asked
the generation time, which nothing anywhere set
births it is measured over 1298
ticks between a parent's birth and its child's 32996.6
the quickest quarter of them, up to 427.0
the middle one 1642.0
the slowest quarter of them, from 6091.0
years that mean is, at 3600 ticks a year 9.2
generations two centuries of it holds 21.8
what the ground paid for, over every creature this valley stood up
how many mean ticks mean cells cells a tick
made at least one child 605 180646.5 9.3256 0.000052
never made one 718 116375.2 9.5156 0.000082
the creature that outlasted every other one in this valley
which one it was 224
generations from a founder 14
the tick it was born on 15951
creature-ticks it was handed 704499
years that is 195.7
cells of ground it walked in all of them 0.3375
the furthest it ever got from where it began 0.3375
cells a tick, which is its whole travelling 0.000000
the ten body factors of the 283 still walking, against 1.00 in every founder
i gene lowest mean highest the row now
0 Bulk 0.2500 0.3830 0.9411 15.3185
1 Full 0.5516 0.9553 1.2557 382.1174
2 Basal 0.2959 0.9972 1.2679 0.0040
3 Work 0.4443 1.0059 2.7648 0.6036
4 Bite 0.8615 2.3007 2.7583 0.5752
5 Convert 0.7655 0.9319 2.7519 3.7274
6 Reach 0.7065 1.0058 1.5450 1.0058
7 Sight 0.9079 1.0126 1.0832 12.1508
8 Top 0.7567 1.0658 3.7950 0.4796
9 Swing 0.2995 1.0571 3.2159 0.0881
how far apart those genomes are 0.0840
the books in grams
the valley opened with 67.000000 plants founded on the first tick
built out of light 27128627.913107 every gram the leaves ever fixed
creatures stood up 1000.000000 bodies the run opened with
built out of a store 25447.355281 grams a parent minted into a child
in 27155142.268388
standing 1839.353414 living plant tissue
walking 4335.127020 living creature bodies
in the air 0.000000 seeds still flying
in the bank 1089.000000 seeds waiting in the ground
lying dead 45.380941 litter: plants and carcasses together
burned as upkeep 6431975.476139 grams a plant spent on standing there
rotted 119102.279932 grams the litter has burned off
blown away 0.000000 seeds that left over the rim
eaten 20596755.647952 grams a mouth took and a store spent
out 27155142.265399
difference 0.002989 2.989e-03, which is the last bits of the adding
719550 ticks in 5m51.516s, 2047 ticks a second (measured here; yours will differ)
The alive column climbs through the same first years and then stops
climbing. Seven, nine, seventeen, twenty-two, sixty-nine, 207, 264 in the eighth year, and
from there to the two hundred and first every reading falls between 244 and 283. That is a
hundred and ninety years inside a band forty animals wide. The plants column
beside it never leaves 119 to 124, and the standing crop settles between eighteen hundred
and twenty-three hundred grams, about a third of what the same ground was holding before
the herd got going.
Nobody chose two hundred and eighty. There is no cap in the code, no maximum, no count of animals compared against anything: there is a hundred and ninety-two cells of ground and a rule that a birth needs one of them, and the population walked to the number those two produce and stayed there for two centuries.
The nowhere column is the rule doing the work, and its size is the surprise:
105,216 births described, priced, paid for in numbers and then refused because the cell
the draw named already had a body on it, against 1,298 that went ahead. Eighty-one
refusals to a birth. The line above it is larger again. A hundred and eighty-one million
times a creature closed a tick over the price of a child with no open cell in reach and
was not asked at all, and each of those would have been 1,189 numbers if the ground had
been asked a step later.
Set the two centuries side by side and the sharpest difference is in what the valley is made of. The first made 8,718 animals and buried 8,743. This one made 1,298 and buried 1,040 and still has 283 walking: a seventh as many animals ever existed in the valley that kept them.
The generation time is where that shows up as a number. It reads 32,996.6 ticks against 2,201.8: nine years and two months for a generation against seven months, and 21.8 generations in two centuries against 327. The quartiles say where that mean came from. The middle birth of this run waited 1,642 ticks, which is very nearly the 1,579 of the run that ate itself, and the quickest quarter still happen inside 427. What has changed is the tail. In a valley whose ground is full, an animal can hold a full store for decades waiting for a cell to come free, and those decades are what drag the average out to nine years. A birth used to wait on a store filling up. It now waits on somebody dying.
Which is also why the travelling table reads as it does, and this is the part the repair does not fix. The 605 animals that managed a child were handed 180,646 creature-ticks apiece on average and the 718 that never did were handed 116,375: fifty years against thirty-two, with both groups walking about nine and a half cells in their entire lives. Walking still buys nothing. Lasting buys everything, and it always did.
Then creature 224, which is the sentence to keep. It was born on tick 15,951, fourteen generations from a founder, and it was handed 704,499 creature-ticks: a hundred and ninety-five years and eight months, in a two-hundred-year run. In the whole of that time it covered 0.3375 of one cell of ground, and the furthest it ever got from the place it was set down is that same 0.3375, so it did not even wander back. An animal stood on one cell of The Hollow for very nearly two centuries, ate whatever grew inside its reach, had children set down beside it, and outlasted everything else in the world.
The body table has moved in a direction the rule implies and never mentions.
Bulk reads 0.3830 across the survivors against 0.2516 in the valley that ate
itself, and its highest is 0.9411: fifteen grams of animal instead of ten, with something
near the founding size still standing. The floor is still occupied, so the pressure to be
small has not gone, but it is no longer the only thing selection has to say. The spread
across the living genomes is 0.0840 against 0.1193. Bite is the one factor
that did not move at all, 2.3007 here and 2.2948 there, arrived at twice by two valleys
that ended two centuries apart in every other respect.
And the books close. Twenty-seven million one hundred and fifty-five thousand grams in and the same out, differing by 0.002989 of a gram, printed instead of rounded to a comfortable zero. The holding lines are where this run and the other one part company: 1839.353414 standing, 4335.127020 walking, 1089.000000 waiting in the bank, and nothing at all over the rim.
Why returning pressure changes population
Strip the valley out and there are two mechanisms here, and the second one is the general lesson.
The first is negative feedback arriving through a resource instead of through a measurement. Nothing here counts the animals, computes a density, or compares this year's roster with last year's. Every animal occupies a cell, cells are finite and a birth needs one, so the harder the ground is used the more often a birth fails, and that failure rate is a function of the population without anything having to work out what the population is. It is the cheapest control loop there is and the one real ecologies mostly run on: nesting sites, territories, holes in a reef. The quantity limits itself by being in its own way.
The second is the fork every runaway in this book arrives at. You can measure the thing that is running away and push back on the measurement, or you can change the world so that running away costs something it did not cost before. Pushing back on a measurement means somebody writes down what to measure, and from that moment every creature is optimising that person's sentence. Changing the world means writing down a fact, and a fact has no opinion about which animal you were hoping would win. This valley's fact is that ground is finite and a body stands on some of it.
What is lost belongs on the page. The rule does not make the animals move, and the travelling columns say so plainly. It does not stop a lineage settling on the smallest body its ranges allow; it moves where that body settles and repeals none of the arithmetic underneath it. It is not a general cure either: the same rule on half the ground buys forty years and loses the valley anyway, which is the second exercise below. A ground rule fixes the thing it is a fact about and nothing else.
- Given a pedigree, You can work out a generation time as a mean over births, say why the depth of the deepest surviving lineage gives a different and smaller answer, and name which of the two a quartile table belongs to.
- You can point at the year in the population table where the standing crop passed the
point it could come back from, and say what it means that the
plantscolumn still reads 119 in the year thestandingcolumn reads nothing. - Handed a grams ledger with zeros on every holding line and a non-zero total, You can say where two centuries of sunlight went, and which single line tells me whether the valley can ever recover.
- You can name the three bills in this world that scale with
Bulkand the two incomes that do not, and use them to predict which end of its range a body factor runs to when nothing scores anything. - You can state the room rule in a sentence that mentions no creature trait, and defend it against the charge that it is a fitness term wearing a hat.
- You can explain why asking the ground after a birth has drawn its 1,189 numbers gives a different valley rather than the same valley more slowly.
Exercise 1 — take the terrarium's two repairs back out. The
ground this page runs on has a walled rim and nutrient that creeps sideways, and no
creature chapter before it switched either on. Predict what two centuries look like
without them, then run
go run ./cmd/lines -mode curve -years 200 -every 20 -wall=false -creep 0.
The herd is beside the point in that run: 26 animals are born, the last of them is struck off in the fifth year, and the rest of it is a plants-only valley for a hundred and ninety-six years. The two columns to watch are the last ones. A hundred and twenty-four plants holding 4828.8 grams at year 21; 118 and 3098.8 at year 61; 95 and 1241.0 at year 141; 75 and 637.0 at year 201. That is a slow bleed and not a crash, and the ledger names the leak: 10,725 grams blown away over an open rim, with the standing crop down by seven eighths at the end of it.
That is the terrarium volume's own finding arriving on a different map, and it is why both rules are on for every run on this page. A repair to the animals means nothing on ground that is quietly emptying underneath them, and two centuries is long enough for the emptying to matter and short enough that it is easy to miss.
Exercise 2 — the same rule on half the ground. The
room rule held the sixteen-by-twelve valley for two centuries. Predict whether it
holds a twelve-by-eight one, then run
go run ./cmd/lines -mode room -years 200 -every 20 -cols 12 -rows 8.
It does not. The population settles at 123 animals in the twenty-first year and 120 in the forty-first, which looks exactly like the run on the page, and then the valley is empty by the sixty-first: 1,764 born, 1,787 struck off, no plants and nothing in the seed bank. Forty years of a level population and a level population are two different things, and only running past the forty says which one you have.
The warning is in the columns beside it, which the run on the page does not have. That ground has 75 cells a root can live in against 172, and its plant count is falling while the population holds: 35 plants at 674.3 grams in the twenty-first year, 30 at 370.8 in the forty-first. The room rule caps the animals at what the ground has cells for, and on this map that cap sits above what the ground can grow food for. A rule that fixes one limit knows nothing about the other.
Exercise 3 — found the same valley with a different herd.
Twenty-five animals were stood up on the ground that ate itself. Predict what a
smaller and a larger founding do to the boom, then run
go run ./cmd/lines -mode curve -years 200 -every 20 -herd 8 and the same
with -herd 64.
Neither of them booms, and neither of them collapses. Eight founders make 20 children and the last of the line is struck off in the fourth year. Fifty-one founders, which is what asking for sixty-four scatters onto distinct cells, make 53 and are gone in the fourth year as well. Both valleys then stand there with about a hundred and twenty-four plants and six thousand grams of crop for a hundred and ninety-six years, and the seed bank of the eight-founder run finishes holding 4070.000000 grams, which is a valley in perfectly good health with nothing walking on it.
So the boom is not what usually happens on this ground: it is one of two endings, and the other is a herd that never gets going at all. Why twenty-five reaches the first and eight and fifty-one both reach the second is not something three runs can answer. What they do settle is that one run is one run, on one seed, at one founding, and that the ending on the page above is a thing this ground does rather than the thing it does.
Two centuries of one seed, run twice, with one sentence about what a cell of ground will carry as the only difference between them. Under that sentence both runs are the same machinery down to the draw: the same twenty-five brains off stream 14, the same 378 weights in every head after them, the same two numbers a gene off stream 16. Every animal in both valleys inherited a controller of exactly the size its parent's was, wired to exactly the inputs its parent's was wired to, and got better or worse at using it. Nothing in either two hundred years added a connection anywhere, because a flat row of numbers has no place to put one. The most an animal in either valley could ever become was a better setting of the same twelve neurons, and neither of these two hundred years says anything whatever about what a lineage might have found if that had not been true.