Micro-behaviours authored by the Modelling4All Project Team

Here are links to the micro-behaviours constructed for the Behaviour Composer as part of the Modelling4All Project at Oxford University funded by the Eduserv Foundation. You can browse subsets of this library tailored to specific tasks:

Browse Micro-Behaviours Needed in Building Disease Models, You can use this step-by-step guide for modelling epidemics.

Browse Micro-Behaviours Needed in Building Sugarscape Models. You can use this step-by-step guide to building Sugarscape models.

Contents

Movement

Appearance

Linking agents

Reproduction

Death and killing

Eating

Creating and setting attributes

Social network

World or environment

User input

Creating graphs and plots

Creating sliders, monitors and other widgets

File operations

Creating event logs

Collective decision-making and animal groups

Relative agreement models

Epidemic and vaccination models

Sugarscape: growing artificial societies

A simple model of predation

Economic models of network formation

Extra NetLogo code

Create your own micro-behaviours

You can browse these subsets of this library:

Movement micro-behaviours

MOVE-FORWARD -- I move forward at a speed.

TURN-RANDOMLY -- I repeatedly turn randomly.

TURN-REPEATEDLY -- I rotate at a speed.

WANDER-RANDOMLY-BY-TURNING -- I repeatedly turn randomly and move forward.

WANDER-RANDOMLY-IN-COMPASS-DIRECTIONS -- I repeatedly move up, down, left, or right one step.

WANDER-TO-AN-UNOCCUPIED-LOCATION -- I repeatedly move to a nearby location but not if someone is already there.

WANDER-TO-RANDOM-LOCATION-UNTIL-EMPTY -- I repeatedly move to a random nearby location and try again if it is already occupied.

MOVE-HORIZONTALLY-IF-UNOCCUPIED-DESTINATION -- I move left or right but only if the destination is unoccupied.

WANDER-HORIZONTALLY -- I repeatedly move left or right one step.

WANDER-VERTICALLY -- I repeatedly move up or down one step.

SET-RANDOM-POSITION -- I jump to a random position.

SET-RANDOM-UNOCCUPIED-POSITION -- I jump to a random position that is not occupied.

SET-POSITION-ON-A-CIRCLE -- I jump to a position on a circle.

TURN-TOWARDS-GOAL -- I turn towards a goal.

TURN-TOWARDS-ANOTHER -- I turn towards another individual.

SET-RANDOM-HEADING -- I set my heading to a random angle.

Appearance micro-behaviours

SET-SHAPE -- Sets my appearance to be a fish (easily changed to another shape)

SET-COLOR -- Sets my colour to red (easily changed to other colours)

SET-SIZE -- Sets my size so I appear bigger or smaller

HIDE -- I become invisible

SHOW -- I become visible again

SIZE-IS-FUNCTION-OF-AGE -- Changes my size as I get older

Linking agents micro-behaviours

These micro-behaviours are for creating and removing links between agents.

ADD-UNDIRECTED-LINK - I create an undirected link to another.

ADD-DIRECTED-LINK - I create a directed link to another.

REMOVE-LINK - I remove a link with another.

Reproduction micro-behaviours

ADD-COPIES -- I make copies of myself and add them to the model

ADD-SOME-OFFSPRING -- I create a random number of offspring whose age is set to zero

REPRODUCE -- I make a few copies of myself when I meet the right mate

ADD-COPY-OF-ANOTHER -- I make a copy of another individual

Death and Killing micro-behaviours

DIE -- Removes me from model

KILL -- Removes other from model

Eating

REDUCE-HUNGER -- Reduces my hunger (after eating)

GROW-HUNGRY -- I repeatedly get more hungry

EAT-WHEN-HUNGRY -- I try to eat something when I am hungry

DIE-WHEN-TOO-HUNGRY -- If I get too hungry I starve

Creating and setting attributes

INITIALISE-ATTRIBUTE -- Sets (and creates if needed) one of my attributes to a value

And some examples using attributes:

AGE-IS-ZERO -- My age starts off at zero

GROW-OLDER -- My age increases repeatedly

DIE-WHEN-TOO-OLD -- I die when I'm very old

UPDATE-MINIMUM-REPRODUCTION-AGE -- Increase the my minimum age before I can reproduce

SET-SPECIES -- Initialises the name of my species

Social Network

The following should be associated with a single agent, e.g. the world or observer.

INITIALISE-SOCIAL-NETWORK-CONSTANT-SYMMETRIC -- Initialises the subset of other agents that I "know" (everyone knows the same number of people). Everyone I know knows me.

INITIALISE-SOCIAL-NETWORK-NORMAL-DISTRIBUTION-SYMMETRIC -- Initialises the subset of other agents that I "know" (the number of people each person knows is normally distributed). Everyone I know knows me.

INITIALISE-SOCIAL-NETWORK-POWER-LAW-DISTRIBUTION-SYMMETRIC -- Initialises the subset of other agents that I "know" (the number of people each person knows follows a power law). Everyone I know knows me.

The following should be associated with the prototype of the population. These are only appropriate when a link from a to b does not entail there should be a corresponding link from b to a.

INITIALISE-SOCIAL-NETWORK-CONSTANT-ASYMMETRIC -- Initialises the subset of other agents that I "know" (everyone knows the same number of people). Not everyone I know knows me.

INITIALISE-SOCIAL-NETWORK-NORMAL-DISTRIBUTION-ASYMMETRIC -- Initialises the subset of other agents that I "know" (the number of people each person knows is normally distributed). Not everyone I know knows me.

REMOVE-SUPER-NODES -- Removes individuals with the greatest number of acquaintances.

CREATE-NUMBER-OF-SUPER-NODES-REMOVED-SLIDER -- Creates a slider to control the number of nodes removed by REMOVE-SUPER-NODES.

To view social networks:

DISPLAY-LINE-TO-EACH-OF-MY-ACQUAINTANCES -- I draw a line to all my acquaintances.

SET-SIZE-PROPORTIONAL-TO-NUMBER-OF-MY-ACQUAINTANCES -- I change my size to reflect the number of individuals in my-acquaintances.

World or Environment

Micro-behaviours for controlling the "world" the individuals "live" in.

SET-WORLD-SIZE -- I set the size of the world

SET-PATCH-SIZE -- I set the size of each patch

SET-WORLD-TO-TORUS -- I set the geometry of the world to a torus (coordinates wrap both horizontally and vertically)

SET-WORLD-TO-PLANE -- I set the geometry of the world to a plane (coordinates do not wrap)

SET-WORLD-TO-PLANE-WITH-CAMERA-FOLLOWING-CENTROID -- I set the geometry of the world to a plane (coordinates do not wrap) but the display of the world is constantly updated so the center is the average position of all individuals

SET-WORLD-TO-VERTICAL-CYLINDER -- I set the geometry of the world to a vertical cylinder (coordinates wrap only horizontally)

SET-WORLD-TO-HORIZONTAL-CYLINDER -- I set the geometry of the world to a horizontal cylinder (coordinates wrap only vertically)

SET-WORLD-LOCATION -- I set where the display of the world is placed

INITIALISE-EACH-PATCH -- Each patch of the world is initialised

EACH-PATCH-CHANGES -- Each patch of the world does this repeatedly

SET-BACKGROUND-COLOR - Sets the colour of the every patch of the background.

PAUSE-WHEN -- Pauses the running of the model when some condition is true

SET-DELTA-T -- Sets the value of delta-t used by convention as the default duration of a tick or cycle

TURN-OFF-CLOCKED-MODE -- I turn off clocked mode.

MAKE-A-MOVIE-OF-A-MODEL -- Records a movie of a model running

User Input

DO-BUTTON-COMMAND -- I do the action of the last button pushed

CREATE-RIGHT-TURN-BUTTON -- I add a button the NetLogo interface for turning right

CREATE-LEFT-TURN-BUTTON -- I add a button the NetLogo interface for turning left

CREATE-SPEED-UP-BUTTON -- I add a button the NetLogo interface for increasing my speed

CREATE-SLOW-DOWN-BUTTON -- I add a button the NetLogo interface for decreasing my speed

GO-FORWARD-AT-SPEED -- I repeatedly go forward in a direction and speed determined by these buttons

MOVEMENT-CONTROLLED-BY-BUTTONS -- Combines all the above in one

Creating Graphs and Plots

CREATE-PLOT -- I create a two-dimensional graph

CREATE-HISTOGRAM -- I create a histogram

Creating Sliders, Monitors, and other Widgets

CREATE-SLIDER -- I add a slider to the NetLogo interface

CREATE-MONITOR -- I add a monitor to the NetLogo interface

CREATE-CHOOSER -- I add a chooser that behaves like a pull-down menu to the NetLogo interface

CREATE-TEXT -- I add some text to the NetLogo interface

File Operations

Here are micro-behaviours for reading and writing to files.

FILE-OPEN -- I open a file for reading or writing

FILE-TYPE -- I write (or type) a value to the opened file.

FILE-WRITE -- I write a value to the opened file in such a manner that it can be read by FILE-READ.

FILE-READ -- I read a value from the opened file.

FILE-CLOSE -- I close the currently opened file.

Creating Event Logs

LOG-ALL-BEHAVIOURS -- Adds to a log all behaviours I receive

LOG-SPECIFIED-BEHAVIOURS -- Adds to a log when I receive a specified behaviour

LOG-ALL-ATTRIBUTES -- Adds to a log every time any of my attributes is updated

LOG-SPECIFIED-ATTRIBUTES -- Adds to a log whenever any of the specified attributes is updated

Collective decision-making in animal groups

The micro-behaviours are based upon the following article.

Couzin, I.D., Krause, J., Franks, N.R. & Levin, S.A.(2005) Effective leadership and decision making in animal groups on the move Nature 433, 513-516.

DIRECTION-TO-AVOID-OTHERS -- I set my desired direction to avoid those within my personal space

DIRECTION-TOWARDS-OTHERS -- I set my desired direction towards those near me that are not within my personal space

DIRECTION-TOWARDS-OTHERS-DELAYED -- I run DIRECTION-TOWARDS-OTHERS delayed a little

DIRECTION-TO-ALIGN-WITH-OTHERS -- I set my desired direction to align with those within my local interaction range

DIRECTION-TO-ALIGN-WITH-OTHERS-DELAYED -- I run DIRECTION-TO-ALIGN-WITH-OTHERS delayed a little

DIRECTION-NOISE -- My desired direction is noisy

INFORMED-DIRECTION -- I set my desired direction partly based upon where I think we should go

INITIALISE-PREFERRED-DIRECTION -- I become 'informed' by having a non-zero preferred direction

INFORMED-NOISE -- My informed direction is noisy

TURN-IN-DIRECTION-AT-MAXIMUM-SPEED -- I can only turn so fast to reach my desired direction

TURN-IN-DIRECTION-AT-MAXIMUM-SPEED-DELAYED -- I run TURN-IN-DIRECTION-AT-MAXIMUM-SPEED after a delay

UPDATE-LOCATION -- I update my position based upon my orientation and speed

UPDATE-LOCATION-DELAYED -- I run UPDATE-LOCATION after other micro-behaviours

CREATE-SLIDER-FOR-PERSONAL-SPACE -- for setting the maximum distance of the personal space

CREATE-SLIDER-FOR-LOCAL-INTERACTION -- for setting the maximum distance for interaction

PLOT-AVERAGE-DIRECTION -- Plots the average heading of everyone

Here is a simple swarming model using some of these micro-behaviours.

Relative Agreement Models

These are special purpose micro-behaviours inspired by the paper

"How can extremism prevail? A study based on the relative agreement interaction model" by Guillaume Deffuant, Frédéric Amblard, Gérard Weisbuch and Thierry Faure (2002); Journal of Artificial Societies and Social Simulation vol. 5, no. 4; <http://jasss.soc.surrey.ac.uk/5/4/1.html>

CHANGE-OPINION-IN-NEIGHBOURHOOD -- I may change my opinion when I meet someone nearby

CHANGE-OPINION-SOCIAL-NETWORK-- I may change my opinion when I interact with someone I know

RELATIVE-AGREEMENT -- Here's how I change my opinion (if I do)

SET-RANDOM-OPINION -- I initialise my opinion to a random value

SET-OPINION-UNCERTAINTY -- I initialise my uncertainty of this opinion

SET-EXTREME-OPINION-NEGATIVE -- I become an extremist with an opinion of -1

SET-EXTREME-OPINION-POSITIVE -- I become an extremist with an opinion of -1

SET-HEADING-TO-CURRENT-OPINION -- My heading is computed from my current opinion so you can see what's happening

SET-SIZE-TO-UNCERTAINTY -- I grow as I become more certain

ADD-RANDOM-POPULATION - I create a population with random opinion values.

CREATE-OPINION-PLOT -- Creates a plot for displaying opinions over time

PLOT-MY-OPINION -- Add a plot of my opinion to the Opinion Plot

Here is a sample relative agreement model

Epidemic and Vaccination Models

These micro-behaviours were designed to explore the SVIR model as presented in "Mathematical models of vaccination", Almut Scherer and Angela McLean, British Medical Bulletin 2002;62 187-199. Here are some suggestions for exploring vaccination models.

For creating an initial population:

CREATE-INITIAL-INFECTED-POPULATION -- I create an initial population of infected individuals.

CREATE-INITIAL-SUSCEPTIBLE-POPULATION -- I create an initial population of susceptible individuals.

CREATE-INITIAL-VACCINATED-POPULATION -- I create an initial population of vaccinated individuals.

CREATE-INITIAL-INFECTED-COUNT-SLIDER -- I create a slider for initial number of infected individuals.

CREATE-INITIAL-SUSCEPTIBLE-COUNT-SLIDER -- I create a slider for initial number of susceptible individuals.

CREATE-INITIAL-VACCINATED-COUNT-SLIDER -- I create a slider for initial number of vaccinated individuals.

To initialise the state of individuals:

SET-STATE-SUSCEPTIBLE -- I set my state to susceptible (to infection).

SET-STATE-INFECTED -- I set my state to infected.

SET-STATE-RECOVERED -- I set my state to recovered (from infection).

SET-STATE-VACCINATED -- I set my state of vaccinated.

To control intrinsic parameters:

CREATE-INFECTION-ODDS-SLIDER -- I create a slider for the odds of an infection spreading per encounter.

CREATE-ENCOUNTER-RATE-SLIDER -- I create a slider for the number of encounters by infected individuals.

CREATE-ENCOUNTER-FRACTION-SLIDER -- I create a slider for the number of encounters as a fraction of the number of acquaintances.

CREATE-DEATH-RATE-SLIDER -- I create a slider for life expectancy.

CREATE-RATE-OF-RECOVERY-SLIDER -- I create a slider for the duration of an infection.

CREATE-FRACTION-OF-VACCINATIONS-THAT-TAKE -- I create a slider for the odds that a vaccination takes.

CREATE-RATE-OF-LOSS-OF-IMMUNITY-SLIDER -- I create a slider for the duration of a vaccination.

CREATE-VACCINE-COUNT-SLIDER -- I create a slider controlling the number of individuals to be vaccinated.

To control policy parameters:

CREATE-FRACTION-VACCINATED-AT-BIRTH-SLIDER -- I create a slider for the proportion vaccinated at birth.

To add all the above at once:

CREATE-SLIDERS-AND-INITIAL-POPULATION -- I do all of the above.

To see how the current slider settings translate to the mathematical model:

MONITOR-FORCE-OF-INFECTION -- I add a monitor that displays β or the force of infection.

To model the spread of infections:

RANDOM-ENCOUNTER -- I possibly infect anyone in the population.

RANDOM-SOCIAL-ENCOUNTER -- I possibly infect someone in my social network.

RANDOM-SPATIAL-ENCOUNTER -- I possibly infect anyone in the population but with a greater probability for those nearby.

RANDOM-PHYSICAL-ENCOUNTER -- I possibly infect anyone I came into contact with.

POSSIBLE-INFECTION -- I may infect the other individual.

LOG-INFECTION-ONSET -- I add to the log every infection event.

To model recovery:

RECOVERY-POSSIBLE-AFTER-INFECTION -- I add a behaviour so that I recover with some probability.

To model interventions:

VACCINATE-N-RANDOM-INDIVIDUALS -- After a delay I vaccinate some number of susceptible individuals.

VACCINATE-N-RANDOM-SUSCEPTIBLE-ACQUAINTANCES-OF-THE-INFECTED -- After a delay I vaccinate some number of susceptible individuals who have an acquaintance who is infected.

One way modelling death and birth (using probabilities of dying or giving birth):

BIRTH-RATE -- I give birth with some probability.

DEATH-RATE -- I die with some probability.

To initialise newborns:

POSSIBLY-VACCINATE-NEW-BORN -- A new born is possibly successfully vaccinated.

NEW-BORN-INITIAL-STATE -- I set my attributes to correspond to a new born.

To create plots as it runs:

CREATE-EMPTY-POPULATIONS-PLOT -- I create a plot to which other micro-behaviours can add.

ADD-SUSCEPTIBLE-TO-POPULATIONS-PLOT -- I add a plot of the number of susceptible individuals to the Populations Plot.

ADD-VACCINATED-TO-POPULATIONS-PLOT -- I add a plot of the number of vaccinate individuals to the Populations Plot.

ADD-INFECTED-TO-POPULATIONS-PLOT -- I add a plot of the number of infected individuals to the Populations Plot.

ADD-RECOVERED-TO-POPULATIONS-PLOT -- I add a plot of the number of recovered individuals to the Populations Plot.

ADD-TOTAL-TO-POPULATIONS-PLOT -- I add a plot of the total number of individuals to the Populations Plot.

To view relationships:

DISPLAY-LINE-OF-INFECTION -- I draw a line between the infector and infected.

DISPLAY-LINE-TO-EACH-OF-MY-ACQUAINTANCES -- I draw a line to all my acquaintances.

SET-SIZE-PROPORTIONAL-TO-NUMBER-OF-MY-ACQUAINTANCES -- I change my size to reflect the number of individuals in my-acquaintances.

To more easily access sub-populations:

REPORT-ALL-LIVING -- I report all the individuals that are alive.

REPORT-ALL-INFECTED -- I report all the individuals that are infected.

REPORT-ENCOUNTER-RATE -- I report the encounter rate.

REPORT-ALL-SUSCEPTIBLES -- I calculate the set of individuals who are susceptible to infection.

REPORT-ALL-SUSCEPTIBLES-WHO-HAVE-AN-INFECTED-ACQUAINTANCE -- I compute the set of individuals who are susceptible to infection who have an acquaintance that is already infected.

To stop the simulation:

PAUSE-WHEN-NONE-INFECTED -- I pause the simulation when no one is infected.

PAUSE-WHEN-TIME-EXCEEDS-50 -- I pause the simulation when the time is greater than 50.

Click to load a simple model of an epidemic spreading over a social network This sample model uses many of the above micro-behaviours.

Sugarscape -- Growing Artificial Societies

The following micro-behaviours can be composed to recreate the models in Growing Artificial Societies by Joshua M. Epstein and Robert Axtell, Brookings Institute Press, The MIT Press, 1996

Here are micro-behaviours for initialising and updating the environment:

INITIALISE-SUGAR-CAPACITY -- I initialise values for the capacity of each patch's maximum sugar capacity by using COMPUTE-INITIAL-SUGAR-CAPACITY

INITIALISE-SUGAR-GROWTH-RATE -- I initialise rate that each patch's sugar grows

INITIALISE-POLLUTION-PRODUCTION-RATE -- I initialise the pollution-production-of-patch

GROW-SUGAR-DELAYED -- Each patch grows sugar after agents are finished collecting sugar

GROWING-SUGAR-PRODUCES-POLLUTION -- When sugar is grown pollution is also created

GROW-SUGAR-SEASONALLY-DELAYED -- Grow more sugar in the summer than the winter using COMPUTE-SEASONAL-GROWTH-FACTOR.

DIFFUSE-POLLUTION -- Pollution spreads to neighbours

UPDATE-PATCH-COLOUR -- I change the patch colours to reflect how much sugar is available

And this creates the initial population:

CREATE-NEW-AGENTS -- I create the initial population

CREATE-NEW-AGENTS-IN-LOWER-LEFT-CORNER -- The population starts off in a block to explore migration

Here are micro-behaviours for initialising individual agents:

INITIALISE-SUGAR-CONSUMPTION -- I initialise my metabolism rate

INITIALISE-VISION-LEVEL -- I initialise my level of vision

INITIALISE-SUGAR-ENDOWMENT -- I initialise my initial store of sugar

INITIALISE-AGE -- I start off with an age of zero

INITIALISE-LIFETIME -- I initialise the length of my life (if I don't starve or the like)

INITIALISE-POLLUTION-DUE-TO-CONSUMPTION-RATE -- I initialise the rate I produce pollution by sugar consumption

INITIALISE-AGENT -- I initialise the metabolism, vision, and initial sugar endowment

Here are agent micro-behaviours:

AGE -- I grow older

CONSUME-SUGAR-DELAYED -- I delay eating my sugar at my metabolism rate until after I'm finished moving

SUGAR-CONSUMPTION-PRODUCES-POLLUTION -- I produce pollution when I consume sugar

DIE-IF-NO-SUGAR -- I starve if my sugar falls to zero or below

DIE-IF-TOO-OLD -- I die if I exceed my life expectancy

CREATE-NEW-AGENT - I create a new individual

REPLACE-DEAD-AGENT -- If I die a new individual is created to replace me

MOVE-TO-NEAREST-PREFERRED-VISIBLE-PATCH -- I move to the patch I can see with the most sugar

PREFER-PATCH-WITH-MORE-SUGAR -- I prefer patches with more sugar

PREFER-PATCH-WITH-GREATER-SUGAR-TO-POLLUTION-RATIO -- I prefer patches with larger sugar to pollution ratios

COLLECT-SUGAR-DELAYED -- I collect all the sugar at my site after I've moved

Here are observer micro-behaviours to create graphs and monitors:

CREATE-POPULATION-PLOT -- I plot the total population over time

CREATE-WEALTH-HISTOGRAM -- I display a histogram of the wealth (i.e. sugar) distribution

CREATE-EMPTY-LORENZ-CURVE -- I create an empty labelled plot

DRAW-LORENZ-CURVE -- I draw a curve of the current wealth distribution

CREATE-GINI-COEFFICIENT-MONITOR -- I monitor the value of the Gini coefficient to measure the inequality of the wealth distribution

CREATE-VISION-LEVEL-MONITOR -- I monitor the average vision level of the population

CREATE-MEAN-METABOLISM-MONITOR -- I monitor the average sugar consumption rate of the population

CREATE-TIME-MONITOR -- I monitor the simulation clock

Click here to load a Sugarscape model using these micro-behaviours

A Simple Model of Predation

The so-called Stupid Model is a predator-prey model that has been implemented in at least 5 different modelling systems. Here we introduce another one (even though one of the models was implemented in NetLogo).

EAT-AND-GROW -- Eat the food on this patch and grow bigger

This library worked fine in an older version of the software. We plan to update it and add it here soon.

Economic Models of Network Formation

This is work-in-progress. It is a collaboration between Edoardo Gallo and Ken Kahn.

CHOOSE-PAIRS -- I randomly select two individuals.

SIMPLE-ADD-LINK-DECISION -- I decide whether to add a link.

ADD-LINK-DECISION-ERROR -- I add a decision error rate to SIMPLE-ADD-LINK-DECISION

SIMPLE-REMOVE-LINK-DECISION -- I decide whether to remove an existing link.

REMOVE-LINK-DECISION-ERROR --  I add noise to the decision to remove links.

ADD-A-LINK-IF-IN-AGREEMENT -- I add a link if the other player has also decided to add a direct link.

PREPARE-FOR-NEXT-TURN -- I forget who I was paired with and what I decided.

INITIALISE-MY-LINKS -- I start off with no links.

LOG-DESIRE-TO-ADD-A-LINK -- I add to the log when an individual prefers to add a link.

LOG-DESIRE-TO-REMOVE-A-LINK -- I add to the log when an individual decides to remove a link.

ADD-PLAYERS -- I add and initialise the player.

SET-MY-MAXIMUM-BENEFIT-DISTANCE -- I give each player a potentially different distance that truncates the benefits of the network.

SET-MY-GROUP -- I determine which group I'm a member of.

And the following sliders to control parameters:

TOTAL-NUMBER-OF-PLAYERS-SLIDER -- I add a slider for the number of players.

DIRECT-LINK-BENEFIT-SLIDER -- I add a slider for the benefit of a direct link.

DIRECT-LINK-COST-SLIDER -- I add a slider for the cost of a direct link.

DIRECT-LINK-SAME-GROUP-COST-SLIDER  -- I create a slider controlling the cost of having a direct link between members of the same group.

INDIRECT-LINK-BENEFIT-DECAY-SLIDER -- I add a slider for the decay factor for indirect links.

MAXIMUM-NUMBER-OF-LINKS-SLIDER -- I add a slider for the maximum number of links any single player can have.

ADD-LINK-ERROR-ODDS-SLIDER -- I add a slider for the odds of making a mistake when deciding to add a link.

REMOVE-LINK-ERROR-ODDS-SLIDER -- I add a slider for the odds of making a mistake when deciding to remove a link.

CREATE-UTILITY-GAINS-PLOT  -- I plot a graph of the accumulated total gains in utility over time.

CREATE-AVERAGE-UTILITY-GAINS-PLOT  -- I plot a graph of the average gains in utility over time.

And these are NetLogo procedures specific to these models:

ADD-LINK-TO -- I add a link to another.

REMOVE-LINK-TO -- I remove a link to another.

LINKED-TO? -- I report if I am linked to another directly.

UTILITY-OF-NETWORK -- I compute the utility of the current network.

TOTAL-COST -- I compute the cost of the direct links of a player.

BENEFIT-OF-LINK-WITH-DISTANCE -- I compute the benefit of a direct or indirect link.

MINIMUM-DISTANCE -- I compute the minimum network distance to another.

ADD-NETWORK-FORMATION-PROCEDURES - This adds the above list of NetLogo procedures needed by network formation micro-behaviours.

Extra NetLogo Code

These aren't really behaviours like the rest, instead they are a way to add any NetLogo code that can be used in other micro-behaviours.

NETLOGO-CODE

Add your own

The code itself can be any NetLogo code as well as these scheduling primitives. References to attributes of a prototype should follow these attribute naming conventions.

NEW-MICRO-BEHAVIOUR