# Zero-Sum Game Solver (Saddle Point / Linear Programming)

Two-person zero-sum games: saddle-point test first, then mixed strategies from a single-phase simplex LP with dual shadow prices, verified by security-level checks.

> Canonical page: https://test.elysiatools.com/en/tools/game-theory-zero-sum

- **Category:** Math & Numbers

- **Keywords:** game theory, zero-sum game, saddle point, mixed strategy, minimax, nash equilibrium, linear programming, shadow price, payoff matrix, operations research

## Overview

Solve 2–6 × 2–6 two-person zero-sum matrix games by automatically testing for pure-strategy saddle points or computing optimal mixed strategies and game value using simplex linear programming and dual shadow prices.

## Inputs

- **Payoff matrix (row player's gain, one row per line)** (textarea): Payoffs to the row player (positive = row wins). 2–6 rows × 2–6 columns; the column player minimizes.
- **Decimal Places** (number)

## When to use

- Evaluating competitive two-player zero-sum scenarios where one player's gain is the other player's loss.
- Checking whether a payoff matrix has a pure strategy Nash equilibrium via maximin and minimax saddle point testing.
- Calculating optimal randomized probability distributions and expected game value when no saddle point exists.

## How it works

- Enter the payoff matrix with rows representing the maximizing row player's payoffs and columns representing the minimizing column player's choices.
- The solver computes row minima (maximin) and column maxima (minimax) to detect pure-strategy saddle points.
- If maximin is strictly less than minimax, the tool shifts payoffs to positive values and executes a single-phase simplex linear program to derive primal and dual mixed strategies.
- The output presents optimal probability distributions for both players, the expected game value, and verified security-level bounds.

## Use cases

- Operations research and game theory coursework requiring step-by-step zero-sum matrix solutions.
- Strategic decision modeling for competitive zero-sum pricing or security defense scenarios.
- Verifying minimax theorem conditions, dual shadow prices, and security level guarantees.

## Frequently asked questions

### What matrix dimensions are supported?

The solver supports payoff matrices ranging from 2×2 up to 6×6 entries.

### How does the tool identify a saddle point?

A saddle point exists when the maximum of the row minima (maximin) equals the minimum of the column maxima (minimax).

### Why does the solver shift matrix values during LP computation?

Payoffs are shifted by a positive constant to make all matrix elements positive for single-phase simplex LP solving, after which the game value is shifted back.

### What does the game value represent?

The game value is the expected payoff guaranteed to the row player when both players follow their optimal minimax strategies.

### Whose payoff perspective is represented in the matrix?

All matrix values represent payoffs to the row player, which the row player maximizes and the column player minimizes.

## Related tools

- [Carmichael Function λ(n) Calculator](https://test.elysiatools.com/en/tools/carmichael-function): Group exponent λ(n) from prime factorization with φ(n) comparison, primitive-root existence, Korselt's Carmichael-number detection, and optional sample-unit verification.
- [Chinese Remainder Theorem Solver (System of Congruences)](https://test.elysiatools.com/en/tools/chinese-remainder-theorem): Generalized pairwise-merge CRT for 2–20 congruences: coprime moduli give the product modulus, consistent non-coprime moduli give the lcm, inconsistent systems are rejected.
- [Permutation / Combination / Subset Generator (With Repeats)](https://test.elysiatools.com/en/tools/combinatorial-generation): Deduplicated, lexicographic permutations / combinations / subsets of up to 12 items with exact multiset counts; display capped at 200 entries.
- [Euler Totient Function φ(n) Calculator](https://test.elysiatools.com/en/tools/euler-totient-function): Exact φ(n) from trial-division factorization (n ≤ 10¹²) with optional coprime listing and Euler's theorem recall.
- [Inverse Laplace Transform Calculator (Partial Fractions)](https://test.elysiatools.com/en/tools/inverse-laplace-calculator): Partial-fraction inverse Laplace transform for proper rational functions: root factorization (real + conjugate pairs), exact coefficient system, term-by-term inversion.
- [Laplace Transform Calculator (Table Lookup)](https://test.elysiatools.com/en/tools/laplace-transform-calculator): Table lookup of L{f(t)} for 14 standard pairs, with parameter substitution, region of convergence, derivation note, and optional numeric F(s₀) evaluation.
- [Multiplicative Order Calculator mod n (ordₙ(a))](https://test.elysiatools.com/en/tools/order-of-element-mod-n): Smallest k with a^k ≡ 1 (mod n) via φ(n) reduction: power table, minimality proof, cyclic subgroup , primitive-root and maximal-order flags.
- [Partial Fraction Decomposer (Rational Functions)](https://test.elysiatools.com/en/tools/partial-fraction-decomposer): Decompose N(x)/D(x) into A/(x−r)^j + (Bx + C)/((x−α)² + β²) with long division for improper fractions and numeric residual verification.

## Samples

- [Bevy Game Engine Samples](https://test.elysiatools.com/en/samples/bevy-samples): Bevy Rust game engine examples with ECS, 2D/3D graphics, audio, and game mechanics implementations
- [Web Image Processing Python Samples](https://test.elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Zero Trust Architecture Samples](https://test.elysiatools.com/en/samples/zero-trust-samples): Comprehensive Zero Trust architecture samples covering identity authentication, network segmentation, micro-segmentation strategies, and secure access control
- [Android Image Processing Java Samples](https://test.elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
