NASH: Nash Equilibrium

Description Usage Arguments Value References Examples

View source: R/NASH.R

Description

This function finds out the Nash equilibria of the 2-D payoff matrix for the players. The input parameters are equal dimensional payoff matrices for the first and the second players.

Usage

1
NASH(P1, P2)

Arguments

P1

Payoff matrix to Alice

P2

Payoff matrix to Bob

Value

The cell positons of the Nash equilibrium/equilibria as a dataframe from the payoff matrices of the players.

References

https://arxiv.org/abs/1512.06808
https://en.wikipedia.org/wiki/Nash_equilibrium

Examples

1
2
3
4
init()
Alice <- matrix(c(4, 3, 2, 4, 4, 2, 1, 0, 3, 5, 3, 5, 2, 3, 1, 3), ncol=4, byrow=TRUE)
Bob <- matrix(c(0, 2, 3, 8, 2, 1, 2, 2, 6, 5, 1, 0, 3, 2, 2, 3), ncol=4, byrow=TRUE)
NASH(Alice, Bob)

QGameTheory documentation built on July 8, 2020, 7:27 p.m.