Presentation is loading. Please wait.

Presentation is loading. Please wait.

Section 5 – Ec1818 Jeremy Barofsky March 3 rd and 4 th, 2010.

Similar presentations


Presentation on theme: "Section 5 – Ec1818 Jeremy Barofsky March 3 rd and 4 th, 2010."— Presentation transcript:

1 Section 5 – Ec1818 Jeremy Barofsky jbarofsk@hsph.harvard.edu March 3 rd and 4 th, 2010

2 Outline Agent-Based Models – Background – Sugarscape (Epstein and Axtell) – NetLogo Example Minority Game – El Farol Problem – Example from class notes – NetLogo Example – OFFICE HOURS – THURSDAY March 4, 10-11, CGIS N outside room 320.

3 Agent-Based Simulation (ABS) / Agent-based computational economics (ACE) / Artificial Agent Models (AA) / Agent-based Models (ABM) What is it? Bottom-up modeling by endowing agents with internal states specific to the agent (eg: eye sight or income) and behavioral rules – heuristics – that govern their behavior. Actions plays out on an environment – usually a grid of squares with their own characteristics (food level, access to water). ABMS produce emergent phenomena / macro- patterns. Other examples of emergent pheomena: – Liquid property of water – Random errors produce a normal distribution (CLT) – Power Laws / Pareto distribution of incomes

4 Differences between traditional economic models and ABMs Traditional Models  usually concerned with behavior of perfectly rational agents  assumes homogeneity of agents (eg assumes one representative consumer).  concerned with static equilibria  no explicit account for interactions among agents  spatial issues usually unimportant Artificial Agents Models  usually concerned with behavior of boundedly rational agents  allows heterogeneous agents  concerned with the equilibrium path; time dynamics; out-of- equilibrium behavior  macrobehavior driven by interactions between agents  spatial issues important (and specific relationship between agents and environment

5 Simulation versus induction and deduction Science proceeds using – Deduction: specify a set of axioms/assumptions and then proving the consequences of those assumptions. – Induction: Taking empirical data and analyzing it for patterns that either prove or disprove the theory created deductively. – AND NOW…Simulation: Starts with a set of explicit assumptions about agent behavior and environment. Does not prove theorems from these assumptions, but generates data from the interactions of the agents that can be analyzed inductively.

6 Scientific Uses of Agent-based models (ABM): “If you didn’t grow it, you didn’t explain it” Prediction: Like systems dynamics, we can predict. Axelrod suggests predicting economic quantities in the short-term (ie: interest rates in 3 months) Vince Darley predictions of changes when NYSE went to decimalization. Yaneer Bat Yam – Argues to reinstate the “uptick rule” (can only short sell stocks after a price increase. Proof: The generativist motto described by Epstein tells us that when we can endow agents with simple rules and grow a macro-pattern, then this constitutes a necessary, but not sufficient proof of how the pattern is created.

7 Advantages of artificial agent modeling: 1) allows economic experiments in a strictly controlled (albeit artificial) environment. In particular, allows testing of hypotheses concerning relationship between microbehavior and macrobehavior. (See Schelling.) 2) easily allows relaxation of some of the more unsatisfactory assumptions of traditional economics (such as assumption of homogeneous perfectly rational agents and no institutions.) 3) from a modeling design perspective, agent-based models are very cheap and efficient. You don’t need big data sets or human experimental subjects. Everything happens in your computerized Petri dish. And some disadvantages: 1) Your model is only as good as your worst assumption. In other words, the way you structure your environment and define your behavioral rules determines the model outcome. If all your assumptions are accurate then the model will be great. But if one or more assumptions are off the mark, the results may be garbage. 2) Similarly, when you stray from the assumption of perfectly rational agents, you step out into a great unknown. The rules that govern the behavior of agents have to come from somewhere, but where? 3) Path dependence: results of a given simulation are very dependent on random events that occurred in that simulation run, but which may never occur in the same sequence again.

8 Sugarscape as ABM archetype Developed by Josh Epstein and Robert Axtell in 1996 book called “Growing artificial societies.” Begin with Sugarscape which simulates the interactions between agents on a Schelling-type lattice. Heterogeneous population with different tastes for sugar and spice. Agents born with vision (to find food), metabolism (to digest), and speed. Movement not determined by which direction will maximize utility. Simple decision rule: “Look around as far as you can, find spot with most sugar, go there and enjoy!”

9 Sugarscape continued Agents move around their lattice environment, burning sugar at their metabolic rate. Agents, unfortunately, die if and when they burn up all their sugar before finding more food. Social phenomena are observed (emergence) without these behavior being programmed mimic the real world – ie: when seasons are introduced migration and hibernation occurs. Agents accumulation of sugar represents their wealth and we also see Pareto distributed wealth distributions as in the real world.

10 Clash of the Civilizations! Epstein and Axtell begin with agents scattered around a twin-peaked landscape with sugar concentrated in one of two areas. Over time, agents aggregate around the fertile areas and develop into spatially segregated and culturally distinct “tribes.” As population increases, the tribes mix, engage in combat with peaceful and expansionist periods. Level of reproduction, resource use, and combat determines whether populations grow out of control, societies collapse, or one group dominates.

11 Minority Game / El Farol Problem It’s so crowded, nobody goes there anymore SETUP: N people decide independently each week to go to El Farol bar for Irish music night. Say N = 100 If people at bar < 60, then enjoyable. BOUNDED RATIONALITY: Decision rule - Person i goes to bar if he expects 60. No collusion, private communication between agents, and choices of individual i not affected by previous visits. Only information is past history – the number of people that came to bar in previous weeks. Model created Stanford Economist Brian Arthur.

12 Three important features of MG game 1) With rational expectations (RE means an obvious model that all people use to make decision that is also known to all) then a deductive solution to this problem could be found. But, large number of expectational models can coexist based on previous results so no RE equilibrium. 2) Expectations are self-defeating: If all believe a few will go, then everyone will go. If all believe no one will go, then everyone will go. 3) Dynamic because we assume that individuals will continue to reassess the best strategy based on previous experience.

13 Decision dynamics Assume that individuals can form predictions on the number of people that will go El Farol using functions that map the last d weeks attendance to their prediction for this week’s attendance = f(d). If last 4 weeks attendance: 40, 56, 22, 35 Eg: same as last week’s [35], mirror image of last week’s attendance around 50 [65], average of last 4 weeks [49]. Each agent keeps track of an individualized set of k predictions and decides to go or not based on currently most accurate predictor in his set of k predictions based on whether f(d) > 60 or not. Other than N = numbers of players, other main parameter of agent is M = number of periods of memory that agents use to make decisions.

14 Attendance Dynamics From the previous periods results, agent updates set of decision rules, discarding the least useful ones and using the most accurate attendance predictor rule. Similarities / differences to GA? CONTRADICTION!?!?: Reflexivity - Set of most credible hypotheses determine attendance, but attendance history determines the set of active hypotheses. Reason we cannot calculate a RE equilibrium. Arthur’s Main result: After initial learning time, mean attendance converges to 60 – a mixed strategy NE where players stay home 40% of time and go 60% of time. But, set of strategies that cause this NE varies over time. Usually, no unique set that would correspond to a RE equilibrium. Strategies used to get 60-40 split continue to change and result fluctuates between 50 and 70. Cycles and cycle-detector strategies are arbitraged away. Challet and Zhang, 1997 solve using generating functional analysis.

15 Simple Example from notes (Lecture 10, page 3) Assume N = 3 and crowding occurs when more than 2 people enter El Farol bar, no way to perfectly coordinate to be in minority. Assume M = 3 (evidence suggests that people only look 3 periods back) so that total histories 2 M = 2 3 = 8. Given 8 histories – agent can choose to stay home or go to bar so total possible strategies = 2 8 = 256. AGENTS CHOOSE ACTION BASED ON THEIR PREVIOUS MOVES NOT OUTCOMES. Say S = 1 if go to bar and S = -1 if stay home so that optimal outcome occurs when sum of S = 0. Then variance gives us a measure of optimality.

16

17 Minority Game Results Using best of k possible “random” strategies performs better than randomly going or not (random  2 /N = 1 and ideal  2 /N = 1 / N). α = 2 M / N – Normalized memory parameter = number of histories / number of players. When α is large – many more histories / strategies than players so similar to random because can’t coordinate (closer to RE). When α is small – players use small numbers of strategies and moves as crowds.

18 Connection to Financial Markets? “Professional investment may be likened to those newspaper competitions in which the competitors have to pick out the six prettiest faces from a hundred photographs, the prize being awarded to the competitor whose choice most nearly corresponds to the average preference of the competitors as a whole; so that each competitor has to pick, not those faces which he himself finds prettiest, but those which he thinks likeliest to catch the fancy of the other competitors, all of whom are looking at the problem from the same point of view. It is not a case of choosing those which, to the best of one’s judgment, are really prettiest, nor even those which average opinion genuinely thinks the prettiest. We have reached the third degree where we devote our intelligences to anticipating what average opinion expects the average opinion to be.” -Keynes, General Theory of Employment Interest and Money, 1936.


Download ppt "Section 5 – Ec1818 Jeremy Barofsky March 3 rd and 4 th, 2010."

Similar presentations


Ads by Google