Sunday, June 27, 2010

Birds

There are some sunning films available on YouTube of balletic maneuvers of the flocking behavior of starlings. These were taken by Dylan Winter over Otmoor near Oxford. What is remarkable about the starlings behavior is that, despite all appearances, there is no choreographer and as far as we know, no leader. Each individual bird is just following local rules.

THE BOIDS

- the story of regularity in chaos in nature

The numbers of individual birds in these flocks can run into thousands, yet they almost literally never collide. Which is just as well for, given the speed at which they fly, any such impact would severely injure them. Often the whole flock seems to behave as a single individual, wheeling and turning as one.

The whole performance would make a more than usually elegant screensaver on a computer. And this is neatly possible in an almost analogical way to how embryology works. Here's how to program flocking behavior in starlings. Devote almost all your effort to programming the behavior of a single individual bird. Build into your robo-starling detailed rules for how to fly, and how to react to the presence of the neighbouring starlings depending on their distance and relative position. Build in rules for how much weight to give individual initiative in changing direction. These model rules would be informed by careful measurements of real birds in action. Endow your cyberbird with a certain tendency to vary its rules at random. Having written a complicated program to specify the behavioural rules of a single starling, now clone the single bird to make a thousand copied, all same as each other (or maybe with some slight random variation among them in their rules) and release them to freely interact with each other.

Craig Reynolds called it boids and wrote a program along these lines in 1986. The basic flocking model in his program consisted of 3 elements:
1. Separation (steer to avoid crowding local flockmates)

2. Alignment (steer to the average heading of local flockmates)

3. Cohesion (steer to move towards the average position of local flockmates)

Each boid has direct access to the whole scene's geometric description, but flocking requires that it only interacts with flockmates within a certain small neighbourhood around itself. The neighbourhood is characterized by distance (measured from center of the boid) and an angled (measured from the direction of boid's flight). Flockmates outside this neighbourhood are ignored.
The key point is that there is no choreographer and no leader. Order, organization, structure - these all emerge as by-products of rules which are obeyed locally and many times over, not globally. And that is how embryology works. It is all done by local rules, at various levels but especially the level of the single cell. In the field of development, or manufacture, the equivalent of this kind of programming is self-assembly.




No comments:

Post a Comment