ICPSR - Complex Systems Models in the Social Sciences - Lab Session 2 - Professor Daniel Martin Katz
1. Introduction to Computing
for Complex Systems
(Lab Session 2)
daniel martin katz
illinois institute of technology
chicago kent college of law
@computationaldanielmartinkatz.com computationallegalstudies.com
6. (a) The World Consists of
Turtles and Patches
(c) Default is Now “square”
(b) Turtle Can Assume
lots of Shapes
(d) What is the plain english
version of this line of
code?
(e) set-default-shape
for
turtles
to
“square”
7. (a) Call on Our Patches
Using “Ask Patches”
(b) But Only A Certain
Random Set of Patches
8. look at the brackets,
what do these brackets do?
we need to learn these primitives:
ask patches
random-float
13. (a) Again it is the “Ask”
“Patches With”
(b) pxcor = min-pxcor
(c) To Ingnite
Here is where pxcor = min-pxcor
(i.e. Where Pxcor =0)
14. How Does It Know What
“Ignite” Means?
With What Criteria?
pxcor = min-pxcor
[Notice The Brackets]
To Do What?
Ignite
Consult Netlogo
Dictionary?
Is it there?
24. [ set color red]
note: color versus pcolor
this implies turtle not patch
(see dictionary for distinction)
fire turtle is set to red
“sprout-fires 1”
sprouting of a turtle
from breed = fires
and a 1 per patch
set pcolor black
setting patch color to black
set burned-trees to burned-trees +1
26. [ set color color - 0.3]
makes the red darker
“ask embers”
embers are a breed
if color < red - 3.5
‘If’ is a conditional
(balance of the command is triggered
if condition is met)
Allows a slow fading of embers
What does color < red - 3.5 imply?
27.
28. [ set color color - 0.3]
makes the red darker
“ask embers”
embers are a breed
[set pcolor color die]
if color < red - 3.5
‘If’ is a conditional
(balance of the command is triggered
if condition is met)
Allows a slow fading of embers
What does color < red - 3.5 imply?
43. What is a Dependancy?
In Class Exercise:
Identify Dependancies
in Fire Model
Why Does It Matter?
How Can We Represent Those
Dependancies in Our Code?
47. In what sense is this model random?
In what sense is this model deterministic?
Thinking conceptually
about the model procedures
all of these models involve a mixture
of determinism and randomness
48. In what sense is this model random?
Thinking conceptually
about the model procedures
Placement of the patches
subject to the selected density level
54. In what sense is this model deterministic?
Thinking conceptually
about the model procedures
The fire is really for G.U.I. purposes
result is basically already
determined before the fire spreads