Giter Site home page Giter Site logo

jmiszczak / matthew_reduction_game Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 53 KB

Implementation of games on networks for controlling the inequalities in the capital distribution

License: Apache License 2.0

Python 100.00%
game-theory network-analysis strategic-game sociophysics econophysics agent-based-modeling agent-based-simulation simulation

matthew_reduction_game's Introduction

DOI

matthew_reduction_game

This software provides implementation of games on networks for controlling the inequalities in the capital distribution (a.k.a. Janosik model).

Software and data in this repository was used in the manuscript:

J.A. Miszczak, Constructing games on networks for controlling the inequalities in the capital distribution, Physica A: Statistical Mechanics and its Applications, Volume 594, 15 May 2022, 126997 DOI:10.1016/j.physa.2022.126997, arXiv:2201.10913 .

Quick start

Main functionality is contained within src/model folder. To run a simulation of the base model with capital distribution initialized using constant difference of capital, run

python Janosik_grid2d_batch.py uniform

Here the last parameter can be uniform or boltzmann.

Example of the model with Parrondo's game used for policy selection can be run as

python JanosikParrondo_grid2d_batch.py nagents

where the parameter nagents is used to define a number of agents in the network. Please note tha only equal difference methods (i.e. uniform) is used for this case.

In all case simulation is executed using parallel capabilities of Mesa library. The number of cored ussed in the simulation is controlled by the nr_processes parameter of BatchRunnerMP class.

Package organization and installation

The provided files can be used to reproduce all the results presented in the accompanying manuscript. They can be also used to extend the models and run simulations using random graphs models.

Description of subdirectories

  • src/model includes model used in the manuscript,
  • src/scripts contains some extra scripts used in the manuscript,
  • data is used to store simulation results and can be used to store graphs generated for running simulations,
  • plots is used to store final plots.

Anaconda environment

You can use to install most of the required packages

conda env create -f matthew_reduction_game.yml

and

pip install -e git+https://github.com/projectmesa/mesa#egg=mesa

to install the latest version of Mesa library.

This software was tested with

  • Python 3.9.7
  • Mesa 0.8.9
  • NetworkX 2.6.3
  • Pandas 1.3.3
  • conda 4.10.3
  • Ubuntu 20.04.3 LTS

Publication

The presented results were published in

J.A. Miszczak, Constructing games on networks for controlling the inequalities in the capital distribution, Physica A: Statistical Mechanics and its Applications, Vol. 594 (2022), 126997, DOI:10.1016/j.physa.2022.126997, arXiv:2201.10913

@article{miszczak2022constructing,
  title = {Constructing games on networks for controlling the inequalities in the capital distribution},
  author = {Miszczak, Jaros{\l}aw Adam},
  journal = {Physica A: Statistical Mechanics and its Applications},
  volume = {594},
  pages = {126997},
  year = {2022},
  doi = {10.1016/j.physa.2022.126997}
}

Contact information

Responsible person: [email protected]

matthew_reduction_game's People

Contributors

jmiszczak avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.