An interactive game theory application for analyzing 2-player games using nashpy and axelrod in a tkinter GUI.
Highlighted equilibria for a Battle of the Sexes, and an axelrod match between a Tit for Tat player and an Alternator:
An SQLite database of matches with a match for every pair of strategies with 1 turn entered in:
Suppose that there's a wife and her husband who are in two separate places and can't talk to each other. The wife prefers to go to a ballet (
This game is a game of coordination because they have to try to choose the same place, and we call it a Battle of the Sexes. We can call it
Wife | |||
---|---|---|---|
F | B | ||
Husband | F | 2, 1 | 0, 0 |
B | 0, 0 | 1, 2 |
We call each pair
Now, suppose that the wife chooses
Wife | ||
---|---|---|
F | ||
Husband | F | 2, 1 |
B | 0, 0 |
Here, we see that the husband is choosing between 2 and 0. Obviously, he'll choose 2 because
Wife | |||
---|---|---|---|
F | B | ||
Husband | F | (2), 1 | 0, 0 |
B | 0, 0 | 1, 2 |
We call this a best response, and we see that the husband also has a best response when the wife chooses
Wife | |||
---|---|---|---|
B | |||
Husband | F | 0, 0 | |
B | 1, 2 |
Therefore, we have all the best responses of the husband:
Wife | |||
---|---|---|---|
F | B | ||
Husband | F | (2), 1 | 0, 0 |
B | 0, 0 | (1), 2 |
We do exactly the same thing for the best responses of the wife. Again,
Wife | |||
---|---|---|---|
F | B | ||
Husband | F | 2, 1 | 0, 0 |
and
Wife | |||
---|---|---|---|
F | B | ||
Husband | F | ||
B | 0, 0 | 1, 2 |
We then have all the best responses
Wife | |||
---|---|---|---|
F | B | ||
Husband | F | (2), (1) | 0, 0 |
B | 0, 0 | (1), (2) |
Note that in the game
When every payoff in an outcome is a best response like this, we call that outcome a pure equilibrium. The main thing to remember about equilibria is that when players (the husband and wife, for example) are playing an equilibrium, no player has an incentive to deviate to a different strategy. In outcome
Currently, this application may only be installed by downloading interactivegt.py
and running it.