Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Genetic Algorithms with Python
About this book
Preface
A brief introduction to genetic algorithms
Goal oriented problem solving
First project
Genetic programming with Python
About the author
About the text
Hello World!
Guess my number
Guess the Password
First Program
Extract a reusable engine
Use Python’s unittest framework
A longer password
Introduce a Chromosome class
Benchmarking
Summary
Final Code
One Max Problem
Test class
Change genetic to work with lists
Genes
Display
Test
Run
Benchmarks
Aside
Summary
Final Code
Sorted Numbers
Test class
Genes
Fitness
Display
Test
Run
Our first stall
Engineer a solution
Use a Fitness object
Use only > for fitness comparison
Run 2
Study the results
Engineer a solution
Run 3
Split get_best
Benchmarks
Summary
Final Code
The 8 Queens Puzzle
Test class
Board
Display
Fitness
Test
Run
Benchmarks
Summary
Final Code
Graph Coloring
Data
Reading the file
Rule
State adjacency Rules
Test class
Test
Genes
Display
Fitness
Run
Benchmarking
Benchmarks
Summary
Final Code
Card Problem
Test class and genes
Fitness
Display
Test
Run
Study the result
Introducing custom mutation
Mutate
Run 2
Study the result
Engineer a solution
Run 3
Retrospective
Benchmarks
Summary
Final Code
Knights Problem
Genes
Position
Attacks
Introducing custom_create
Create
Mutate
Display
Fitness
Test
Run
Test 8x8
Try 10x10
Performance
Retrospective
Benchmarks
Summary
Final Code
Magic Squares
Test class
Test harness
Fitness
Display
Mutate
Run
Use sum of differences
Run 2
Fixing the local minimum / maximum issue
Set the max age
Run 3
Size-5 Magic Squares
Size 10 Magic Squares
Retrospective
Benchmarks
Summary
Final Code
Knapsack Problem
Resources
Test
ItemQuantity
Fitness
Max Quantity
Create
Mutate
Display
Test
Run
Use simulated annealing
Run 2
Solving a harder problem
Performance
Retrospective
Benchmarks
Summary
Final Code
Solving Linear Equations
Test class, test, and genes
Fitness
Optimal fitness
Display
Run
Use simulated annealing
Run 2
Fractions and 3 Unknowns
Finding 4 unknowns
Performance
Benchmarks
Summary
Final Code
Generating Sudoku
Test class and genes
Fitness
Display
Test
Run
What should we do now?
Many options
Benchmarks
Summary
Final Code
Traveling Salesman Problem
Test Data
Test and genes
Calculating distance
Fitness
Display
Mutate
Test
Run
A larger problem
Run
Introducing crossover
Run
Retrospective
Updated benchmarks
Summary
Final Code
Approximating Pi
Test and genes
Convert bits to an int
Fitness
Display
Best approximations for Pi
Optimal value
Run
Modify both parts
Run 2
Use simulated annealing
Run 3
Expanding the genotype
Pass the bit values
Change the bit values
Exercise
Optimizing the bit array
Summary
Final Code
Equation Generation
Example
Evaluate
Test and genes
Create
Mutate
Display
Fitness
Test
Run
Support multiplication
Refactoring
Supporting Exponents
Improve performance
Benchmarks
Summary
Final Code
The Lawnmower Problem
Part I - mow and turn
Part II - Jump
Try a validating field
Part III - Repeat
Optimizing for fuel efficiency
Part IV - Automatically defined functions
Multiple ADFs
Exercise
Summary
Final Code
Logic Circuits
Circuit infrastructure
Generate OR
Generate XOR
Performance improvement
Generate A XOR B XOR C
Generate a 2-bit adder
Retrospective
Summary
Final Code
Regular Expressions
Test
Fitness
Display
Mutation
Test Harness
Run
Performance improvement
Groups
Character-sets
Repetition
State codes
Exercise
Summary
Final Code
Tic-tac-toe
Genes
Fitness
Mutation and Crossover
Results
Tournament selection
Summary
Final Code
Afterward
← Prev
Back
Next →
← Prev
Back
Next →