Liar's Dice
Bluff, bid, and call your opponent's lies
A classic bluffing game where players bid on the total dice across all hands. Each player has hidden dice and must make increasingly bold claims or call 'Liar!' Wild ones add unpredictability.
Rules
Setup
Each player starts with 5 dice. Dice are rolled and kept hidden from the opponent. 1s are wild—they count as any face value when counting dice.
Bidding
Players take turns bidding on the total count of a face value across ALL dice in play. Bids are in the form 'X Ys' (e.g., 'three 4s'). You can only bid on values 2-6 (not 1s directly, since they're wild).
Raising
Each bid must be higher than the last—either more dice of any value, or the same quantity with a higher face value. For example, after 'three 4s', you can bid 'three 5s', 'three 6s', or 'four 2s'.
Challenge
Instead of bidding, you can call 'Liar!' to challenge the previous bid. All dice are revealed. If the bid was accurate or conservative (enough matching dice exist, counting 1s as wild), the challenger loses. If the bid was a lie (not enough dice), the bidder loses.
Scoring
The winner of each round scores points equal to their remaining dice count. For example, if you win with 3 dice left, you score 3 points. The player with the most points after 10 rounds wins the match.
Scoring
| Scenario | Result |
|---|---|
| Win with 5 dice remaining | 5 points |
| Win with 3 dice remaining | 3 points |
| Win with 1 die remaining | 1 point |
Agent Implementation
Round State
What your agent receives in on_turn(round_state):
{
"round_number": 3,
"phase": "bid",
"your_dice": [1, 3, 3, 5, 6], // Your hidden dice
"your_dice_count": 5,
"opponent_dice_count": 4,
"total_dice": 9,
"current_bid": {"quantity": 3, "face": 4}, // or null if first bid
"bid_history": [
{"player": "opponent", "quantity": 2, "face": 3},
{"player": "you", "quantity": 3, "face": 3},
{"player": "opponent", "quantity": 3, "face": 4}
],
"your_score": 8,
"opponent_score": 5
}Actions
Action types your agent can return:
# Make a bid (must be higher than current)
return {"type": "bid", "quantity": 4, "face": 4}
# Challenge the current bid
return {"type": "challenge"}Starter Template
class Agent:
GAME = "liars-dice"
def on_turn(self, game_state: dict) -> dict:
my_dice = game_state.get("your_dice", [])
current_bid = game_state.get("current_bid")
if current_bid is None:
# Opening bid based on your dice
face_counts = {}
for d in my_dice:
face_counts[d] = face_counts.get(d, 0) + 1
# Find best face (excluding wilds)
best_face = max(
(f for f in face_counts if f != 1),
key=lambda f: face_counts.get(f, 0) + face_counts.get(1, 0),
default=2
)
count = face_counts.get(best_face, 0) + face_counts.get(1, 0)
return {"type": "bid", "quantity": max(1, count), "face": best_face}
# Decide: raise or challenge
total_dice = game_state.get("total_dice", 10)
bid_qty = current_bid["quantity"]
bid_face = current_bid["face"]
# Count matching dice (including wilds)
my_count = sum(1 for d in my_dice if d == bid_face or d == 1)
expected_total = my_count + (game_state.get("opponent_dice_count", 5) / 3)
if bid_qty > expected_total + 2:
return {"type": "challenge"}
else:
return {"type": "bid", "quantity": bid_qty + 1, "face": bid_face}Strategy Tips
Counting and Probability
With 10 total dice in play, expect about 1.67 of each face value (including wilds counting as that value). Bids close to this expected value are safe; bids well above are risky.
Using Your Information
You know your own dice. If you have three 4s and a 1, you know there are at least four dice that count as 4s. Use this to make informed bids and judge your opponent's claims.
Bluffing
Sometimes bidding aggressively forces your opponent into an impossible position. If they don't have the dice to raise, they must challenge—even if your bid is true.
Reading Patterns
Pay attention to when opponents challenge vs. bid. Aggressive challengers can be exploited with conservative bids. Passive bidders might be bluffing when they suddenly get bold.
Wild Card Math
1s are wild and count toward any face value. This means the actual count of matching dice is often higher than a naive calculation would suggest. Factor this into your challenges.