5D Library › Imperfect-Information Stochastic Games, Bayesian Hand-Reading and Counterfactual Regret Minimisation in Four-Player Tile Dynamics · 中文

Chapter 4. Shanten, Acceptance and the Race: Ignoring Three Players Overstates the Win

Shanten and acceptance

“How many tiles away from a ready hand” is called the shanten number, and it can be computed exactly. A standard winning hand is four sets plus a pair, so the shanten number is determined by how many sets and partial sets the hand can be decomposed into. The computation is a recursive decomposition of each suit’s tile count vector, taking the decomposition with the most sets and then the most partials (Bellman 1957).

Calculation

# Chapter 4. Shanten (distance from a ready hand) and acceptance, by dynamic
# programming over tile counts. Shanten is defined as 2*(4 - melds) - partials
# - has_pair, floored appropriately; the standard recursive decomposition over
#   a suit's count vector gives
# the maximum number of melds and partial sets, and the three suits plus
# honours combine additively subject to the four-meld-plus-one-pair target.
# This program implements that decomposition exactly for the standard shape
# (it does not handle seven pairs or thirteen orphans), then computes
# ACCEPTANCE: the set of tile types that lower shanten, and the number of live
# copies of each. Standard library only.
from functools import lru_cache

SUIT_LEN = 9

def parse(s):
    """'123406789' style string of counts per value, or a hand like '123m' ->
    counts."""
    return tuple(int(c) for c in s)

@lru_cache(maxsize=None)
def suit_best(counts, want_pair):
    """(melds, partials, pair_used) maximising melds then partials for one
    suit."""
    counts = list(counts)
    i = 0
    while i < SUIT_LEN and counts[i] == 0:
        i += 1
    if i == SUIT_LEN:
        return (0, 0, 0)
    best = (-1, -1, 0)

    def rec(idx, c, melds, partials, pair):
        nonlocal best
        while idx < SUIT_LEN and c[idx] == 0:
            idx += 1
        if idx == SUIT_LEN:
            key = (melds, partials, pair)
            if (melds, partials, pair) > best:
                best = key
            return
        # triplet
        if c[idx] >= 3:
            c[idx] -= 3
            rec(idx, c, melds + 1, partials, pair)
            c[idx] += 3
        # run
        if idx + 2 < SUIT_LEN and c[idx] and c[idx + 1] and c[idx + 2]:
            c[idx] -= 1; c[idx + 1] -= 1; c[idx + 2] -= 1
            rec(idx, c, melds + 1, partials, pair)
            c[idx] += 1; c[idx + 1] += 1; c[idx + 2] += 1
        # pair (as the hand's pair, at most once overall - handled by caller)
        if c[idx] >= 2:
            c[idx] -= 2
            rec(idx, c, melds, partials + 1, pair)
            c[idx] += 2
        # partial run: idx, idx+1  and  idx, idx+2
        for step in (1, 2):
            if idx + step < SUIT_LEN and c[idx] and c[idx + step]:
                c[idx] -= 1; c[idx + step] -= 1
                rec(idx, c, melds, partials + 1, pair)
                c[idx] += 1; c[idx + step] += 1
        # drop this tile
        c[idx] -= 1
        rec(idx, c, melds, partials, pair)
        c[idx] += 1

    rec(i, counts, 0, 0, 0)
    return best

def shanten(hand):
    """hand: dict of (suit, value) -> count, suits 0,1,2 numbered and 3
    honours."""
    suits = []
    for s in range(3):
        suits.append(
            tuple(hand.get((s, v), 0) for v in range(1, SUIT_LEN + 1))
        )
    hon = tuple(hand.get((3, v), 0) for v in range(1, 8))
    best = 99
    # try every tile type as the designated pair, plus the no-pair case
    for pair in [None] + [k for k, v in hand.items() if v >= 2]:
        h = dict(hand)
        if pair is not None:
            h[pair] -= 2
        melds = partials = 0
        for s in range(3):
            c = tuple(h.get((s, v), 0) for v in range(1, SUIT_LEN + 1))
            m, p, _ = suit_best(c, False)
            melds += m
            partials += p
        for v in range(1, 8):
            c = h.get((3, v), 0)
            if c >= 3:
                melds += 1
            elif c >= 2:
                partials += 1
        melds = min(melds, 4)
        partials = min(partials, 4 - melds)
        st = 8 - 2 * melds - partials - (1 if pair is not None else 0)
        best = min(best, st)
    return best

def hand_from_text(spec):
    """'123m456p789s11z' -> dict. m,p,s numbered suits; z honours."""
    out = {}
    suit_map = {"m": 0, "p": 1, "s": 2, "z": 3}
    digits = ""
    for ch in spec:
        if ch.isdigit():
            digits += ch
        else:
            s = suit_map[ch]
            for d in digits:
                out[(s, int(d))] = out.get((s, int(d)), 0) + 1
            digits = ""
    return out

def acceptance(hand, visible=None):
    """Tile types that reduce shanten when drawn, with live copies
    remaining."""
    visible = visible or {}
    base = shanten(hand)
    out = []
    for s in range(4):
        for v in range(1, (SUIT_LEN if s < 3 else 7) + 1):
            k = (s, v)
            if hand.get(k, 0) >= 4:
                continue
            h = dict(hand)
            h[k] = h.get(k, 0) + 1
            # a 14-tile hand: discard the worst tile to re-evaluate at 13
            best = 99
            for d, c in list(h.items()):
                if c == 0:
                    continue
                h2 = dict(h)
                h2[d] -= 1
                if h2[d] == 0:
                    del h2[d]
                best = min(best, shanten(h2))
            if best < base:
                live = 4 - hand.get(k, 0) - visible.get(k, 0)
                out.append((k, live, best))
    return base, out

NAMES = {0: "m", 1: "p", 2: "s", 3: "z"}

if __name__ == "__main__":
    tests = [
        ("three runs + two pairs", "123456789m11p22s"),
        ("three runs + pair + two far singles", "123456789m11p25s"),
        ("two runs + pair + scattered", "12345678m11p258s"),
        ("all singles, maximal gaps", "147m258p369s12z"),
        ("six pairs + a single", "1199m1199p119s1z"),
    ]
    print(
        "Shanten counted for the STANDARD shape (four sets plus a pair): 0"
        " means"
    )
    print("ready, one tile from a win. The maximum for this shape is 8.\n")
    print(
        "   hand description                       tiles              shanten"
    )
    for label, spec in tests:
        h = hand_from_text(spec)
        print("   {:36s} {:18s} {:6d}".format(label, spec, shanten(h)))
    print(
        "\n   Note the last row: six pairs plus a single is 3 away from the"
        " standard"
    )
    print(
        "   shape but only 1 away from a seven-pairs hand, which this program"
        " does"
    )
    print(
        "   NOT implement. A shanten calculator that omits the alternative"
        " shapes"
    )
    print(
        "   systematically overstates the distance of pair-heavy hands, and"
        " that is"
    )
    print("   a real limitation of what follows, not a rounding detail.")

    print(
        "\nAcceptance is defined for hands at shanten 1 or more (this program"
        " does"
    )
    print(
        "not score a completed 14-tile hand as -1, so a ready hand shows"
        " none)."
    )
    for spec in ("123456789m11p25s", "12345678m11p258s"):
        h = hand_from_text(spec)
        base, acc = acceptance(h)
        total = sum(max(0, l) for _, l, _ in acc)
        print("\n   {}  (shanten {})".format(spec, base))
        print("   acceptance: {} distinct types, {} live copies"
              .format(len(acc), total))
        for (s, v), live, newst in sorted(acc):
            print("      draw {}{} -> shanten {}   ({} copies live)"
                  .format(v, NAMES[s], newst, live))

    print(
        "\nWhy this matters for the next section. Shanten plus acceptance is"
        " exactly"
    )
    print(
        "the state a Markov model of the race needs: shanten says how many"
        " steps"
    )
    print(
        "remain and acceptance says the per-draw probability of a step. The"
        " next"
    )
    print(
        "programme uses these two numbers and nothing else, which is both its"
    )
    print(
        "strength (it is computable) and its weakness (it ignores hand value,"
        " which"
    )
    print("the next section adds back as a separate term).")
# Shanten counted for the STANDARD shape (four sets plus a pair): 0 means
# ready, one tile from a win. The maximum for this shape is 8.
#
#    hand description                       tiles              shanten
#    three runs + two pairs               123456789m11p22s        0
#    three runs + pair + two far singles  123456789m11p25s        1
#    two runs + pair + scattered          12345678m11p258s        2
#    all singles, maximal gaps            147m258p369s12z         8
#    six pairs + a single                 1199m1199p119s1z        3
#
#    Note the last row: six pairs plus a single is 3 away from the standard
#    shape but only 1 away from a seven-pairs hand, which this program does
#    NOT implement. A shanten calculator that omits the alternative shapes
#    systematically overstates the distance of pair-heavy hands, and that is
#    a real limitation of what follows, not a rounding detail.
#
# Acceptance is defined for hands at shanten 1 or more (this program does
# not score a completed 14-tile hand as -1, so a ready hand shows none).
#
#    123456789m11p25s  (shanten 1)
#    acceptance: 8 distinct types, 28 live copies
#       draw 1p -> shanten 0   (2 copies live)
#       draw 1s -> shanten 0   (4 copies live)
#       draw 2s -> shanten 0   (3 copies live)
#       draw 3s -> shanten 0   (4 copies live)
#       draw 4s -> shanten 0   (4 copies live)
#       draw 5s -> shanten 0   (3 copies live)
#       draw 6s -> shanten 0   (4 copies live)
#       draw 7s -> shanten 0   (4 copies live)
#
#    12345678m11p258s  (shanten 2)
#    acceptance: 13 distinct types, 45 live copies
#       draw 3m -> shanten 1   (3 copies live)
#       draw 6m -> shanten 1   (3 copies live)
#       draw 9m -> shanten 1   (4 copies live)
#       draw 1p -> shanten 1   (2 copies live)
#       draw 1s -> shanten 1   (4 copies live)
#       draw 2s -> shanten 1   (3 copies live)
#       draw 3s -> shanten 1   (4 copies live)
#       draw 4s -> shanten 1   (4 copies live)
#       draw 5s -> shanten 1   (3 copies live)
#       draw 6s -> shanten 1   (4 copies live)
#       draw 7s -> shanten 1   (4 copies live)
#       draw 8s -> shanten 1   (3 copies live)
#       draw 9s -> shanten 1   (4 copies live)
#
# Why this matters for the next section. Shanten plus acceptance is exactly
# the state a Markov model of the race needs: shanten says how many steps
# remain and acceptance says the per-draw probability of a step. The next
# programme uses these two numbers and nothing else, which is both its
# strength (it is computable) and its weakness (it ignores hand value, which
# the next section adds back as a separate term).

Note

A real defect. This book’s program implements only the standard shape (four sets plus a pair), not seven pairs or thirteen orphans. The consequence is visible in the last row of the table: six pairs plus a single is 3 away from the standard shape but only 1 away from a seven-pairs hand. So a shanten calculator that omits the alternative shapes systematically overstates the distance of pair-heavy hands. That is not a rounding detail but a defect that changes conclusions about what to keep, and it constrains every later use of the shanten number in this book.

Acceptance is the set of tile types that lower the shanten number, with their live copies. The program gives two examples: a 1-shanten hand with 8 acceptance types and 28 live copies, and a 2-shanten hand with 13 types and 45 live copies.

Shanten and acceptance together are exactly the state the next section’s race model needs: shanten says how many steps remain, acceptance gives the per-draw probability of a step. That is the model’s strength (it is computable) and its weakness (it contains no hand value, which has to be added back separately).

A hand is a race

Written as an absorbing Markov chain: the state is the remaining shanten distance, each draw advances one step with the probability acceptance gives, and once at 0 the hand completes with the probability the live winning tiles give.

Calculation

# Chapter 4. The hand as a race, and why a one-player race model is badly
# wrong. State = shanten distance; each own draw advances with probability set
# by the acceptance count (p04) over the unseen pool (p02). Once ready, the
# player wins by drawing or claiming a winning tile. The program first
# computes this WITHOUT competing risk, then adds the hazard that one of the
# three opponents ends the hand first, and compares. The gap between the two
# is the point of the chapter: ignoring the other three players inflates the
# win probability several-fold, which is the commonest error in informal
# analysis of this game. Illustrative parameters; standard library only.
import math

TURNS = 18
POOL = 70

def p_adv(acc):
    return min(1.0, acc / float(POOL))

def p_hit(win_tiles):
    """Per-turn chance of completing: own draw plus roughly one claimable
    discard."""
    return min(1.0, 1.9 * win_tiles / float(POOL))

def simulate(shanten, acc, win_tiles, opp_hazard, turns=TURNS):
    """Exact forward recursion. Returns (P(win), P(someone else ends it),
    P(exhaustive draw)). opp_hazard = per-turn probability the hand ends
    through
    an opponent (their win, by draw or by someone dealing in)."""
    # state: (distance remaining); distance 0 means ready
    state = {shanten: 1.0}
    p_win = p_opp = 0.0
    for t in range(turns):
        nxt = {}
        for d, w in state.items():
            # the opponents may end the hand first, before this player's
            # action
            p_opp += w * opp_hazard
            w2 = w * (1.0 - opp_hazard)
            if d == 0:
                h = p_hit(win_tiles)
                p_win += w2 * h
                nxt[0] = nxt.get(0, 0.0) + w2 * (1 - h)
            else:
                a = p_adv(acc)
                nxt[d - 1] = nxt.get(d - 1, 0.0) + w2 * a
                nxt[d] = nxt.get(d, 0.0) + w2 * (1 - a)
        state = nxt
    return p_win, p_opp, math.fsum(state.values())

if __name__ == "__main__":
    print(
        "One player's race, {} own draws, unseen pool {} tiles.\n".format(
            TURNS, POOL
        )
    )
    ACC = 28

    print(
        "A. WITHOUT competing risk (the naive model: no other players exist):"
    )
    print("   start shanten   P(win)   P(wall exhausts)")
    naive = {}
    for s in (1, 2, 3, 4):
        pw, po, pe = simulate(s, ACC, 8, 0.0)
        naive[s] = pw
        print("   {:13d} {:8.3f} {:17.3f}".format(s, pw, pe))

    print(
        "\nB. WITH competing risk. Three opponents, each ending the hand with"
    )
    print(
        "probability about 0.016 per turn, so a combined hazard near 0.047:"
    )
    print("   start     P(win)   P(an opponent   P(wall      naive / real")
    print("   shanten            ends it)        exhausts)")
    for s in (1, 2, 3, 4):
        pw, po, pe = simulate(s, ACC, 8, 0.047)
        print("   {:7d} {:10.3f} {:12.3f} {:13.3f} {:13.2f}"
              .format(s, pw, po, pe, naive[s] / pw if pw else float("nan")))

    f1 = naive[1] / simulate(1, ACC, 8, 0.047)[0]
    f4 = naive[4] / simulate(4, ACC, 8, 0.047)[0]
    print(
        "\n   The naive model overstates the win probability by a factor of"
        " {:.2f} at".format(f1)
    )
    print(
        "   1-shanten rising to {:.2f} at 4-shanten: the error GROWS with"
        " distance,".format(f4)
    )
    print(
        "   because a hand far from ready spends more turns exposed to the"
        " hazard."
    )
    print(
        "   That direction is the structural lesson, and it means any"
        " comparison of"
    )
    print(
        "   a fast cheap hand against a slow valuable one is biased toward"
        " the slow"
    )
    print("   hand if competing risk is left out.")

    print(
        "\n   A calibration warning, because the absolute numbers above are"
        " too high."
    )
    print(
        "   In recorded play a player wins roughly a fifth of hands, and"
        " roughly"
    )
    print(
        "   half of the hands in which they declare a ready hand with a good"
        " wait."
    )
    print(
        "   This model gives {:.2f} at 1-shanten even with the hazard, for"
        " three".format(simulate(1, ACC, 8, 0.047)[0])
    )
    print(
        "   reasons: it starts every hand already at 1-shanten, whereas most"
        " hands"
    )
    print(
        "   never get that close; it lets the player draw freely for all {}"
        " turns;".format(TURNS)
    )
    print(
        "   and its completion rate per turn is generous. So the model is"
        " COMPARATIVE"
    )
    print("   only - it ranks options against each other - and its absolute")
    print(
        "   probabilities should not be quoted. Section C shows how sensitive"
        " even"
    )
    print(
        "   the comparison is to the one parameter that is hardest to pin"
        " down."
    )

    print("\nC. Sensitivity to the opponents' hazard, 1-shanten start:")
    print("   combined hazard per turn   P(win)   P(opponent ends it)")
    for hz in (0.00, 0.02, 0.047, 0.07, 0.10):
        pw, po, pe = simulate(1, ACC, 8, hz)
        print("   {:24.3f} {:8.3f} {:20.3f}".format(hz, pw, po))

    print(
        "\nD. The decision that actually arises: at 1-shanten, keep a wide"
        " cheap"
    )
    print(
        "shape or switch to a narrow valuable one? Hazard 0.047 throughout."
    )
    print("   option                acceptance  win tiles  P(win)  value"
          "  E[points]")
    rows = []
    for label, acc1, wint, value in (("wide and cheap", 28, 8, 2000),
                                     ("wide and medium", 24, 8, 3900),
                                     ("narrow and valuable", 12, 4, 8000),
                                     ("narrow and huge", 8, 2, 12000)):
        pw, po, pe = simulate(1, acc1, wint, 0.047)
        rows.append((label, pw, value, pw * value))
        print("   {:21s} {:10d} {:10d} {:7.3f} {:6d} {:10.0f}"
              .format(label, acc1, wint, pw, value, pw * value))

    best = max(rows, key=lambda r: r[3])
    widest = rows[0]
    print("\n   The highest expected points is '{}' at {:.0f},"
          .format(best[0], best[3]))
    print("   while the highest win probability is '{}' at {:.3f}."
          .format(widest[0], widest[1]))
    print("   The two rankings disagree, which is")
    print(
        "   why a probability model is not yet a strategy: the quantity to"
        " maximise"
    )
    print("   is points.")

    print(
        "\nE. And the term still missing: the cost of dealing in while"
        " pushing."
    )
    print(
        "   E[points] = P(win) x value - q x 5200, for the deal-in"
        " probability q:"
    )
    print("   option                       q = 0      q = 0.08   q = 0.15")
    for label, pw, value, ev in rows:
        print("   {:28s} {:9.0f} {:11.0f} {:10.0f}"
              .format(label, ev, ev - 0.08 * 5200, ev - 0.15 * 5200))
    neg = [r[0] for r in rows if r[3] - 0.15 * 5200 < 0]
    print("\n   At q = 0.15, {} of the four options are negative: {}."
          .format(len(neg), ", ".join(neg) if neg else "none"))
    print(
        "   Chapter 5 treats when to stop pushing as an optimal stopping"
        " problem,"
    )
    print(
        "   and these numbers are why it cannot be settled by win probability"
        " alone."
    )
# One player's race, 18 own draws, unseen pool 70 tiles.
#
# A. WITHOUT competing risk (the naive model: no other players exist):
#    start shanten   P(win)   P(wall exhausts)
#                1    0.973             0.027
#                2    0.943             0.057
#                3    0.886             0.114
#                4    0.790             0.210
#
# B. WITH competing risk. Three opponents, each ending the hand with
# probability about 0.016 per turn, so a combined hazard near 0.047:
#    start     P(win)   P(an opponent   P(wall      naive / real
#    shanten            ends it)        exhausts)
#          1      0.716        0.272         0.011          1.36
#          2      0.627        0.350         0.024          1.51
#          3      0.536        0.416         0.048          1.65
#          4      0.441        0.470         0.088          1.79
#
#    The naive model overstates the win probability by a factor of 1.36 at
#    1-shanten rising to 1.79 at 4-shanten: the error GROWS with distance,
#    because a hand far from ready spends more turns exposed to the hazard.
#    That direction is the structural lesson, and it means any comparison of
#    a fast cheap hand against a slow valuable one is biased toward the slow
#    hand if competing risk is left out.
#
#    A calibration warning, because the absolute numbers above are too high.
#    In recorded play a player wins roughly a fifth of hands, and roughly
#    half of the hands in which they declare a ready hand with a good wait.
#    This model gives 0.72 at 1-shanten even with the hazard, for three
#    reasons: it starts every hand already at 1-shanten, whereas most hands
#    never get that close; it lets the player draw freely for all 18 turns;
#    and its completion rate per turn is generous. So the model is COMPARATIVE
#    only - it ranks options against each other - and its absolute
#    probabilities should not be quoted. Section C shows how sensitive even
#    the comparison is to the one parameter that is hardest to pin down.
#
# C. Sensitivity to the opponents' hazard, 1-shanten start:
#    combined hazard per turn   P(win)   P(opponent ends it)
#                       0.000    0.973                0.000
#                       0.020    0.853                0.129
#                       0.047    0.716                0.272
#                       0.070    0.620                0.373
#                       0.100    0.515                0.481
#
# D. The decision that actually arises: at 1-shanten, keep a wide cheap
# shape or switch to a narrow valuable one? Hazard 0.047 throughout.
#    option                acceptance  win tiles  P(win)  value  E[points]
#    wide and cheap                28          8   0.716   2000       1433
#    wide and medium               24          8   0.701   3900       2735
#    narrow and valuable           12          4   0.454   8000       3628
#    narrow and huge                8          2   0.242  12000       2907
#
#    The highest expected points is 'narrow and valuable' at 3628,
#    while the highest win probability is 'wide and cheap' at 0.716.
#    The two rankings disagree, which is
#    why a probability model is not yet a strategy: the quantity to maximise
#    is points.
#
# E. And the term still missing: the cost of dealing in while pushing.
#    E[points] = P(win) x value - q x 5200, for the deal-in probability q:
#    option                       q = 0      q = 0.08   q = 0.15
#    wide and cheap                    1433        1017        653
#    wide and medium                   2735        2319       1955
#    narrow and valuable               3628        3212       2848
#    narrow and huge                   2907        2491       2127
#
#    At q = 0.15, 0 of the four options are negative: none.
#    Chapter 5 treats when to stop pushing as an optimal stopping problem,
#    and these numbers are why it cannot be settled by win probability alone.

Section A is the naive model, which pretends the other three players do not exist. Section B adds competing risk: the hazard that any of the three ends the hand first.

This is the book’s most important correction. Comparing the two:

  • starting at 1-shanten: naive 0.973, with competing risk 0.716, overstated by a factor of 1.36;
  • starting at 4-shanten: naive 0.790, with competing risk 0.441, overstated by 1.79.

The error grows with distance, because a hand far from ready spends more turns exposed to the hazard. That direction is structural, and its consequence is:

a model that ignores competing risk is systematically biased toward slow, valuable hands.

Any argument of the form “this hand is worth building up” that uses a win probability without competing risk is already biased, and biased in the direction that supports the argument.

Left: win probability against starting shanten; the upper curve is the naive model that ignores the other three players, the lower curve includes competing risk. Right: their ratio against shanten, rising from 1.36 to 1.79 — the error grows with distance.

Note

A calibration warning, which must be read. The absolute numbers above are too high. In recorded play a player wins roughly a fifth of hands. This model still gives 0.716 for a 1-shanten start even with the hazard, for three reasons: it starts every hand at 1-shanten, whereas most hands never get that close; it lets the player draw freely for all 18 turns; and its per-turn completion rate is generous. So this model is comparative only — it is for ranking options against each other — and its absolute probabilities must not be quoted. Section C shows how sensitive even the comparison is to the parameter that is hardest to pin down, the opponents’ hazard.

Probability is not strategy

Section D gives the decision that actually arises: at 1-shanten, keep a wide cheap shape or switch to a narrow valuable one?

The result: the highest expected points is “narrow and valuable” (3628) while the highest win probability is “wide and cheap” (0.716). The two rankings disagree. That is why a probability model is not yet a strategy — the quantity to maximise is points.

Section E adds one more term: the cost of dealing in while pushing to the end. At a deal-in probability of 0.15, some of the four options turn negative. Chapter 5 writes “when to stop pushing” as an optimal stopping problem, and these figures are the reason it cannot be answered by win probability alone.

Hypothesis · not established

The author’s hypothesis (not established): in a duplicate design against a fixed opponent pool, a policy that chooses using win-probability estimates with competing risk beats one that uses estimates without it, and the difference comes mainly from the latter over-pursuing valuable hands when far from ready. What would show it to be wrong: a 95 % confidence interval for the comparison that includes zero; and if the difference exists but is not larger in the far-from-ready stratum when stratified by starting shanten, the mechanism part of the hypothesis is wrong.

Summary

The shanten number can be computed exactly by recursive decomposition of tile count vectors, and this book’s program implements only the standard shape, so it systematically overstates the distance of pair-heavy hands — a real defect that changes conclusions. Shanten and acceptance together give the state of the race model. The chapter’s main correction is that a naive race model ignoring the other three players overstates the win probability by 1.36-fold at 1-shanten and 1.79-fold at 4-shanten, with the error growing with distance, so it is systematically biased toward slow valuable hands. The model’s absolute probabilities are too high and must not be quoted; it is for ranking options only. Finally, the option with the highest expected points differs from the one with the highest win probability (narrow and valuable against wide and cheap), which shows that a probability model is not yet a strategy; and once the deal-in cost is added, some options turn negative, which is the reason Chapter 5 writes folding as optimal stopping.

References

Bellman, Richard. 1957. Dynamic Programming. Princeton: Princeton University Press.

Fan, Y. (2026). Imperfect-Information Stochastic Games, Bayesian Hand-Reading and Counterfactual Regret Minimisation in Four-Player Tile Dynamics: From Markov Transitions of the Tile Pool and the Optimal Stopping of Defensive Folding to Kelly Allocation in a Multiplayer Game, with a Textual Examination of the Orthodox and the Unorthodox in the Classical Military Writers [四人不完全信息随机博弈、贝叶斯读牌与反事实遗憾最小化] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24020464 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).