Watch populations evolve through selection, crossover, and mutation — six modes from function optimisation to TSP
Tournament selection picks k random individuals and keeps the fittest. Roulette-wheel selection (fitness-proportionate) gives each individual a probability proportional to fitness. Both create selection pressure the force driving the population toward high-fitness regions.
One-point crossover splits parents at a random locus and swaps the tails. Two-point uses two loci. Uniform crossover independently picks each gene from either parent with probability 0.5. For permutation problems like TSP, ordered crossover (OX) preserves relative ordering of cities.
Bit-flip mutation independently flips each bit with probability p_m 1/L (chromosome length). Real-valued GAs add Gaussian noise s to each gene. Mutation prevents premature convergencewithout it the population loses diversity and may get stuck in local optima.
Elitism copies the best e individuals unchanged to the next generation, guaranteeing the best solution is never lost. Without elitism, good solutions can be destroyed by crossover or mutation. Diversity metrics (average Hamming distance, entropy) track whether the population is converging or still exploring.
| Domain | Problem | Chromosome | Fitness |
|---|---|---|---|
| Logistics | Vehicle routing, TSP | Permutation | 1/tour length |
| Engineering design | Structural topology, aerodynamic shapes | Real-valued vector | Stress / drag minimisation |
| Machine learning | Neural architecture search, hyperparameter tuning | Integer / mixed | Validation accuracy |
| Bioinformatics | Protein folding, sequence alignment | Amino acid string | Energy / alignment score |
| Scheduling | Job-shop, timetabling, resource allocation | Permutation | Makespan, conflicts |
| Finance | Portfolio optimisation, trading rules | Binary / real | Sharpe ratio |
| Game AI | Evolving game-playing agents, level generation | Strategy tree | Win rate |
| VLSI design | Circuit layout, cell placement | Permutation | Wire length, timing |
| Variant | Key Idea | Best Used For |
|---|---|---|
| Simple GA (SGA) | Binary chromosomes, roulette selection, one-point crossover | Benchmark problems |
| Real-coded GA | Floating-point chromosomes, BLX-a crossover, Gaussian mutation | Continuous optimisation |
| NSGA-II | Non-dominated sorting + crowding distance for multi-objective | Pareto front problems |
| CMA-ES | Covariance matrix adaptation learns correlations between variables | High-dim continuous |
| Island Model (parallel GA) | Multiple sub-populations periodically exchange migrants | Diversity, large scale |
| Genetic Programming | Chromosomes are programs (syntax trees) | Symbolic regression |
Read the complete guide to evolutionary algorithms selection pressure, fitness landscapes, convergence analysis, and real-world applications.
Read: Evolutionary Algorithms Guide →A GA maintains a population of candidate solutions. Each generation: evaluate fitness; select parents (fitter individuals more likely); produce offspring via crossover; apply mutation. Elitism copies the best unchanged. Over hundreds of generations, average fitness rises as good building blocks spread through the population via Holland's implicit parallelism.
Short, low-order schemata (bit templates) with above-average fitness receive exponentially increasing representation in successive generations. Despite evaluating only N individuals, the GA implicitly processes O(N) schemata the building-block hypothesis. This explains why GAs efficiently search enormous spaces by assembling sub-patterns rather than individual solutions.
Crossover combines two parents to create offspring mixing genetic material. It is the primary driver of exploration and exploitation. Mutation independently perturbs each gene at a low rate (p_m 1/L), preventing premature convergence by maintaining diversity and injecting novelty. Too-high mutation rate turns the GA into random search; too-low loses diversity.
Deceptive functions mislead selection: short, individually-fit sub-patterns combine to give poor fitness, while the true global optimum requires individually-poor sub-patterns. Standard GAs converge to the deceptive attractor. Solutions include niching, fitness sharing, island models, or switching to estimation-of-distribution algorithms that model the full solution distribution rather than individual genes.