FA-11686 / Game simulation rules / Open access
A defeated flag carrier scores on entering home · case 01
A defeated flag carrier scores on entering home.
ROOT CAUSE
Home arrival is scored before lethal damage and flag drop.
THE FAILURE
Home arrival is scored before lethal damage and flag drop.
Unsuccessful approach: Requiring survival alone ignores the own-flag-at-home capture condition.
Case contract
HP positive, damage nonnegative; carrying, at_home, own_flag_home bool. Return [remaining HP, enemy flag state carried/dropped/captured/absent, score 0/1]. Death takes priority over capture.
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(hp, damage, carrying, at_home, own_flag_home):
left=max(0,hp-damage)
if not carrying:return [left,'absent',0]
if at_home and own_flag_home:return [left,'captured',1]
return [left,'dropped' if left==0 else 'carried',0]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('lethal home arrival',solve(N,N,True,True,True),[0,'dropped',0])
check('own flag missing',solve(N+1,0,True,True,False),[N+1,'carried',0])
check('legal capture',solve(N+2,1,True,True,True),[N+1,'captured',1])
check('outside home',solve(N+1,0,True,False,True),[N+1,'carried',0])
check('no carried flag',solve(N,0,False,True,True),[N,'absent',0])
check('overkill drops',solve(N,N+5,True,False,False),[0,'dropped',0])
check('empty carrier defeated',solve(N,N,False,True,True),[0,'absent',0])
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 |
|---|---|---|---|
| lethal home arrival | [0, 'captured', 1] | [0, 'dropped', 0] | Failed |
| own flag missing | [2, 'carried', 0] | [2, 'carried', 0] | Passed |
| legal capture | [2, 'captured', 1] | [2, 'captured', 1] | Passed |
| outside home | [2, 'carried', 0] | [2, 'carried', 0] | Passed |
| no carried flag | [1, 'absent', 0] | [1, 'absent', 0] | Passed |
| overkill drops | [0, 'dropped', 0] | [0, 'dropped', 0] | Passed |
| empty carrier defeated | [0, 'absent', 0] | [0, 'absent', 0] | Passed |
SHA-256 / 63e5faaf82ba8049bb68c125dacc6453ee86a5f66a343d66361b47879449f26c
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(hp, damage, carrying, at_home, own_flag_home):
left=max(0,hp-damage)
if not carrying:return [left,'absent',0]
if left==0:return [left,'dropped',0]
return [left,'captured',1] if at_home else [left,'carried',0]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('lethal home arrival',solve(N,N,True,True,True),[0,'dropped',0])
check('own flag missing',solve(N+1,0,True,True,False),[N+1,'carried',0])
check('legal capture',solve(N+2,1,True,True,True),[N+1,'captured',1])
check('outside home',solve(N+1,0,True,False,True),[N+1,'carried',0])
check('no carried flag',solve(N,0,False,True,True),[N,'absent',0])
check('overkill drops',solve(N,N+5,True,False,False),[0,'dropped',0])
check('empty carrier defeated',solve(N,N,False,True,True),[0,'absent',0])
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 |
|---|---|---|---|
| lethal home arrival | [0, 'dropped', 0] | [0, 'dropped', 0] | Passed |
| own flag missing | [2, 'captured', 1] | [2, 'carried', 0] | Failed |
| legal capture | [2, 'captured', 1] | [2, 'captured', 1] | Passed |
| outside home | [2, 'carried', 0] | [2, 'carried', 0] | Passed |
| no carried flag | [1, 'absent', 0] | [1, 'absent', 0] | Passed |
| overkill drops | [0, 'dropped', 0] | [0, 'dropped', 0] | Passed |
| empty carrier defeated | [0, 'absent', 0] | [0, 'absent', 0] | Passed |
SHA-256 / 4c8cbc3d8147e5c297fe92153ec321ca3bcdb38467efbf5de6a3c3996490c377
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 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:50.111340+00:00.
Case digest / e0e54d7d21089332b65285934471bf640c7231e2f5ff18a80a7cb79298f22220