FAILURE MAP
← Case archive

FA-11646 / Game simulation rules / Open access

Sequential combat suppresses a defeated fighter’s committed strike · case 01

Sequential combat suppresses a defeated fighter’s committed strike.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The second attack is conditioned on surviving the first.

VERIFIED REPAIR

Apply both committed attacks to the pre-round participants.

Unsuccessful approach: Allowing a retaliation only when the first target survives still resolves ties asymmetrically.

Case contract

Both fighters begin alive with positive HP; nonnegative attack values land simultaneously. Return remaining HP clamped at zero.

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_a, hp_b, attack_a, attack_b):
    return [max(0,hp_a-(attack_b if hp_b>attack_a else 0)),max(0,hp_b-attack_a)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('mutual defeat',solve(N,N,N,N),[0,0])
check('first fighter lethal',solve(N+3,N,N,1),[N+2,0])
check('second fighter lethal',solve(N,N+3,1,N),[0,N+2])
check('zero attacks',solve(N,N,0,0),[N,N])
check('both survive',solve(N+4,N+5,2,3),[N+1,N+3])
check('overkill clamps',solve(N,N,N+8,N+9),[0,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 fixtureActualExpectedOutcome
mutual defeat[1, 0][0, 0]Failed
first fighter lethal[4, 0][3, 0]Failed
second fighter lethal[0, 3][0, 3]Passed
zero attacks[1, 1][1, 1]Passed
both survive[2, 4][2, 4]Passed
overkill clamps[1, 0][0, 0]Failed

SHA-256 / 625f9ab629bc1afb8be25c83eac2673c0adc2110fd028ac8c1d838654331c67f

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(hp_a, hp_b, attack_a, attack_b):
    return [max(0,hp_a-attack_b),max(0,hp_b-(attack_a if hp_a>attack_b else 0))]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('mutual defeat',solve(N,N,N,N),[0,0])
check('first fighter lethal',solve(N+3,N,N,1),[N+2,0])
check('second fighter lethal',solve(N,N+3,1,N),[0,N+2])
check('zero attacks',solve(N,N,0,0),[N,N])
check('both survive',solve(N+4,N+5,2,3),[N+1,N+3])
check('overkill clamps',solve(N,N,N+8,N+9),[0,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 fixtureActualExpectedOutcome
mutual defeat[0, 1][0, 0]Failed
first fighter lethal[3, 0][3, 0]Passed
second fighter lethal[0, 4][0, 3]Failed
zero attacks[1, 1][1, 1]Passed
both survive[2, 4][2, 4]Passed
overkill clamps[0, 1][0, 0]Failed

SHA-256 / 975adbfc68bafb2d51d20634e81a414e0cf6c623cd5418a0909f0b4b424b1339

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(hp_a, hp_b, attack_a, attack_b):
    return [max(0,hp_a-attack_b),max(0,hp_b-attack_a)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('mutual defeat',solve(N,N,N,N),[0,0])
check('first fighter lethal',solve(N+3,N,N,1),[N+2,0])
check('second fighter lethal',solve(N,N+3,1,N),[0,N+2])
check('zero attacks',solve(N,N,0,0),[N,N])
check('both survive',solve(N+4,N+5,2,3),[N+1,N+3])
check('overkill clamps',solve(N,N,N+8,N+9),[0,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 fixtureActualExpectedOutcome
mutual defeat[0, 0][0, 0]Passed
first fighter lethal[3, 0][3, 0]Passed
second fighter lethal[0, 3][0, 3]Passed
zero attacks[1, 1][1, 1]Passed
both survive[2, 4][2, 4]Passed
overkill clamps[0, 0][0, 0]Passed

SHA-256 / 4d53599fdb6370a050d8701720d4895117f223c8ddd883398817219e241f38cb

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.825529+00:00.

Case digest / 02491ec546e66693c82373201f9b25748244664bfd7411c5a320f1ca6b8685bb