Evolving a brain, stage by stage

Author

Emiel Witting

Introduction

This book follows one experiment: growing a brain in a simulation, one piece at a time, in roughly the order in which brains are thought to have evolved.

Each stage adds a small circuit to the brain of the previous stage, and changes the world so that the new circuit has something to be good for. Evolution then gets a number of generations to put the circuit to use. Each page of this book is one stage: what was added and why, the biology it is modelled on, and whether it worked.

The idea of explaining cognition in steps that follow evolution comes from the book A Brief History of Intelligence by Max Bennett. The stages do not match its chapters one to one, and you do not need to have read it to follow along.

A disclaimer: this work is not guaranteed to be scientifically accurate, and its brains do not match real brains exactly. It stays close to nature where it can, and elsewhere it just “goes for it”: it builds up to something advanced from what works, without a citation for every choice. Still, I think that following these experiments builds an intuition about intelligence that could prove useful both in neuroscience and in machine learning.

New to neurons or to evolutionary algorithms? The background page explains everything this book assumes, with a glossary.

The animals and their world

The animals live on a grid. Each has a stomach that empties a little every tick (one tick is about a second of behaviour), and faster when it moves. An animal whose stomach is empty dies.

Food grows on bushes. Once a bush’s last berry is eaten it stays empty for a long time, longer than a full stomach lasts, so an animal has to keep moving. At any moment only a small share of the bushes carries berries. A bite costs a little energy.

The objects, their names and their pictures come from the game One Hour One Life. The simulation uses a small slice of the game’s rules at each stage, and a larger one as the brain grows.

An animal senses the world through a few coarse “eyes”: a handful of directions, in each of which it sees whether something is there, how near it is, and what it looks like. What something looks like is a short list of numbers, its look. It can step forward, turn left or right, and grasp what is in front of it.

How a stage is judged

Every stage page ends with Did it work?, which answers two questions.

  1. Is the new circuit used? The evolved animals live again with the new cells silenced, a lesion. If they do clearly worse, in every seed, they were using them. This is the main criterion: a circuit that is used is one that later stages can build on.
  2. Does the new brain do better than the old one? Each stage has a main run, with the new circuit, and a control: the brain of the previous stage, put in the same new world and evolved from the same starting population. The new circuit is the only difference between them. The new brain does not have to win; it must not be clearly worse.

Evolution is noisy: one run can end almost anywhere. So every stage is run three times from different random starts (seeds), and a result counts only when it holds across them. In the charts, bars are the mean and dots are the seeds.

The comparison is measured in two ways. Each among its own kind: every final population lives again in the same set of worlds, so that no population owes its score to easier worlds. Sharing one world: half new and half old animals live together and compete for the same bushes. When the two disagree, the page says why.

The fitness that all of this measures is the well-fed lifetime: how long an animal lived from its first meal, with each tick weighted by how full its stomach was.

Under Full results, each page keeps everything else, folded away: fitness over the generations, every measure with its standard error, every lesion, and what did not work. The results table there has up to three rows: the last generations as they ran, each among its own kind, and sharing one world (head to head). The lesion chart has one bar per region: fitness with that region silenced, as a percentage of the intact population.

How to read a stage page

A page starts with a short summary box, the brain diagram and the new circuit. Where it helps, a Watching it work strip follows one animal over a few dozen ticks, so that you can see the circuit act. Then come the biology the stage is modelled on, the world it was tested in, and Did it work?. At the end, Runs links to a dashboard that replays the last generation of a run.

The diagrams and charts show more when you point at a box, an arrow, a bar or a curve, or tap it on a phone. The numbers, graphs and diagrams are drawn from data files written when a stage is run; only the text is written by hand.