liveBook · Manning

Evolution

As explained in Evolutionary Deep Learning: Genetic algorithms and neural networks

Biological evolution is the change in heritable characteristics of populations across generations through processes such as variation and selection.

Evolution changes populations across generations by passing traits through reproduction, filtering individuals by fitness, and introducing variation through mutation. In computational models, the goal is not merely to keep the strongest individuals but to encourage adaptive change and population diversity. section 2.4.1 section 2.4.4

A deliberately simple evolutionary simulation follows this loop:

  • Represent each individual with traits and a fitness value. section 2.4.1
  • Evaluate fitness with an explicit equation tied to the traits. section 2.4.1
  • Select higher-fitness individuals as parents, mate pairs, and create offspring from shared trait values. section 2.4.1
  • Mutate offspring occasionally by changing trait values within configured bounds. section 2.4.1
  • Repeat evaluation and reproduction while tracking population, average fitness, or other attributes. section 2.3 section 2.4.1

A cell population optimizing strength

A life simulation assigns each cell random health and strength values. Health is adjusted using strength, and health thresholds determine reproduction and death. Plotting population size, average strength, and average health makes the optimization process observable across generations. section 2.3

Listing 2.6 EDL_2_3_Simulating_Life.ipynb: Life functions updated
def create_cell():
  return dict(
      health = random.randint(1, 100),
      strength = random.randint(1, 100)     #1
    )                     
 
def birth(offspring):
  return [create_cell() for i in range(offspring)]
 
def evaluate(cells):                        #2
  for cell in cells:
    cell["health"] *= cell["strength"]/100  #3
  return cells

Inspect the minimal Python functions that create cells with random traits and evaluate health from strength before adding selection and mutation. section 2.3

The model is intentionally simplified: averaging is only one inheritance mechanism, selection has many variants, and long mutation-driven runs may produce only minor changes. Experiments can change target functions, operators, crossover, selection, and mutation parameters. section 2.4.1 section 4.1.2

How Evolutionary Deep Learning: Genetic algorithms and neural networks covers it

How deep it goes
Implements simplified life simulations with fitness, selection, inheritance, mutation, plotting, and parameter experiments rather than biological genetic detail.
Examples
Demonstrates cell populations, inherited traits, fitness equations, mutation rules, live plots, and notebook exercises that vary evolutionary operators.
What it assumes
Assumes a prior simple life simulation and notebook execution, while introducing trait inheritance, fitness, selection, and mutation incrementally.
What you can do after
Build it from scratch as a Python life simulation, then modify fitness functions, inheritance, selection, mutation, and monitoring parameters.
How it connects
Connects natural selection, fitness, mutation, genetic algorithms, evolutionary computation, and population diversity.

Also explained in

Compare how 3 books explain evolution →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Evolutionary Deep Learning: Genetic algorithms and neural networks. The section links point to the parts of the book it draws on.