examples.el_farol_bar_model.agents package¶
Submodules¶
examples.el_farol_bar_model.agents.agents module¶
Agents for the el farol bar problem
-
class
examples.el_farol_bar_model.agents.agents.LikeCrowdedPlayer(simulation, model, agent_number, agent_def)[source]¶ Bases:
examples.el_farol_bar_model.agents.agents.PlayerA player that always defect
-
class
examples.el_farol_bar_model.agents.agents.LikeSixtyPercentPlayer(simulation, model, agent_number, agent_def)[source]¶ Bases:
examples.el_farol_bar_model.agents.agents.PlayerA player that always defect
-
class
examples.el_farol_bar_model.agents.agents.Player(simulation, model, agent_number, agent_def)[source]¶ Bases:
sphinx.ext.autodoc.importer._MockObjectA basic player in the El Farol Bar Problem
-
class
examples.el_farol_bar_model.agents.agents.RandomPlayer(simulation, model, agent_number, agent_def)[source]¶ Bases:
examples.el_farol_bar_model.agents.agents.PlayerA player that always defect
examples.el_farol_bar_model.agents.el_farol_bar_action_set module¶
Basic Strategy Class implementation
-
class
examples.el_farol_bar_model.agents.el_farol_bar_action_set.LikeCrowded(agent, recall)[source]¶ Bases:
examples.el_farol_bar_model.agents.el_farol_bar_action_set.StrategyStrategy Like Crownded
-
class
examples.el_farol_bar_model.agents.el_farol_bar_action_set.LikeSixtyPercent(agent, recall)[source]¶ Bases:
examples.el_farol_bar_model.agents.el_farol_bar_action_set.StrategyStrategy under sixty percent
-
class
examples.el_farol_bar_model.agents.el_farol_bar_action_set.RandomPlay(agent)[source]¶ Bases:
examples.el_farol_bar_model.agents.el_farol_bar_action_set.StrategyStrategy under random
examples.el_farol_bar_model.agents.el_farol_bar_prediction_model module¶
Prediction Model for the El Farol Problem
-
class
examples.el_farol_bar_model.agents.el_farol_bar_prediction_model.FitnessFunction(owner)[source]¶ Bases:
objectFitness Function for the el-farol bar model following: Rand, W., & Stonedahl, F. (2007). The El Farol bar problem and computational effort:
Why people fail to use bars efficiently. Northwestern University, Evanston, IL.f(S,t) = sum_(i=t-L)^(t-1) abs(p(S,i) - a(i)) Where: p(S,i) is the prediction of strategy S on time i and a(i) is the observed attendance on time i and L is the memory reacall lenght.
-
class
examples.el_farol_bar_model.agents.el_farol_bar_prediction_model.PredictionModel(agent, recall)[source]¶ Bases:
objectThe prediction model that the agent uses to choose the strategy Arthur’s paper (1994) strategies 1. the same as last week’s 2. a mirror image around 50 of last week’s 3. a (rounded) average of the last four weeks 4. the trend in last 8 weeks, bounded by [0,100] 5. the same as 2 weeks ago (2-period cycle detector) 6. the same as 5 weeks ago (5-period cycle detector)
Module contents¶
-
class
examples.el_farol_bar_model.agents.Player(simulation, model, agent_number, agent_def)[source]¶ Bases:
sphinx.ext.autodoc.importer._MockObjectA basic player in the El Farol Bar Problem
-
class
examples.el_farol_bar_model.agents.RandomPlayer(simulation, model, agent_number, agent_def)[source]¶ Bases:
examples.el_farol_bar_model.agents.agents.PlayerA player that always defect
-
class
examples.el_farol_bar_model.agents.LikeCrowdedPlayer(simulation, model, agent_number, agent_def)[source]¶ Bases:
examples.el_farol_bar_model.agents.agents.PlayerA player that always defect
-
class
examples.el_farol_bar_model.agents.LikeSixtyPercentPlayer(simulation, model, agent_number, agent_def)[source]¶ Bases:
examples.el_farol_bar_model.agents.agents.PlayerA player that always defect