Emergent Behavior of Complex Systems

In philosophy, systems theory and the sciences, emergence refers to the way complex systems and patterns arise out of a multiplicity of relatively simple interactions. Emergence is central to the theory of complex systems.
Emergence - Wikipedia, the free encyclopedia

Try out this demo:

What’s happening here is that each worm is following two rules: 1) try to move in the same direction as nearby worms (commonly known as the cohesion rule) and 2) move away from other worms if they get too close (known as the separation rule). There is some randomness thrown in so that worms will sporadically move in an arbitrary direction, to give the system a more organic feel. The result is the effect you see: a shifting pattern of motion comprised of groups of individuals, each of which is just moving according to the same two rules.
Christian Cenizal, Designer-Developer (Flocking and emergent behavior)

Blogged with Flock