NetLogo banner

Home
Download
Help
Resources
Extensions
FAQ
NetLogo Publications
Contact Us
Donate

Models:
Library
Community
Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

  Donate

NetLogo User Community Models

(back to the NetLogo User Community Models)

[screen shot]

Download
If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".(The run link is disabled for this model because it was made in a version prior to NetLogo 6.0, which NetLogo Web requires.)

WHAT IS IT?

El Farol is a bar in Santa Fe, New Mexico, at which a band plays Irish music on Thursday evenings. The bar is enjoyable only if it is not too crowded (say more than 60% of the agents). Trying to decide whether or not to go to El Farol on Thursday nights is what Arthur's, 1994, "El Farol bar problem" is about.

Each agent (out of "Number-of-Agents") has to decide whether they should go or not by making an independent decision. In other words, each agent enjoys going to El Farol to listen to the music, but not if the bar is going to be too crowded.

In order to optimise ones utility, each agent has to try and predict what everybody else will do. However, the problem is set up so that any model of the problem that is shared by most of the agents is what Schelling refers to as a self-negating prophecy:
"If all believe few will go, all will go and vice versa".

HOW IT WORKS

Arthur modelled this situation by randomly giving each agent "Strategies-per-agent" potentially suitable predictors, given past data (e.g. the past "D" weeks attendance figures, called "Memory"). For example, the number of people turning up over the past 10 weeks might be: 15, 67, 84, 34, 45, 76, 40, 56, 23 and 35. Each person then independently employs a prediction procedure to estimate how many people will appear at the bar in the coming week. Typical predictors might be for example:

-the same number as last week (35),
-a mirror image around 50% of last week's attendance,
-a (rounded) average of attendances over the past four weeks (39).
-the same as 2 weeks ago (2-period cycle predictor),
-etc. ...

Each week each agent evaluates these models against the past data and chooses the one that was the best predictor on this data and then uses this to predict the number who will go this time (the active predictor). It will go if this prediction is less than 60% and not if it is more than 60%.

Because agents have "Strategies-per-agent" different suitable predictors in their sets, some will turn up at the bar, while others will not. A new attendance figure is available and everyone updates the accuracies of all their predictors.

HOW TO USE IT

1 - The Sliders
The "Number-of-Agents" slider is straight-forward. It determines the number of agents in the game (set at 100 in the standard game).

The "Strategy-Space" slider will determine the size "S" of possible strategies (S = 6 to 200, set at 200).

The "Strategies-per-agent" slider will distribute randomly the strategy soups (3, 4, ..., or 12 out of S pre-designed ones, set at 6) to each agent.

The "Memory" slider will determine the length of the past data the agents use (5 to 20, set at 20).

The "Lambda" slider is used to compute the performance of each strategy. A low "Lambda" uses gives more importance to current performance while a high "Lambda" uses the past. (0 to 0.9).

2 - Buttons
Two buttons, "SETUP" and "GO", control execution of the model.

The "SETUP" button resets the system, preparing the model to be run. The number of strategies per agent is determined by the slider.

The "GO" button, a forever button, will then run the model.

The "GO ONCE" button is the same as GO except the agents only take one step.

3 - Plot
People Going to El Farol - The total attendance at the bar and the average vs. time.

Agent's scores - The best, worst and average score vs. time.

Attendance-Histogram - Histogram of the attendance at the bar.

**The agents have a binary choice, to go or to stay, respectively coloured in pink and white.

STRATEGIES

The strategies used in this simulation are the following.

TitForTat: This family of strategies predicts next week's attendance by using the same as N weeks ago, with N from 0 to "Memory" (20 possibilities).
It could be for example N = 0 for last weeks attendance or N = 4 for 5 weeks ago's one.
Mirror: This is a family of strategies using a mirror image around 50% of N (up to 20) weeks ago as prediction.

Fixed: The "Fixed" strategy always chooses the same attendance (5%, 10%, 15%, 20%, 25% ... or 100%).

Trend: A N (up to 20) dated 2 day trend applied to the last attendance.

OppositeTrend: A N (up to 20) dated 2 day opposite trend applied to the last attendance.

Trend2: A N (up to 20) dated 2 day (3 day spaced) trend applied to the last attendance.

MovingAverage: A N (up to 20) 5 day Moving average.

OppositeMovingAverage: A N (up to 20) opposite 5 day Moving average.

Trend3: A N (up to 20) dated 2 day relative trend applied to the last attendance.

OppositeTrend3: A N (up to 20) dated 2 day relative trend applied to the last attendance.

THINGS TO NOTICE

In the case of absence of collusion or prior communication between agents, this model, of limited resources, shows how unstable behaviour is yielded in this repeated game, and two interesting patterns are revealed.

First, the number of people who attend the bar fluctuates around an average level of 60%, with on average 60% predicting not to go and 40% to go, which constitutes the Nash Equilibria, which is selected through the computer simulations. It is learning that allows the bounded-rational agents to select this equilibrium strategy.

Second, the dynamics seem random, despite that no random component determines the dynamics of how many people go. In fact, although at a microscopic level each agent is applying a different predictor at any one time, with varying degrees of success, when viewed globally, they seem pretty indistinguishable. The only random part of Arthur's model is the setting-up.
Therefore once the game is set the output is completely deterministic since the rule update is stable.

CREDITS AND REFERENCES

This model was based upon Brian Arthur's article:
Arthur, Brian, (1994), "Inductive Reasoning and Bounded Rationality: The El Farol Bar Problem", American Economic Review, 84(2), pp.406-411.

Information can be found on the web at:
http://www.santafe.edu/arthur/Papers/El_Farol.html

AUTHOR

The Author, Mark Garofalo, may be contacted by Email at: mark_garofalo@hotmail.com
http://www.markgarofalo.com/
January 2004.

(back to the NetLogo User Community Models)