Murmuration refers to the phenomenon that results when hundreds, sometimes thousands, of starlights(starlings) fly in swooping, intricately coordinated patterns through the sky. My introduction to the word, murmuration, was by the Jazz trio, GoGo penguins. Murmuration is the 5th piece they perform in one of their live performances: link. It is one of the most enthralling pieces of music I've heard. I implore you to check them out: https://gogopenguin.bandcamp.com/.
When we observe these starlings fly we see a pattern that stands out. And when there's a pattern involved there is a strong possibility an algorithm exists to explain it and implement a computer simulation which helps me to segue into Boids algorithm.
Boids algorithm is an artificial life program, developed by Craig Reynolds. It simulates the flocking behavior of birds. Boid is a shortened version of Bird-oid, which refers to the bird-like object. Boids are an example of emergent behavior,i.e. the algorithm works because individual agents stick to a set of simple rules. Boids are driven by three rules.
- Separation: fly away to avoid a collision.
- Alignment: steer toward the average heading of nearest boids.
- Cohesion: move toward the average position of the nearest boids.
Boids algorithm has a vague similarity to human behavior as well. Gustave Le Bon, in his book "The Crowd: A study of the popular mind" explains crowd psychology and why people behave differently in groups. In the book, Le Bon highlights three causes as to why an individual behaves differently when they are a part of a crowd in contrast to when they are alone. These three causalities are:
- Anonymity: An individual loses the fear of the consequences, they lose their moral responsibility, temporarily feeling invincible. This is a major operator in the behavioral understanding of mobs.
- Contagion: In a crowd, Le Bon believed that every act is contagious. When we look at the dot com(.com) bubble or any major financial crisis, everyone that was part of the system was lead to buy something just because someone else was buying. The idea that buying or investing in a dot com venture was valuable was promoted as a contagion and not as an analytical understanding of the markets.
- Suggestibility: Individuals enter into a hypnotic state of mind mesmerized by a charismatic leader.
Herd mentality and mob mentality are observation of social psychology that mirror properties of the boids algorithm of working as a collective. The psychological study explores the idea that people can be influenced by their peers to adopt certain behavioral traits. As humans, we default to thinking that a collective might know something that as individuals we wouldn't know. Mob mentality might give away negative connotations to the idea of a collective but it is not all bad, there is a possibility of collective intelligence - something that stokes collaborations and collective effort. A great example of collaborative effort is the open-source software ecosystem.
The parallels between human behavior and the Boids algorithm give us an insight into how life-like boids algorithm is. By observing the patterns of a murmuration we have created an artificial life simulation, with autonomous entities that behave independently conforming to certain rules.
In times of uncertainity we always default to a collective.
------------------------------------------------------------------------------------------------------------
The Code.
When I took a stab at the algorithm, I wanted to give complete autonomy to the boids by providing or simulating awareness of each boid to their surroundings. I didn't want to explore unsupervised learning to create the simulation, I think it would be an overkill. If I can create a truly autonomous boid then I can go a little further and introduce some cognitive dissonance, that's the plan at least.
Link to Code: https://github.com/Keith3895/boids-js
link to the demo: https://keith3895.github.io/boids-js/
Comments
Post a Comment