liveBook · Manning

Population

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

A population is a collection of candidate solutions maintained together during an evolutionary optimization process.

A population is a collection of candidate solutions maintained together during evolutionary optimization. Its value lies not only in fitness, but also in preserving diversity so evolution can adapt to change. section 2.4.4

A simple genetic-algorithm population uses a NumPy tensor: each row is an individual represented by an n-dimensional gene vector, while tensor dimensions specify population and gene counts. section 2.5.3

Listing 2.14 EDL_2_5_Genetic_Algorithms.ipynb: Creating the population
population = 100                                        #1
genes = 100                                             #2
generations = 100                                       #3
 
pop = np.random.randint(0,2, size=(population,genes))   #4
print(pop)
========================
[[0 1 1 ... 1 0 0]                                      #5
 [1 1 0 ... 1 1 0]
 [1 0 0 ... 1 0 1]
 ...
 [1 0 1 ... 0 0 1]
 [1 0 0 ... 0 1 0]
 [1 0 0 ... 0 0 1]]

Inspect the executable construction of a 100-by-100 binary population and the row-wise individual representation. section 2.5.3

A population participates in the genetic-algorithm cycle by:

  • Calculating fitness for every individual. section 2.5.8
  • Selecting parents, producing children through crossover, and applying mutation. section 2.5.8
  • Replacing the current generation and inspecting maximum, minimum, mean, and standard-deviation fitness across the population. section 2.5.8

One-max evolution

A binary population evolves for 100 generations while histograms and fitness statistics track collective progress; one run reaches maximum fitness 98, with mean fitness 93.21. section 2.5.8

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

How deep it goes
Defines population structure, implements its tensor representation, and follows fitness, reproduction, mutation, replacement, and stopping criteria.
Examples
Uses binary NumPy tensors, a one-max problem, notebook listings, fitness histograms, and generation-level summary statistics.
What it assumes
Assumes basic Python and NumPy use while making genetic-algorithm population mechanics tangible through incremental notebook code.
What you can do after
Build it from scratch, evolve binary candidate populations, and inspect collective fitness across generations.
How it connects
Connects populations to evolutionary computation, genetic algorithms, fitness, selection, crossover, mutation, and diversity.

Also explained in

Compare how 9 books explain population →

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.