1 / 135

Agent-Based Modeling: Exploring and Extending Models

Learn how to modify and extend agent-based models to generate complex phenomena and patterns in population behavior. Explore models such as the fire model, segregation model, and El Farol model.

mimsc
Download Presentation

Agent-Based Modeling: Exploring and Extending Models

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MIS 585 Special Topics in IMS Agent-Based Modeling Chapter 3: Exploring and Extedning Agent-Based Models

  2. Outline Intorduction The Fire Model The Diffusion-Limited Aggregation (DLA) Model The Segregation Model The El Farol Model Conclusion

  3. Introduction • This chapter is based on • IABM-WR: Chapter 3

  4. Introduction • Learn how to modify and extend an ABM • Four characteristics of AB Modeling • 1 – Simple rules can be used to generate complex phenomena • 2 – Randomness in individual behavior can results in consistant patterns of population behavior • 3 – Complex patterns can be “self-oranize” without any leader organizer • 4 – Different models emphasize different aspects of the world

  5. Rule 1 • many models – simple rules • without any complex math • deep understanding of the knowledge domain • E.g.: the fire model • with very simple rules about spreading o fire form tree to tree • interesting things to say about how likely a fire is sepead all over the forest

  6. Rule 2 • seeing an ordered population behavior • individual level need not be ordered • by fixed rules • stochastic rules mey results ordered patterns at the population level

  7. Rule 3 • flock of bird - no leader bird or organizer abut how to fly • self-organize without a leader

  8. Rule 4 • different models different aspects of the world • For each model filter out some aspects and remove others • Segragation model is about • how urban population develop • but nothing to say about • location of retail stores • or parks • or school districts

  9. Outline Intorduction The Fire Model The Diffusion-Limited Aggregation (DLA) Model The Segregation Model The El Farol Model Conclusion

  10. The Fire Model • Description of the Fire Model • First Extension: Probablistic Transitions • Second Extension: Adding Wind • Third Extension: Allow Long Distance Transmission • Summary of the Fire Model • Advenced Modeling Applications

  11. The Fire Model • many complex systems • critical treshold • tipping point • A small change in one parameter results in a large change in outcome • model of a forest fire • spread of a disease • diffusion of innovation • Sensitive to one parameter: percentage of trees • after some p

  12. Tipping Point • know where tipping point is and where you are

  13. Description of the Fire Model • percolation: • in 1987, Denish physisists and complex systems theoritst, Per Bak • self-oganizing criticallity

  14. A Simple Fire Model • (Wilenksly 1997a), NetLogo library in Earch Science section • Fire Simple in: Simple Models > IABM > Chapter 3 > Fire Extension > Fire Simple • Only patches – four kind • greeen: unburn tree • red: burning tree • brown: burned tree • block: empty space

  15. A Simple Fire Model (cont.) • when setup • Left edeg of World – all red – on fire • when running • the fire will ignate neighboring trees – neighbor four • continues • untill run out of trees • Control parameter: density • a probability whether or not a pacth is a tree

  16. Initialization • set up trees: a randomly seleted patch is a tree with a probablity density. • make a column of burning treese at the left edge • keep track of how many trees there are

  17. setup globals [initial-trees] patches-own [] to setup ca ask patches [ if random 100 < density [set pcolor green] if pxcor = min-pxcor [set pcolor red] ] set initial-trees count patches with [pcolor = green] reset-ticks end

  18. Exercises • Different initializations of trees • Inililize always fixed number of trees • Find other ways of initialization of threes and burning trees

  19. iterations • ask the burning trees to set fire to any neighboring (four neithbors) non-burning trees

  20. go to go ask patches with [pcolor = red] [ ask neighbors4 with [pcolor = green] [ set pcolor red ] ] tick end

  21. Stoping Condition • iterations stop when all trees are burned if all? patches [pcolor != red] [stop] • i

  22. final go procedure to go if all? patches [pcolor != red] [stop] ask patches with [pcolor = red] [ ask neighbors4 with [pcolor = green] [ set pcolor red ] set pcolor red - 3.5 ] tick end

  23. Reporter • write a reporter to return trees fireing • and use the reporter propersly

  24. Reporter to report fire-trees return patches with [pcolor = red] end • change go from ask patches with [pcolor = red] • to ask fire-trees

  25. Monitoring percentage of burend trees • Add a moitor to the interface to see the percentages of trees bured • Add a moitor • to the reporter: (count patches with [shade-of? pcolor red]) / initial-trees * 100

  26. Tipping Point • Experiment with density parameters and see how percent of trees burned changes with the density of trees • At 59% there is a tipping point • a silite change in input parameter has a large effect on output

  27. First Extension: Probablistic Transitions • Many simplifying assumptions: • fire does not spread deterministically • but many factors: • wind, wood type, how close the branches are • not certaion - with a proabability • Change the go procedure so that a burning tree ignates fire to its neighbor with a probability

  28. probabilistic spread • old go statement ask patches with [pcolor = red] [ ask neighbors4 with [pcolor = green] [ set pcolor red ] ... • new go statement ask patches with [pcolor = red] [ ask neighbors4 with [pcolor = green] [ if random 100 < probability-of-spread [set pcolor red] ] ...

  29. Experimentation • Experiment with both probability-of-spread and density parameters • setting probability to 100 returns to the original model • for a given density, high values of probability-of-spread is needed to get almost same percentage of spread

  30. Second Extension: Adding Wind • wind: • increases the chance of fire spread in the directio it is blowing • decreases the chnage of fire spread in the direction it is not blowing • no effect on the chance of spread in the perpendicular direction • Implemented by two sliders • speed from the south (negative from north) • speed from the west (negative from east)

  31. Initialization • both form -25 to +25 • they affect probability-of-spread parameter • Implementation: • create a local variable probability initially set to probability-of-spread parameter • creation by let, setting by set,

  32. The pseudocode for all red pathces ask their unborn neighbor threes - create and set probability to probability-of-spread - determine the direction - adjust the probability according to the diection - determine whether the neighbor will burn or not if so -- set its color to red

  33. Implementation • create and set probability to probability-of-spread: let probability probability-of-spread • determine the direction: compute the direction from you (the green tree) to the burning tree (NOTE: “myself” is the burning tree (the red patch) that asked youto execute commands) let direction towards myself

  34. adjust the probability • if the burning tree is north of you • so the south wind impedes the fire spreading to you • so reduce the probability of spread ifdirection = 0 [ set probability probability - south-wind-speed ] burning tree myself you green tree

  35. adjust the probability • if the burning tree is east of you • so the west wind impedes the fire spreading to you • so reduce the probability of spread ifdirection = 90 [ set probability probability - west-wind-speed ] you: green tree burning tree myself

  36. adjust the probability • if the burning tree is south of you • so the south wind aids the fire spreading to you • so increase the probability of spread if (direction = 180 ) [ set probability probability + south-wind-speed ] you: green tree burning tree myself

  37. adjust the probability • ifthe burning tree is west of you • so the west wind aids the fire spreading to you • so increase the probability of spread if direction = 270 [ set probability probability + west-wind-speed ] burning tree you

  38. catch on fire • after determining the probability • set color of the tree just burning if random 100 < probability [ set pcolor red]

  39. Explanation • modify the probability of spread • increase or decrease accordingly • for each neighnbor • first determine • which direction the fire is trying to spead • how wind effect the probability • with the updated probability • the fie will spread to the neighboring tree

  40. New Predicates • towards • ask

  41. Experimentation • set • density at %100 • let the wind blow strong from the south and west • set probability-of-spead fairly low arond %38 • triangular to northeast

  42. Third Extension: Allow Long Distance Transmission • another effet of wind: enables fire to jump over long distances • add a switch to control jumping • in NetLogo – control boolean variables • add – big-jumps: on and off • off: reduced to Fire 2 Model • on: ingnate new fire at some distance in the direction of the wind

  43. the code if random 100 < probability [ set pcolor red ;; if big jumps is on, then sparks can fly farther if big-jumps? [ let target patch-at ( west-wind-speed / 5 ) ( south-wind-speed / 5 ) if target != nobody and [pcolor] of target = green [ ask target [ set pcolor red ];; to ignite the target patch ] ;; end if target ] ;; end big-jump? ] ;; end random 100

  44. if big-jumps? is true • it looks for a target patch some distance away in the direction of the wind • experiment with different parameters • observation: lines in the direction of wind Figure 3.7 • increases the probability of raaching the other end but reusting patterns are different with • chunks of world not burned • as new features are added modify the questions and the measures

  45. Extensions • probablistic sparks or locations

  46. Summary of the Fire Model • three change to the basic model • affecting tipping point in different ways • as model assumptions or mechnizms change new measurse msy be needed • in Extension 3 • whether the file will move to right edge mey not be a good measure • Tipping points: • characteristics of inputs and outputs • not the models’

  47. Advanced Modeling Applications • generalized into model of a percolation: • Given a structure with probablistic transitions between locations • how likely that an new entity diffuses form one side to another • E.g.: • innovation diffusion • spread of diseases – epidemiology

  48. Outline Intorduction The Fire Model The Diffusion-Limited Aggregation (DLA) Model The Segregation Model The El Farol Model Conclusion

  49. The Diffusion-Limit Aggregation (DLA) Model • Description of the Diffusion-Limit Aggregation (DAL) Model • First Extension: Probablistic Sticking • Second Extension: Neighbor Influence • Third Extension: Different Aggregates • Summary of the DAL Model • Advenced Modeling Applications

  50. Intorduction • in ABMs no direct relation between • complexity of resulting pattern and • complexity of the uderlying rules • simple rules may create complex pattrns • focus not on complex rules but on interractions • ABMs are interesting: • not because what each agent does • what tghe agents do together

More Related