Tournament Selection & Evolutionary Dynamics
Watch populations evolve fitness peaks — selection vs mutation vs drift
Generation: 0
Best Fitness: 0.00
Mean Fitness: 0.00
Diversity: 0.00
Tournament selection: pick k random individuals, select the fittest. Higher k = stronger selection pressure.
Population evolves in 2D fitness landscape (x,y). Bright=high fitness. Dots=individuals. Color=fitness rank (blue=low, red=high).
Rastrigin function: f(x,y) = 10·2 - [x²-10cos(2πx)] - [y²-10cos(2πy)] — many local optima trap naive search.
Evolution with mutation can escape local optima via genetic drift — stochastic exploration of the fitness landscape.
Right panel tracks best (red) and mean (orange) fitness over generations.