Activity Index

This page lists every activity box in the book. Reproducible examples open the tool in a fixed state, so the result matches the one in the book (with EvoTraveller and SelectionMechanisms, the ⚙ Open and configure button opens the application, and the example gives the values to enter). In the Application boxes invite you to explore without fixed results, and exercises are worked out with pencil and paper. The first part sorts the boxes by tool, to help you prepare a session around a particular application; the second sorts them by chapter. The level column gives the level of the section that contains each box.

By Tool

Genetic Algorithms Lab portal

2 “In the Application” boxes.

Activity Title Section Level
In the Application “How they fit into the algorithm” 2.2 B
In the Application Free exploration 11.4 B

representation-ga · Representation

10 reproducible examples and 8 “In the Application” boxes.

Activity Title Section Level
Example 3.1 From Bits to a Point 3.1 B
In the Application “Continuous function optimisation” 3.1 B
Example 3.3 More Bits, a Finer Grid 3.3 B
In the Application “Continuous function optimisation” 3.3 B
Example 3.4 Loads and Makespan 3.4 B
In the Application “Task-to-machine assignment” 3.4 B
Example 3.5 One Tour, Twelve Chromosomes 3.5 B
In the Application “Travelling salesman problem (TSP)” 3.5 B
Example 3.6 A Point That Binary Encoding Cannot Represent 3.6 B
Example 3.7 Three Chromosomes: Which Fit? 3.7 B
In the Application “Knapsack problem” 3.7 B
Example 3.8 The Same Point, Two Codes 3.8 A
In the Application “Compare encodings” 3.8 A
Example 3.9 A Matrix That Is Not a Schedule 3.9 A
In the Application “Compare encodings” 3.9 A
Example 3.10 Five Treatments of One Chromosome 3.10 A
Example 3.11 Three Ways to Handle One Point 3.11 A
In the Application “Continuous function optimisation” 3.11 A

initialization-and-evaluation-ga · Initialization and Evaluation

13 reproducible examples and 11 “In the Application” boxes.

Activity Title Section Level
Example 4.1 A Random Assignment 4.1 B
In the Application “Uniform random” 4.1 B
Example 4.2 A Five-City Tour 4.2 B
Example 4.3 Eight Random Knapsacks 4.3 B
In the Application “Uniform random” 4.3 B
Example 4.4 One Seeded Copy 4.4 B
In the Application “Seeding with a heuristic (counterexample)” 4.4 B
Example 4.5 Evaluating an Overweight Knapsack 4.5 B
In the Application “From genotype to fitness” 4.5 B
Example 4.6 Six Assignments on the Roulette Wheel 4.6 B
In the Application “Objective versus fitness” 4.6 B
Example 4.7 What Should Excess Weight Cost? 4.7 B
In the Application “Constraints as a penalty” 4.7 B
Example 4.8 What a Cache Saves 4.8 B
In the Application “The cost of evaluating” 4.8 B
Example 4.9 Halton by Hand 4.9 A
In the Application “Quasi-random and Latin hypercube” 4.9 A
Example 4.10 Six Separated Assignments 4.10 A
Example 4.11 Full Knapsacks 4.11 A
In the Application “Feasible initialisation” and “Compare strategies” 4.11 A
Example 4.12 Moving Through Neighbors 4.12 A
In the Application “Fitness landscape” 4.12 A
Example 4.13 Two Individuals Mistaken for Each Other 4.13 A
In the Application “Noisy fitness” 4.13 A

selection-ga · Selection

13 reproducible examples, 11 “In the Application” boxes, and 3 exercises.

Activity Title Section Level
In the Application “Compare mechanisms” 1.3 B
Example 2.5 Four Spins of the Wheel 2.5 B
Example 2.7 The New Population 2.7 B
Exercise 2.7 Losing the Best 2.7 B
Example 5.2 Four Binary Tournaments 5.2 B
In the Application “Tournament selection” 5.2 B
Example 5.3 Four Spins of the Wheel 5.3 B
In the Application “Roulette wheel” 5.3 B
Example 5.4 Adding a Constant to Fitness 5.4 B
In the Application “Counterexample: shifted fitness” 5.4 B
Example 5.5 Forty Generations of Selection Only 5.5 B
In the Application “Compare mechanisms” 5.6 B
Example 5.7 SUS versus Roulette 5.7 A
In the Application Free exploration 5.7 A
Example 5.8 The Same Individual, Two Draws 5.8 +
In the Application “Axelrod’s selection (f̄ ± σ)” 5.8 +
Example 8.2 The Offspring Replace Everyone 8.2 B
Example 8.3 One Elite Individual 8.3 B
Exercise 8.3 By Hand 8.3 B
In the Application “Generational with elitism” 8.3 B
Example 8.4 Two Offspring Enter the Population 8.4 B
In the Application “Steady state” 8.4 B
Example 8.7 Three Ways to Make Room 8.7 A
Exercise 8.7 An Offspring Worse Than Everyone 8.7 A
In the Application “Steady state” 8.7 A
Example 8.8 Competing Together or Only Among Offspring 8.8 A
In the Application (μ + λ) and (μ, λ) 8.8 A

crossover-ga · Crossover

12 reproducible examples, 10 “In the Application” boxes, and 1 exercise.

Activity Title Section Level
Example 2.6 Two One-Point Crossovers 2.6 B
Example 6.2 One Cut and Two Cuts 6.2 B
In the Application “One-point crossover” 6.2 B
Example 6.3 A Random Mask, with Bits and with Integers 6.3 B
In the Application “Uniform crossover” 6.3 B
Example 6.4 Copying or Blending 6.4 B
In the Application “Arithmetic crossover” 6.4 B
Example 6.5 Cutting Two Routes 6.5 B
In the Application “Counterexample: one-point crossover” 6.5 B
Example 6.6 Segment and Order 6.6 B
In the Application “OX crossover” 6.6 B
Example 6.7 Following the Mappings 6.7 B
In the Application “PMX crossover” 6.7 B
Example 6.8 Three Cycles 6.8 B
In the Application “CX crossover” 6.8 B
Example 6.9 Leaving the Interval 6.9 A
In the Application Free exploration 6.9 A
Example 6.10 Comparing Permutation Crossovers 6.10 A
Exercise 6.10 Before or After? 6.10 A
In the Application “Compare operators” 6.10 A
Example 6.11 Crossing a Parent with Itself 6.11 +
Example 10.3 The Generation’s Crossover and Mutation 10.3 B
In the Application “OX crossover” 10.3 B

mutation-ga · Mutation

10 reproducible examples and 9 “In the Application” boxes.

Activity Title Section Level
In the Application “Bit-flip mutation” 2.6 B
Example 7.2 One Draw per Position 7.2 B
In the Application “Bit-flip mutation” 7.2 B
Example 7.3 Jumping or Creeping 7.3 B
In the Application “Creep mutation” 7.3 B
Example 7.4 The Step Size 7.4 B
In the Application “Gaussian mutation” 7.4 B
Example 7.5 Changing Cities at Random 7.5 B
In the Application “Counterexample: random resetting” 7.5 B
Example 7.6 Three Ways to Rearrange 7.6 B
In the Application permutation mutations 7.6 B
Example 7.7 Little or Much Mutation 7.7 B
In the Application “Compare operators” 7.7 B
Example 7.8 Narrowing Jumps 7.8 A
In the Application Free exploration 7.8 A
Example 7.9 Comparing Permutation Mutations 7.9 A
In the Application “Compare operators” 7.9 A
Example 7.10 Inverting Almost Everything 7.10 +
Example 10.3 The Generation’s Crossover and Mutation 10.3 B

EvoTraveller

8 reproducible examples and 2 “In the Application” boxes.

Activity Title Section Level
In the Application Free exploration 2.9 B
Example 9.1 One Run 9.1 B
Example 9.2 No Mutation, a Little, and More 9.2 B
Example 9.3 Five Maps, Three Values of pm 9.3 B
In the Application Free exploration 9.5 B
Example 10.1 One Run, from Start to Finish 10.1 B
Example 10.2 Six Places in EvoTraveller 10.2 B
Example 10.4 Tournaments of 2 and 10 10.4 B
Example 10.5 Small Elite and Large Elite 10.5 B
Example 10.6 Three Maps, Two Configurations 10.6 B

SelectionMechanisms

2 reproducible examples and 1 “In the Application” box.

Activity Title Section Level
Example 9.7 Ten Generations of Selection 9.7 B
Example 9.8 10 Simulations or 100 9.8 A
In the Application Free exploration 9.8 A

By Chapter

1. Evolution and Optimization

Activity Title Section Tool Level
Exercise 1.1 Giraffes’ Necks 1.1 — B
Exercise 1.2 Is the Economy Evolutionary? 1.2 — B
Exercise 1.3 Evolutionary or Not? 1.2 — B
In the Application “Compare mechanisms” 1.3 selection-ga B
Exercise 1.4 How Many Routes? 1.4 — B
Exercise 1.5 Climbing Through Neighbors 1.4 — B
Exercise 1.6 Explore or Exploit? 1.5 — B
Exercise 1.7 The Genetic Algorithm as an Evolutionary System 1.6 — B

2. The Cycle and Design Decisions

Activity Title Section Tool Level
Exercise 2.1 The Vocabulary 2.1 — B
In the Application “How they fit into the algorithm” 2.2 portal B
Exercise 2.2 Put the Steps in Order 2.2 — B
Exercise 2.3 Read the Pseudocode 2.3 — B
Exercise 2.4 Decode and Evaluate 2.4 — B
Example 2.5 Four Spins of the Wheel 2.5 selection-ga B
Example 2.6 Two One-Point Crossovers 2.6 crossover-ga B
Exercise 2.6 No Mutation? 2.6 — B
In the Application “Bit-flip mutation” 2.6 mutation-ga B
Example 2.7 The New Population 2.7 selection-ga B
Exercise 2.7 Losing the Best 2.7 selection-ga B
Exercise 2.8 Which Decision? 2.8 — B
In the Application Free exploration 2.9 EvoTraveller B
Exercise 2.9 EvoTraveller’s Decisions 2.9 — B
Exercise 2.10 Count Evaluations 2.10 — A

3. Representing Solutions

Activity Title Section Tool Level
Example 3.1 From Bits to a Point 3.1 representation-ga B
Exercise 3.1 Decode and Encode 3.1 — B
In the Application “Continuous function optimisation” 3.1 representation-ga B
Exercise 3.2 One Variable in a Different Interval 3.2 — B
Example 3.3 More Bits, a Finer Grid 3.3 representation-ga B
Exercise 3.3 How Many Bits? 3.3 — B
In the Application “Continuous function optimisation” 3.3 representation-ga B
Example 3.4 Loads and Makespan 3.4 representation-ga B
Exercise 3.4 Change One Gene 3.4 — B
In the Application “Task-to-machine assignment” 3.4 representation-ga B
Example 3.5 One Tour, Twelve Chromosomes 3.5 representation-ga B
Exercise 3.5 Is It a Permutation? 3.5 — B
In the Application “Travelling salesman problem (TSP)” 3.5 representation-ga B
Example 3.6 A Point That Binary Encoding Cannot Represent 3.6 representation-ga B
Exercise 3.6 Choose a Representation 3.6 — B
Example 3.7 Three Chromosomes: Which Fit? 3.7 representation-ga B
Exercise 3.7 Does It Fit in the Knapsack? 3.7 — B
In the Application “Knapsack problem” 3.7 representation-ga B
Example 3.8 The Same Point, Two Codes 3.8 representation-ga A
Exercise 3.8 Convert to Gray and Back 3.8 — A
In the Application “Compare encodings” 3.8 representation-ga A
Example 3.9 A Matrix That Is Not a Schedule 3.9 representation-ga A
Exercise 3.9 Repair a Matrix 3.9 — A
In the Application “Compare encodings” 3.9 representation-ga A
Example 3.10 Five Treatments of One Chromosome 3.10 representation-ga A
Exercise 3.10 Three Treatments 3.10 — A
Example 3.11 Three Ways to Handle One Point 3.11 representation-ga A
Exercise 3.11 Outside on the Left 3.11 — A
In the Application “Continuous function optimisation” 3.11 representation-ga A
Exercise 3.12 Classify the Mapping 3.12 — A

4. Initialization and Evaluation

Activity Title Section Tool Level
Example 4.1 A Random Assignment 4.1 initialization-and-evaluation-ga B
Exercise 4.1 Same Numbers, Different Rules 4.1 — B
In the Application “Uniform random” 4.1 initialization-and-evaluation-ga B
Example 4.2 A Five-City Tour 4.2 initialization-and-evaluation-ga B
Exercise 4.2 A Shuffle That Looks Right 4.2 — B
Example 4.3 Eight Random Knapsacks 4.3 initialization-and-evaluation-ga B
Exercise 4.3 Distances by Hand 4.3 — B
In the Application “Uniform random” 4.3 initialization-and-evaluation-ga B
Example 4.4 One Seeded Copy 4.4 initialization-and-evaluation-ga B
Exercise 4.4 Takeover by Hand 4.4 — B
In the Application “Seeding with a heuristic (counterexample)” 4.4 initialization-and-evaluation-ga B
Example 4.5 Evaluating an Overweight Knapsack 4.5 initialization-and-evaluation-ga B
Exercise 4.5 Evaluate by Hand 4.5 — B
In the Application “From genotype to fitness” 4.5 initialization-and-evaluation-ga B
Example 4.6 Six Assignments on the Roulette Wheel 4.6 initialization-and-evaluation-ga B
Exercise 4.6 Adding a Constant 4.6 — B
In the Application “Objective versus fitness” 4.6 initialization-and-evaluation-ga B
Example 4.7 What Should Excess Weight Cost? 4.7 initialization-and-evaluation-ga B
Exercise 4.7 The Quadratic Penalty 4.7 — B
In the Application “Constraints as a penalty” 4.7 initialization-and-evaluation-ga B
Example 4.8 What a Cache Saves 4.8 initialization-and-evaluation-ga B
Exercise 4.8 Budgets 4.8 — B
In the Application “The cost of evaluating” 4.8 initialization-and-evaluation-ga B
Example 4.9 Halton by Hand 4.9 initialization-and-evaluation-ga A
Exercise 4.9 More Halton Points 4.9 — A
In the Application “Quasi-random and Latin hypercube” 4.9 initialization-and-evaluation-ga A
Example 4.10 Six Separated Assignments 4.10 initialization-and-evaluation-ga A
Exercise 4.10 Accepted or Rejected? 4.10 — A
Example 4.11 Full Knapsacks 4.11 initialization-and-evaluation-ga A
Exercise 4.11 Order Decides 4.11 — A
In the Application “Feasible initialisation” and “Compare strategies” 4.11 initialization-and-evaluation-ga A
Example 4.12 Moving Through Neighbors 4.12 initialization-and-evaluation-ga A
Exercise 4.12 Is It a Local Optimum? 4.12 — A
In the Application “Fitness landscape” 4.12 initialization-and-evaluation-ga A
Example 4.13 Two Individuals Mistaken for Each Other 4.13 initialization-and-evaluation-ga A
Exercise 4.13 How Many Evaluations? 4.13 — A
In the Application “Noisy fitness” 4.13 initialization-and-evaluation-ga A
Exercise 4.14 Who Dominates Whom? 4.14 — +

5. Selecting Parents

Activity Title Section Tool Level
Exercise 5.1 Predict 5.1 — B
Example 5.2 Four Binary Tournaments 5.2 selection-ga B
In the Application “Tournament selection” 5.2 selection-ga B
Example 5.3 Four Spins of the Wheel 5.3 selection-ga B
Exercise 5.3 Select on Paper 5.3 — B
In the Application “Roulette wheel” 5.3 selection-ga B
Example 5.4 Adding a Constant to Fitness 5.4 selection-ga B
In the Application “Counterexample: shifted fitness” 5.4 selection-ga B
Exercise 5.4 Convert Cost into Fitness 5.4 — B
Example 5.5 Forty Generations of Selection Only 5.5 selection-ga B
In the Application “Compare mechanisms” 5.6 selection-ga B
Exercise 5.6 Is One Run Enough? 5.6 — B
Example 5.7 SUS versus Roulette 5.7 selection-ga A
In the Application Free exploration 5.7 selection-ga A
Example 5.8 The Same Individual, Two Draws 5.8 selection-ga +
In the Application “Axelrod’s selection (f̄ ± σ)” 5.8 selection-ga +

6. Crossover

Activity Title Section Tool Level
Exercise 6.1 Predict 6.1 — B
Example 6.2 One Cut and Two Cuts 6.2 crossover-ga B
Exercise 6.2 Crossing Integer Vectors 6.2 — B
In the Application “One-point crossover” 6.2 crossover-ga B
Example 6.3 A Random Mask, with Bits and with Integers 6.3 crossover-ga B
Exercise 6.3 One Point by Chance? 6.3 — B
In the Application “Uniform crossover” 6.3 crossover-ga B
Example 6.4 Copying or Blending 6.4 crossover-ga B
Exercise 6.4 How Far Can the Population Reach? 6.4 — B
In the Application “Arithmetic crossover” 6.4 crossover-ga B
Example 6.5 Cutting Two Routes 6.5 crossover-ga B
Exercise 6.5 A Lucky Cut? 6.5 — B
In the Application “Counterexample: one-point crossover” 6.5 crossover-ga B
Example 6.6 Segment and Order 6.6 crossover-ga B
In the Application “OX crossover” 6.6 crossover-ga B
Example 6.7 Following the Mappings 6.7 crossover-ga B
Exercise 6.7 OX Versus PMX 6.7 — B
In the Application “PMX crossover” 6.7 crossover-ga B
Example 6.8 Three Cycles 6.8 crossover-ga B
Exercise 6.8 How Many Different Children? 6.8 — B
In the Application “CX crossover” 6.8 crossover-ga B
Example 6.9 Leaving the Interval 6.9 crossover-ga A
In the Application Free exploration 6.9 crossover-ga A
Example 6.10 Comparing Permutation Crossovers 6.10 crossover-ga A
Exercise 6.10 Before or After? 6.10 crossover-ga A
In the Application “Compare operators” 6.10 crossover-ga A
Example 6.11 Crossing a Parent with Itself 6.11 crossover-ga +

7. Mutation

Activity Title Section Tool Level
Exercise 7.1 Predict 7.1 — B
Example 7.2 One Draw per Position 7.2 mutation-ga B
Exercise 7.2 How Many Bits Change? 7.2 — B
In the Application “Bit-flip mutation” 7.2 mutation-ga B
Example 7.3 Jumping or Creeping 7.3 mutation-ga B
Exercise 7.3 Choose and Calculate 7.3 — B
In the Application “Creep mutation” 7.3 mutation-ga B
Example 7.4 The Step Size 7.4 mutation-ga B
Exercise 7.4 How Far Does It Go? 7.4 — B
In the Application “Gaussian mutation” 7.4 mutation-ga B
Example 7.5 Changing Cities at Random 7.5 mutation-ga B
In the Application “Counterexample: random resetting” 7.5 mutation-ga B
Example 7.6 Three Ways to Rearrange 7.6 mutation-ga B
Exercise 7.6 Rearranging by Hand 7.6 — B
In the Application permutation mutations 7.6 mutation-ga B
Example 7.7 Little or Much Mutation 7.7 mutation-ga B
Exercise 7.7 How Many Stay the Same? 7.7 — B
In the Application “Compare operators” 7.7 mutation-ga B
Example 7.8 Narrowing Jumps 7.8 mutation-ga A
In the Application Free exploration 7.8 mutation-ga A
Example 7.9 Comparing Permutation Mutations 7.9 mutation-ga A
Exercise 7.9 Counting Adjacencies and Precedences 7.9 — A
In the Application “Compare operators” 7.9 mutation-ga A
Example 7.10 Inverting Almost Everything 7.10 mutation-ga +

8. Replacement and Stopping

Activity Title Section Tool Level
Exercise 8.1 Predict 8.1 — B
Example 8.2 The Offspring Replace Everyone 8.2 selection-ga B
Example 8.3 One Elite Individual 8.3 selection-ga B
Exercise 8.3 By Hand 8.3 selection-ga B
In the Application “Generational with elitism” 8.3 selection-ga B
Example 8.4 Two Offspring Enter the Population 8.4 selection-ga B
In the Application “Steady state” 8.4 selection-ga B
Exercise 8.5 Reading the Figure 8.5 — B
Exercise 8.6 Where Does It Stop? 8.6 — B
Example 8.7 Three Ways to Make Room 8.7 selection-ga A
Exercise 8.7 An Offspring Worse Than Everyone 8.7 selection-ga A
In the Application “Steady state” 8.7 selection-ga A
Example 8.8 Competing Together or Only Among Offspring 8.8 selection-ga A
Exercise 8.8 Limiting Cases 8.8 — A
In the Application (μ + λ) and (μ, λ) 8.8 selection-ga A

9. Parameters and Randomness

Activity Title Section Tool Level
Example 9.1 One Run 9.1 EvoTraveller B
Exercise 9.1 Changing the Seed 9.1 — B
Example 9.2 No Mutation, a Little, and More 9.2 EvoTraveller B
Exercise 9.2 Why It Stagnates 9.2 — B
Example 9.3 Five Maps, Three Values of pm 9.3 EvoTraveller B
Exercise 9.3 Mean and Standard Deviation 9.3 — B
Exercise 9.4 How Often Am I Wrong? 9.4 — B
Exercise 9.5 Tuning with a Small Case 9.5 — B
In the Application Free exploration 9.5 EvoTraveller B
Exercise 9.6 What Comes First? 9.6 — B
Example 9.7 Ten Generations of Selection 9.7 SelectionMechanisms B
Exercise 9.7 Tournaments of 2 and 5 9.7 — B
Example 9.8 10 Simulations or 100 9.8 SelectionMechanisms A
Exercise 9.8 How Many Replicates Are Needed 9.8 — A
In the Application Free exploration 9.8 SelectionMechanisms A
Exercise 9.9 The Trap of Tuning One at a Time 9.9 — A
Exercise 9.10 Parameter or Operator? 9.10 — A

10. The Traveling Salesman from Start to Finish

Activity Title Section Tool Level
Example 10.1 One Run, from Start to Finish 10.1 EvoTraveller B
Exercise 10.1 Three Questions for Later 10.1 — B
Example 10.2 Six Places in EvoTraveller 10.2 EvoTraveller B
Exercise 10.2 The Length of a Route 10.2 — B
Example 10.3 The Generation’s Crossover and Mutation 10.3 crossover-ga, mutation-ga B
Exercise 10.3 With the Classic OX 10.3 — B
In the Application “OX crossover” 10.3 crossover-ga B
Example 10.4 Tournaments of 2 and 10 10.4 EvoTraveller B
Exercise 10.4 How Many Copies of the Best Route 10.4 — B
Example 10.5 Small Elite and Large Elite 10.5 EvoTraveller B
Exercise 10.5 Without an Elite, by Hand 10.5 — B
Example 10.6 Three Maps, Two Configurations 10.6 EvoTraveller B
Exercise 10.6 Which Would You Choose? 10.6 — B
Exercise 10.7 Counting the Parts of a Generation 10.7 — A
Exercise 10.8 Why Is Changing the OX Variant Not Enough? 10.8 — A

11. Recap

Activity Title Section Tool Level
Exercise 11.1 An Incomplete Description 11.1 — B
Exercise 11.2 Which Representation? 11.2 — B
Exercise 11.3 What Is Wrong with This Design? 11.3 — B
In the Application Free exploration 11.4 portal B
Exercise 11.4 A Genetic Algorithm? 11.4 — B
Exercise 11.5 An Exam Timetable 11.4 — B
Exercise 11.6 Choosing Variables 11.5 — B