Explanation
Motivation
Understand the design decisions, alternatives, and limits.
The system makes a genetic algorithm observable. Instead of optimizing an abstract score in a console, every candidate is a launch trajectory. The interface exposes the best path, ghost attempts, draggable target position, and configurable physics while the population adapts.
The optimizer doubles as a debugging surface. Selection pressure, mutation rate, population size, and environmental difficulty are usually hidden inside algorithm logs. Here, each setting changes the shape of the paths on screen.
The project is intentionally not trying to prove that a genetic algorithm is the best way to solve projectile motion. A closed-form or numerical solver could find many of these shots more directly. Projectile motion gives the algorithm a visible success condition: exploration, exploitation, lucky hits, premature convergence, and recovery from changed conditions appear as geometry rather than as abstract fitness numbers.
- Genome: a two-dimensional launch velocity.
- Environment: Matter.js physics with walls, gravity, wind, restitution, and drag.
- Goal: evolve enough successful launch attempts to satisfy a solved streak.