TheAlgorithms / Python

All Algorithms implemented in Python
https://thealgorithms.github.io/Python/
MIT License
194.4k stars 45.66k forks source link

Add Game Theory Algorithms #11583

Closed VesperAkshay closed 1 month ago

VesperAkshay commented 1 month ago

Feature description

Description:

We aim to enhance our repository by including a comprehensive list of game theory algorithms. This addition will provide valuable resources for users interested in understanding and implementing these algorithms in various applications.

Proposed Algorithms to Add:

  1. Minimax Algorithm: A decision-making algorithm for two-player games to minimize the maximum possible loss.

  2. Alpha-Beta Pruning: An optimization technique for the minimax algorithm that reduces the number of nodes evaluated by eliminating branches that won't affect the final decision.

  3. Nash Equilibrium: A solution concept in non-cooperative games where no player can benefit by changing their strategy while others keep theirs unchanged.

  4. Monte Carlo Tree Search (MCTS): A heuristic search algorithm used for decision-making processes, particularly in games like Go.

  5. Dynamic Programming in Games: Techniques like backward induction for solving extensive-form games by solving subproblems in a bottom-up manner.

  6. Evolutionary Game Theory: Analyzes strategies in populations of agents using concepts like replicator dynamics and Nash equilibria.

  7. Fictitious Play: A learning process where players assume their opponents will continue to play the same mixed strategies over time.

  8. Shapley Value: A method for distributing payoffs fairly among players based on their contributions in cooperative games.

  9. Correlated Equilibrium: A generalization of Nash equilibrium where players coordinate their strategies based on signals from a mediator.

  10. Zero-Sum Games: Algorithms designed for games where one player's gain is balanced by the losses of another, often solved using linear programming.

Tasks:

Benefits:

Adding these algorithms will provide users with a richer resource for understanding game theory and its applications, fostering learning and development in this area.

tianyizheng02 commented 1 month ago

If you wish to contribute, please simply open a PR with your algorithm. You don't need to open an issue to get approval or to get assigned to work on it. If you wish to contribute a game theory algorithm, please don't create a new directory for it; place your algorithm under maths/ instead, and we may consider moving game theory algorithms to a separate directory once we have enough of them to justify doing so.

As a side note, some of your proposed "algorithms" aren't really algorithms. For instance: