Tight Genes: Intro to Genetic Algorithms
summary
Explains a hands‑on genetic algorithm implemented in Ruby code with an initial truck‑load example (population ~10), a knapsack fitness that treats overweight solutions as zero, stop after 100 generations if no improvement, and a 1 in 4 mutation per gene; a run moves the best truck score from ~20,000 up to ~26,000. Also evolves D&D stats using geometric fitness weights (32× strength …) reaching a 90%‑fit wizard in ~11 generations. Includes a reusable “evolver” repo (reveal.js slides) and a MacBook Air M1 demo.
AI-written summary · about
chapters (19)
- 0:00Introduction and speaker intro
- 2:15What are genetic algorithms
- 6:57How genetic algorithms work
- 7:19Creating initial population
- 10:51Fitness function explained
- 11:55Stopping criteria
- 13:42Selecting breeders
- 14:23Breeding with crossover
- 15:48Mutation step
- 17:53Evolving truckloads example
- 18:13Evolving D&D fighter stats
- 25:56Evolving a wizard character
- 26:41Other applications of genetic algorithms
- 27:02Key takeaways summary
- 28:31Q&A: Applications and problems
- 30:22Q&A: Hardware requirements
- 31:29Q&A: Fitness functions for code
- 32:36Q&A: Libraries for beginners
- 33:41Q&A: Practical developer uses
