For our NetLogo tools (extensions & include files) see TOOLS
Please note: we use sxl-utils.nls (a small collection of utility procedures) in many of our models.
This should be placed in the same folder as any models that need it and loaded into the model using an include statement at the start of your model code...
__includes [ "sxl-utils.nls" ]
NetLogo models...
link | description |
---|---|
Life Workshop | examples used in the workshop at the Centre for Life |
foxes & rabbits | a simple series of models if you are just starting with NetLogo - similar to the Life Workshop models |
Maker Faire 2014 | some of the models from the Maker Faire 2014 |
Maker Faire 2016 | some models from the 2016 Maker Faire |
Malaria Models | models representing the transmission of malaria and the way different gene types respond to infection |
Speciation Models | models representing the transmission of malaria and the way different gene types respond to infection |
path finding | a NetLogo breadth first search an A* search from one patch to another and other state space searches (a search mechanism, examples and utilities) |
L-systems model | morphogenesis of 2D shapes using context free grammar rules |
fox & hounds | a competition based on a chase scenario |
NetLogo tasks | a discussion of tasks and how to use them (NetLogo 5 onwards) |
adaptive models | this section is developing. It includes simple adaptation models, genetic drift, speciation and the "evolution lab" models. The BuzzBug models are also here for now. |
other models | models not included elsewhere |
intro.ppt | a few slides used to introduce modelling biological & physical systems |
Complexity.ppt | an introduction to complexity & emergence, etc,
modelling with cellular automata & state machines |
other links
- a nice collection of NetLogo Models for Artificial Intelligence from W. J. Teahan Models for AI -- highly recommended.
- for more NetLogo resources check the NetLogo site: ccl.northwestern.edu/netlogo.
- for a short but useful summary for writing NetLogo check: NetLogo-4-0-QuickGuide.pdf.
- work from Michael Gizzi (Illinois State University) recommended: The NetLogo learning Lab.
- models from Tom Carter (California State University Stanislaus) - recommended:
Tom's NetLogo Models.
(Tom's pages have lots of useful information relevant to modelling, AI, linguistics, complexity, etc. Well worth a look, see Tom's Pages) - ccl evolution pages ccl beagle
- Computational Modeling in Cognitive and Social Science from Stanford -- their home page or check one of their couse pages here
- Schank Lab & SwarmFest SwarmFest
- Model Thinking Model Thinking -- an open course from the university of Michigan, sign up for more details
- Agent Based Modelling - summer school ABM -- Computer Programming for Social Scientists from Machester University
- we welcome contributions from others so please contact us if you build models you would like to share.
- to cite the work on these pages please quote the web address and use S.C.Lynch as the author name
also...
This is a good place to start if you are new to NetLogo. These are a series of models which build on each other to progress from a simple to a more complex model. See brief.pdf for an explanation.
fox & rabbit models...
- fox-n-rabbits-0.nlogo
- fox-n-rabbits-1.nlogo
- fox-n-rabbits-2.nlogo
- fox-n-rabbits-3.nlogo
- fox-n-rabbits-4.nlogo
- fox-n-rabbits-5.nlogo
If you want to write your own model from scratch you can start with the following blank1.nlogo
Netlogo breadth-first search & best-first search
- search routines & utilities
- check breadth-search(1a).nlogo for a generalised search routine and an example based on a numbers puzzle, read the info tab for an explanation.
- check also breadth-search(1a)-eg2.nlogo for a second example based on a word transformation problem, as before read the info tab for details.
- to help set up an environment with hills/cost gradients for other types of search see hill-diffusion.nlogo
- see maze(1b).nls for an include file to draw mazes and maze-test(1a).nlogo for a simple model which demonstrates the maze drawing.
- see also patch-to-patch-search(1a).nls for an include file containing a search mechanism to find a path from one patch to another and maze-search-test(1a).nlogo for a simple model which demonstrates the use of the patch-to-patch search.
- some example implementations of search (now upgraded to netlogo 5)
- patches - no obstacles search operating on a blank background of patches. ie: no obstacles, no costs
- patches with obstacles as the previous versions but patches may be marked as "walls" which act as barriers for search paths
- patches with costs this model allows patches to be given costs and implements a best first search
- walk a marked path
this model allows patches to marked as being part of a path and uses a breadth first search
to find a route on the path from a start patch to a goal patch. It looks like this...
- maze traversal
-- this model was developed after a Programming Interest Group competition.
There is a partial maze environment containing pigs (lost and need rescuing), pig stys and
golf carts (mobile agents that find pigs and return them to a sty). The controller for golf-carts
(or maybe they are shopping trollys) is based on search. For more details check the info
tab on the model. It looks like this...
Morphogenesis is concerned with the "creation of shape". It normally refers to the development of shape/structure in a biological entity. Computer Science also has had an interest since Lindenmayer proposed "L-systems", a formal system for describing morphogenesis.
An L-system is a 'language' defined by a set of production rules. These production rules are initially applied over a sequence of start symbols (an "axiom") expanding them into a new sequence of symbols which are then used for further expansions (more information is readily available on the web).
In a computational model, the resulting sequences (after multiple applications of production rules) can be interpreted as sequences of instructions. With our model here, we use a common approach which is to interpret the symbols as instructions to move a turtle (the turtle draws with its pen).
The model can be tailored expanded by adding new L-systems descriptions into the code.
the model: l-system1.nlogo
model images...
external links...
- algorithmic botany -- pages from the University of Calgary
- algorithmic beauty of plants -- a (free) online book
- links to an Lparser package
- L-systems -- an applet runner from university of Calgary
- kevs3d -- an L-system runner in html5 from Kevin Roach
- Tickle Trunk -- brief discussion of L-systems and an applet to run them
models used to introduce NetLogo
The models present a simple world inhabited by foxes and rabbits. When the foxes land on a rabbit, the rabbit dies.
The models progress from "fox-n-rabbits-0.nlogo" to "fox-n-rabbits-5.nlogo" with additional capability/complexity added at each stage (see version details below). There is also a model demonstrating simple adaptation (called "fox-n-rabbits-adapting.nlogo") where rabbits & foxes learn to spend less time sleeping and more time chasing each other or running away.
Note that all models need to use the file called "sxl-utils.nls" so make sure this is in the same folder as your NetLogo models. You can get "sxl-utils.nls" here sxl-utils.nls
The best way to learn NetLogo is to experiment with the models - download them then open them with NetLogo - do not try to cut & paste model code from a text editor into NetLogo because this does not work.
NetLogo comments start with a semi-colon ";" and end at the end of a line so any text after a semi-colon is used to explain the model code but does not affect how it operates.
models...
- fox-n-rabbits-0.nlogo -- rabbits & foxes move at random
- fox-n-rabbits-1.nlogo -- foxes can chase rabbits
- fox-n-rabbits-2.nlogo -- rabbits can run away from foxes
- fox-n-rabbits-3.nlogo -- allow rabbits to breed/hatch clones
- fox-n-rabbits-4.nlogo -- add aging for rabbits
- fox-n-rabbits-5.nlogo -- addition of energy values (& breeding) for foxes
- fox-n-rabbits-adapting.nlogo -- foxes & rabbits learn to sleep less (this is based on model #4 above)
- and don't forget sxl-utils.nls
- outline -- to follow
- rules for coding
- skeleton netlogo model
Tasks are introduced in NetLogo 5 - here are some examples/discussions of their use.
- task-test(1a).pdf - for some comments about referencing tasks in NetLogo5, see also test1a.nlogo for the test model
- task-test-2.pdf - some experiments using task closures to define stack functions (updated 23/10/11)
- fox & rabbit speed
a simple model showing co-evolution/adaption of the speed of movement of rabbits & foxes - vectors on diffused space
adaptive entities (each defined by a collection of [x y] vectors) aim to occupy optimal positions in a search space than contains multiple (partial-)optima - multi-facet v.2
this model shows evolution/adaption of multiple variables over time. The model uses a fixed size population with a simple "survival of the fitest" approach. - evolab
the evolution lab model. The version here uses a binary genome & a rule-based phenome. For details of parenting strategy, etc. please check the model code. - genetic drift on patches
-- a model showing genetic drift occuring over patches. - speciation
-- a more complex model which pushes genetic drift to illustrate speciation. I am still working on modelling speciation, if you are also working in this area please get in contact.
- cloud formation
-- demonstrates cloud formation using cellular automata which operate in a similar way to genetic dift.
- BuzzBug
-- this model investigates the way in which simple genetic operators (cross-over
& mutation) effect inheritance. The model holds a small population of "bugs", each defined by
a short digital gene sequence. A bug's genome define its shape and the sound it makes.
You can select parents to breed new off-spring with modified genomes.
Notes...- make sure you have the sound on!
- click [setup] to start
- the grid shows 25 "bugs" (shape & sound defined by their unique digital genome)
- listen to bugs by clicking the [play] button then clicking the mouse on the bug shape in the grid
- breed new bugs using [select P1] and [select P2] to choose 2 parents (click the button then click on the shape you want in the grid), use [select NEW] to identify which bug you want to replace and [breed(P1,P2)=>NEW] to get the breeding to take place
- to see all genomes press [print genomes]
- for more details check the info tab on the model
The model world looks like this...
- friends-of-friends
"Six degrees of separation" is the notion that, on average, everyone is connected to everyone else on the planet by 6 friendship links. This model explores a similar idea. -
a code anti-pattern?
demonstrates how NOT to code up selection mechanisms if you want even/fair distribution. - test page