Documentation for the project “Evolutionary Minority Game (EMG)”

Table of contents.

  1. Installation
  2. The core file
  3. Case studies

1. Installation

Download the folder “projects/EMG”, go to that folder, and then run in the terminal:

pip install -r requirements.txt

2. The core file

The core file is “EMG.py”, in which the model is defined. The parameter

  • “R” is the maximum step size (step range) for the evolution of “p”,
  • “d” is the the threshold for the strategy score of a user, below which the strategy (i.e., the value of “p”) will be adjusted,
  • and “Ratio” is the ratio of “reward” to “fine”.

3. Case studies

Run “casestudy-friends.py” you are expecting to get the following figures:

friends-Conservative friendsfriends-Liberal friendsfriends-Moderate friends

Run “casestudy-networks.py” you will get the datasets (saved in “savs/networks/”) used for drawing the networks shown below (drawn with Gephie):

Run “casestudy-price-vs-t.py” you will get the following figures:

Price-Score-t-N501m1Ratio1.0

Run “casestudy-Ratio.py” you will get the following figures:

Percent-vs-Ratio.png

Run “casestudy-shape-vs-RL” you will get the following figures (i.e., the fraction of different types of users (the dark colored figure is using R-G-B to represent the fractions), and the phase diagram(the last figure) ):

Feedback: comment below or send me an email.

Publication: (preparing)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s