← All works Software · 2024 · Live

Emergent Flocking Lab

An interactive simulation of how 14-input neural networks learn flocking behaviour.

Type
Software
Year
2024
Status
Live
License
MIT

A lab studying the evolution of flocking through neural networks and genetic algorithms, with alignment, collision and clustering metrics.

14 Inputs Velocity, neighbours, edges, corners
8+6 Hidden layers Two layers
4 Outputs Turn, speed, edge

Problem

The classic Boids algorithm produces flocking with fixed rules. Can agents discover those rules themselves? Which local information is sufficient for collective motion?

Approach

Each boid receives 14 inputs: velocity, neighbour position, alignment, separation, neighbour density, edge distance and corner urgency. Two hidden layers (8+6 neurons) produce four outputs: turn, speed change and edge-avoidance components.

Method

JavaScript + Canvas; Neuroevolution-based population evolution; elitism, mutation, vision radius and edge-behaviour parameters; bird/fish/drone/arrow themes; live generation and collision statistics.

Findings

The simulation shows whether randomly initialised agents learn to survive longer and move without collisions across generations.

Status: Live. Live parameter updates and a multi-seed report are planned for the next release.

Limitations

Although visually compelling, a single metric set and limited seeds do not support statistical generalisation. “Swarm intelligence” here does not claim to be a one-to-one model of biological flocking.

Related works

From the same thread.

Neuroevolution Flight Bench
Software2024

Neuroevolution Flight Bench

A neuroevolution experiment measuring the effect of population, mutation and elitism on learning, with seeds and export support.

Evolutionary Navigation Bench
Software2024

Evolutionary Navigation Bench

A navigation benchmark measuring how agents evolve through tournament selection, crossover and mutation to solve mazes.