Presentation is loading. Please wait.

Presentation is loading. Please wait.

New Mexico Computer Science For All Patches and Agent/Environment Interactions Maureen Psaila-Dombrowski.

Similar presentations


Presentation on theme: "New Mexico Computer Science For All Patches and Agent/Environment Interactions Maureen Psaila-Dombrowski."— Presentation transcript:

1 New Mexico Computer Science For All Patches and Agent/Environment Interactions Maureen Psaila-Dombrowski

2 Why are Patches Important Agent based modeling ▫Agents (turtles) interact with other agents (turtles) ▫Agents (turtles) interact with the environment (patches) Turtle – Patch interaction is an important part of creating models in NetLogo

3 Patches in NetLogo Patches are a type of agent The NetLogo world is a two dimensional grid of "patches” - like a tiled floor Unique identifier ▫Turtles have an number: ask turtle 1 ▫Patches have Coordinates: pxcor pycor  Default Origin: 0 0  All other patches are referenced to the origin  Ask patch 1 1

4 Patches NetLogo World Patches Coordinates: pxcor pycor max-pxcor = 3 min-pxcor = -3 Max-pycor = 3 Min-pycor = -3 Number of Patches (Max - min + 1) Total across = 7 Total up/down = 7 Total patches = 7 x 7 Total patches = 49

5 Can change the number of patches in the 2D NetLogo world ▫Interface tab ▫Settings button (upper right corner) Patches – changing number of patches

6

7

8

9 Command ▫Turtles: create-turtles # ▫Patches: resize-world # # # # resize-world min-pxcor max-pxcor min-pycor max-pycor resize-world -16 16 -16 16 Patches – changing number of patches

10 For Turtles – set size # Can change the size of patches in the 2D NetLogo world ▫Interface tab ▫Settings button (upper right corner) Patches – changing size of patches

11

12

13 Command ▫Turtles: set size # ▫Patches: set-patch-size # set-patch-size 10 Patches – changing size of patches

14 Other Patch Related Commands clear-patches set pcolor # (or name or RGB) ask patch # # [commands] ask patches [commands] random-pxcor / random-pycor distancexy # # patch-ahead

15 Turtle/Patch Interactions Turtles can interact with patches in many ways Variety of Triggers  Patch color  Patch location  Patch occupant (other turtles, breeds)

16 Turtle/Patch Interactions Response  Change Turtle related property  Shape/Color/Size  Direction  Die/propagate  Variable  Change Patch characteristics  Color  Variable  Other Response

17


Download ppt "New Mexico Computer Science For All Patches and Agent/Environment Interactions Maureen Psaila-Dombrowski."

Similar presentations


Ads by Google