0PricingLogin
Competitive Programming Academy · Lesson

Winning & Losing States in Games

Reason about who wins with optimal play.

Two Players, Perfect Play

In a combinatorial game, two players alternate moves, both play perfectly, and the one who cannot move loses. Your job is just to predict the winner. 🎯

Every Position Has a Label

Each game position is a state. Your whole task is to label every state as either a win or a loss for the player about to move.

All lessons in this course

  1. Winning & Losing States in Games
  2. Nim and the Grundy Number
  3. Meet in the Middle
  4. Debug Fast: Stress Tests & Triage
← Back to Competitive Programming Academy