Starlogo is a programmable modelling environment for exploring the workings of decentralized systems-- systems that are organized without an organizer. With StarLogo, you can model many real-lifre phenomena such as flocks of birds, the behavior of a cellular slime mold, ant colonies, and fireflies, as well as market economies.
http://education.mit.edu/starlogo/