liveBook · Manning

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.

How 7 Manning books explain it

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.

Read how Evolutionary Deep Learning: Genetic algorithms and neural networks explains genetic algorithm →

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 evolving populations to search for high-quality solutions to optimization problems such as ticket pricing and route planning.
How deep it goes
Works through representations, fitness, selection, variation, survival, termination, and Python implementations; does not establish a guarantee of optimality.
Examples
Uses a binary ticket-pricing implementation and a permutation-based, 20-city traveling-salesman solver.
What you can do after
Build it from scratch for binary ticket pricing, or apply it via pymoo to pricing and route optimization.

Read how Optimization Algorithms: AI techniques for design, planning, and control problems explains genetic algorithm →

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.

Read how Classic Computer Science Problems in Swift: Essential techniques for practicing programmers explains genetic algorithm →

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
Searches large sets of possible solutions for a good answer when checking every combination is costly.
How deep it goes
Walks through population creation, fitness scoring, and the overall life cycle; defers alternative encoding, crossover, mutation, and selection techniques.
Examples
Uses knapsack item combinations, Python population and fitness snippets, delivery routes, truck packing, and feature selection.
What you can do after
Build it from scratch using random candidate generation and fitness scoring, then configure the search for solution quality and computational cost.

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
Uses genetic algorithms to search large spaces of possible delivery plans and to optimize parameters in a proposed fraud-prevention system.
How deep it goes
Walks through evaluation, selection, crossover, mutation, and stopping conditions without code or formal equations.
Examples
Illustrates candidate solutions with delivery routes and resource allocations, then tabulates the number of possible school-bus routes.
What you can do after
Evaluate/understand it as a way to search delivery plans or optimize model parameters, with progress judged against chosen measures.

Read how Inside AI explains genetic algorithm →

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 →

Related concepts

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.