StarLogo is a programmable modeling environment for exploring the workings of decentralized systems – systems that are organized without an organizer, coordinated without a coordinator.
Homepage | http://education.mit.edu/starlogo/ |
---|---|
Origin | MIT |
Year | 2000 |
Version | 2.21 |
License | Clearthought (open source) |
Language | Extension of logo |
StarLogo is a specialized version of the Logo programming language. With traditional versions of Logo, you can create drawings and animations by giving commands to graphic “turtles” on the computer screen. StarLogo extends this idea by allowing you to control thousands of graphic turtles in parallel. In addition, StarLogo makes the turtles' world computationally active: you can write programs for thousands of “patches” that make up the turtles' environment. Turtles and patches can interact with one another - for example, you can program the turtles to “sniff” around the world, and change their behaviors based on what they sense in the patches below. StarLogo is particularly well-suited for Artificial Life projects.
Presents a simple language and environment for modeling agents in the space. Fixed space and fixed neighbourhood. Each cell can have as many turtles as possible, but the user cannot visually identify when a cell has more than one turtle.
The tool is limited, therefore we can implement only simple models.
They present a couple of models together with the program, for example sugarscape (shown in the figure below),
bees making honeycombs, and a predator-prey system of rabbits and grass.
Each model has turtles and a observer. Conceptually, patches are not turtles, but in terms of implementation they are turtles. The observer represents a control entity. It can execute functions like create new turtles or change the color of all of the patches. Turtles execute moving commands, change the environment and other turtles:
if sick? ;if you're sick, make all the other turtles on your patch sick [setsick?-at 0 0 true make-sick]
One sign for turtles activates all turtles. For example, in a model of grass and rabbits, all the turtles receive the signs “grow” and “move”, and the function needs to check the type of the agent:
to grow if species = rabbit [stop] ;rabbit turtles don't grow grass ; [...] if pc-ahead = green [stamp green] ;grass only grows near other grass end
to move if species = grass [stop] ;grass turtles don't move rt random 50 lt random 50 fd 1 setenergy energy - 0.25 ; [...] end
One turtle can execute a command to change the cell it belongs. For example, it can change the color of the cell it belongs using the command “stamp”, used by the function “grow” above.