Genetic Algorithm Explorer

© 2026 Theodore P. Pavlic · MIT License
Fitness landscape  ·  sum of 6 Gaussians
f(x) = Σ hi · exp(−(x−μi)2 / 2σi2)
x ∈ [0, 10],  all σi ≈ 0.3–0.4
Peak parameters  (μ, σ, h)
① (0.85, 0.30, 2.5)   ④ (5.50, 0.42, 2.2)
② (2.30, 0.38, 2.9)   ⑤ (7.20, 0.35, 3.1)
③ (3.95, 0.32, 2.6)   ⑥ (9.00, 0.28, 2.8)
A real-valued canonical GA maximizing a 6-peak landscape. Without niching, the population converges on the highest peak. Enable a niching method to maintain subpopulations at multiple peaks simultaneously. Tip for stable multimodal equilibria: use Roulette Wheel or SUS, Fitness Sharing, σshare ≈ half the typical inter-peak distance, pc ≤ 0.3, N ≥ 60, or just press MMO preset.
Quick-set →
Population
60
Operators
0.50
0.120
0.45
Selection
Niching Method
Elitism
1
Controls
GENERATION
0
BEST f(x) ↑
MEAN f(x) ↑
POP. SPREAD σx
PEAKS OCCUPIED ↑
Parameter key
pcProbability that two parents exchange genetic material (crossover)
pmProbability that each offspring is perturbed by mutation
σmGaussian step size of mutation — controls how far an individual can jump per mutation event
σxStd. dev. of all individual x positions — a measure of population spatial diversity. No arrow: smaller = converged (good for single-peak), larger = spread across peaks (good for MMO).
Niching parameters
σshareNiche radius for Fitness Sharing — individuals within this distance share fitness, reducing the effective payoff of crowded peaks
σclearNiche radius for Clearing — only the best individual within this radius retains its fitness; others are zeroed out
Det. CrowdingEach offspring competes for survival against whichever parent it most resembles; no explicit radius needed
Peaks occupiedCount of landscape peaks with ≥ 1 individual within 1.5 × peak σ
© 2026 Theodore P. Pavlic · MIT License
Problem
Population
80
Algorithm
Diversity (MOEA)
Crossover (arithmetic)
0.70
Gaussian Mutation
0.10
0.10
Rank Color Key
Rank 1
Rank 2
Rank 3
Rank 4
5+
Controls
Linear Weight Visualizer
0.50
Arrow + ring show where a single-objective linear weighted optimizer (w1G1 + w2G2, w2 = 1−w1) would land on the true front. In RWGA mode, each generation uses one fresh random w.
GENERATION
0
RANK-1 / ARCHIVE ↑
HV (hypervolume) ↑
SPREAD σcd
Operator key
pcProbability of applying arithmetic crossover; offspring are convex combinations of the two parents
pmPer-gene probability of applying Gaussian mutation
σmStd. dev. of the Gaussian perturbation added during mutation
Crowding dist.How isolated a rank-1 point is relative to its neighbors along the front; used as a diversity tie-breaker so that less-crowded points are preferred
Statistics
HVHypervolume: area of objective space simultaneously dominated by the rank-1 (or archive) set, measured from a reference corner. Increases as the front converges and spreads; higher = better
σcdStd. dev. of crowding distances across rank-1 individuals. Low σ means evenly distributed; high σ means some regions are dense, others sparse
Archive (RWGA)Persistent set of all non-dominated solutions found across all generations; grows monotonically and visualized as orange dots
© 2026 Theodore P. Pavlic · MIT License
In a Distributed GA (DGA) / Island Model, the population is split into semi-isolated subpopulations (islands) that evolve independently, then periodically exchange individuals via migration. Isolation prolongs the window during which drift can shift an island away from a local optimum — essentially buying time for crossing fitness valleys. Migration lets high-fitness genotypes spread once found. The key tradeoff: too much migration collapses diversity and produces premature convergence (as in a single large GA); too little means islands never share solutions. This is less about Shifting Balance Theory and more like parallel tempering — independent searchers that periodically synchronize.
Islands
4
15
Operators
0.50
0.30
Migration
0.10
5
Deme Colors
Controls
GENERATION
0
GLOBAL BEST f(x) ↑
MIGRATION EVENTS
0
BETWEEN-ISLAND σx
Parameter key
σmGaussian mutation step size — larger values give each island more local exploration
Migration rateFraction of each island's population that copies to a neighbor each migration event
Migration intervalHow many generations between migration events — longer intervals = more isolation = more drift
Statistics
σxStd. dev. of each island's mean x position — measures how spread out the islands are in genome space; drops toward 0 when all islands converge on the same peak. No arrow: large = diverse exploration, small = convergence — which is desirable depends on context.
Shaded bandsPer-island min / mean / max fitness over generations; overlap shows when islands have found similar fitness values on different peaks
© 2026 Theodore P. Pavlic · MIT License
A real-valued 2-D GA on classic single-objective test functions — the same algorithms and operators as Tabs 1 and 2, now in a 2-D decision space. The heatmap shows the fitness landscape (dark = low, bright = high); dots are individuals colored by fitness. The 3-D thumbnail gives a surface view of the same function. Enable island mode to split the population into colored demes; enable a niching method to maintain multiple peaks simultaneously. Goal: maximize.
Function
Population
50
Operators
0.50
0.050
0.15
Selection
3
Niching
Island Mode
0.15
5
Elitism
1
Controls
GENERATION
0
BEST f(x,y) ↑
MEAN f(x,y) ↑
PEAKS OCCUPIED ↑
Function library
Tips
Single-peakSphere or Rosenbrock — use tournament selection, no niching, small σm
MultimodalRastrigin or Ackley — try fitness sharing with σshare ≈ 1.0; watch how many peaks the population occupies
Multiple equal optimaHimmelblau or Cross-in-tray — 4 global minima at equal depth; deterministic crowding naturally splits the population
Island modeEach island is initialized in a different region; set migration interval high (≥ 10) to let islands diverge before synchronizing
Needle-in-haystackEasom — flat everywhere except a tiny basin at (π, π); standard GA struggles; try large σm or many islands
© 2026 Theodore P. Pavlic · MIT License