FloraJS by Vince Allen is an visual exploration into the world of Braitenberg vehicles. In the words of Wikipedia:

A Braitenberg vehicle is an agent that can autonomously move around. It has primitive sensors (measuring some stimulus at a point) and wheels (each driven by its own motor) that function as actuators or effectors. A sensor, in the simplest forms, is directly connected to an effector, so that a sensed signal immediately produces a movement of the wheel. Depending on how sensors and wheels are connected, the vehicle exhibits different behaviors (which can be goal-oriented). This means that it appears to strive to achieve certain situations and to avoid others, changing course when the situation changes.

You might be saying to yourself, “Hmm…that sounds a bit like AI,” and you’d be quite right! The concepts of Braitenberg vehicles apply to both the individual and the group.

Individuals can be programmed to be attracted to a certain force, such as enemies in a video game following and attacking you. They can also be driven away by certain forces; for instance: a grenade.

Group mentality can be programmed through these vehicles. For example, in addition to being attracted to your character in a game, enemies might also respond to hurried behavior of other baddies already chasing you and join in the pursuit.

But enough talk—the point of FloraJS is to explain how this works visually, so go check it out!