Library/Interactive Puzzles/Game Theory & Strategies

Game Theory & Strategies

In competitive games, the best outcome depends not only on your own decisions but also on the choices made by others. Strategic thinking helps you find optimal moves.

Practice
JuniorMathematics
Puzzles · Game Theory
Strategic Thinking in Games

Game theory puzzles teach you to think ahead, anticipate your opponent's moves, and discover strategies that guarantee victory. Every game below has an optimal strategy—can you find it?

Winning Positions
Identify positions where you can guarantee victory
Symmetry Strategies
Mirror your opponent's moves to maintain advantage
Backwards Analysis
Work from the goal to find cold squares
Nim GamesPositional GamesRacing GamesTiling Games
Guide

Game Theory & Strategies

In the realm of strategic games, your success depends on more than just your own choices—it hinges on understanding and anticipating the decisions of others. This is the essence of game theory: analyzing how players interact, compete, and cooperate when their outcomes are interconnected.

These puzzles teach you to think several moves ahead, identify winning and losing positions, and discover strategies that guarantee victory regardless of your opponent's actions.

What is a Strategy?

A strategy in game theory is a complete plan of action: a rule that tells you what move to make in every possible situation. The best strategies are often based on mathematical principles rather than intuition.

Example: The Clock Game

Two players take turns moving a clock hand forward by either 2 or 3 hours. Starting at 12, whoever lands on 6 wins.

Question: Who wins with perfect play?

The key insight is to work backwards from the goal (6) and identify cold squares—positions where the current player will lose if both play optimally.

Core Concepts

Winning and Losing Positions

  • Winning position: The current player has a move that guarantees victory
  • Losing position (cold): Every possible move leads to a winning position for the opponent
  • Strategy: Always move to put your opponent in a losing position

Common Game Types

Game TypeDescriptionExample
Nim-likeRemove objects from pilesClassic Nim, stone piles
TerritoryControl squares or positionsDomino tiling, rook placement
Race to goalFirst to reach a target winsRook race to h8, clock to 6
Number gamesManipulate digits or valuesDivisible by 9, digit subtraction

Key Techniques

1. Backwards Analysis

Work from the winning state backwards to identify all losing positions:

  • If the goal is to reach position X, what positions lead only to X?
  • Mark those as "must avoid" (losing for the previous player)

2. Symmetry Strategy

In many games, the second player can win by mirroring the first player's moves:

  • Non-attacking rooks: mirror across the diagonal
  • Domino tiling: mirror placement strategy
  • This works when the game board has natural symmetry

3. Invariants

Some quantity remains constant or follows a pattern:

  • Total stones (in closed systems)
  • Parity (odd/even) of remaining moves
  • Sum modulo some number

4. State Space Search

Model the game as a graph where:

  • Nodes = game states (board configurations)
  • Edges = legal moves
  • Terminal nodes = winning/losing positions

Working backwards from terminal states, you can label every position as W (winning) or L (losing).

Example: Nim with Equal Piles

Setup: Two piles with the same number of stones. Players take turns removing any number of stones from exactly one pile. Taking the last stone wins.

Strategy: The second player wins by mirroring—whenever you take k stones from one pile, they take k from the other pile, maintaining equality. Eventually, you'll be forced to take from the last pile, leaving them with the winning move.

Try It Yourself

Use the sandbox below to explore various game theory puzzles:

  • Adjust initial configurations
  • Play against an optimal bot
  • Discover winning strategies through experimentation

Practice with the linked problems below, or create your own variants to challenge friends.

Mathematical Background

Game theory connects to:

  • Combinatorial game theory: Analysis of sequential games with perfect information
  • Graph theory: Modeling game states as directed graphs
  • Number theory: Nim-values, XOR operations, and modular arithmetic
  • Invariant principles: Quantities preserved under legal moves

These puzzles develop crucial skills in:

  • Strategic thinking and planning ahead
  • Pattern recognition in complex systems
  • Logical deduction and proof
  • Algorithmic reasoning

Whether you're playing to win or analyzing the mathematics behind optimal strategies, these games offer endless opportunities for discovery and learning.

Interactive Sandbox
Experiment with game theory puzzles

Try different starting positions, play against optimal bots, and discover winning strategies for classic combinatorial games.

Open Sandbox
Practice Problems
Test your understanding with these problems
Nim with Equal Piles
JuniorDifficulty: 3/10
Nim with Three Equal Piles
IntermediateDifficulty: 5/10
Rook Race to h8
JuniorDifficulty: 4/10
King's Retreat to a1
IntermediateDifficulty: 5/10
Clock Hand to 6 Game
JuniorDifficulty: 4/10
Non-Intersecting Chords
IntermediateDifficulty: 5/10
7×7 Non-Adjacent Coloring
IntermediateDifficulty: 6/10
Chamomile Petals Game
JuniorDifficulty: 4/10
Two-Chip Linear Chase
IntermediateDifficulty: 5/10
Domino Tiling Game (Cram)
IntermediateDifficulty: 6/10
Non-Attacking Rooks Placement
IntermediateDifficulty: 5/10
Dual-Pile Subtraction Game
IntermediateDifficulty: 6/10
8-Digit Number Divisible by 9
IntermediateDifficulty: 5/10