Swarm Lab is a single-file, browser-based genetic algorithm activity for teaching evolutionary optimization through an interactive rocket-swarm challenge.
Students do not manually draw a path. Instead, they tune the rules of evolution and watch a swarm improve across generations as it tries to reach a beacon while avoiding obstacles.
- Population size and search diversity
- Mutation rate and exploration
- Fuel/lifespan as a search budget
- Generation count as an optimization budget
- Elitism and preservation of strong solutions
- Fair comparison through fixed maps and seeds
Open the file below in any modern browser:
src/swarm-lab.html
No installation, server, login, package manager, or internet connection is required.
- Instructor selects one map and one seed.
- All teams use the same map and seed.
- Each team gets a fixed number of attempts, such as three.
- Teams record their best score.
- The class discusses which parameter choices helped or hurt convergence.
swarm-lab/
README.md
LICENSE
CITATION.cff
CODE_AVAILABILITY.md
CHANGELOG.md
.gitignore
src/
swarm-lab.html
docs/
instructor-guide.md
student-handout.md
supplementary/
README.md
The prototype is implemented as a single self-contained HTML file. For manuscript review, the HTML file can also be submitted as supplementary material. Upon publication, a tagged GitHub release may be archived through Zenodo or an institutional repository.
This project is released under the MIT License.