Code Monkey home page Code Monkey logo

silver-carp's Introduction

silver-carp

English 中文

Repository Introduction

Understand the game model of public goods, the evolution and dissemination of cooperation, and the impact of rewards and punishments on cooperation evolution under random networks, and use Monte Carlo simulation analysis to achieve mechanism modeling.

Background Introduction

There are many restaurants of all sizes in the city, and each restaurant has a probability of being subjected to hygiene checks by relevant departments every day. If hygiene is not done on that day (i.e. betrayal), fines will be imposed. Use this mechanism to demonstrate cooperation and betrayal on four networks.

Model Ideas

When an individual is a collaborator and regardless of whether they undergo inspection or not, the collaborator has already done a good job of hygiene and will not be punished. At this point, the profit that the individual collaborator obtains from the whole is as follows:

When an individual is a betrayer and the probability of being tested meets the following criteria.

The betrayer has not yet done a good job in hygiene, and at this point, the benefits of the betrayer are:

Rewards are awarded when the group cooperation rate is less than 0.5. Finally, calculate the total income of the individual:

Plus benefits from other groups

Parameter Description

c: Cooperation costs for collaborators
r: Input-output ratio
k: Rationality level
penaltyAmount:Fine
rewardAmount: Reward
reward: group reward
Cooperation_rate: Group combination work rate
M1: Number of rows
M2: Number of columns
N: Number of game rounds
A: Denotes a collaborator or betrayer
D: Benefits of each individual in the group
E: Total income per individual
tongji: stores the proportion of collaborators at each moment
NC: represents the number of co authors in group i
NCD:Number of individuals in group i
totalpay:Represented as the total return of individual i playing games in multiple groups
individualRewards:All rewards received by individuals

diffNetwork default penaltyAmount rewardAmount

Install

This project uses Matlab Git. Go check them out if you don't have them locally installed.

$ git clone https://github.com/touero/silver-carp.git

Related Efforts

Maintainers

@touero

Contributing

Feel free to dive in! Open an issue or submit PRs.

Contributors

This project exists thanks to all the people who contribute.

License

GNU General Public License v3.0

silver-carp's People

Contributors

touero avatar

Stargazers

 avatar  avatar  avatar  avatar  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.