liveBook · Manning

Roulette-wheel selection

As explained in Classic Computer Science Problems in Swift: Essential techniques for practicing programmers

A genetic algorithm selection technique that chooses chromosomes with probabilities proportional to their fitness.

Roulette-wheel selection, also called fitness-proportionate selection, chooses genetic-algorithm chromosomes with probabilities proportional to their fitness. Every chromosome can be selected, while fitter chromosomes receive larger portions of the wheel. section 5.3

Selection in a generic genetic algorithm

A configurable GeneticAlgorithm can select either roulette or tournament mode. In roulette mode, it builds one probability share per cached fitness value, then repeatedly picks parents with pickRoulette.

How Classic Computer Science Problems in Swift: Essential techniques for practicing programmers covers it

How deep it goes
Defines the method and shows its Swift picker, probability construction, and integration with parent reproduction.
Examples
Demonstrates normalized fitness shares, cumulative random selection, and configurable roulette-based parent picking.
What it assumes
Assumes chromosomes expose fitness and participate in reproduction through crossover and mutation.
What you can do after
Build it from scratch as a configurable parent-selection strategy in a generic genetic algorithm.
How it connects
Connects fitness, genetic algorithms, chromosomes, reproduction, crossover, mutation, and tournament selection.

Also explained in

Compare how 4 books explain roulette-wheel selection →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Classic Computer Science Problems in Swift: Essential techniques for practicing programmers. The section links point to the parts of the book it draws on.