Game Theory

Liar's Dice

Game engine with tournament-winning agent that discovered optimal play through 32.4 million competitive rounds.

Overview

A complete Liar’s Dice game engine featuring a deterministic agent that achieved optimal play through extensive testing. This is the first in a series where I use AI to play games and see what works and what doesn’t.

The Challenge

Liar’s Dice is a game of probabilistic reasoning and deception. Players make bids about the total dice showing a certain face across all players’ hidden dice. You can either raise the bid or call the previous player’s bluff. The question: can we find an optimal strategy?

Approach

My initial versions used GPT-class models via LM Studio, but this game turned out to be much simpler—requiring only a deterministic agent to solve. I experimented with an adaptive agent that dynamically changes its call and raise thresholds, hoping it would better exploit weaker archetypes. However, it still underperformed against the optimal agent.

Results

The tournament-validated optimal strategy achieved:

  • 56.5% average win rate across all configurations
  • Beats 77 of 80 opponent configurations tested
  • Validated across 32.4 million competitive rounds

Key Insight

For future games, minimizing LLM reliance is key—testing with an LLM is either expensive or slow. Delegating tasks to deterministic sub-agents where possible will be critical for tackling more complicated games.

Highlights

  • Tournament-validated optimal strategy with 56.5% average win rate
  • Beats 77 of 80 opponent configurations tested
  • Five distinct AI personality archetypes for varied gameplay
  • Probabilistic decision engine using binomial statistics

Interested in learning more?

Check out my other projects or get in touch.