Click the green flag. This implements the famous "Boids" model. Boids follow three rules: align, cohere, and separate. There is no leader yet flocking patterns emerge. To make bat boids go faster, Hold the shift key while clicking Flag (puts you in turbo mode), click Flag to see bats flock.
This implements the famous "Boids" model: Boids follow three rules: align, cohere, and separate. The main point of the model is that there is no leader, yet flocking emerges. Boids only see nearby neighbors, not the whole flock, but the group self-organizes. I added wing flapping only for effect. The original Boids model is by Craig Reynolds. One fun application was bat swarms in the move Batman Returns. Thanks to boltoncode for scratch coding ideas. See our variant, flocking segregation, with red and blue birds on https://lifepatternsemerging.com Music: J. S. Bach: Toccata and Fugue in D Minor performed by Kevin MacLeod: https://commons.wikimedia.org/wiki/File:Kevin_MacLeod_-_J_S_Bach_Toccata_and_Fugue_in_D_Minor.ogg Owl: young asio otus, surroundings of Warsaw, Poland, July 23, 2005, photo taken by Artur Mikołajewski (we modified by removing background, and creating a duplicate image with eyes closed): https://upload.wikimedia.org/wikipedia/commons/1/1e/Asio_otus_uszatka1.JPG https://upload.wikimedia.org/wikipedia/commons/e/e2/The_night_sky_in_Rind_village.jpg