Skip to content
Kudos AI

Game-Playing Agent

Minimax with alpha-beta pruning over a real game tree, plus an equilibrium solver for small normal-form games - optimal play against an adversary, and against a rational one.

Pythonactive

Two related pieces of strategic reasoning in one codebase. The first is a complete adversarial search engine: minimax over a game tree, alpha-beta pruning, depth limiting, and a heuristic evaluation function, instrumented to report how many nodes pruning actually removes so the reader sees the saving rather than being told about it. The second is a solver for small normal-form games that finds pure and mixed-strategy equilibria, applied to the standard cases - the prisoner's dilemma, matching pennies, and coordination games - where the equilibrium and the jointly best outcome come apart. Together they cover the two regimes the articles distinguish: strictly opposed play, where minimax is the whole story, and partly aligned play, where it is not. Implementation is in progress and no source repository has been published yet.

Highlights

  • Alpha-beta pruning instrumented to report nodes visited against plain minimax on the same tree
  • Pure and mixed-strategy equilibrium solver for small normal-form games
  • Prisoner's dilemma, matching pennies, and coordination games worked as test cases
  • Move ordering shown to change how much pruning is achievable

Related articles

6 min readSearch and Games

Adversarial Search and Minimax

How a program plays a game against an opponent who is trying to beat it: the minimax value, why alpha-beta pruning reaches the same answer while examining fewer nodes, and a game tree pruned move by move.

Artificial IntelligenceSearch & PlanningGame Theory
7 min readSearch and Games

Game Theory and Nash Equilibrium

Strategic reasoning when players are not strictly opposed: dominant strategies, the prisoner's dilemma worked from its payoff matrix, Nash equilibrium, Pareto optimality, and why equilibrium and efficiency can conflict.

Game TheoryArtificial IntelligenceMathematics