54
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Agent-based Modeling Web Science (VU) (706.716) Elisabeth Lex ISDS, TU Graz May 28, 2018 Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 1 / 41

Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Agent-based ModelingWeb Science (VU) (706.716)

Elisabeth Lex

ISDS, TU Graz

May 28, 2018

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 1 / 41

Page 2: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Introduction

Repetition

Information Cascades, HerdingModeling with Bayes’ RuleLinear Threshold ModelProbabilistic Models: SIR, SIS

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 2 / 41

Page 3: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Introduction

Today

Agent-based Modeling (ABM)What is ABM?Phenomena that can be modeled using ABMExamples

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 3 / 41

Page 4: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Introduction

What is Agent-based Modeling (ABM)?

New approach to modeling systems that consist of autonomous,interacting agentsDynamic processes of agent interaction are simulated repeatedly overtimeThus, an ABM is a model in which agents interact repeatedlyIdeas for an example from nature?

Ant colonies: organizes itself to carry out complex tasks of gatheringfood and building a nest while being extremely resilient if colony isdisrupted (“swarm intelligence”)

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 4 / 41

Page 5: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Introduction

What is Agent-based Modeling (ABM)?

New approach to modeling systems that consist of autonomous,interacting agentsDynamic processes of agent interaction are simulated repeatedly overtimeThus, an ABM is a model in which agents interact repeatedlyIdeas for an example from nature?Ant colonies: organizes itself to carry out complex tasks of gatheringfood and building a nest while being extremely resilient if colony isdisrupted (“swarm intelligence”)

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 4 / 41

Page 6: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Introduction

The need for Agent-based ModelingWe live in an increasingly complex world

Our systems are increasingly complex and interdependent: e.gelectrical infrastructures, telecommunication networks, transportationnetworks, social systems, social networksSome systems have always been too complex to model realistically:e.g models for economic marketsNew tools and modeling approaches available that help us analyzecomplex systemsLots of empirical data available and computational powerExample use cases for ABM: modeling agent behaviour in the stockmarket, supply chains, consumer markets, spreading of epidemics,understanding social systems,..All those are Complex Systems: individual behavior and propertiesbetter understood than behavior and properties of whole system

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 5 / 41

Page 7: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Agents

Agent-based models

Agents are autonomous and model intelligent behavior with a simpleset of rulesThe agents are situated in space (e.g. a grid or a network)The agents interact with each other locally (i.e., they are social)The agents have only a partial local informationThere are often different types of agents following different set of rulesThe rules may be deterministic or probabilisticThere are often random elements in the world

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 6 / 41

Page 8: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Agents

Agents

Agents are self-contained: identifiable, discrete, has set ofcharacteristics / attributes, behaviours and decision-making capabilityAgents can have memory - then, they can learn and adapt theirbehaviour (dynamic agent attribute)Examples for agents: people, groups, organizations, insects, swarms,robots, biological entities,..

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 7 / 41

Page 9: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Agents

Agent-based models

Argent-based models are used to simulate actions and interactions ofautonomous agents and to assess their effects on system as a wholeUnderstanding relations between individual decisions and systembehaviorMicromotives vs. Macrobehavior (Schelling’s book)They are always computational, i.e., simulationsThey are intuitive for implementation, experiments, interpretation

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 8 / 41

Page 10: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Agents

Advantages of Agent-based models

ABMs are extensibleABM are interpretable: one can use them to transparently planreal-world conceptsHolistic modeling approach: can be used to answer multiple questions(“many question models”)Typically, individual-level behavior better understood than aggregate(population) level. One can start with sth that is better understoodto understand macro behaviorABMs help tackle complexity and well suited to model behavior

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 9 / 41

Page 11: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Agents

Tools to build ABM

Agent-based modeling and simulation toolkits: Repast (Java), Swarm(Objective C, Java), NetLogo, StarLogo, MASON, AnyLogixGenerall tools: e.g. MATLAB, spreadsheets, ABM with programminglanguages (Python, Java,...)

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 10 / 41

Page 12: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Agents

Selected models1 Life2 Schelling Model3 Viruses on networks4 Ising model5 Forest fire

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 11 / 41

Page 13: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Life

Life (1/3)

Developed by mathematician John ConwayBased on cellular automata (CA): 2-dimensional grid partitioned intocellsEach cell assumes one of a finite nr of states at any point in time -On or OffValue of each cell is determined by set of rules, based on cell’sprevious state and value of its immediate 8 neighboursEach cell updated at each time step according to the rules

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 12 / 41

Page 14: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Life

Life (2/3)

Life has 3 rules that determine next state of each cell:Rule 1: The cell will be On in the next generation if exactly three ofits eight neighboring cells are currently On.Rule 2: The cell will retain its current state if exactly two of itsneighbors are On.Rule 3: The cell will be Off otherwise.

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 13 / 41

Page 15: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Life

Life (3/3)

Life as ABM:Each cell is an agentStates of cell (On and Off) are the possible states of an agentCell update rules represent an agent’s behaviourThe states of all the agents taken together at a specific time in thesimulation is the state of the model (system)Grid is the environment of Life - minimal function as reference pointto determine agent’s neighborhood

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 14 / 41

Page 16: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Life

Example of Life

(a) Initial stage (b) After 40 times

Figure: Life simulation: (a) initial random layout of cells in the On state, (b) afterall cells updated 40 times

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 15 / 41

Page 17: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Life

Observations from Life Model

Rules are simple and use only local information as each cell’s state isbased on its current state and the state of its immediate neighborsResulting patterns of Life depend on initial conditions - eachsimulation gives different patterns of On and Off cellsPatterns can emerge in systems that are completely described bysimple, deterministic rules based on only local informationBased on simple rules of behavior and nature of agent interactions,systems can show collective intelligence, even without existence of acentral authority

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 16 / 41

Page 18: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Life

Netlogo Example of the Life Model

http://ccl.northwestern.edu/netlogo/Go to File/Model Library/Computer Science/Cellular Automata/Life

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 17 / 41

Page 19: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

The Schelling Model

The Schelling Model

A small preference for a specific kind of neighbors lead to totalsegregationShows how global patterns (spatial segregation) can arise from localpreferences (homophily)A simple robust mechanism leads to segregationSegregation achieved even if no one explicitly aims for it

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 18 / 41

Page 20: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

The Schelling Model

How does the Schelling Model work? (1/2)

Assume a population of individuals (aka agents) of type 𝑋 or 𝑂Types represent immutable characteristics (e.g., age)Two populations are initially placed into random locations of aneighborhood gridAfter placing all agents, each cell is either occupied by an agent oremptyThe neighbor relationships among the cells can be represented verysimply as a graph: cells are the nodes, edges are inserted between twocells that are neighbors on the grid

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 19 / 41

Page 21: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

The Schelling Model

How does the Schelling Model work? (2/2)

Now, determine if each agent is satisfied with its current locationAgent is satisfied if is surrounded by at least 𝑡 of its own type ofneighboring agentsThreshold 𝑡 applies to all agents in the model (in reality everyonemight have a different threshold they are satisfied with)The higher 𝑡, the higher the likelihood that agents will not besatisfied with their current locationExample:

For example, if 𝑡 = 3, agent 𝑋 is satisfied if at least 3 of its neighborsare also 𝑋If fewer than 3 are X, then the agent is not satisfied, and it will want tochange its location in the gridAny algorithm can be used to choose new location (e.g., randomselection, nearest available location, 1 row at a time)

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 20 / 41

Page 22: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

The Schelling Model

Example

(a) Initial stage (b) After one round

Figure: Left image: all dissatisfied agents have an asterisk next to them. Rightimage: shows new configuration after all dissatisfied agents have been moved tounoccupied cells (1 row at a time) where they are satisfied. May cause otheragents to become unsatisfied, then new round of movement begins

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 21 / 41

Page 23: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

The Schelling Model

Netlogo Example of the Schelling Model

http://ccl.northwestern.edu/netlogo/Go to File/Model Library/Social Science/Segregation

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 22 / 41

Page 24: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

The Schelling Model

Observations from Schelling’s Model

Spatial segregation takes place even though no individual agentactively seeks itSegregation doesn’t happen due to built-in model agents that arewilling to be in the minorityIdeally, all agents are carefully arranged in an integrated patternHowever, from random start hard for agents to find such integratedpatternsAt more general level, Schelling model is an example of how fixedcharacteristics (e.g., ethnicity) can become highly correlated withmutable characteristicsE.g. decision where to live, which over time conforms to similarities inagents immutable types, producing segregation

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 23 / 41

Page 25: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Virus on a Network

Rep: How does the epidemics work?

The models originally come from biologyHow viruses and diseases spread in social networksWe have different types of nodesInfected (I): people who got the virusSusceptible (S): people who do not have virus but can check itRecovered (R): people who had the virus but got recovered and cannot catch it again (in some models people can become immune)Various model: SI, SIR, SIS, SIRS

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 24 / 41

Page 26: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Virus on a Network

Netlogo Example of the Epidemics

http://ccl.northwestern.edu/netlogo/Go to File/Model Library/Networks/Virus on a Network

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 25 / 41

Page 27: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Virus on a Network

Questions

What happens in SI model after long time?

Everyone is infectedWhich model do we have if we set gain-resistance-chance to 0?SISWhen we will have an outbreak in SIS?E.g. if recovery chance is low and transmission rate is high

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 26 / 41

Page 28: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Virus on a Network

Questions

What happens in SI model after long time?Everyone is infectedWhich model do we have if we set gain-resistance-chance to 0?

SISWhen we will have an outbreak in SIS?E.g. if recovery chance is low and transmission rate is high

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 26 / 41

Page 29: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Virus on a Network

Questions

What happens in SI model after long time?Everyone is infectedWhich model do we have if we set gain-resistance-chance to 0?SISWhen we will have an outbreak in SIS?

E.g. if recovery chance is low and transmission rate is high

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 26 / 41

Page 30: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Virus on a Network

Questions

What happens in SI model after long time?Everyone is infectedWhich model do we have if we set gain-resistance-chance to 0?SISWhen we will have an outbreak in SIS?E.g. if recovery chance is low and transmission rate is high

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 26 / 41

Page 31: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Virus on a Network

Phase transition

Outbreak depends on the relation between dynamical parameters andthe network structureWith fixed dynamical parameters in what kind of the network anoutbreak is more likely?With higher or lower average degree?

Higher degreeOften there is a very small margin for parameters and the networkstructure where the system goes quickly from one state into anotherPhase transition

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 27 / 41

Page 32: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Virus on a Network

Phase transition

Outbreak depends on the relation between dynamical parameters andthe network structureWith fixed dynamical parameters in what kind of the network anoutbreak is more likely?With higher or lower average degree?Higher degree

Often there is a very small margin for parameters and the networkstructure where the system goes quickly from one state into anotherPhase transition

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 27 / 41

Page 33: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Virus on a Network

Phase transition

Outbreak depends on the relation between dynamical parameters andthe network structureWith fixed dynamical parameters in what kind of the network anoutbreak is more likely?With higher or lower average degree?Higher degreeOften there is a very small margin for parameters and the networkstructure where the system goes quickly from one state into anotherPhase transition

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 27 / 41

Page 34: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Forest Fire

How does the Forest Fire work?

The forest is a grid of cellsA cell is either occupied by a tree or emptyThe fire starts on the left edge of the forestIt spreads to the neighboring trees in all four directionsNorth, south, east, westFire can not skip an empty cellThere is no wind

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 28 / 41

Page 35: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Forest Fire

Netlogo Example of the Forest Fire model

http://ccl.northwestern.edu/netlogo/Go to File/Model Library/Earth Science/Fire

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 29 / 41

Page 36: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Forest Fire

Questions

With density around 50% how much of the forest burnsWith different initial settings do the same tree burn?Each point that represents a tree burning is born and then diesIt never moves whatsoeverThe fire is made of burning trees that do not moveBut the fire itself moves!Local vs. global levelEmergence of properties at a global level that do not exist on thelocal level

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 30 / 41

Page 37: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Forest Fire

Questions

Again phase transition around 59%Reaching the other edge of the gridFor which scenarios could we apply the forest fire on the Web?

Viral marketing

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 31 / 41

Page 38: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Forest Fire

Questions

Again phase transition around 59%Reaching the other edge of the gridFor which scenarios could we apply the forest fire on the Web?Viral marketing

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 31 / 41

Page 39: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Ising

How does the Ising model work?

The model originally comes from physicsIt models the magnetization of a materialThe cells are organized in a gridEach cell has a spin 𝑠𝑖: it is represented by +1 or -1The cells can flip their spinThe energy of a cell is calculated from its four neighbors (north,south, east, west) as 𝐸𝑖 = ∑𝑗 𝑠𝑖𝑠𝑗The total energy is 𝐸 = ∑𝑖 𝐸𝑖The system always tries to reach the state of the minimal energy withsome randomness, which increases with temperature

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 32 / 41

Page 40: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Ising

Netlogo Example of the Ising model

http://ccl.northwestern.edu/netlogo/Go to File/Model Library/Chemistry & Physics/Ising

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 33 / 41

Page 41: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Ising

Questions

What happens when the temperature is low?

The cells will align their spinsWhat happens when the temperature is high?The alignment is not likely anymoreThere is a specific temperature, which separates those two modes:

2𝑙𝑛(1+

√2) on an infinite grid

Phase transitionFor what phenomenon ca we use Ising model on the Web?Opinion dynamics, consensus reaching, etc.

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 34 / 41

Page 42: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Ising

Questions

What happens when the temperature is low?The cells will align their spinsWhat happens when the temperature is high?

The alignment is not likely anymoreThere is a specific temperature, which separates those two modes:

2𝑙𝑛(1+

√2) on an infinite grid

Phase transitionFor what phenomenon ca we use Ising model on the Web?Opinion dynamics, consensus reaching, etc.

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 34 / 41

Page 43: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Ising

Questions

What happens when the temperature is low?The cells will align their spinsWhat happens when the temperature is high?The alignment is not likely anymoreThere is a specific temperature, which separates those two modes:

2𝑙𝑛(1+

√2) on an infinite grid

Phase transitionFor what phenomenon ca we use Ising model on the Web?

Opinion dynamics, consensus reaching, etc.

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 34 / 41

Page 44: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Ising

Questions

What happens when the temperature is low?The cells will align their spinsWhat happens when the temperature is high?The alignment is not likely anymoreThere is a specific temperature, which separates those two modes:

2𝑙𝑛(1+

√2) on an infinite grid

Phase transitionFor what phenomenon ca we use Ising model on the Web?Opinion dynamics, consensus reaching, etc.

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 34 / 41

Page 45: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Wealth Distribution

How does the wealth distribution work?

We have population living on a grid of cellsEach cell has an amount of grain and an grain capacityPeople collect grain from the cells and eat (some of) the grain tosurviveHow much grain each person accumulates is her wealthInitially, a roughly equal distributionEach person attempts to move to a cell with more grain (if free)People have a life expectancy and can die and can also die if theyhave no grainIf a person dies an offspring is born with a random amount of grain(no inheritance)

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 35 / 41

Page 46: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Wealth Distribution

Netlogo Example of the Wealth Distribution model

http://ccl.northwestern.edu/netlogo/Go to File/Model Library/Social Science/Wealth Distribution

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 36 / 41

Page 47: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Wealth Distribution

Questions

What kind of wealth distribution do we expect to see?

A power-law distribution! Why?Because agents are heterogeneousThey have different visions, metabolism, life expectancy, and so onThose agents who gain an initial advantage will keep that advantagePreferential attachment

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 37 / 41

Page 48: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Wealth Distribution

Questions

What kind of wealth distribution do we expect to see?A power-law distribution! Why?

Because agents are heterogeneousThey have different visions, metabolism, life expectancy, and so onThose agents who gain an initial advantage will keep that advantagePreferential attachment

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 37 / 41

Page 49: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Wealth Distribution

Questions

What kind of wealth distribution do we expect to see?A power-law distribution! Why?Because agents are heterogeneousThey have different visions, metabolism, life expectancy, and so onThose agents who gain an initial advantage will keep that advantagePreferential attachment

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 37 / 41

Page 50: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Wealth Distribution

Summary

Agent-based modelingWhy? To model complex systems and to study emergent phenomena,e.g. from animal behavior, social sciences, ecology, ...Complex system: individual behavior and properties better understoodthan behavior and properties of whole systemExamples for ABM: Life, Schelling, Epidemics, Ising, Forest Fire,Wealth distribution

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 38 / 41

Page 51: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Wealth Distribution

Take away

We can model and understand real-world phenomena by constructingmodels that exhibit complex emergent behavior resulting from local,simplified agent interaction.

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 39 / 41

Page 52: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Wealth Distribution

How would you build an ABM?

Pro tip: Take an established model and see whether you can buildupon itRequires model literacy!

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 40 / 41

Page 53: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Wealth Distribution

How would you build an ABM?

Pro tip: Take an established model and see whether you can buildupon itRequires model literacy!

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 40 / 41

Page 54: Agent-based Modeling - Graz University of Technologykti.tugraz.at/.../webscience/slides_2018/agents.pdf · The need for Agent-based Modeling We live in an increasingly complex world

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

...

.

Wealth Distribution

Thanks for your attention - Questions?

Elisabeth Lex (ISDS, TU Graz) Agents May 28, 2018 41 / 41