Unit 1: What is Complexity

13 thoughts
last posted Oct. 14, 2013, 7:46 p.m.

12 earlier thoughts

0

The world in logo is a coordinate system of patches. Each place in the world is a patch. You can control the size of the world.

ask patches [stuff]

stuff settings for patches:
set pcolor <color>

if <condition> [<..>]
if not any? patches with [<condition>] [stop]

ask turtles [ <stuff> ]

set <variable> <value>
set label <value>

To provide state to an agent:

turtles-own [variable]

Add a slider with the UI to let the user set a variable which can then be used by name in the code.

Add a plot with the UI to watch a variable: sum [food-eaten] of turtles

Completed Ant2.nlogo exercise