5D Library › Imperfect-Information Stochastic Games, Bayesian Hand-Reading and Counterfactual Regret Minimisation in Four-Player Tile Dynamics · 中文
Preface: The Least Agreeable Class of Game
Note
This is not a gambling guide; read this first. This book studies the mathematical structure of a class of games: four-player, imperfect-information, stochastic, and negative-sum in money. It does not advise anyone to stake money on the games it discusses. A program in the last section of Chapter 8 computes that for a player with a plausible edge, playing one session of 60 hands a week for a year (3,120 hands; p16), a fee of 0.010 buy-ins a hand leaves an expected year of +8.6 buy-ins while 36 % of such players still finish down; and that with no edge, any fee at all makes the expectation negative, which no money-management rule changes. Gambling can cause serious financial and personal harm and can become compulsive (Calado and Griffiths 2016; Potenza et al. 2019). Anyone who finds that they are playing more than they intended, staking more than they can afford, or chasing losses should treat that as the signal it is and seek help from a qualified service in their own country. Laws on gambling differ between jurisdictions, and readers must establish the law where they are.
The book’s position is that this game is worth studying as a game, and that studying it does not require betting on it.
A four-person table assembles several of the most awkward features in game theory. The information is incomplete: each player sees their own tiles and every discard, and not the other three hands or the wall. The process is stochastic: dealing and drawing are sampling. There are four participants rather than two, which matters far more than it sounds — every elegant result for two-player zero-sum games, from the minimax theorem to the convergence guarantees of solvers, fails once there are more than two. And in money it is negative-sum: a table fee, rake or commission ensures the four of them lose money in aggregate, even where their points are zero-sum.
This book writes those features as mathematics and then tests the popular reasoning about this game segment by segment. Like the other 5D Library books it falsifies before it sets bounds, and it reports negative results as they are — including the places where it set out to show something and failed.
What is in this book
Chapter 1 computes the scale of the game and shows why enumerating information sets is a category error rather than an engineering problem. Chapter 2 writes the tile pool as hypergeometric inference and reaches a result opposite in direction to common sense. Chapter 3 derives the “suji” heuristic as a Bayesian consequence rather than a statistical regularity. Chapter 4 computes shanten and acceptance by dynamic programming and writes a hand as a race under competing risk, reaching the book’s most important correction. Chapter 5 writes folding as optimal stopping. Chapter 6 first verifies counterfactual regret minimisation on a two-player zero-sum game, then reports two negative results on a three-player game, and then handles mixed strategies and bankroll — it is the chapter about solving the game and about money. Chapter 7 reads the Sunzi’s “solid and empty” and “orthodox and unorthodox” beside Clausewitz. Chapter 8 gives a four-step checklist and a pre-registered duplicate-design policy comparison.
This book sits next to several in the 5D Library; where they overlap it reviews briefly and does not repeat their programs. Volume 19 covered non-ergodicity and the Kelly criterion (whose framework Chapter 6 adopts); Volume 26 covered probability calibration (Chapter 3); Volumes 27 and 50 covered mechanism design (Chapter 6); Volume 32 covered algorithmic game theory and the price of anarchy (Chapter 6); Volume 33 covered pre-registration, power and decision rules (used in Chapter 8); Volume 35 covered evolutionary games and reciprocity (Chapter 6); Volume 37 covered discrete cyclical networks and occupancy entropy (Chapter 2); Volume 40 covered tail dependence and barbell allocation (Chapter 6); Volume 42 covered Bayesian search and optimal stopping (used in Chapter 5); Volume 45 covered information asymmetry in the order book (Chapter 3); and Volumes 53 and 54 covered structural identifiability and estimator bias (whose methods Chapters 2 and 6 reuse).
Claims corrected after checking
- Enumerating information sets is infeasible, and not because of storage. There are distinct 13-tile multisets; an upper bound on the configurations of the other three hands at a player’s first discard is about ; their product is about bytes (Chapter 1, program p01). The observable universe holds about atoms, so this is not “a big disk is needed” but a methodological category error. Every method discussed in Chapter 6 runs on an abstraction.
- Counting acceptance tiles overstates wide waits early in the hand. The ratio of completion probability for a two-sided against a one-sided wait is 1.94 with two draws left (close to the 2.0 that counting live tiles predicts) and falls to 1.38 with sixteen draws left, because both waits have time to be hit (Chapter 2, program p02). The direction is easy to invert: few draws remaining means late in the hand. So estimating completion in proportion to acceptance count is accurate late and overstates wide waits early.
- The hypergeometric calculation is optimistic for contested tiles. Treating the 73 unseen tiles as a wall ignores that 39 of them are in opponents’ hands — and an opponent often holds a tile precisely because it is useful to them. This bites hardest on the tiles a player most wants (Chapter 2).
- Suji is a furiten deduction, not a statistical regularity. Under this book’s illustrative prior, after the opponent has discarded a 4 the deal-in probability for a 1 falls from 0.480 to 0.133, about 3.6 times safer — not safe. The residual risk is concentrated in pair and three-sided waits (Chapter 3, program p03).
- The suji and tile-pool heuristics must be multiplied, not applied in sequence. A suji tile with three copies live can be more dangerous than a non-suji tile with one copy live (Chapter 3, program p03).
- The hand-reading model is a best response to a NON-ADAPTIVE opponent. It treats discards as informative but not strategic. An opponent who knows they are being read can exploit that, and Chapter 6 shows that against such an opponent no fixed reading rule is safe. That is the correct description of the model, and not the usual one.
- A shanten algorithm that omits seven-pairs systematically overstates the distance of pair-heavy hands. Six pairs plus a single is 3 away from the standard shape but only 1 away from a seven-pairs hand. This book’s program implements the standard shape only; that is a real defect and is marked (Chapter 4, program p04).
- A one-player race model overstates the win probability by factors of 1.36 to 1.79, and the error grows with distance. Ignoring the other three therefore biases the model systematically toward slow, valuable hands (Chapter 4, program p05). The book also states that the model is comparative only and its absolute probabilities must not be quoted — in recorded play a player wins roughly a fifth of hands, far below the model’s figures, for reasons given in the text.
- Folding protects only against dealing in, not against a self-draw, so the opponent’s self-draw term cancels between pushing and folding. The case for folding therefore rests entirely on the deal-in probability, and a nearly safe tile should be pushed even with a weak hand (Chapter 5, program p06). This is often stated as “when in doubt, fold”, which has the direction backwards.
- The optimal-stopping framing fails in three places. The deal-in probability depends on what the opponent waits on, and their choice is made partly in anticipation of being read (so it is not a decision problem); there are three opponents, not one, and their hands are dependent through the tiles nobody drew (folding against one can feed another); and points are not utility (in the last hand of a match with a deficit to make up, the correct policy can be a negative-expectation push) (Chapter 5).
- Counterfactual regret minimisation does converge on two-player zero-sum games. Verified here on a toy game (p07): exploitability falls from 0.667 to 0.0013, the game value converges to against the known , and the ratio of betting the worst card to betting the best is 3.01 against a predicted 3.00 (Zinkevich et al. 2008) (Chapter 6, program p07).
- “It fails with three or more players” is false — the book’s first negative result. On the three-player toy game constructed here, the same algorithm drives exploitability to . So “no convergence theorem” does not mean “the algorithm fails”; Abou Risk and Szafron’s three-player poker agents likewise performed well without a guarantee (Abou Risk and Szafron 2010) (Chapter 6, program p08).
- The book has no worked example of the multiplayer “no value guarantee” — the second negative result. In two-player zero-sum games an equilibrium strategy guarantees at least the game’s value; in multiplayer games there is no such guarantee, which is a fact about which theorems exist. But the four simple opponent deviations constructed here failed to hold the player below the equilibrium value (every one left the player better off), so the book does not claim an example of the phenomenon, and the full minimisation over the opponents’ coalition (about profiles) is left uncomputed (Chapter 6, program p08).
- The Kelly growth curve is nearly symmetric about the optimum. Half-Kelly keeps 75.3 % of the growth rate and 1.5× Kelly keeps 75.7 % — the same penalty to within half a percentage point in both directions; only at 2× Kelly does it collapse to 3.7 %. So “the growth curve falls off a cliff above the optimum” is not a good argument for shading the stake down (Chapter 6, program p09).
- The real reason to shade down is that the edge must be estimated. On a 100-hand sample, 0.75 Kelly () does beat full Kelly on the estimate (); the advantage narrows as the sample grows (Chapter 6, program p10).
- The two-way formula has the wrong sign here. Treating this book’s outcome distribution as “wins two times in ten” and applying that formula gives , while the correct Kelly fraction is : the wins are larger than the losses, so a win rate below a half is perfectly compatible with an edge (Chapter 6, program p09).
- A table fee is not a small deduction from a winner’s rate; it decides whether there is a winner. In this book’s illustrative distribution the edge vanishes at a fee of 0.0128 buy-ins a hand, and a fee of 0.005 — only 39 % of the edge — already cuts the optimal stake by 40 %, while 0.010 cuts it by 79 % (Chapter 6, programs p09 and p13).
- The three levers on ruin are not equally weighted. Bankroll and stake enter the ruin probability exponentially and the edge only linearly, so for the purpose of not going broke, staking small is more effective than playing well. That is a statement about survival, not about earning (Chapter 6, program p13).
- Personal experience is almost worthless as evidence about strategy. An improvement of 0.01 buy-ins a hand is a large edge in this game, and detecting it with a two-sample test needs about 39,766 hands per arm, roughly 663 sessions (Chapter 8, program p11). This is the quantitative reason the confident opinions players hold about marginal decisions are not supported by the number of hands they have played.
- The argument for mixing is conditional. That a mix beats every pure strategy is a theorem for zero-sum games (Chapter 6, program p12); but it requires the opponent to observe enough hands to estimate the mixing proportion, and by item 19 that takes thousands. Against an opponent who has seen a few hundred, a deterministic policy is in fact not exploitable. That is the honest version of the doctrine, and it is narrower than the usual statement.
- The duplicate design turns the trial from infeasible into feasible. Replaying the same deals under both policies reduces the standard deviation of the paired difference from 0.435 to about 0.12, and the hands needed from 79,532 to 1,514, about 53-fold (Chapter 8, program p11). The cost is that the pairing stops being exact after the first decision at which the policies differ, so Chapter 8 scores only that decision and discards most of each hand.
How to read the marked boxes
Evidence
Evidence boxes report published results with their sources. Theorems and empirical results are written separately, as are two-player zero-sum results and multiplayer ones.
Calculation
Calculation boxes give short Python programs. Each runs as printed in a standard Python 3 environment, uses only the standard library and fixes its random seeds; the typesetting pipeline for this book executes every program at build time and writes its output into the book. The outcome distributions, priors and parameters in the programs are illustrative and are not measurements of any real hand or any real player.
Hypothesis · not established
Hypothesis boxes are the author’s ideas, marked “not established”, with a statement of what result would show them to be wrong.
Source text
Source text boxes quote classical works with a plain-language gloss. Every comparison across traditions is marked as an analogy.
Note
Note boxes give cautions and explain choices.
About this version
This is version 1.0.0, the first complete version: a preface and eight chapters, in Chinese and English, with 16 Python programs and 6 vector figures. The text, boxes and code were drafted with an AI writing tool from the author’s title, framework and notes; the author is responsible for reviewing and revising them and for checking every source. The priors of Chapter 2, the wait priors of Chapter 3, the race parameters of Chapter 4, and the toy games and outcome distributions of Chapter 6, together with the planning assumptions of Chapter 8, are the author’s illustrative settings; their mathematical properties are not findings about any real table.
Where information-theoretic and physical concepts are applied to the game, what is computed is Shannon entropy and quantities of Markov chains, and no further analogy is drawn. The book contains no unsupported assertions of the form “most players will…”.
Disclosure
The author uses the works of 5D Library, including this book, as the methodological basis of his community courses, the 5D Ascension Cards (Dimensional Shift Card Decks) and the Yafu AI knowledge base, and therefore has a commercial interest in the subject of this book. The book promotes no course, card deck, software or service, provides no link to or recommendation of any gambling platform, agent or funding service, and accepts no sponsorship from any such organisation. This book is not a gambling guide: it does not advise anyone to stake money on the games it discusses, the last section of Chapter 8 computes why staking on an unmeasured edge is a quantifiable error, and it states that gambling can cause serious financial and personal harm and can become compulsive. The Chapter 8 trial is a comparison of policies between software agents, to be run and analysed by researchers independent of the author’s business, involves no real-money wagering, and does not recruit from the author’s community, students or customers; all the code and the study protocol are published openly for anyone to check.
References
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).