Lecture 7 - Introduction to Netlogo

Here’s the code for the netlogo program we developed in class:

EvolutingAnts.nlogo

Right-Click and choose “download file as” and save the file with nlogo extension. Then open the file in netlogo directly.

This version of the model also contains evolution which you should try to implement in your own model.

Also have a look at the netlogo library and the various commands. Here’s a selection of commands we used today

clear all
create-turtles
shape
size
random-xcor
random-ycor
random-float
clear-drawing
one-of
turtles-here
die
hatch
ifelse
hsb
rgb
nobody
other
turtles-own
forward
right
neighbors
setxy
set
let
if
ifelse
max-pxcor
min-pxcor
tick
reset-ticks