Behave! is a visual programming environment for specifying behavior. The environment is targeted towards visitors to the Computer Museum's Virtual Fishtank exhibit, who I assumed to be fairly naive about computers and to have fairly short attention spans. The intent of Behave! is to convey some of the flavor of rule-based programming and computer languages in general -- in particular, the idea that a program or rule is a complex object assembled from primitives according to a meaningful grammar.
In Behave!, the grammar is implicit in the interface design. Instead of having to learn syntactical rules, they become immediately obvious from the affordances and indicators of the interface.
The interface of Behave! is based on a drag-and-drop tile metaphor. Tiles represent various programming primitives (such as species names, actions, and numbers). The language is strongly typed, with type indicated by the color of the block. So for instance a "forward <x>" block might be brown to indicate it is an action, but the hole in the block that represents the argument would be green, to indicate that only things with a numerical value could be dropped there.
Behave! takes concepts from programming language theory and translates them into easily-understood interface affordances. In Behave!, color corresponds to type. The available types are displayed at the top of the screen, and the particular tiles of a given type may be seen by clicking on the type tile.
Tiles become translucent when dragged. Here an assemblage of two tiles is being dragged into a hole of type direction, which is itself part of an action block that specifies that a creature should go in the given direction by the given amount:
Drag-and-drop in Behave!
Behave! can control behavior in several different software-simulated worlds, but has been primarily used with StarLogo. Behave!'s language is deliberately much simpler than StarLogo, with higher-level primitives selected for the behavioral domain -- in particular, there are no control constructs other than an implict "agent" that iterates the rules indefinitely. However, it is easy to change the underlying grammar (to make new types of blocks, for instance), so the same interface could be used to realize different languages.
Behave! controlling a fish school in StarLogo.