Hack The Flock

Hack the Flock is a permanent installation in the Open Studio area of the Telus SPARK Science Centre in Calgary, Canada. Shapes, known as BOIDS (bird-droids), move across the screens in intricate and emergent flocking patterns. The flock isn’t simply following a set of instructions – instead, each BOID follows three rules: alignment (how much they should try to head in the same direction as nearby BOIDS), cohesion (how close they stay towards the centre of the flock), and separation (how much distance it wants to keep between itself and other BOIDS). As each BOID follows these rules, flocking patterns emerge. This standard flocking algorithm was created by Craig Reynolds in 1986 and implemented in Processing (the open source platform we used for this exhibit) by Daniel Shiffman.

At Hack the Flock, visitors have access to the source code that runs the flocking simulation. They can change the values of alignment, cohesion, and separation to change the flocking behaviour of the BOIDS. However, they can do so much more than that – visitors are invited to playfully explore all of the simulation code, leading them to changing the shape and colour of the BOIDS, their speed and how fast they turn around, and even add images of bees or monkeys to the screen. The simulation changes with every “hack” to the code, in expected or unexpected ways. Coding experience is not necessary; expert facilitators are on hand to help visitors of all ages, with all levels of coding experience, hack the flock in new and creative ways. “Mistakes” can lead to fascinating behaviour, from “bird clouds” to “raining” bees, buzzing grasshoppers to BOID dancers.

Want to "Hack the Flock" at home?

Click below for instructions on how to download the open-source code and other necessary software to your computer.

HackTheFlock_HomeInstructions.docx