Agent-Based Modeling and Simulation (ABMS) Bertan Badur Department of Management Information Systems Boğaziçi University.

Slides:



Advertisements
Similar presentations
AP Computer Science Anthony Keen. Computer 101 What happens when you turn a computer on? –BIOS tries to start a system loader –A system loader tries to.
Advertisements

Netlogo! NetLogo is a programmable modeling environment for simulating complex systems. Modelers can give instructions to hundreds or thousands of independent.
Agents and Pervasive Computing Group Università di Modena e Reggio Emilia System Requirements NetLogo is designed: to run almost any type of computer.
New Mexico User Test Starlogo TNG September 16, 2006 Starlogo TNG September 16, 2006.
Netlogo and its Relatives Logo (Papert) –Language for teaching mathematics graphically –Tell turtle how to move Starlogo (Resnick) & StarlogoT (Wilensky)
Wurzer, Lorenz, Popov: „NetLogo Workshop (Part 1)“, in eCAADe 2012 Prague, Slide 1 „Netlogo First Steps (Artif. Societies) “, in Social Simulation Conference.
Day 1 Goal: To create a model of people hunting in the forest for mushrooms and then start working on improving their mushroom hunting ability mathematically.
New Mexico Computer Science For All Local Variables in Netlogo Maureen Psaila-Dombrowski.
Using Logo and Logic Please use speaker notes for additional information!
EPIDEMIOLOGY: Introduction to the Agent-based epidemic modeling Dr. Qi Mi Department of Sports Medicine and Nutrition, SHRS, Univ. of Pitt.
Mrs. Chapman. Tabs (Block Categories) Commands Available to use Script Area where you type your code Sprite Stage All sprites in this project.
Agent-based model of a simple stable economy Alexandre Lomovtsev Adviser: Dr. Russ Abbott.
Agent-based model of a simple stable economy Alexandre Lomovtsev Advisor: Dr. Russell Abbott, Ph.D. California State University, Los Angeles Department.
StarLogoTNG Treasure Hunt Game Unit Lesson 1: Basic Movement.
Teaching Contemporary Mathematics Conference January 25, 2013 Christine Belledin NC School of Science and Mathematics.
Department of Computer Science What is NetLogo UH-DMML  Multi-agent programmable modeling environment  Well suited for modeling complex systems evolving.
An Introduction to NetLogo given by Gabriel Wurzer. ,
Line up By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Modeling and Simulation Module 1: Lesson 1
Agent-Based Modeling and Simulation (ABMS) Bertan Badur Department of Management Information Systems Boğaziçi University.
2-Day Introduction to Agent-Based Modelling Day 1: Session 1 Introduction, commands, loops, conditionals.
New Mexico Computer Science For All Statements and Expressions in NetLogo Maureen Psaila-Dombrowski.
ABM Frameworks Dr Andy Evans With additions from Dr Nick Malleson.
2-Day Introduction to Agent-Based Modelling Day 1: Session 4 Networks.
Agent-Based Modeling and Simulation (ABMS) Bertan Badur Department of Management Information Systems Boğaziçi University.
CISC 1600 – Lecture 3.2 Simulations Complex Input & Output NetLogo.
2-Day Introduction to Agent-Based Modelling Day 2: Session 8 Exploring Model Collections, NetLogo Lists, Further Resources.
Agent-Based Modeling and Simulation (ABMS) Bertan Badur Department of Management Information Systems Boğaziçi University.
Week 11 DO NOW QUESTIONS. An ask turtles block is a set of instructions that is issued to every turtle. Even though computers can do things very quickly,
Class-level Methods Chapter 6 part 1. Classes and Objects Classes o In Alice, classes are predefined as 3D models Objects o An object is an instance of.
A Look Inside Some NetLogo Simulations Bruce Edmonds Centre for Policy Modelling Manchester Metropolitan University.
B.A. (Mahayana Studies) Introduction to Computer Science November March Logo (Part 2) More complex procedures using parameters,
Bridges To Computing General Information:  This document was created for use in the "Bridges to Computing" project of Brooklyn College.  You are invited.
Programming for Swarm CS655 Course Project Weilin Zhong.
An Introduction to NetLogo Gabriel Wurzer, Vienna University of Technology AnthropologischeGesellschaftWien.
Introduction to Algorithms using Netlogo. What’s an Algorithm Definitions of Algorithm on the Web: –A procedure or formula for solving a problem.
Week 9 DO NOW QUESTIONS. Question: If the following procedure is executed after 1 turtle is created in the program, what shape is created on the NetLogo.
Models, Agent-Based Models and the Modeling Cycle Universidad Politécnica Salesiana.
New Mexico Computer Science For All Command Procedures in NetLogo Maureen Psaila-Dombrowski.
2-Day Introduction to Agent-Based Modelling Day 2: Session 6 Mutual adaption.
A Simple Quiz: Ask User Functions. By Lana Dyck under the direction of Professor Susan Rodger Duke University June 2009, added Part 2 July 2011.
Agent-Based Modeling and Simulation (ABMS) Bertan Badur Department of Management Information Systems Boğaziçi University.
Week 10 DO NOW QUESTIONS. A programmer has created 100 turtles of random colors and randomly distributes green patches. Every time the turtles land on.
Probability with Dice and Data, Wiggle Walk, and Colliding Turtles Modeling and Simulation Module 1: Lesson 1.
New Mexico Computer Science For All Variables and Scope Maureen Psaila-Dombrowski.
New Mexico Computer Science For All Creating Turtles Maureen Psaila-Dombrowski.
Algorithms Writing instructions in the order they should execute.
Agent-Based Modeling and Simulation (ABMS) Bertan Badur Department of Management Information Systems Boğaziçi University.
New Mexico Computer Science For All Patches and Agent/Environment Interactions Maureen Psaila-Dombrowski.
Ready, SET, go! By Melissa Dalis Professor Susan Rodger Duke University July 2011.
MIS 585 Special Topics in IMS Agent-Based Modeling Bertan Badur Department of Management Information Systems Boğaziçi University.
MIS 585 Special Topics in MIS: Agent-Based Modeling 2015/2016 Fall.
M10 WS11:Krankenhausbedarfsplanung The World as We See It given by Gabriel Wurzer and Wolfgang E. Lorenz
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Georgia Institute of Technology More on Creating Classes Barb Ericson Georgia Institute of Technology June 2006.
1 Agent-Based Tools: focus on NetLogo Ing. Cristina Ponsiglione University of Naples Federico II Laboratorio di Simulazione ad Agenti.
An Introduction to NetLogo given by Gabriel Wurzer and Wolfgang E
MIS 643 Agent-Based Modeling and Simulation 2016/2017 Fall
A Simple Quiz for Alice 3.2:
Management Information Systems
Creating Simple Agent-Based Models
Management Information Systems
An introduction to Netlogo agent-based software
MIS 643 Agent-Based Modeling and Simulation 2016/2017 Fall.
A Simple Quiz for Alice 3.2:
Coding Concepts (Sub- Programs)
Using Logo and Logic This presentation uses a version of Logo called StarLogo available through MIT. It can be downloaded for free and installed on your.
creating a ecosystems model in net logo
Creating a Simple Game in Scratch
Presentation transcript:

Agent-Based Modeling and Simulation (ABMS) Bertan Badur Department of Management Information Systems Boğaziçi University

Outline Introduction Searching Mushrooms in a Forest

Introduction NetLogo –simple to install and experiment its model library User Manual –Tutorials, Interface Guide and Programming Guide –Dictionary Model Library –code examples

Agents Four kind of agents Moving agents – Turtles Patches – square cells – space in world Links – connect two turtles networks Observer - controler of the model –create other agents –global variables Each type of agents –commands –variables – build-in such as color and location user defined – additional –observer – gloabal variables

Global variables: –all agent can read and change –environment characteristics –model parameters Primitives – build-in procedure or command –commands tell agents something to do – retukrn void –reoprters calculte and report something – return a value or list –Ex: mean reports mean of a list of numbers – neighbors reports list of surrounding patches

Context –each pice of code is “in the contxt of ” one kind or occationally more then one kind of agent –can be changed during execution –Ex: ask turtles [move] agents – directly access variables for their own type Exceptions: –observer varibles by all agents –turtles can access patchs variables they are currenlty on

Searching Mushrooms in a Forest Is there a best strategy for searching mushrooms? observation: –mushrooms in clusters An intuitive strategy: –scanning an area in wide sweeps –upon finding a mushroom turning to smaller scale sweeps –as mushrroms in clusters What is large, small sweeps? and How long to search in smaller sweeps? Humans searching –pizzas, jobs, low prise goods, peace with neighbors

model of the problem try different search strategies Purpose: –what search strategy maximizes musrooms found in a given time Ignore trees and vegitables, soil type Musrooms are distributed as clusters mushroom hunter –moving point –having a sensing radius –track of how many mushrooms found –how much time passed since last mushroom fouınd

clusters of items (mushrooms) If the agent (hunter) finds an item smaller-scale movement If a critical time passes since last item found swithes back to more streight movement so as to find new clusters of items

Demonstrating Program: Mushroom Hunt File/New File/Save with extension “nlogo” Settings World geometry: –0,0 orgin, max-pxcor=16, max-pycor=16 –33x33 squre latice 2 hunters – turtels cluster of mushrooms – red patches all other patches are black setup – initialization go – continuous operations

procedukres – commands to proc name commands end Create a button executing procedure setup Create a button executing procedure go –forever is cheked – forever button write setup procedure code tab

to setup end to go end

to setup ask patches [ set pcolor red ] end ask primitive asks selected agents to do actions by commands in brackets set color of all pathces to red set - primitive is assignment pcolor – variable for patches

to setup ask n-of 4 patches [ ask patches in-radius 5 [ set pcolor red ] end n-of : n-of number ageent set in-radius : agents in-radius number

to setup ask n-of 4 patches [ ask n-of 20 patches in-radius 5 [ set pcolor red ] end 4 patches are randomly selected for each randomly selected pathc for all patches in radius 5 select 20 randomly set their color to red

to setup clear-all ;abriviares as – ca - ask n-of 4 patches [ ask n-of 20 patches in-radius 5 [ set pcolor red ] end clear-all: clear all default values

using parameters globals [ num-clusters ] to setup clear-all set num-clusters 4 ask n-of num-clusters patches [ ask n-of 20 patches in-radius 5 [ set pcolor red ] end

creating 2 hunters - turtles create-tutrles 2 ;crt 2 [ set sıze 2 set color yellow ] create 2 turtles crt create-tutles bnild-in turtle variables size and color

go procedure to go ask turtles [search] end to search ifelse tıme-sınce-last-found <= 20 [right (random 181) - 90] [right (random 21) - 10] forward 1 end cifelse boolean condition [ block whan true ] [ block when false ] right: turn right by angle in degrees

algorithm of move if timelast-found <= critical value make a small turn else make a biger turn if found – come on a red patch set timelasf-fournd to 0 set color to yellow else increment timelast-found by one

variable for turtles tutrles-own [ tıme-sınce-last-found ] tıme-sınce-last-found variable for all turtles time passed since last mushroom has found by the hunter

tıme-sınce-last-found initial value crt 2 [ set sıze 2 set color yellow set tıme-sınce-last-found 999 ] initialze tıme-sınce-last-found to a very high value greater then 20

add to the search procedure ifelse pcolor = red [ set tıme-sınce-last-found 0 set pcolor yellow ] [ set tıme-sınce-last-found tıme-sınce- last-found + 1 ] end if found pcolor is red set tıme-sınce-last-found to 0 set pcolor yellow else increment tıme-sınce-last-found by one

command center select turtles write commands hatch 1 [right 160] show count turtles

firther modifications adding ticks add reset-ticks to the end of setup add tick to the begining of go following motion of hunters add pen-down to the setup procedute when initilizing turtles