What Is a Genetic Algorithm?

Genetic Algorithm Explainer

A genetic algorithm is a population-based optimization method inspired by biological evolution. Each individual encodes a candidate solution, and a fitness function measures how well that candidate meets the objective.

The algorithm selects individuals to become parents, recombines parts of their representations, and introduces random mutations. The resulting offspring form all or part of a new generation, and the evaluate-select-reproduce cycle repeats.

Genetic algorithms are useful when a search space is irregular, gradients are unavailable, or solutions contain discrete structures. They have been applied to scheduling, design, feature selection, control, and other optimization problems.

Success depends on representation, population size, selection pressure, mutation and crossover rates, and the fitness function. Evolution can converge prematurely to a limited region, so diversity and repeated trials are important when evaluating a result.

A genetic algorithm searches for solutions by evolving a population through selection, recombination, mutation, and evaluation.

Key terms include population, chromosome, individual, fitness function, selection, crossover, mutation, generation, diversity and convergence.

Candidates are evaluated, promising parents are selected, and variation operators create a new set of possible solutions.

Repeated generations can combine useful partial structures without requiring a differentiable objective.

Crossover and mutation only help when the representation lets useful solution components survive and recombine.

Diversity controls and multiple runs reduce the risk of mistaking early convergence for a genuinely strong solution.

Explore more "Explainers"

Discover additional explainers across politics, science, business, technology, and other fields. Each explainer breaks down a complex idea into clear, everyday language—helping you better understand how major concepts, systems, and debates shape the world around us.