In this example, each creature drops a chemical pheromone (shown in green). The creatures also "sniff" ahead, trying to follow the gradient of the chemical. Meanwhile, the patches diffuse and evaporate the chemical. Following these simple, decentralized rules, the creatures aggregate into clusters.
setup
button to set up a collection of slime-mold
cells. Click the go
button to start the simulation.
The number
slider controls the number of slime mold cells.
Changes in the slider do not have any effect until the next
setup
command.
With 500 creatures, following the exact same rules, the result is qualitatively different. When a few creatures happen (by chance) to wander near one another, they create a "puddle" of chemical. The creatures sniff the chemical and try to stay nearby. They then deposit more chemical in the puddle, so the puddle expands and attracts more creatures. This process is a good example of positive feedback: the more creatures, the larger the puddle, and the larger the puddle, the more likely it is to attract more creatures.
How do the results change if there is more (or less) randomness in the creatures' motion?
What "critical number" of creatures is needed for the clusters to form? How does the critical number change if you modify the evaporation or diffusion rate?
uphill
procedure, the turtle "follows the gradient"
of the chemical. That is, it "sniffs" in three directions,
then turns in the direction where the chemical is strongest.
The uphill
procedure can be useful in many other projects.
You might want to try variants of the uphill
procedure,
changing the number and placement of "turtle sniffs."