Lab
Heuristics · Genetic Algorithm

Evolution

Instead of solving a problem directly, you can evolve a solution. A population of agents carries “DNA”; the fittest reproduce, their offspring mutate slightly, and over generations the population gets better at the task — here, reaching a target.

click to move the goal

How it works

  1. Each agent's genome is a sequence of steering forces it follows. At first they're random, so most just wander off.
  2. Fitness scores how close each agent got to the goal. Higher fitness means a higher chance of becoming a parent.
  3. Crossover blends two parents' genomes and mutation tweaks a few genes. New generation, replay, repeat — watch them home in.

Evolutionary heuristics like this were the toolkit of my bachelor's thesis: when a search space is too vast for brute force, you let good-enough solutions breed better ones.