Decentralizing behavior
In the real world, the behavior demonstrated by a group as a whole can be quite different and surprisingly complex when compared to the behavior of its members. Given our own predilection as humans to organize ourselves in hierarchies, it can be tempting to imagine there's always a central, controlling, intelligence overseeing and directing each member's actions in harmony with its peers.
For group behavior, such as a flock of birds flying in formation or ants foraging for food, research would tend to suggest that no centralized controlling intelligence is required, and that such feats can be achieved through each member of the group following a relatively simple set of rules.
Getting ready
This recipe requires a plain white texture file, preferably small and only a few pixels in height and width.
How to do it...
To create your own example of decentralized behavior:
1. Add an enumeration to describe the various states an ant can be in:
enum AntMode { FollowingPheromone...