Cover Image: November 2000 Scientific American Magazine See Inside

ARTIFICIAL LIFE: Boids of a Feather Flock Together

Shawn Carlson explains how to simulate simple organisms on your computer















Share on Tumblr

Ariel Dolan, a computer programmer in Ramat-Gan, Israel, has added a delightful twist to Reynolds's creation by developing carnivorous boids, dubbed "floys" (pronounced "flow-eez"). Your gateway to Dolan's a-life aviary is at www.aridolan.com/efloys.html, where you will find Java scripts that produce simulations that are truly a treat to watch.

Dolan's floys follow just two rules: stick close to your fellows but not too close, and when you spot an intruder, move toward it and attack. These instructions also generate a flock. But the assembly benefits individuals in an unexpected way. Avoiding too much togetherness causes the floys to move in an ensemble that spreads out over a substantial region. They thus patrol airspace that extends far beyond the sensory range of any one floy. Whenever an outsider approaches, the nearest floy moves toward it. And because its compatriots are all programmed to remain together, the nearest neighbors follow along, as do their wing men, and so on.





Image Credit--DANIELS & DANIELS
A sequence of snapshots (top to bottom, right) shows what happens when a band of floys (green) detects a lone intruder (red) and hunts it down as the besieged interloper tries to flee.
The result is quite striking. Challenged by an enemy, the entire flock turns quickly and pursues the intruder, including those floys that were initially too far away to sense the presence of the interloper. The swarm soon engulfs the invader, which ends up fighting for its a-life. This scene is not unlike what would happen to a hapless water buffalo that wandered into a lake infested with piranha.

Like feasting piranha, each floy is rewarded for every successful "bite" that it takes. In Dolan's boid-eat-boid world, each morsel delivers one unit of energy from prey to predator. Fast floys have more opportunity to gorge, but they burn up energy rapidly while flying. Slow floys use less energy, but they tend to reach intruders last, and so they collect less sustenance.

Dolan's code generates mutations in the instructions for speed and energy consumption and in other parameters as well, including how closely individuals approach one another, how fast they accelerate and even the probability that they will disobey the rules. Dolan's program also ensures that the floys with the most energy are the most likely to reproduce and pass on their traits. So as the cybergenerations pass, the population becomes ever better adapted to live within its virtual realm.

Armed with Dolan's code and a little imagination, anyone with modest programming skills can perform all kinds of original investigations. I am now trying to understand why high levels of aggression survive in a population when this tendency so often seems self-destructive. My new version sets two bands of floys against each other. A floy still loses energy when it gets bitten by one from the enemy camp. But because warriors don't gain strength when they strike a foe, successful floy fighters in my simulation don't gain energy when they bite an opponent. The result is a melee in which the winner is determined entirely by numbers, energy reserves and the rules of probability.

I plan to modify the code to allow for floys with three distinct levels of inborn hostility. When a floy receives one cybergene for aggression from each parent, it will be especially combative and will fight to the death with all foreigners. A floy that inherits only one gene for aggression will battle until its energy reserves get low and then retreat. And a floy with no genes for aggression will withdraw from all fights.



Comments

Add Comment
Leave this field empty

Add a Comment

You must sign in or register as a ScientificAmerican.com member to submit a comment.
Click one of the buttons below to register using an existing Social Account.

More from Scientific American

See what we're tweeting about

Scientific American Editors

More »

Free Newsletters


Get the best from Scientific American in your inbox

Solve Innovation Challenges

Powered By: Innocentive

  SA Digital

Latest from SA Blog Network

  SA Digital

Email this Article

ARTIFICIAL LIFE: Boids of a Feather Flock Together: Scientific American Magazine

X
Scientific American Magazine

Subscribe Today

Save 66% off the cover price and get a free gift!

Learn More >>

X

Please Log In

Forgot: Password

X

Account Linking

Welcome, . Do you have an existing ScientificAmerican.com account?

Yes, please link my existing account with for quick, secure access.



Forgot Password?

No, I would like to create a new account with my profile information.

Create Account
X

Report Abuse

Are you sure?

X

Institutional Access

It has been identified that the institution you are trying to access this article from has institutional site license access to Scientific American on nature.com. To access this article in its entirety through site license access, click below.

Site license access
X

Error

X

Share this Article

X