Catalog/gt-nash-2x2

Game Theory

Nash equilibrium 2x2 API

Finds all pure-strategy Nash equilibria and the interior mixed-strategy equilibrium of a 2x2 bimatrix game from both players' payoff matrices. Answers 'What are the equilibria of this 2x2 game?', 'What is the mixed strategy for matching pennies?'.

Price$0.08per request
MethodPOST
Route/v1/gametheory/nash-2x2
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
game-theorynash-equilibriummixed-strategybimatrix2x2best-responsestrategydecision
API URLhttps://x402.hexl.dev/v1/gametheory/nash-2x2
Integration docs
Example request
{
  "payoffsA": [
    [
      3,
      0
    ],
    [
      5,
      1
    ]
  ],
  "payoffsB": [
    [
      3,
      5
    ],
    [
      0,
      1
    ]
  ]
}
Example response
{
  "pureEquilibria": [
    {
      "row": 1,
      "col": 1,
      "payoffA": 1,
      "payoffB": 1
    }
  ],
  "mixedEquilibrium": null,
  "hasPure": true,
  "hasMixed": false,
  "interpretation": "Found 1 pure Nash equilibrium/equilibria."
}
Input schema
{
  "type": "object",
  "required": [
    "payoffsA",
    "payoffsB"
  ],
  "properties": {
    "payoffsA": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "examples": [
        [
          [
            3,
            0
          ],
          [
            5,
            1
          ]
        ]
      ]
    },
    "payoffsB": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "examples": [
        [
          [
            3,
            5
          ],
          [
            0,
            1
          ]
        ]
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}