Download presentation
Presentation is loading. Please wait.
1
An introduction to Netlogo agent-based software
Brian Dermody
2
What is an agent? An agent is an individual It has attributes
Person, plant, electron etc. It has attributes Happy, wilted, charged etc. It performs actions Buy/sell, grow, radiate etc. It exists in an environment Market, ecosystem, atom etc. Agents are often different Interactions among agents and their environment bring about emergent behaviour/ patterns
3
Emergence Small scale interactions among agents and their environment bring about higher-level emergent patterns Simple – complex Cross-scale feedbacks
4
Netlogo Netlogo is the most widely used agent-based modelling environment in both education and research. Netlogo is written mostly in Scala, an object-oriented language, with some parts in Java. Netlogo consists of a Graphical User Interface (GUI) frontend with code on the backend. GUI consists of buttons, sliders, graphs which can be linked with the code. Here start with a blank model.
6
Netlogo Netlogo is the most widely used agent-based modelling environment in both education and research. Netlogo is written mostly in Scala, an object-oriented language, with some parts in Java. Netlogo consists of a Graphical User Interface (GUI) frontend with code on the backend. GUI consists of buttons, sliders, graphs which can be linked with the code. Netlogo runs sequentially, parallel not possible: Disadvantage! Here start with a blank model.
7
Netlogo Agents (Turtles in Netlogo speak) interact with environment and each other The environment comprises of patches Grid-based data
8
Netlogo Agents (Turtles in Netlogo speak) interact with environment and each other The environment comprises of patches Grid-based data Supports multi-agent networks Check model library for examples So one of the classic examples of emergence is the segregation model. The idea behind this model was how people areas arise with in cities with people of different ethnicities. So-called ghettoization of cities. The author, Thomas schelling figured it was just an inevitable outcome of the desire to be close to a certain amount of people from the same ethnicity. He figured that ghettos within cities were an emergent property of of people wanting to live close to people of the same ethnicity. Depending on the intolerance for other ethnicities, the more ghettoized a city would become So the way this model works is that each individual has a certain desire about the number of people they want the same around them. So for example, they want that at least 20% of their immediate neighbours are of the same ethnicity. If that is not the case they move somewhere else. And that continues. The more intolerant they are (i.e. the more of their own ethnicity they desire) the more ghettoized the city becomes. observer> ask turtle 0 [show count links] observer> ask turtle 0 [show count my-links] observer> ask turtle 0 [set color red]
9
Netlogo attributes Global attributes are "global" because they are accessible by all agents and can be used anywhere in a model. Agent/agent-set attributes: accessible by agents Patch attributes: accessible by patches Link attributes: accessible by links and node agents (for network models)
10
Tutorial Go to uu.nl/clue and download the text file.
11
Tutorial Open Netlogo and paste the provided code under the code tab
The model doesn’t work? – We need to provide links between frontend and the code
12
Tutorial Open Netlogo and paste the provided code under the code tab
The model doesn’t work? – We need to provide links between frontend and the code Use the check to see where the problems lie You code relates to frontend controls such as buttons and sliders. You need to add these
13
Tutorial Add a slider that allows you to flexibly set the number of “vulture” agents (min 0, max 50) Add chooser for roost-dispersed (10, 50) Add slider that allows you to flexibly set the number of “carcass” agents (min-0, max 50) You need to add a “setup” and “go” buttons Set go as “forever” Change area of environment to 30*30 with patch size 10
14
Agent-based model of vulture foraging
Vultures Scavengers Soaring flight Vulture foraging Food is spatially and temporally ephemeral Large enough to feed more than one forager Food becomes easier to see when it is found by others Activity at the carcass Rapid descent of other vultures Vultures roost communally Research Questions What is the importance of the roost? Do vultures form groups?
15
Coordinated movement in animal groups
In order to give our vultures in our model the ability to react to other vultures we assigned them with 3 rules which are the basis for group behaviour in a range of animals. Animals that form highly cohesive groups are proposed to do so using three simple rules. These can be thought of in terms of decision circles around the animal and depending on where other animals fall within those spheres the decisions the animal makes will be different. For example if another agent enters the red ring of this agent it will move away, if Couzin et al. (2005)
16
Assignment Add ZoR, ZoO and ZoA sliders to the Netlogo frontend and link with code on coordinated movement (0-5 with increment of 0.1) What type of coordinated movement do you see for different combinations of the 3 sliders?
17
Assignment Add ZoR, ZoO and ZoA sliders to the Netlogo frontend and link with code on coordinated movement What type of coordinated movement do you see for different combinations of the 3 sliders?
18
More questions? Netlogo dictionary Netlogo models library
Simply right-click command Netlogo models library Adjust existing models to meet your needs Netlogo user community forum Usually answers within 1 day
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.