Genetic algorithm
A genetic algorithm is an evolutionary optimization method that improves a population of candidate solutions through fitness-based selection and variation, often including recombination and mutation.
Evolutionary Deep Learning: Genetic algorithms and neural networks
A genetic algorithm is an evolutionary optimization method that encodes candidate traits as genes and applies selection and recombination to search for solutions.
- How it is used
- Applies evolutionary search to optimization problems, including deep-learning hyperparameters, architectures, weights, and GAN training balance.
- How deep it goes
- Walks through encoding, fitness, selection, crossover, mutation, stopping criteria, Python simulation, DEAP implementations, and structured neural-network genomes.
- Examples
- Uses binary One Max populations, traveling salesperson routes, polygon image rendering, MLP weight search, autoencoders, and DCGANs.
- What you can do after
- Apply it via DEAP to encode candidates, configure operators, evaluate fitness, and evolve solutions for search and deep-learning optimization tasks.
Advanced Algorithms and Data Structures
A genetic algorithm is an evolutionary optimization technique that improves a population of candidate solutions through selection and variation operators inspired by biological reproduction.
- How it is used
- Uses population-based optimization to seek good solutions to knapsack, TSP, and vertex cover problems.
- How deep it goes
- Develops chromosome encoding, initialization, fitness, generation operators, and parameter tuning through pseudocode and problem-specific implementations.
- Examples
- Works through a Mars knapsack, TSP tours, vertex cover fitness, and measured routing results.
- What you can do after
- Build it from scratch for encoded optimization problems, then tune operators and validate solutions against their constraints.
Read how Advanced Algorithms and Data Structures explains genetic algorithm →
Optimization Algorithms: AI techniques for design, planning, and control problems
A genetic algorithm is a stochastic evolutionary optimization algorithm that generates candidate solutions through selection and variation of a population.
- How it is used
- Uses genetic algorithms to search continuous and discrete optimization problems with populations of candidate solutions.
- How deep it goes
- Explains initialization, fitness, selection, variation, repair, termination, replacement models, and operator-rate heuristics, with implementations.
- Examples
- Works through ticket pricing and a 20-city traveling salesman problem.
- What you can do after
- Builds a binary genetic algorithm from scratch and applies a genetic algorithm via pymoo to pricing and routing problems.
Classic Computer Science Problems in Swift: Essential techniques for practicing programmers
An evolutionary optimization technique that searches for solutions by iteratively selecting, combining, and mutating candidate representations according to their fitness.
- How it is used
- Searches complex problems when traditional approaches are too slow and a good-enough solution may suffice.
- How deep it goes
- Develops a configurable Swift chromosome interface and generation loop, then tests two fitness functions; emphasizes fundamentals over application-specific tuning.
- Examples
- Works through equation maximization and SEND+MORE=MONEY, then proposes tournament-selection, constraint-satisfaction, and bit-string exercises.
- What you can do after
- Build it from scratch using a reusable Swift genetic algorithm, then define chromosome representations and fitness functions for new problems.
Grokking AI Algorithms, Second Edition
A genetic algorithm is an evolutionary optimization technique that improves candidate solutions through selection, recombination, and mutation.
- How it is used
- Uses genetic algorithms to search large optimization spaces for good solutions when exhaustive search is costly.
- How deep it goes
- Walks through the life cycle, population initialization, fitness scoring, and configuration trade-offs, with alternative approaches explored later.
- Examples
- Uses a knapsack problem with binary item choices, weight constraints, and value-based fitness, alongside logistics and feature-selection applications.
- What you can do after
- Builds it from scratch for optimization, including random population generation and fitness scoring for a knapsack problem.
Read how Grokking AI Algorithms, Second Edition explains genetic algorithm →
Inside AI
A genetic algorithm is an optimization technique that evolves a population of candidate solutions through evaluation, selection, recombination, and random variation.
- How it is used
- Searches large solution spaces by evolving candidate solutions toward better performance.
- How deep it goes
- Explains fitness, selection, crossover, mutation, and stopping conditions through a worked scenario, without implementation details.
- Examples
- Illustrates delivery-route and resource-allocation planning and proposes parameter optimization for a fraud-prevention model.
- What you can do after
- Evaluate and understand how a genetic algorithm searches for solutions and where it can contribute to a larger system.
Machine Learning Algorithms in Depth
A genetic algorithm is an evolutionary optimization technique that iteratively evaluates a population of candidate solutions and generates new candidates through selection, crossover, and mutation.
- How it is used
- Uses evolutionary search to optimize a population of candidates against a target.
- How deep it goes
- Works through initialization, fitness, selection, crossover, mutation, and stopping in a from-scratch string implementation.
- Examples
- Evolves random letter sequences toward “Genome” and asks readers to brainstorm further applications.
- What you can do after
- Build it from scratch to evolve strings toward a target using fitness-ranked selection, crossover, and mutation.
Read how Machine Learning Algorithms in Depth explains genetic algorithm →
Also covered in
What to know first
- mutationMutation is a change to an existing entity, such as a value, state, data structure, or candidate representation.
- chromosomeA chromosome is an encoded representation of a candidate solution in an evolutionary algorithm, composed of genes or other solution components.
- evolutionary computationEvolutionary computation is a family of search and optimization methods that iteratively improve candidate solutions through variation and selection inspired by biological evolution.
- individualAn individual is a single candidate solution represented as a member of an evolutionary algorithm's population and evaluated by its fitness.
Related concepts
- crossoveruses · Crossover is an evolutionary recombination technique that combines material from parent candidate solutions to produce one or more offspring.
- Traveling Salesman problemaddresses · The Traveling Salesman problem is a combinatorial optimization problem that seeks a minimum-cost tour visiting each specified location exactly once and returning to the starting location.
- evolutionary computationkind of · Evolutionary computation is a family of search and optimization methods that iteratively improve candidate solutions through variation and selection inspired by biological evolution.
- mutationuses · Mutation is a change to an existing entity, such as a value, state, data structure, or candidate representation.
- natural selectionuses · Natural selection is the evolutionary process by which heritable traits affecting survival or reproduction influence which variants become more common in a population.
- optimizationkind of · Optimization is the systematic selection or modification of values, configurations, or implementations to improve a defined objective, often subject to constraints.
Questions about genetic algorithm
What is genetic algorithm?
A genetic algorithm is an evolutionary optimization method that improves a population of candidate solutions through fitness-based selection and variation, often including recombination and mutation.
Which Manning books explain genetic algorithm?
Evolutionary Deep Learning: Genetic algorithms and neural networks, Advanced Algorithms and Data Structures, Optimization Algorithms: AI techniques for design, planning, and control problems, Classic Computer Science Problems in Swift: Essential techniques for practicing programmers, Grokking AI Algorithms, Second Edition, Inside AI and Machine Learning Algorithms in Depth.
What should I know before learning genetic algorithm?
Manning books that teach genetic algorithm usually introduce mutation, chromosome, evolutionary computation and individual first.
What is genetic algorithm a kind of?
Genetic algorithm is a kind of evolutionary computation. Evolutionary computation is a family of search and optimization methods that iteratively improve candidate solutions through variation and selection inspired by biological evolution.
What is genetic algorithm also called?
Genetic algorithm is also called GAs or GA.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.






