Elevator Simulator

Uploaded image

Using only local actions, little people found elevator shafts, waited for cars, and then used them to travel between floors at random. wiki

A Cocoa world is made up of pieces that live on a grid. It is a little like the GameOfLife except that the marks (pieces) are of various types and you can always define more. The elevator simulator uses these four types of pieces.

The pieces obey rules that are defined by their types. A person has one rule: move into the empty space on your right, if possible. When the world runs, all of the people pieces start marching to the right until they run into something, like an elevator shaft, or a line of other people already there.

One programs Cocoa by demonstrating rules, one by one. Rules can be organized and their evaluation controlled with a grouping structure available in the rule editing window. These are the rules that govern the elevator cars.

- first try to load a person, if possible - otherwise either unload a person - or continue up or down - finally, if nothing else works, try reversing direction