CS108 Spring 2014 2014 Week 4 Video Summary

advertisement
CS108 Spring 2014 2014
Week 4 Video Summary
Introduction to Computational Science
 Computational science – the intersection of computer science, mathematics
and science – Model real world science
 Made possible by the increase in computational power
o Allows us to run multiple scenarios
o Does not replace field experimentation
 Computational science cycle
o Select Real world problem
o Simplify to make a working model (abstraction)
o Formulate a mathematical or algorithmic model
o Translate the model into computer code
o Run simulations using the computer model as the test bed
o Evaluate and draw conclusions from the data generated from the
model. Interpret if the model – does it represent the real world
 Modeling approach
o One extreme global behavior is represented by mathematical formulas
– use procedural programming (Fortran, C…)
o Other extreme – individual behavior is represented by rules or
mathematical equations – Agent based programming (NetLogo)
Introduction to Agent Based Modeling
 A tool for studying complex adaptive systems
 Models consist of agents , environments and the interactions between agents
and other agents and agents and the environment.
 3 turtles ‘types’
o Observer agent has no position but can ‘see’ everything, sets up the
world
o Turtles are agents or the individuals in the world
o Patches are fixed agents with positions and can have variables
 Three phases of an agent based model
o Setup – create the world
o Runtime loop – agents go through their behavior and change their
states and the environment and screen is updated. There are three
abstractions in the runtime loop
 Agents with rules representing real things
 Environment that the agents inhabit
 Time: tick =one time through the runtime loop
o Exit – quit or runs to termination
 Model representation of complex systems
o Model is a representation of interactions in the complex system
o Goal is to develop an understanding of how the models results
represent the real-world phenomena
Document1

o Random factors are built into model - Different results when ran again
Classification schemes (increasing complexity)
o Idea Models
o Minimal Models for Systems
o Systems Models – of a specific system
Computer Science and Simulation/Emergency Planning
 Applied Complexity can be used to simulate important real world events that can
save lives and reduce destruction.
 A Simtable is a type of interactive projection that utilizes Geographic Information
Systems and sand to allow a person to interact with geographic information via
touch.
 One example of how a this can help with emergency planning is by simulating
the traffic flow of people evacuating from a fire, and then finding ways to keep
them from causing traffic jams
NetLogo and Random Walk
 An example of random walk is a drunkard walking in an idealized city
 Random walk covers the entire surface. The drunkard does not stay close to
the same place
 Random walk – sets the heading of the turtle to be a random direction
between 0 and 360 degrees.
 Random walk results in a uniform distribution of directions. Each degree has
an equal probability to be chosen.
Wiggle Walk and Sliders to Control Global Variables in NetLogo
 Wiggle Walk is used to model the movement of animals
 Wiggle Walk involved right (random) and left (random), this results in a
probability distribution that is triangular.
 Wiggle walk results in a turtle movement that is most likely to move straight.
 Wiggle Walk has a Triangular Discrete Probability Distribution - Results for
combining two uniformly distributed random variables to form a new
probability distribution
 Random Walk – uses a Uniform Discrete Probability Distribution, the heading
is equally likely to be any of 360 degrees.
 Sliders create global variables in NetLogo
Document1
Download