Alexey Meshkov

When does evolution pay for learning

In the first version of the world the brain did not grow because the animals had nothing to remember. In the second I gave them lifetime learning and tested which worlds it evolves in. Learning appeared exactly where theory predicts. The brain still did not grow.

Iteration 2 of the evo-brain-sim prototype. A toy model, not a study: the conclusions apply to the model. October 2026.

A follow-up to iteration 1, which found no “volatile climate → bigger brain” link. The main hypothesis then was that without memory and learning a changing world gives the brain no advantage.

In short

  • Learning pays when the world changes between generations but stays stable within a lifetime. If the world never changes, knowledge moves into the genes. If it changes too fast, what is learned goes stale before it pays off. This supports Stephens’s classic hypothesis.
  • Moderate change is best, not the most frequent. Learning peaks where the “right” food changes once every few generations, not every generation.
  • Learning helps the individual, not the species. A learner takes good food from non-learning neighbours. But a population where nobody can learn does no worse.
  • Brain and memory did not grow. That is how the model is built: learning in it does not need neurons. A limitation of the model, not a finding about nature.

What changed in the world

Instead of a drifting climate, six fertile patches wander across the map. Patches come in two colours: food of one colour is nutritious, the other is empty. Which colour is “good” changes, controlled by two knobs:

  • Between generations. Once per “generation” (100 ticks — an average lifetime) the good colour flips with some probability: from “never” to “every time”.
  • Within a lifetime. How often the colour flips during an individual’s life: from “never” to “every ~6 ticks”.

The animals gained:

  • Colour value — attraction to food of a given colour. It is the sum of an innate part (in the genes, mutates) and a learned part (zero at birth, not inherited).
  • Learning — the learned part changes by a simple rule: “what I ate” × “better or worse than I expected”. Learning rate is inherited; zero means “does not learn”. Learning costs energy — at the maximum, as much as one neuron.
  • Memory — up to four neurons that remember the previous step. Each costs as much as a regular neuron.

At the start, nobody can learn. There are no predators in iteration 2: in the new world they always went extinct.

The road to a working model was indirect, and that is a result too. At first, “learning all network weights from reward” turned out to be harmful: learners lost to non-learners even where there was nothing to learn. It worked once genes and learning got the same task — colour value — on equal terms.

The mechanism, isolated

First without evolution: half the population are “learners”, half are rivals. What share of learners remains after 1,200 ticks?

Worldstablechanges between generationsfast within a lifetimefast within and between
learners vs “naive” (like both colours)0.990.810.540.45
learners vs “oracles” (born knowing the answer)0.001.000.930.96

In a stable world innate knowledge beats learning: the oracle wins. When the world changes between generations, learning beats the genes. When it changes too fast, learners are no better than the naive. Oracles lose to everyone there: their “knowledge” is harmful half the time.

Share of learners competing against naive individuals and oracles in four types of world

The main map: where learning evolves

A 5 × 5 grid: horizontal axis — change between generations, vertical — within a lifetime. Each cell is 6 runs of 10,000 ticks. The number is the learning rate evolution reached (starting from zero).

Heat map: mean learning rate at the end of evolution by change between generations and within a lifetime
Dark means learning evolved, light means it did not. The top row (the world changes every ~6 ticks within a lifetime) is almost white. Chart labels are in Russian.
  • Fast change within a lifetime kills learning. The most reliable effect: with a colour flip every ~6 ticks the learning rate drops almost to zero (0.03).
  • Some change between generations is needed, but not the maximum. In the row stable within a lifetime: 0.23 → 0.65 → 0.70 → 0.72 → 0.45. The peak is at a flip roughly every 2–3 generations, not every one.
  • Why not in the corner. Generations overlap in the model. If the colour flips every 100 ticks, for most adults that is a change during their life, and what everyone learned goes stale at once. So the two knobs are not fully independent in this model.
  • Why learning is not zero in a stable world (0.23, wide spread): knowledge moves into the genes, after which learning is simply useless. But it is cheap, and selection against it is weak.
Learning-rate profiles along each of the two grid axes

Switching learning off: what is lost

Take populations after evolution and switch learning off in a copy of the world. Two ways of comparing.

Measureflip every generationpeak pointcontrol: fast change within life
population without / with learning (switched off for all)1.01 ± 0.081.08 ± 0.081.02 ± 0.06
share of “switched off” at the end (off for half, start 0.5)0.36 ± 0.110.06 ± 0.060.77 ± 0.11

The conclusion cuts both ways, and that matters. A population where nobody can learn does no worse: population and energy are within noise. But in direct competition non-learners lose: at the peak point almost none are left. Where the world changes too fast, the “switched off” win instead.

It is the same picture as with the “trackers” in iteration 1: what benefits the individual does not benefit the population. A learner takes good food from a neighbour, but the total food supply does not grow.

Population and share of individuals without learning after ablation at three points

The cost of learning works

Learning cost0base×2×4
final learning rate0.620.450.300.22
share of energy spent on learning00.6%1.0%1.8%

The more expensive learning is, the lower its evolved rate, and the relationship is monotonic. Even free learning does not run up to the maximum: learning too fast is noisy. That the cost is actually charged was verified directly in every run.

Learning rate at four levels of learning cost

Is it robust

Repeated on five neighbouring parameter sets: more expensive learning, fast and noisy patches, more small patches, harmful “bad” food, cheap life with long-range senses.

  • “Fast change within a lifetime kills learning” — significant in 4 of 6 sets. In one set it cannot be compared: the population goes extinct. In another the direction is the same but the spread is large.
  • “Learning pays more with some change between generations than with none” — significant in all 6.
  • “Moderate change pays more than change every generation” — same direction in all 6, but significant in only 2. A weak effect.
Learning rate at different between-generation change in six parameter sets

Genes take over the knowledge

The stable world shows something beautiful: at first almost half the knowledge about the good colour comes from learning. Then the innate value grows in the same direction, catches up with and overtakes the learned one, and the learned correction falls to zero. There is nothing left to learn: the genes are already right. This is called genetic assimilation.

But the classic Baldwin effect — learning speeding up the appearance of innate knowledge — was not confirmed. With learning, genes reach the answer no faster than without it: 733 ± 197 ticks vs 640 ± 54. If anything, the opposite: those who can learn suffer less from bad genes, so selection on the genes is weaker.

Why in this model: the innate value changes in small steps, and each step is immediately useful. Selection needs no hint from learning. In the classic Hinton–Nowlan model only a fully correct combination of genes pays — a “needle in a haystack” — and there learning helps find it.

Innate and learned colour value over time in a stable world, with and without learning

What did not happen

  • The brain did not grow. Hidden neurons 0.1–0.5, memory neurons 0.07–0.24 at every point, with no pattern — the mutational background around zero. The reason is the model’s design: both innate and learned value act on the choice of action directly, without neurons. “Go to the good colour” is solved without a “brain”, and memory is not needed because the learned value itself stores the past.
  • Childhood did not appear. The gene for “how many ticks a parent feeds its young” stayed at random-drift level (~2 ticks) at every point tested. A young animal in the model can only learn from its own food, so feeding teaches it nothing and costs the parent dearly.
Grid maps: memory, brain size, innate and learned preference, population
The other maps over the same grid: memory and brain size are near zero almost everywhere.

Limitations. The “brain” in the sense of neuron count did not grow: learning and neurons are independent in the model. Learning is tailored to the task; the general rule “learn all weights from reward” was harmful in this model. The two time knobs are not fully independent: generations overlap, which probably explains the mid-range peak. The stable world is the noisiest point. Learning gives no population-level benefit. No predators, a small world (56 × 56, 200–600 individuals), 13 of 150 runs ended in extinction. Significance was assessed crudely (difference greater than two standard errors) with no correction for multiple comparisons.

What’s next

  1. Learning that needs neurons (plastic synapses inside the network) — to reconnect “learning” and “brain size”.
  2. Separate the time knobs more strictly: discrete generations, or tie the world’s “generation” to an individual’s birth.
  3. Bring predators back into the patch world.
  4. Social learning: the young learn from a parent’s example. Otherwise childhood is useless.
  5. More runs in the stable world and in the grid corners.

Code and raw data are in the evo-brain-sim repository. To discuss, message me on Telegram.