/game_theory

Game Theory solver with explorations into iterative, non-memory games

Primary LanguagePythonMIT LicenseMIT

Game Theory Solver

Travis-CI Build Status

Game theory is a series of tools and methods which attempt to model rational behavior given agents with payoffs. Here, rational behavior is defined as having complete and transitive preferences. In other words, each agent is able to compare the value for all of her options and rank order them. The rank ordering of the preferences satisfy transitivity, continuity, and independence. With this mathematical framework, one can show with the Von Neumann–Morgenstern utility theorem that this is sufficient to construct a utility function and connect this theory to the rest of economics and decision theory. While the mathematical object if these axioms are voided (e.g. the agent is irrational) is worth exploring, such explorations are outside of the scope of this project.

Currently, this repo can find any Nash Equilibrium in two player simultaneous game with n * m choices and deterministic strategies. It can also simulate game theory environments where there are non-memory, iterative games with any number of agents and choices, although two agents per game. This is similar to Axelrod's tournament although here, the agents optimize on their choices as oppose to enacting heuristic strategies (always cheat, tic-for-tac, etc.) and then examining at steady states. Once a general mixed equilibrium strategy is in place, this will fix some of the arbitrary choices such as playing the choosing the first of any n Nash Equilibriums

Next step is to allow for stochastic strategies, unit testing, and subgames. Similarly, explore visualizations for steady states in such games. This was inspired by Nicky Case's video on the subject. Case's example also uses heuristic strategies in their games.

A further milestone include: exploring how this framework could be used to solve Mechanism Design problems. In other words, given a set of agents and preferences, can a researcher induce a game which returns the desired outcome. An example of this is with the parable of King Solomon and the lost baby:

1 Kings 3:16–28 recounts that two mothers living in the same house, each the mother of an infant son, came to Solomon. One of the babies had died, and each claimed the remaining boy as her own. Calling for a sword, Solomon declared his judgment: the baby would be cut in two, each woman to receive half. One mother did not contest the ruling, declaring that if she could not have the baby then neither of them could, but the other begged Solomon, "Give the baby to her, just don't kill him!" The king declared the second woman the true mother, as a mother would even give up her baby if that was necessary to save its life. This judgment became known throughout all of Israel and was considered an example of profound wisdom.

King Solomon achieves the desired outcome (the baby is matched with the correct mother) by inducing the game which the mother and fake mother truthfully reveal their preferences. Similarly, Glazer and Albert MA 89 present the King Solomon parable in the framework of Mechanism Design and present a proof with N-1 fake mothers.

For more information visit the Game Theory wiki or the Mechanism Design wiki