GithubHelp home page GithubHelp logo

pgg-with-loner-and-rl's Introduction

PGG-with-Loner-and-RL

Imitation and replication have emerged as a paradigm in numerous studies that explore the evolution of cooperative behavior. Since they embrace the essence of natural selection, it is widely recognized in exploring the evolution of biological behaviors. However, it is not easy to express the way individuals select and optimize in these simple and elegant ways in the complex and variable interactive environments. Currently, reinforcement learning is widely used in the study of strategy updating dynamics and agent learning processes in game theory. Therefore, we introduce the Q-learning algorithms into the voluntary public goods game to explore the impact of cooperative evolution.

This repository hosts the source code of paper of Exploring cooperative evolution with tunable payoff's loners using reinforcement learning.

Requirements

It is worth mentioning that because python runs slowly, we use numba library to improve the speed of code running.

  • networkx==3.1
  • numba==0.57.0
  • numpy==1.23.0
  • pandas==2.0.2
  • scipy==1.11.1
  • seaborn==0.12.2
  • tqdm==4.65.0

Setup

The installation of PGG-with-Loner-and-RL is very easy. We've tested our code on Python 3.10 and above. We strongly recommend using conda to manage your dependencies, and avoid version conflicts. Here we show the example of building python 3.10 based conda environment.


conda create -n pggrl python==3.10.2 -y
conda activate pggrl
pip install -r requirements.txt

Running

python pggrl.py

Results

The core code of paper is provided here. 'pggrl.py' can plot the evolutionary process of various strategies under various parameter settings. Other results in the paper can be obtained by modifying this code. The example of results which are obtained from 'pggrl.py' are shown below:

Citation

Please cite this work if you find it useful:

@article{ZHANG2024114358,
title = {Exploring cooperative evolution with tunable payoff’s loners using reinforcement learning},
journal = {Chaos, Solitons & Fractals},
volume = {178},
pages = {114358},
year = {2024},
issn = {0960-0779},
doi = {https://doi.org/10.1016/j.chaos.2023.114358},
url = {https://www.sciencedirect.com/science/article/pii/S0960077923012602},
author = {Huizhen Zhang and Tianbo An and Pingping Yan and Kaipeng Hu and Jinjin An and Lijuan Shi and Jian Zhao and Jingrui Wang},
keywords = {Public goods game, Self-regarding Q-learning, Human cooperation, Loner}
}

Contact

Please email Huizhen Zhang([email protected]) or Jingrui Wang([email protected]) for further questions.

pgg-with-loner-and-rl's People

Contributors

wangjingrui530 avatar

Stargazers

 avatar  avatar Simon Li avatar

Watchers

 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.