> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fincept.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify Nash Equilibrium

> Check whether a given strategy profile (possibly mixed) is a Nash equilibrium. A strategy profile is a Nash equilibrium if no player can improve their expected payoff by unilaterally deviating. Also returns the expected payoffs for both players. Use to verify candidate equilibria or validate algorithmic solutions. [Tier: STANDARD, Credits: 2]



## OpenAPI

````yaml api-specs/economics.json post /quantlib/economics/games/nash-check
openapi: 3.1.0
info:
  title: FinceptQuantLib API - Economics
  description: >-
    Economics module endpoints for FinceptQuantLib API - general equilibrium,
    game theory, auctions, and utility functions
  version: 3.0.0
  contact:
    name: Fincept API Support
    url: https://fincept.in
servers:
  - url: https://api.fincept.in
    description: Fincept API Production Server
security:
  - APIKeyHeader: []
tags:
  - name: quantlib-economics
    description: >-
      Economics module - general equilibrium, game theory, auctions, and utility
      theory
    x-displayName: Economics
paths:
  /quantlib/economics/games/nash-check:
    post:
      tags:
        - quantlib-economics
      summary: Verify Nash Equilibrium
      description: >-
        Check whether a given strategy profile (possibly mixed) is a Nash
        equilibrium. A strategy profile is a Nash equilibrium if no player can
        improve their expected payoff by unilaterally deviating. Also returns
        the expected payoffs for both players. Use to verify candidate
        equilibria or validate algorithmic solutions. [Tier: STANDARD, Credits:
        2]
      operationId: nash_check_quantlib_economics_games_nash_check_post
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - payoff_matrix_1
                - payoff_matrix_2
                - strategy_1
                - strategy_2
              properties:
                payoff_matrix_1:
                  type: array
                  description: Payoff matrix for Player 1
                  items:
                    type: array
                    items:
                      type: number
                  example:
                    - - 3
                      - 0
                    - - 5
                      - 1
                payoff_matrix_2:
                  type: array
                  description: Payoff matrix for Player 2
                  items:
                    type: array
                    items:
                      type: number
                  example:
                    - - 3
                      - 5
                    - - 0
                      - 1
                strategy_1:
                  type: array
                  description: >-
                    Mixed strategy for Player 1 (probability distribution over
                    strategies, must sum to 1)
                  items:
                    type: number
                    minimum: 0
                    maximum: 1
                  example:
                    - 0
                    - 1
                strategy_2:
                  type: array
                  description: >-
                    Mixed strategy for Player 2 (probability distribution over
                    strategies, must sum to 1)
                  items:
                    type: number
                    minimum: 0
                    maximum: 1
                  example:
                    - 0
                    - 1
            example:
              payoff_matrix_1:
                - - 3
                  - 0
                - - 5
                  - 1
              payoff_matrix_2:
                - - 3
                  - 5
                - - 0
                  - 1
              strategy_1:
                - 0
                - 1
              strategy_2:
                - 0
                - 1
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      is_nash_equilibrium:
                        type: boolean
                        description: True if the strategy profile is a Nash equilibrium
                        example: true
                      payoff:
                        type: array
                        description: >-
                          Expected payoffs for both players [payoff_p1,
                          payoff_p2]
                        items:
                          type: number
                        example:
                          - 1
                          - 1
              example:
                success: true
                data:
                  is_nash_equilibrium: true
                  payoff:
                    - 1
                    - 1
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/InsufficientTierError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
              example:
                detail:
                  - loc:
                      - body
                      - strategy_1
                    msg: field required
                    type: value_error.missing
      security:
        - APIKeyHeader: []
components:
  responses:
    UnauthorizedError:
      description: Authentication information is missing or invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Invalid API key
    InsufficientTierError:
      description: API tier insufficient for this endpoint
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Endpoint requires Basic tier or higher
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Get your key at
        https://api.fincept.in/auth/register

````