Neural Boids
3 days ago
- #computational-biology
- #neural-networks
- #flocking-behavior
- Noids are neural boids that use a small neural network to output steering forces based on local perception, with 1,922 learned parameters.
- Real starlings flock by tracking 6-7 topological neighbors, adjusting velocity to stay close, match heading, and avoid collisions, creating murmurations without global signals.
- Craig Reynolds' boids (1986) use three hand-tuned rules: separation, alignment, and cohesion, which have been the basis for flocking simulations since.
- Noids eliminate hand-written rules, instead learning steering functions from data, using topological neighbors like real birds.
- The neural network in a noid takes 24 inputs (own velocity, heading, and 5 nearest neighbors' relative positions and velocities) and outputs a 2D acceleration.
- Training involves imitation learning, where noids mimic Reynolds' rules through gradient descent, optimizing 1,922 weights.
- The transition from random weights to flocking behavior is a phase transition in weight space, emerging from interactions of all parameters.
- Noids perform well on GPUs due to matrix multiplications aligning with GPU operations, making them efficient for large flocks.
- The noid library is open-source, written in Rust, and supports training and weight interpolation, enabling flexible flocking simulations.