FA-11681 / Game simulation rules / Open access
An exploding die consumes rolls belonging to the next die · case 01
An exploding die consumes rolls belonging to the next die.
ROOT CAUSE
The whole supplied roll stream is summed.
THE FAILURE
The whole supplied roll stream is summed.
Unsuccessful approach: Stopping after one extra roll truncates a chain of explosions.
Case contract
Sides>=2 and stream contains at least one value below sides. Values in 1..sides. Score one exploding die by consuming maxima until first nonmaximum, including it; ignore suffix.
Why this case matters
A deterministic game-rule model isolates this rule interaction for regression testing.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(sides, rolls):
return [sum(rolls),len(rolls)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
s=N+2
check('unused suffix',solve(s,[1,s,1]),[1,1])
check('chain of explosions',solve(s,[s,s,1,2]),[2*s+1,3])
check('one explosion',solve(s,[s,1]),[s+1,2])
check('no explosion',solve(s,[s-1]),[s-1,1])
check('long chain',solve(s,[s]*(N+2)+[1,s]),[s*(N+2)+1,N+3])
check('minimum die',solve(2,[2,2,1]),[5,3])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| unused suffix | [5, 3] | [1, 1] | Failed |
| chain of explosions | [9, 4] | [7, 3] | Failed |
| one explosion | [4, 2] | [4, 2] | Passed |
| no explosion | [2, 1] | [2, 1] | Passed |
| long chain | [13, 5] | [10, 4] | Failed |
| minimum die | [5, 3] | [5, 3] | Passed |
SHA-256 / 6925ec4187d25f3b23fdf2700bf2f67cd6cdfa7b010e194c7e87ae8277aaadf9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(sides, rolls):
count=2 if rolls[0]==sides else 1
return [sum(rolls[:count]),count]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
s=N+2
check('unused suffix',solve(s,[1,s,1]),[1,1])
check('chain of explosions',solve(s,[s,s,1,2]),[2*s+1,3])
check('one explosion',solve(s,[s,1]),[s+1,2])
check('no explosion',solve(s,[s-1]),[s-1,1])
check('long chain',solve(s,[s]*(N+2)+[1,s]),[s*(N+2)+1,N+3])
check('minimum die',solve(2,[2,2,1]),[5,3])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| unused suffix | [1, 1] | [1, 1] | Passed |
| chain of explosions | [6, 2] | [7, 3] | Failed |
| one explosion | [4, 2] | [4, 2] | Passed |
| no explosion | [2, 1] | [2, 1] | Passed |
| long chain | [6, 2] | [10, 4] | Failed |
| minimum die | [4, 2] | [5, 3] | Failed |
SHA-256 / f3cb5d7c15e45c725637d06c647b6b40c8b6b6150a52b978af8c45af71722f21
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
Controlled rules-only simulation; not a complete game engine. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:38:49.984120+00:00.
Case digest / 45be30ae3df08b9e7bb7f8184381e615e177acff25dfea15636104b54481802a