Bot Infrastructure
Working paperGuan Dan Online · Bot Infrastructure

Strategist: an interpretable explicit-policy agent for Guan Dan

Abstract. Guan Dan has an enormous legal action space, yet strong play concentrates in a small decision space — pass, a minimum beater, a decomposition-preserving alternative, or a control exception. Rather than learn that space from sparse self-play reward, the Strategist is a from-scratch, fully interpretable policy built on three pillars: a power-graded hand decomposition under an all-cost value model, an explicit per-state decision machine, and a layered belief engine that separates what is logically impossible from what is merely unlikely. It carries no neural dependency, every move traces to an explicit valuation of control, material, and tribute, and it is measured by seat-balanced, whole-game matches against the published DanZero line.

Back to Arena
Doctrine: backend/bots/STRATEGY.md

Code and checkpoints are not yet public — the policy and its weights are still under active optimization. This page documents the design and reports current measurements.

1

Introduction

The game is won by going out first so the team advances past Ace. Everything reduces to two currencies: tempo — emptying the hand in few plays — and control — holding the lead and dictating the next trick. Every card and combo is valued by how well it serves those two.

Deep-RL agents learn this implicitly from reward, which spends enormous compute on dominated legal actions and produces a policy that cannot be inspected. We take the opposite stance: encode the structure that is known — legality, decomposition, hard public facts — and reserve learning for the residual judgments that genuinely need it. The result is interpretable by construction.

2

Background & related agents

The Strategist is developed against a ladder of reference agents (the full catalog, with live tournament results, is on the Arena page). Each is a measuring stick rather than a dependency.

Super Rules (heuristic baseline)
Hand-authored, no lookahead

The skill floor: full played-card tracking, behavioral inference, explicit bomb-inventory management, and a precision endgame search. The reference for how far disciplined classical rules reach before learning is required.

DanZero (DMC)
Deep RL — Deep Monte-Carlo

The released DanZero value network, run as-is: a 567-dimensional state encoder feeding a published Q-network trained by Deep Monte-Carlo over distributed self-play. The strongest public checkpoint we could obtain and the base for the variants below — and the Strategist's primary benchmark opponent.

Read the paper · arXiv:2210.17087
DanZero+ (PPO)
DMC + PPO refinement

The published successor adds a policy-based (PPO) refinement stage on top of the DMC value network, reported to surpass DMC alone. Its checkpoint was never released, so we document it as existing work but cannot run or benchmark it.

Read the paper · arXiv:2312.02561
DanZero Augmented
DMC + hand-authored restrictions

DanZero (DMC) with our own corrective overrides — never beat your partner with aces/rank-cards/bombs, prefer an optimal non-bomb play over spending a bomb, lead the lowest combo of the best decomposition, and apply belief-driven endgame discipline. Enough to outrank the raw network.

3

Hand decomposition & the all-cost value model

Before a hand can be valued it must be partitioned into combo categories, and the partition is itself a decision: choose the one that maximizes total hand power.

Only bombs are positive

Every non-bomb card is a liability you must eventually shed, so it carries a COST that shrinks toward zero as the combo becomes harder to beat. Hand strength = Σ bomb value − Σ non-bomb cost, so the strongest residual hand is the one that keeps bombs and sheds the deadest cards.

Decomposition is an optimization

A hand is partitioned into singles, pairs, triples, full houses, straights, tubes, plates, and bombs — but not by a fixed parse. We grade several candidate decompositions and keep the power-maximal one, never the naive minimum-plays partition (which will dissolve a bomb to save a play).

Tempo and control

Two currencies decide every play. TEMPO is emptying the hand in few plays; CONTROL is holding the lead and dictating the next trick's shape. A bomb is pure control, a long straight is pure tempo, a lone low single serves neither.

Strength
strength(hand) = Σ bomb_value(c) − Σ non_bomb_cost(c)

ΔPower — the change in residual strength a play produces — becomes a magnitude signal (how much liability a play sheds), not a sign test. Play/pass and control decisions live in the per-state doctrine, not in the grade.

4

The explicit decision machine

Every decision is classified into one state, each with its own doctrine. Candidate plays are then chosen by residual comparison — leading, beating, and overtaking all reduce to "pick the candidate that leaves the best residual hand," gated by control.

LEADING

We hold the table. Open with the lowest member of the best decomposition, conserving higher combos as control reserve; tail-exit and partner-feed leads when the residual supports them.

FOLLOW_PARTNER

Our partner controls the trick. Default to passing so they keep the lead, overtaking only when the residual gain clears a fracture/safety threshold — never burning our partner's control for a marginal shed.

BEAT_ENEMY

An opponent controls the trick. Choose pass / minimum beater / decomposition-preserving beater / control play, gated by belief: contest when the beat is provably safe or denies a low opponent, fold when it fractures our hand.

BLOCK / FORCED_BOMB

Special cases: block a player about to go out, or spend a bomb when the situation forces it. Each is stamped into the play's provenance so a decision can be traced after the fact.

5

Belief: separating impossible from unlikely

Strength is relative: a combo is only as good as the chance no one beats it. The belief engine is layered so that hard facts (logically certain) are never overridden by soft reads (behavioral, probabilistic). This is the part of the system most directly reused from the published-agent work and the most reusable on its own.

Hard public accounting

There is no stock and no hidden discard in Guan Dan: the union of the three hidden hands is exactly the unseen two-deck pool. Removing our cards and every played card yields hard upper bounds — which bombs and endgame shapes are even possible for each hidden player.

Tribute deductions

A paid tribute is, by rule, the giver's single highest non-wild card. That pins the card to the recipient and imposes a hard rank ceiling on the giver (they held nothing higher at hand start). The return card is symmetric. Precision-first: an uncertain deduction is simply omitted.

Conditioned beat probabilities

Above the hard layer, two per-opponent questions: P(this player can beat the combo) and P(they hold a slower combo of a beating shape they would want to shed). These condition the state-machine's contest/fold thresholds.

Sampled & learned belief

Weighted determinized hand sampling turns the soft reads into concrete worlds for keep-lead and win-out gating. A small learned calibrator (Figure 2) fills the genuinely uncertain matrix cells the hard layer leaves open — clamped so it never contradicts a proven fact.

How belief evolves over a hand

Belief is not a single guess — it is a matrix over (combo shape × rank) for every hidden player, and it tightens with every card the table reveals. Two things happen as a hand unfolds. Options are eliminated: a rank plays out, a tribute caps a player's ceiling, or a pass proves they cannot beat a combo — and those cells snap to logically impossible. And confidence shifts: ruling out the high cards a player doesn't hold raises the odds they are sitting on the low ones, so the surviving cells warm or cool. Hard facts clamp; the learned calibrator only colours the cells no deduction can settle.

Belief over one hidden player · evolving
shape \ rank
7
9
10
J
Q
K
A
2
Single
58
57
57
56
55
55
54
53
Pair
50
49
49
48
48
47
46
46
Triple
36
36
35
35
34
34
33
33
Straight
32
32
31
31
30
30
30
29
Bomb
16
16
16
15
15
15
15
15
t1/5Deal — public accounting only

Only card counts constrain the three hidden hands. Everything else is open.

unlikely likely eliminated
Figure 1. One hidden player's belief matrix tightening over a hand (illustrative). Cells snap to eliminated as ranks play out and a tribute caps the ceiling, while confidence on the surviving shapes rises and falls.
Learned calibrated belief matrix
Belief-Matrix Calibratorstrategist_v2 self-play

A small MLP that scores every cell of an opponent's belief matrix — “can this hidden player play a given combo at a given rank right now?” Hard deductions (pins, exclusions, ceilings) clamp the cells they prove; the calibrator fills the genuinely uncertain cells in between with a probability trained on self-play ground truth. One shared forward pass scores the whole matrix.

Train loss
BCE
Val loss
best —
Val AUC
acc 0%
Calib. ECE
brier —
training cells · feature dim · positive rate 0%
Hard facts sound — 0 violations across — clamped cells
Sample — P(opponent can play combo·rank) ×100, fresh random deal
No trained calibrator available.
Figure 2. The learned belief-cell calibrator (live, self-play). Each cell is P(a hidden player can play a given combo at a given rank); hard deductions clamp the cells they prove, and the network fills the uncertain remainder. The validator asserts a calibrated cell never contradicts a proven fact.
Full-Game Matchups
Whole races to Ace with real tribute — game winrate, in-game hand winrate, average placement, and final level lead, from the row bot's perspective.
Loading matchups…
Figure 3. Head-to-head whole games (race to Ace, real tribute) between the house bots. Game winrate is the metric that matters; hand winrate, placement and final level lead show how it was won.
6

Tribute as information and optimization

Tribute is both a constraint and a signal. Because the paid card is forced to be the giver's highest, it reveals a hard rank ceiling on that player for the rest of the hand — folded directly into the belief layer. The return is treated as an optimization in its own right: among the engine-legal candidates, the Strategist returns the card that leaves the strongest remaining decomposition, rather than a fixed "lowest card" heuristic.

7

Evaluation against the DanZero line

The Strategist's primary yardstick is the published DanZero line. We run the released DanZero (DMC) value network as a fixed opponent, and DanZero Augmented — the same network with our corrective overrides — as the strongest DanZero-line player on the ladder. DanZero+ (PPO) is reported to surpass DMC, but its weights were never released — so it appears here as existing work only; we cannot run or benchmark it.

The headline number is whole-game outcome. We play full race-to-Ace games — proper tribute resolution through the bots' own choices, every hand played to completion — and the run is seat-balanced: the Strategist occupies each seat-pair in half the games, so neither side is advantaged by seating. Because Guan Dan is a 2v2 partnership game, we report two metrics: the game win rate (the outcome that actually matters) and, as a finer-grained per-hand signal, the net level change. Each hand, the team with the first player out advances by the standard rule — 1st+2nd is +3 levels, 1st+3rd is +2, 1st+4th is +1 — and the other team gains nothing; we score that as the Strategist team's gain minus the opponents', so a hand is +1/+2/+3 when the Strategist wins it and −1/−2/−3 when the opponents do (range −3…+3, never 0). This deliberately rewards taking first place: a 1st+4th finish (+1) beats a 2nd+3rd one (−1), which a raw finishing-position margin would wrongly call a tie. Both metrics carry 95% confidence intervals over the independent unit (the game), since hands within a game are correlated.

Current — strategist_v2 vs the DanZero line · 100 full games each
vs DanZero Augmentedstrongest DanZero-line opponent
99–199.0% win rate · 95% CI [94.6%, 99.8%]
net level change +1.74/hand [+1.59, +1.90]
vs DanZero (DMC)released network, run as-is
100–0100% win rate · 95% CI [96.3%, 100%]
net level change +1.70/hand [+1.56, +1.83]

The Strategist sweeps the raw DanZero network 100–0 and still beats DanZero Augmented — the same network plus hand-authored corrective overrides — 99–1, so the result is not an artifact of a weak baseline. It takes first in roughly three of every four hands, and the +1.7-level average means those wins are typically the high-value kind (a well-placed partner, not a bare 1st+4th). Win rate is whole-game outcome; net level change is the per-hand signal. A learned-belief variant is in development and gated the same way; self-play A/B is a secondary check against overfitting to a single adversary.

Belief features are judged by the vs-DanZero result, not the mirror match. Live standings and the full roster are on the Arena page.

8

Limitations & future work

  • Hand-set coefficients. The valuation weights are tuned by self-play but remain hand-set; the goal is to derive them end-to-end.
  • Learned value head. An experimental variant replaces the final valuation with a one-ply learned value net, aiming to keep the interpretable policy while adding a learned sense of position.
  • Determinized search. Belief-sampled search over the policy is retained as scaffolding for a future fast learned leaf evaluator; the current hand-crafted rollouts are noise-dominated.