New Mexico Computer Science For All Breeds and Shapes in NetLogo Maureen Psaila-Dombrowski.

Slides:



Advertisements
Similar presentations
Fractions.
Advertisements

NETLOGO LISTS Or… James says, fput THIS!. What are LISTS? Shopping list Address list DNA sequences Any collection of similar or dissimilar things Often.
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.
13 giugno 2006Master in economia e politica sanitaria - Simulazione per la sanità 1 _Strumenti, seguito _______________________________________ Un modello.
New Mexico User Test Starlogo TNG September 16, 2006 Starlogo TNG September 16, 2006.
Week 7 DO NOW QUESTIONS. Question: In the following segment of code, “food-location” is a ___? breed [ foragers forager ] breed [ followers follower ]
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.
New Mexico Computer Science for All Agent-based modeling By Irene Lee December 27, 2012.
New Mexico Computer Science For All More Looping in NetLogo Maureen Psaila-Dombrowski.
Department of Computer Science What is NetLogo UH-DMML  Multi-agent programmable modeling environment  Well suited for modeling complex systems evolving.
Fell View Computer Club StarLogo TNG – Session Two.
Building and managing class pages on our new Web site School Wires Training.
An Introduction to NetLogo given by Gabriel Wurzer. ,
1 CSC 221: Computer Programming I Fall 2004 Objects and classes: a first pass  software objects, classes, object-oriented design  BlueJ IDE, compilation.
New Mexico Computer Science For All Statements and Expressions in NetLogo Maureen Psaila-Dombrowski.
© Cheltenham Computer Training Using Freelance Graphics - Slide No. 1 A First Look at Freelance Graphics Using Freelance for Windows.
Lab 9 – User Forms Design. User Forms What are user forms? –Known as dialog boxes –Major ways for getting user input An example of using user forms: Monthly.
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,
Introduction to Programming with Java. Overview What are the tools we are using – What is Java? This is the language that you use to write your program.
It’s a Designer Original Josef Guarin Block 3 Geometry H.
New Mexico Computer Science For All Population Dynamics: Birth and Death Maureen Psaila-Dombrowski.
A Look Inside Some NetLogo Simulations Bruce Edmonds Centre for Policy Modelling Manchester Metropolitan University.
NetLogo Workshop Complexity And Business Analytics October 10, 2008, UM-Dearborn David Bowen, WSU Physics Slides and model files will.
New Mexico Computer Science For All Interface Input in NetLogo Maureen Psaila-Dombrowski.
An Introduction to NetLogo Gabriel Wurzer, Vienna University of Technology AnthropologischeGesellschaftWien.
New Mexico Computer Science For All Interface Output in NetLogo (Part 1) Maureen Psaila-Dombrowski.
Agent P, I have been hearing some rumours about a Python Turtle.
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.
Agent-Based Modeling and Simulation (ABMS) Bertan Badur Department of Management Information Systems Boğaziçi University.
Open template and choose “View”. Left click on one shape hold down upper case arrow key and left click on each row of shapes.
New Mexico Computer Science For All Command Procedures in NetLogo Maureen Psaila-Dombrowski.
1 CSC 221: Computer Programming I Spring 2008 Objects and classes: a broad view  software objects, classes, object-oriented design  BlueJ IDE, compilation.
Week 2 DO NOW QUESTIONS. In this procedure the programmer intended to clear all the turtles and patches and make a new turtle of size 3 with the pen down,
New Mexico Computer Science For All Variables and Scope Maureen Psaila-Dombrowski.
A Simple Guide to Using SPSS ( Statistical Package for the Social Sciences) for Windows.
New Mexico Computer Science For All Creating Turtles Maureen Psaila-Dombrowski.
Loops & Graphics IP 10 Mr. Mellesmoen Recall Earlier we wrote a program listing numbers from 1 – 24 i=1 start: TextWindow.WriteLine(i) i=i+1 If.
Flash CS 5 Interface BY NSCHEWCZYK | ©2012. MENU BAR A bar at the top of the window. It lists menu options including: File, Edit, View, Insert, Modify,
New Mexico Computer Science For All Patches and Agent/Environment Interactions Maureen Psaila-Dombrowski.
Set-up a Data Entry Page Section 3. Set Up Columns Switch to Variable View. At the bottom left of your screen there are two tabs (Data View and Variable.
1 Building Your Own Turtle Functions For making really cool pictures!
Week 4 DO NOW QUESTIONS. Question: Predict a turtle’s heading after this procedure is run once. to go ask turtles [ forward 1 set heading random 45 right.
How many …?. What shape can you see? I can see some _____. Q1 Q1 stars.
M10 WS11:Krankenhausbedarfsplanung The World as We See It given by Gabriel Wurzer and Wolfgang E. Lorenz
1 Agent-Based Tools: focus on NetLogo Ing. Cristina Ponsiglione University of Naples Federico II Laboratorio di Simulazione ad Agenti.
M10 WS11:Krankenhausbedarfsplanung More, More and Even-More More given by Gabriel Wurzer and Wolfgang E. Lorenz
An Introduction to NetLogo given by Gabriel Wurzer and Wolfgang E
AnthropologischeGesellschaftWien
Give young children a good start to their education
Mathematics Phase 3.
Bugs.
Levels of Organization Ecology Flow
Agent P, I have been hearing some rumours about a Python Turtle.
Organizing common actions
TermiGator Ebrahem Hamdan University of Florida
Programming using Alice 3
Algorithms and Flow Charts
Animated picture with “video wall” reveal effect (Basic)
WE CAN READ Donald Joyce.
Levels of Organization Ecology Flow
Symbols, Brush Effects, blends
creating a ecosystems model in net logo
Unsupervised Machine Learning in Agent-Based Modeling
2D Shapes Rectangle Circle Triangle Rectangle. What shape is the door? Rectangle.
TITLE BYOT Half Circle (Advanced)
Presentation transcript:

New Mexico Computer Science For All Breeds and Shapes in NetLogo Maureen Psaila-Dombrowski

Breeds in NetLogo Predefines Four Types of agent ▫Turtles ▫Patches ▫Links ▫Observer Predefines ONE type of Turtle Allows the programmer (YOU!) to define different “Breeds” of Turtles

Breeds in NetLogo – Remember! Breeds are types of Turtles ▫Has all the properties that turtle has in addition to breed specific Breeds are a Subset of Turtles Turtles Breed1 Breed2 … # Breed 1 # Breed 2 … Total # Turtles

When to Use Breeds Many reasons to use breeds, some include: ▫Want agents with attributes  Example: genders, species, infected,… ▫Want agents that can behave differently  Ask each breed to behave differently ▫Want to refer to each breed separately ▫Want agents to have different variables

Define a Breed Define turtle breeds using the breed keyword ▫At the top of the program ▫Before any procedures Breed [ plural_name singular_name ] Examples: breed [wolves wolf] breed [sheep a-sheep]

Create a Breed Similar to creating turtles: create- number create- number [ commands ] Example: breed [wolves wolf] breed [sheep a-sheep] to setup clear-all create-wolves 50 [ set color black] create-sheep 50 [ set color white] end

Set Breed Attributes Attributes: ▫breed ▫color ▫heading ▫hidden? ▫label ▫label-color ▫pen-mode (up, down, erase) Can set breed attributes (NetLogo predefined agent variables) : ask [set attribute #] ask wolf 3 [set size 5] ask [set attribute #] ask wolves [set size 5] ▫shape ▫size ▫who ▫xcor ▫ycor

Breed Attribute: Shape You can set the shape of a turtle or specific breed Set initial shape set-default-shape turtles string set- default-shape breed string  Changes the shape of breeds after used Example: in setup procedure set-default-shape turtles "circle” set-deault-shape cows “cow” create-turtles 1 ;; new turtle's shape is "circle" create-cows 1 ;; new turtle's shape is ”cow"

Breed Attribute: Shape (continued) Can set shape within the code set shape “shape_name” Example ask wolf 10 [set shape “sheep’]

How do you find shapes? Top of program – Tools Tab Turtles Shape editor to view shapes  Can look at the shapes in the Turtle Shape Editor window and pick one ▫Over 30 shapes to choose from  Can Import a shape from the Library ▫Over 200 shapes to choose form  Can Edit an existing shape –RENAME it  Can create a new shape Once you pick/import/edit/create a shape – note the name carefully

First row: default, airplane, arrow, box, bug, butterfly, car Second row: circle, circle 2, cow, cylinder, dot, face happy, face neutral Third row: face sad, fish, flag, flower, house, leaf, line Fourth row: line half, pentagon, person, plant, sheep, square, square 2 Fifth row: star, target, tree, triangle, triangle 2, truck, turtle Sixth row: wheel, x

Go to Program to show shapes

Breed Specific Agent Variables Can specify variables for breeds Each agent in that breed has its own value At top of the program before procedures -own [var1...] breed [sheep a-sheep] breed [wolves wolf] turtles-own [energy] ; ; both wolves and sheep wolves-own [WolfBirthRate] ;; only wolves sheep-own [SheepBirthRate] ;; only sheep

Breed Specific Actions To get Breeds to do specific actions: ask breeds [commands…] ask breed # [commands…] ask breeds with [ condition][commands] Example ask sheep [ left random 90 right random 90 forward 1 ]

Show variables and Actions in program

Summary Can have Breeds in NetLogo ▫Subset of Turtles For each Breed ▫Define ▫Create Breed ▫Set attributes (NetLogo predefined agent variables)  Set shape ▫Specific Agent Variables ▫Specify Agent specific commands