The Observer

Turtle World has a deity called the Observer. You can control the Observer by typing observer commands into the observer command box (press the Enter key after typing a command to get the observer to execute the command.)

Ask

The observer can ask all of the turtles to execute a block of turtle commands:

ask turtles [fight move eat mate]

The observer can ask all of the patches to execute a block of patch commands:

ask patches [grow bloom seed]

Of course the observer can ask individual patches and turtles to execute blocks of patch and turtle commands:

ask turtle 42 [seek destroy]

ask patch 10 5 [advertise sell restock]

We can also ask subsets of turtles and patches to execute blocks of patch and turtle commands:

ask turtles with [21 <= age] [drink puke pass-out]

ask [neighbors] of turtle 0 [explode burn]

Create and Destroy

The observer can create turtles:

crt 100  ; create 100 turtles

The observer can clear all turtles, patches, drawings:

ct ; clear turtles

cp ; clear patches

cd ; clear drawing

The observer can clear everything with one command:

ca ; clear all

The Clock

The world is equipped with a clock. It's the observer's responsibility to move the clock by periodically calling the tick procedure:

tick  ; advance world clock by one tick

Example

The typical NetLogo program

; initialize the simulation
to init
  ca                        
  crt 20                    
  init-globals
  ask patches [init-patch]
  ask turtles [init-turtle]
end

; call repeatedly
to update
  tick                      
  ask patches [update-patch]
  ask turtles [update-turtle]
  update-globals
end

Example

Note the observer commands typed into the command center window:

Inspect

Print

Just want to know the answer? Ask the observer to print the answer to your question:

Beep

Make some noise with the beep command.