pure_nash¶
Author: Zejin Shi
Methods for computing pure Nash equilibria of a normal form game. (For now, only brute force method is supported)

quantecon.game_theory.pure_nash.
pure_nash_brute
(g)[source]¶ Find all pure Nash equilibria of a normal form game by brute force.
Parameters: g : NormalFormGame
Returns: NEs : list(tuple(int))
List of tuples of Nash equilibrium pure actions. If no pure Nash equilibrium is found, return empty list.
Examples
Consider the “Prisoners’ Dilemma” game:
>>> PD_bimatrix = [[(1, 1), (2, 3)], ... [(3, 2), (0, 0)]] >>> g_PD = NormalFormGame(PD_bimatrix) >>> pure_nash_brute(g_PD) [(1, 1)]
If we consider the “Matching Pennies” game, which has no pure nash equilibirum:
>>> MP_bimatrix = [[(1, 1), (1, 1)], ... [(1, 1), (1, 1)]] >>> g_MP = NormalFormGame(MP_bimatrix) >>> pure_nash_brute(g_MP) []