Skip to content
Borregolife laboratory ES · Español

From a school project to a laboratory

It started in my first year of bachillerato (the last stage of secondary school in Spain), in computing class: I wrote Conway's Game of Life from scratch. It became my research project (TDR), where I invented a version with three species of cells and tried to turn it into an evolutionary algorithm.

The evolutionary part did not work out. Three years later I went back to the documents and the code: I fixed the three versions and finally built the missing one.

Black 10 by 10 grid with grey lines and a few red, green and blue cells
The three-species version, June 2023.

In short

  1. 2023Conway from scratch, then Borrego (three species) and Mixing. The evolutionary algorithm stays on paper.
  2. 2026The three versions fixed and playable on the portfolio.
  3. 2026This laboratory: a big board, rewind, patterns and, at last, the Evolutionary version.

What was broken in 2023

Conway

  • The code was right. The theory document said a cell stays alive with «more than 2 and fewer than 3» neighbours: there is no whole number between 2 and 3.

Borrego

  • Cells were born with 4 neighbours (it only checked for 3 of one species) and died the next generation.
  • If two species reached 3 at once, the last one the loop looked at always won.
  • Drawing while paused did not work: the new cell died instantly.

Mixing

  • A mixed cell's colour was blended with neighbours that had already moved on to the next generation: it depended on the order the grid was scanned.
  • Every newborn cell was mixed, even the child of three greens.

Why the evolutionary part failed, and how it works now

The 2023 plan was to give cells “traits” (times revived, time alive, colours it had…), select the best of each colour and let children inherit part of them. Evolution needs three things: inheritance that changes how a cell lives, variation when inheriting, and selection. The traits measured things but decided nothing.

The new version inherits what matters: each cell's own survival rules, with mutations. And nobody picks the best: whoever survives, survives.

Before publishing it I tested it with hundreds of simulated games. What came out:

  1. Mutations only. The board ended up 50 % full of a motionless grey mass: living packed together always wins.
  2. With food. Every cell of the board holds food that grows back. There is movement, but genes always drift to “I need nothing”: if you starve anyway, being strict does not help.
  3. With cost. Being permissive makes you eat more. A trade-off appears: with plenty of food the permissive ones win, with little the strict ones.
  4. With colour as a surname. Colour is inherited with a small change and the ethnic condition counts similar-coloured neighbours. Instead of everything turning grey, dozens of families live side by side.

The 2023 traits are still there, but for looking: in the laboratory, the “Inspect a cell” tool shows its age, how many generations its family has, how many times something was born in that cell and which species have been there.

Try the Evolutionary version See the rules