Catalog/gt-monty-hall

Game Theory

Monty Hall problem API

Computes stay-vs-switch win probabilities for the generalized Monty Hall problem with D doors and any number of revealed losing doors. Answers 'Should I switch in Monty Hall?', 'What is the switch advantage with 100 doors?'.

Price$0.04per request
MethodPOST
Route/v1/gametheory/monty-hall
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
probabilitymonty-hallconditionalbayespuzzleswitchdecisiongame-show
API URLhttps://x402.hexl.dev/v1/gametheory/monty-hall
Integration docs
Example request
{
  "doors": 3
}
Example response
{
  "doors": 3,
  "revealed": 1,
  "stayWinProbability": 0.3333333333,
  "switchWinProbability": 0.6666666667,
  "switchAdvantage": 2,
  "bestAction": "switch",
  "interpretation": "With 3 doors and 1 goat door(s) revealed, switching wins 66.6667% vs staying 33.3333% — switch."
}
Input schema
{
  "type": "object",
  "properties": {
    "doors": {
      "type": "integer",
      "minimum": 3,
      "examples": [
        3
      ]
    },
    "revealed": {
      "type": "integer",
      "minimum": 1,
      "examples": [
        1
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}