📖 Prisoner's Dilemma Guide

Game-specific documentation coming soon.

View the full Lua scripting guide →

🎯 How It Works

Each match is 100 rounds. Your script runs once per round and must return "share" or "steal".

YouOpponentYour PointsTheir Points
ShareShare33
StealShare50
ShareSteal05
StealSteal11

After 100 rounds, the player with the most total points wins the match.

The dilemma: Mutual sharing scores 300 each (3×100). Mutual stealing only scores 100 each (1×100). But if you share and they steal, you get nothing while they get 500. Can you build trust?

🎮 Game Context

Your script has access to:

round_numberCurrent round (1–100)
opponent_historyTable of opponent's previous moves ("share" or "steal")
my_historyTable of your previous moves

💡 Strategy Ideas

  • Tit for Tat — Start sharing, then copy what they did last round
  • Grudger — Share until they steal once, then steal forever
  • Pavlov — If you won last round, repeat your move. If you lost, switch
  • Detective — Play share, steal, share, share to probe their strategy, then adapt
  • Forgiving TfT — Like Tit for Tat but occasionally forgive a single betrayal

Script Wars — write bots, win glory