Giter Site home page Giter Site logo

gametheory's Introduction

"Game theory" simulations ๐Ÿ•น๏ธ

Interactively simulate and engage with game theory

Game theory is a key tool for analyzing strategic interactions and decision-making across diverse areas. It enhances our comprehension of human behavior in real-world situations, encompassing both cooperation and competition.

"if you are going to interact once you are better off defect otherwise you should consider cooperating" --- Unknown

Inspired by Robert Axelrod's 1984 The Evolution of Cooperation and Veritasium's take on the topic

Usage

Dilemma

  1. clone the repo: git clone https://github.com/ProsperoKay/gametheory.git
  2. run dilemma with python -m dilemma
  3. interact with simulation

Strategies

Statuses - Added[โœ”๏ธ] | To Be Added[โŒ]

No. Strategy Description Status
1 AlwaysCooperate Strategy always cooperates with opponent in every matchup โœ”๏ธ
2 AlwaysDefect Strategy always defects in every matchup โœ”๏ธ
3 RandomDefect Strategy defects at random โœ”๏ธ
4 TitForTat Strategy always cooperates but defects only after opponent defects once then goes back to cooperate after opponent cooperates โœ”๏ธ
5 TitFor2Tat Strategy always cooperates but defects once after opponent defects twice in a row then goes back to cooperate after opponent cooperates โœ”๏ธ
6 Historian Strategy defects if opponent historically defects more than cooperates โœ”๏ธ
7 Unforgiving Strategy defects the rest of the game if opponent defects even once โœ”๏ธ
8 PrimeDefector Strategy defects at every prime numbered stage โŒ

Contributing

So you've got an improvement, just send in a pull request!

1. Fork this repository

2. Create your feature branch

git checkout -b new_feature

3. Commit your changes

When you are ready to generate a pull request, either for preliminary review, or for consideration of merging into the project you must first push your local topic branch back up to GitHub:

git push origin new_feature

4. Create new Pull Request

Once you've committed and pushed all of your changes to GitHub, go to the page for your fork on GitHub, select your development branch, and click the pull request button. If you need to make any adjustments to your pull request, just push the updates to your branch. Your pull request will automatically track the changes on your development branch and update.

If you've got feature ideas โœจ, or wish to report a bug ๐Ÿ› simply open a new issues!

Remember to โญ star this repository to receive updates.

License

MIT


GitHub @prosperokay โ€ข Email@prosperokay

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.