Simple implementation of the El Farol Bar Problem
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Simple implementation of the El Farol Bar problem
AUTHOR
Giangiacomo Bravo
WHAT IS IT?
This model implement the classic El Farol Bar problem in a simple way, suitable for introductory classes in social simulation.
HOW IT WORKS
Agents face a binary decision: to enter or not the bar. They are happy to enter the bar if it's not overcrowded, but prefer to stay outside above a certain number of clients. In each tick, a certain proportion of agents simultaneously check whether the number of clients in the bar is above their (un)happiness threshold (equal for all). If not, they enter (or remain in) the bar, if yes they remain (or go) outside.
HOW TO USE IT
The setup bottom sets up the agents. All are initially outside. Click it just once at the beginning of the simulation. The go button starts and ends the simulation.
Global parameters
- The n-of-agents slider allows to select the number of agents in the model.
- The bar-limit slider sets the happiness threshold for the agents.
- The simultaneous-move-prop slider sets the proportion of agents checking whether they are happy or not in a given tick.
THINGS TO NOTICE
The average number of clients in the bar is always close to the happiness threshold. Still the actual number can oscillate widely if many agents do their choices at the same time.
Comments and Questions
to setup ca set-default-shape turtles "person" ask patches with [abs pxcor < 5 and abs pycor < 4] [set pcolor white] ask n-of n-of-agents patches with [pcolor = black] [sprout 1] reset-ticks end to go choose tick end to choose let turtles-in-the-bar count turtles-on patches with [pcolor = white] ask n-of round (n-of-agents * simultaneous-move-prop) turtles [ ifelse turtles-in-the-bar > bar-limit [ move-to one-of patches with [pcolor = black] ] [ move-to one-of patches with [pcolor = white] ] ] end
There is only one version of this model, created about 8 years ago by Giangiacomo Bravo.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Simple implementation of the El Farol Bar Problem.png | preview | Preview for 'Simple implementation of the El Farol Bar Problem' | about 8 years ago, by Giangiacomo Bravo | Download |
This model does not have any ancestors.
This model does not have any descendants.
Rodgers Munene
El Farol Bar Problem Model (Question)
How can I apply this model in power microgrid resilience modelling? Bearing in mind that power microgrid resilience under fault or abnormal conditions is unpredictable and complex and ill-defined and deductive reasoning cannot be possible. Only inductive reasoning under boundedly rational agents solutions are found to give better results.
Posted almost 8 years ago