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

NetLogo User Community Models(back to the NetLogo User Community Models)
## WHAT IS IT?
El Farol is a bar in Santa Fe, New Mexico. The bar is popular  especially on Thursday nights when they offer Irish music  but sometimes becomes overcrowded and unpleasant. In fact, if the patrons of the bar think it will be overcrowded they stay home; otherwise they go enjoy themselves at El Farol. This model explores what happens to the overall attendance at the bar on these popular Thursday evenings, as the patrons use different strategies for determining how crowded they think the bar will be.
In this extended version of El Farol the story goes that the owner of the bar tired of patrons complaining about the bar being overcrowded and installed an ugly statue that the bar owner called the coin flipper god. On the statue there is a big sign proclaiming with big letters:
The model builds heavily on Uri Wilensky original NetLogo implementation of El Farol.
## HOW IT WORKS
An agent will go to the bar on Thursday night if they think that there will not be more than a certain number of people there  a number given by the OVERCROWDINGTHRESHOLD. To predict the attendance for any given week, each agent has access to a set of prediction strategies, including one random strategy, and the actual attendance figures of the bar from previous Thursdays. A strategy is represented as a list of weights that determines how the agent believes that each time period of the historical data affects the attendance prediction for the current week and one dummy weight tied to a single random variable. This definition of a strategy is loosely based on an implementation of Arthur's model as revised by David Fogel et al. (1999). The agent decides which one of its strategies to use by determining which one would have done the best had they used it in the preceding weeks.
The number of potential strategies an agent has is given by NUMBERSTRATEGIES, and these potential strategies are distributed randomly to the agents during SETUP, but at any one tick each agent will only utilize one strategy, based on its previous ability to predict the attendance of the bar. The length of the attendance history the agents can use for a prediction or evaluation of a strategy is given by MEMORYSIZE.
The model has been extended with COINMEAN and COINGAP. These variables define a uniform distribution with mean of COINMEAN from COINMEAN  COINGAP to COINMEAN + COIN_GAP. The random strategy is considered optimal if the actual number of patrons in the bar fall between COINMEAN  COINGAP to COINMEAN + COINGAP . COINERRORPREMIUM is percentage applied to error calculations when finding optimal strategy in the EL Farol Bar problem.
The HISTORICALMEAN and HISTORICALGAP determine how historical values are created. The distribution used or historical value is a uniform distribution between HISTORICALMEAN  HISTORICALGAP to HISTORICALMEAN + HISTORICALGAP.
## HOW TO USE IT
To use the model, set the NUMBERSTRATEGIES, OVERCROWDINGTHRESHOLD, MEMORY size, COINMEAN, COINGAP, COINERRORPREMIUM, HISTORICALMEAN, HISTORICALGAP, press SETUP, and then GO.
The Bar Attendence plot shows the average attendance at the bar over time. The coin flippers plot shows the number of patrons using the random strategy of "coin flipping".
## THINGS TO NOTICE
The green part of the world represents the homes of the patrons, while the blue part of the world represents the El Farol Bar. White patrons are using prediction strategies while yellow agents use the random strategy of "coin flipping".
## THINGS TO TRY
Try running the model with different settings of COINGAP, COINMEAN and COINERRORPREMIUM and notice when the random "coin flipping" strategy is used.
## EXTENDING THE MODEL
Experiment with different random distributions. Try to find a strategy that is better than the random strategy of "coin flipping".
## CREDITS AND REFERENCES
Based heavily on the original NetLogo model by Uri Wilensky
Based on the original
This model is inspired by a paper by W. Brian Arthur. "Inductive Reasoning and Bounded Rationality", W. Brian Arthur, The American Economic Review, 1994, v84n2, p406411.
David Fogel et al. also built a version of this model using a genetic algorithm. "Inductive reasoning and bounded rationality reconsidered", Fogel, D.B.; Chellapilla, K.; Angeline, P.J., IEEE Transactions on Evolutionary Computation, 1999, v3n2, p142146.
## HOW TO CITE
If you mention this model in a publication, we ask that you include these citations for the model itself and for the NetLogo software:
* Rolf Stenholm (2014). NetLogo El Farol Attack of the coin flippers.
## COPYRIGHT AND LICENSE
Copyright 2014 Rolf Stenholm
Based heavily on the original NetLogo El Farol model, Copyright 2007 Uri Wilensky.
![CC BYNCSA 3.0](http://i.creativecommons.org/l/byncsa/3.0/88x31.png)
This work is licensed under the Creative Commons AttributionNonCommercialShareAlike 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/byncsa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

(back to the NetLogo User Community Models)