Table of contents.
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:
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:
Run “casestudy-Ratio.py” you will get the following figures:
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.