FA-84066 / Sports scoring and tiebreakers / Open access
Shootout wins counted as regulation-plus-overtime wins · case 01
A team with shootout wins is ranked ahead on ROW.
ROOT CAUSE
The ROW counter includes shootout wins.
THE FAILURE
The ROW counter includes shootout wins.
Unsuccessful approach: Counting only regulation wins in ROW drops legitimate overtime wins.
Case contract
Ice hockey standings. games rows are [home, home_goals, away, away_goals, decided, so_winner] with decided in REG, OT, SO; for SO the listed goals are tied and so_winner names the winner. A win is 2 points and an OT or SO loss 1 point. The shootout winner is credited with one extra goal for, the loser one extra goal against. RW counts regulation wins, ROW regulation plus overtime wins (not shootouts). Rank by points, then RW, then ROW, then total wins, then goal difference, then name. Return [team, points, RW, ROW, W, GD].
Why this case matters
Playoff races are often decided by the RW/ROW cascade and the shootout goal convention.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(games):
t = {}
for h, hg, a, ag, decided, so_winner in games:
if decided == 'SO':
if so_winner == h:
hg += 1
else:
ag += 1
for team, f, g in ((h, hg, ag), (a, ag, hg)):
row = t.setdefault(team, {'pts': 0, 'rw': 0, 'row': 0, 'w': 0, 'gd': 0})
row['gd'] += f - g
if f > g:
row['pts'] += 2
row['w'] += 1
if decided == 'REG':
row['rw'] += 1
row['row'] += 1
elif decided != 'REG':
row['pts'] += 1
order = sorted(t, key=lambda k: (-t[k]['pts'], -t[k]['rw'], -t[k]['row'], -t[k]['w'], -t[k]['gd'], k))
return [[k, t[k]['pts'], t[k]['rw'], t[k]['row'], t[k]['w'], t[k]['gd']] for k in order]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
try:
return solve(*args)
except Exception as exc:
return 'raised ' + type(exc).__name__
cases = [[('control regulation win',
([['Bears', 3, 'Hawks', 1, 'REG', None]],),
[['Bears', 2, 1, 1, 1, 2], ['Hawks', 0, 0, 0, 0, -2]]),
('boundary overtime loss point',
([['Bears', 2, 'Hawks', 3, 'OT', None]],),
[['Hawks', 2, 0, 1, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary shootout goal credit',
([['Bears', 2, 'Hawks', 2, 'SO', 'Hawks']],),
[['Hawks', 2, 0, 0, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary RW breaks tie',
([['Bears', 1, 'Lynx', 0, 'REG', None], ['Hawks', 1, 'Otters', 0, 'OT', None]],),
[['Bears', 2, 1, 1, 1, 1],
['Hawks', 2, 0, 1, 1, 1],
['Otters', 1, 0, 0, 0, -1],
['Lynx', 0, 0, 0, 0, -1]]),
('regression: row shootout exclusion',
([['Lynx', 1, 'Bears', 1, 'SO', 'Lynx'],
['Otters', 1, 'Bears', 0, 'OT', None],
['Bears', 3, 'Otters', 4, 'OT', None],
['Bears', 1, 'Otters', 3, 'REG', None],
['Lynx', 3, 'Bears', 4, 'OT', None],
['Lynx', 3, 'Otters', 1, 'REG', None]],),
[['Otters', 6, 1, 3, 3, 2], ['Lynx', 5, 1, 1, 2, 2], ['Bears', 5, 0, 1, 1, -4]]),
('variant scenario 1',
([['Lynx', 1, 'Otters', 1, 'SO', 'Lynx'],
['Hawks', 1, 'Bears', 0, 'OT', None],
['Hawks', 0, 'Lynx', 5, 'REG', None],
['Otters', 1, 'Hawks', 1, 'SO', 'Otters'],
['Lynx', 3, 'Bears', 4, 'REG', None]],),
[['Lynx', 4, 1, 1, 2, 5],
['Bears', 3, 1, 1, 1, 0],
['Hawks', 3, 0, 1, 1, -5],
['Otters', 3, 0, 0, 1, 0]]),
('variant scenario 2',
([['Lynx', 3, 'Hawks', 5, 'REG', None],
['Bears', 3, 'Hawks', 4, 'REG', None],
['Lynx', 5, 'Otters', 3, 'REG', None],
['Hawks', 1, 'Lynx', 0, 'OT', None]],),
[['Hawks', 6, 2, 3, 3, 4],
['Lynx', 3, 1, 1, 1, -1],
['Bears', 0, 0, 0, 0, -1],
['Otters', 0, 0, 0, 0, -2]])],
[('control regulation win',
([['Bears', 3, 'Hawks', 1, 'REG', None]],),
[['Bears', 2, 1, 1, 1, 2], ['Hawks', 0, 0, 0, 0, -2]]),
('boundary overtime loss point',
([['Bears', 2, 'Hawks', 3, 'OT', None]],),
[['Hawks', 2, 0, 1, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary shootout goal credit',
([['Bears', 2, 'Hawks', 2, 'SO', 'Hawks']],),
[['Hawks', 2, 0, 0, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary RW breaks tie',
([['Bears', 1, 'Lynx', 0, 'REG', None], ['Hawks', 1, 'Otters', 0, 'OT', None]],),
[['Bears', 2, 1, 1, 1, 1],
['Hawks', 2, 0, 1, 1, 1],
['Otters', 1, 0, 0, 0, -1],
['Lynx', 0, 0, 0, 0, -1]]),
('regression: row shootout exclusion',
([['Hawks', 1, 'Otters', 2, 'OT', None],
['Otters', 4, 'Hawks', 2, 'REG', None],
['Lynx', 0, 'Otters', 5, 'REG', None],
['Bears', 1, 'Otters', 2, 'REG', None],
['Bears', 3, 'Otters', 1, 'REG', None]],),
[['Otters', 8, 3, 4, 4, 7],
['Bears', 2, 1, 1, 1, 1],
['Hawks', 1, 0, 0, 0, -3],
['Lynx', 0, 0, 0, 0, -5]]),
('regression: row shootout exclusion',
([['Lynx', 4, 'Bears', 3, 'OT', None],
['Otters', 3, 'Lynx', 3, 'SO', 'Lynx'],
['Lynx', 1, 'Otters', 0, 'OT', None],
['Otters', 3, 'Hawks', 3, 'SO', 'Otters'],
['Lynx', 0, 'Bears', 2, 'REG', None],
['Hawks', 0, 'Otters', 1, 'OT', None]],),
[['Lynx', 6, 0, 2, 3, 1],
['Otters', 6, 0, 1, 2, 0],
['Bears', 3, 1, 1, 1, 1],
['Hawks', 2, 0, 0, 0, -2]]),
('variant scenario 1',
([['Otters', 3, 'Lynx', 4, 'OT', None],
['Hawks', 4, 'Lynx', 3, 'REG', None],
['Bears', 1, 'Hawks', 3, 'REG', None]],),
[['Hawks', 4, 2, 2, 2, 3],
['Lynx', 2, 0, 1, 1, 0],
['Otters', 1, 0, 0, 0, -1],
['Bears', 0, 0, 0, 0, -2]]),
('variant scenario 2',
([['Bears', 0, 'Hawks', 0, 'SO', 'Hawks'],
['Bears', 5, 'Hawks', 3, 'REG', None],
['Hawks', 1, 'Bears', 0, 'OT', None],
['Bears', 1, 'Otters', 5, 'REG', None],
['Bears', 5, 'Lynx', 1, 'REG', None]],),
[['Bears', 6, 2, 2, 2, 0],
['Hawks', 4, 0, 1, 2, 0],
['Otters', 2, 1, 1, 1, 4],
['Lynx', 0, 0, 0, 0, -4]])],
[('control regulation win',
([['Bears', 3, 'Hawks', 1, 'REG', None]],),
[['Bears', 2, 1, 1, 1, 2], ['Hawks', 0, 0, 0, 0, -2]]),
('boundary overtime loss point',
([['Bears', 2, 'Hawks', 3, 'OT', None]],),
[['Hawks', 2, 0, 1, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary shootout goal credit',
([['Bears', 2, 'Hawks', 2, 'SO', 'Hawks']],),
[['Hawks', 2, 0, 0, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary RW breaks tie',
([['Bears', 1, 'Lynx', 0, 'REG', None], ['Hawks', 1, 'Otters', 0, 'OT', None]],),
[['Bears', 2, 1, 1, 1, 1],
['Hawks', 2, 0, 1, 1, 1],
['Otters', 1, 0, 0, 0, -1],
['Lynx', 0, 0, 0, 0, -1]]),
('regression: row shootout exclusion',
([['Otters', 0, 'Hawks', 3, 'REG', None],
['Bears', 0, 'Hawks', 3, 'REG', None],
['Lynx', 2, 'Otters', 2, 'SO', 'Lynx'],
['Otters', 0, 'Hawks', 0, 'SO', 'Otters'],
['Bears', 1, 'Lynx', 1, 'SO', 'Bears'],
['Hawks', 0, 'Bears', 0, 'SO', 'Hawks'],
['Otters', 0, 'Hawks', 0, 'SO', 'Hawks']],),
[['Hawks', 9, 2, 2, 4, 7],
['Otters', 4, 0, 0, 1, -4],
['Lynx', 3, 0, 0, 1, 0],
['Bears', 3, 0, 0, 1, -3]]),
('regression: row shootout exclusion',
([['Bears', 0, 'Hawks', 3, 'REG', None],
['Bears', 3, 'Lynx', 3, 'SO', 'Lynx'],
['Hawks', 1, 'Bears', 5, 'REG', None],
['Otters', 3, 'Lynx', 4, 'OT', None],
['Lynx', 0, 'Hawks', 2, 'REG', None],
['Otters', 5, 'Hawks', 4, 'OT', None],
['Lynx', 5, 'Hawks', 4, 'REG', None]],),
[['Lynx', 6, 1, 2, 3, 1],
['Hawks', 5, 2, 2, 2, -1],
['Bears', 3, 1, 1, 1, 0],
['Otters', 3, 0, 1, 1, 0]]),
('variant scenario 1',
([['Hawks', 3, 'Otters', 4, 'OT', None],
['Otters', 1, 'Hawks', 3, 'REG', None],
['Hawks', 0, 'Bears', 0, 'SO', 'Hawks'],
['Bears', 1, 'Lynx', 5, 'REG', None],
['Otters', 4, 'Bears', 4, 'SO', 'Otters'],
['Hawks', 3, 'Otters', 4, 'REG', None],
['Hawks', 0, 'Bears', 2, 'REG', None],
['Lynx', 4, 'Otters', 4, 'SO', 'Lynx']],),
[['Otters', 7, 1, 2, 3, 0],
['Hawks', 5, 1, 1, 2, -1],
['Lynx', 4, 1, 1, 2, 5],
['Bears', 4, 1, 1, 1, -4]]),
('variant scenario 2',
([['Otters', 1, 'Bears', 1, 'SO', 'Otters'],
['Lynx', 1, 'Hawks', 1, 'SO', 'Hawks'],
['Otters', 5, 'Hawks', 1, 'REG', None],
['Lynx', 0, 'Otters', 1, 'OT', None],
['Hawks', 2, 'Lynx', 3, 'REG', None]],),
[['Otters', 6, 1, 2, 3, 6],
['Lynx', 4, 1, 1, 1, -1],
['Hawks', 2, 0, 0, 1, -4],
['Bears', 1, 0, 0, 0, -1]])],
[('control regulation win',
([['Bears', 3, 'Hawks', 1, 'REG', None]],),
[['Bears', 2, 1, 1, 1, 2], ['Hawks', 0, 0, 0, 0, -2]]),
('boundary overtime loss point',
([['Bears', 2, 'Hawks', 3, 'OT', None]],),
[['Hawks', 2, 0, 1, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary shootout goal credit',
([['Bears', 2, 'Hawks', 2, 'SO', 'Hawks']],),
[['Hawks', 2, 0, 0, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary RW breaks tie',
([['Bears', 1, 'Lynx', 0, 'REG', None], ['Hawks', 1, 'Otters', 0, 'OT', None]],),
[['Bears', 2, 1, 1, 1, 1],
['Hawks', 2, 0, 1, 1, 1],
['Otters', 1, 0, 0, 0, -1],
['Lynx', 0, 0, 0, 0, -1]]),
('regression: row shootout exclusion',
([['Lynx', 2, 'Otters', 0, 'REG', None],
['Otters', 3, 'Bears', 3, 'SO', 'Bears'],
['Bears', 4, 'Lynx', 3, 'REG', None],
['Otters', 0, 'Hawks', 3, 'REG', None]],),
[['Bears', 4, 1, 1, 2, 2],
['Hawks', 2, 1, 1, 1, 3],
['Lynx', 2, 1, 1, 1, 1],
['Otters', 1, 0, 0, 0, -6]]),
('regression: row shootout exclusion',
([['Otters', 3, 'Lynx', 2, 'REG', None],
['Lynx', 0, 'Hawks', 4, 'REG', None],
['Otters', 1, 'Hawks', 0, 'REG', None],
['Bears', 2, 'Hawks', 2, 'SO', 'Bears'],
['Bears', 3, 'Otters', 2, 'OT', None],
['Hawks', 1, 'Bears', 4, 'REG', None],
['Bears', 0, 'Hawks', 2, 'REG', None],
['Otters', 5, 'Hawks', 1, 'REG', None],
['Lynx', 3, 'Otters', 2, 'OT', None]],),
[['Otters', 8, 3, 3, 3, 4],
['Bears', 6, 1, 2, 3, 3],
['Hawks', 5, 2, 2, 2, -3],
['Lynx', 2, 0, 1, 1, -4]]),
('variant scenario 1',
([['Otters', 3, 'Lynx', 0, 'REG', None],
['Bears', 4, 'Lynx', 4, 'SO', 'Bears'],
['Hawks', 0, 'Lynx', 0, 'SO', 'Lynx'],
['Otters', 4, 'Hawks', 2, 'REG', None],
['Bears', 3, 'Hawks', 2, 'REG', None],
['Bears', 1, 'Otters', 2, 'REG', None],
['Otters', 1, 'Bears', 4, 'REG', None],
['Otters', 1, 'Bears', 1, 'SO', 'Bears'],
['Bears', 4, 'Otters', 4, 'SO', 'Bears']],),
[['Bears', 10, 2, 2, 5, 6],
['Otters', 8, 3, 3, 3, 1],
['Lynx', 3, 0, 0, 1, -3],
['Hawks', 1, 0, 0, 0, -4]]),
('variant scenario 2',
([['Lynx', 4, 'Otters', 3, 'REG', None],
['Bears', 5, 'Otters', 4, 'OT', None],
['Bears', 4, 'Lynx', 0, 'REG', None],
['Bears', 3, 'Hawks', 3, 'SO', 'Hawks'],
['Hawks', 3, 'Lynx', 3, 'SO', 'Lynx']],),
[['Bears', 5, 1, 2, 2, 4],
['Lynx', 4, 1, 1, 2, -2],
['Hawks', 3, 0, 0, 1, 0],
['Otters', 1, 0, 0, 0, -2]])],
[('control regulation win',
([['Bears', 3, 'Hawks', 1, 'REG', None]],),
[['Bears', 2, 1, 1, 1, 2], ['Hawks', 0, 0, 0, 0, -2]]),
('boundary overtime loss point',
([['Bears', 2, 'Hawks', 3, 'OT', None]],),
[['Hawks', 2, 0, 1, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary shootout goal credit',
([['Bears', 2, 'Hawks', 2, 'SO', 'Hawks']],),
[['Hawks', 2, 0, 0, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary RW breaks tie',
([['Bears', 1, 'Lynx', 0, 'REG', None], ['Hawks', 1, 'Otters', 0, 'OT', None]],),
[['Bears', 2, 1, 1, 1, 1],
['Hawks', 2, 0, 1, 1, 1],
['Otters', 1, 0, 0, 0, -1],
['Lynx', 0, 0, 0, 0, -1]]),
('regression: row shootout exclusion',
([['Hawks', 5, 'Bears', 1, 'REG', None],
['Bears', 0, 'Lynx', 0, 'SO', 'Bears'],
['Hawks', 0, 'Bears', 0, 'SO', 'Bears'],
['Hawks', 2, 'Lynx', 1, 'OT', None],
['Otters', 1, 'Bears', 5, 'REG', None],
['Hawks', 1, 'Otters', 2, 'OT', None],
['Lynx', 0, 'Hawks', 4, 'REG', None],
['Lynx', 0, 'Bears', 4, 'REG', None],
['Otters', 3, 'Bears', 2, 'REG', None],
['Otters', 1, 'Bears', 2, 'REG', None]],),
[['Bears', 10, 3, 3, 5, 6],
['Hawks', 8, 2, 3, 3, 7],
['Otters', 4, 1, 2, 2, -3],
['Lynx', 2, 0, 0, 0, -10]]),
('variant scenario 1',
([['Hawks', 4, 'Otters', 3, 'OT', None],
['Lynx', 1, 'Bears', 1, 'SO', 'Bears'],
['Bears', 4, 'Otters', 2, 'REG', None],
['Otters', 0, 'Lynx', 1, 'REG', None],
['Bears', 1, 'Hawks', 4, 'REG', None],
['Otters', 4, 'Lynx', 5, 'REG', None],
['Hawks', 2, 'Bears', 3, 'OT', None],
['Lynx', 0, 'Bears', 1, 'OT', None],
['Hawks', 2, 'Otters', 3, 'REG', None],
['Otters', 4, 'Lynx', 4, 'SO', 'Lynx']],),
[['Lynx', 8, 2, 2, 3, 1],
['Bears', 8, 1, 3, 4, 2],
['Hawks', 5, 1, 2, 2, 2],
['Otters', 4, 1, 1, 1, -5]]),
('variant scenario 2',
([['Bears', 4, 'Lynx', 4, 'SO', 'Bears'],
['Bears', 2, 'Lynx', 3, 'OT', None],
['Lynx', 2, 'Otters', 2, 'SO', 'Lynx'],
['Lynx', 3, 'Hawks', 5, 'REG', None],
['Bears', 1, 'Lynx', 2, 'OT', None],
['Bears', 3, 'Lynx', 4, 'REG', None],
['Hawks', 2, 'Bears', 0, 'REG', None],
['Otters', 0, 'Lynx', 3, 'REG', None]],),
[['Lynx', 11, 2, 4, 5, 4],
['Hawks', 4, 2, 2, 2, 4],
['Bears', 4, 0, 0, 1, -4],
['Otters', 1, 0, 0, 0, -4]])]]
for label, args, expected in cases[N - 1]:
check(label, run(args), expected)
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 |
|---|---|---|---|
| control regulation win | [['Bears', 2, 1, 1, 1, 2], ['Hawks', 0, 0, 0, 0, -2]] | [['Bears', 2, 1, 1, 1, 2], ['Hawks', 0, 0, 0, 0, -2]] | Passed |
| boundary overtime loss point | [['Hawks', 2, 0, 1, 1, 1], ['Bears', 1, 0, 0, 0, -1]] | [['Hawks', 2, 0, 1, 1, 1], ['Bears', 1, 0, 0, 0, -1]] | Passed |
| boundary shootout goal credit | [['Hawks', 2, 0, 1, 1, 1], ['Bears', 1, 0, 0, 0, -1]] | [['Hawks', 2, 0, 0, 1, 1], ['Bears', 1, 0, 0, 0, -1]] | Failed |
| boundary RW breaks tie | [['Bears', 2, 1, 1, 1, 1], ['Hawks', 2, 0, 1, 1, 1], ['Otters', 1, 0, 0, 0, -1], ['Lynx', 0, 0, 0, 0, -1]] | [['Bears', 2, 1, 1, 1, 1], ['Hawks', 2, 0, 1, 1, 1], ['Otters', 1, 0, 0, 0, -1], ['Lynx', 0, 0, 0, 0, -1]] | Passed |
| regression: row shootout exclusion | [['Otters', 6, 1, 3, 3, 2], ['Lynx', 5, 1, 2, 2, 2], ['Bears', 5, 0, 1, 1, -4]] | [['Otters', 6, 1, 3, 3, 2], ['Lynx', 5, 1, 1, 2, 2], ['Bears', 5, 0, 1, 1, -4]] | Failed |
| variant scenario 1 | [['Lynx', 4, 1, 2, 2, 5], ['Bears', 3, 1, 1, 1, 0], ['Otters', 3, 0, 1, 1, 0], ['Hawks', 3, 0, 1, 1, -5]] | [['Lynx', 4, 1, 1, 2, 5], ['Bears', 3, 1, 1, 1, 0], ['Hawks', 3, 0, 1, 1, -5], ['Otters', 3, 0, 0, 1, 0]] | Failed |
| variant scenario 2 | [['Hawks', 6, 2, 3, 3, 4], ['Lynx', 3, 1, 1, 1, -1], ['Bears', 0, 0, 0, 0, -1], ['Otters', 0, 0, 0, 0, -2]] | [['Hawks', 6, 2, 3, 3, 4], ['Lynx', 3, 1, 1, 1, -1], ['Bears', 0, 0, 0, 0, -1], ['Otters', 0, 0, 0, 0, -2]] | Passed |
SHA-256 / c3c45a47044f1c712c5dbb6665fb940fc9fab1c9bf548a9e9a50421136e1bb23
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(games):
t = {}
for h, hg, a, ag, decided, so_winner in games:
if decided == 'SO':
if so_winner == h:
hg += 1
else:
ag += 1
for team, f, g in ((h, hg, ag), (a, ag, hg)):
row = t.setdefault(team, {'pts': 0, 'rw': 0, 'row': 0, 'w': 0, 'gd': 0})
row['gd'] += f - g
if f > g:
row['pts'] += 2
row['w'] += 1
if decided == 'REG':
row['rw'] += 1
if decided == 'REG':
row['row'] += 1
elif decided != 'REG':
row['pts'] += 1
order = sorted(t, key=lambda k: (-t[k]['pts'], -t[k]['rw'], -t[k]['row'], -t[k]['w'], -t[k]['gd'], k))
return [[k, t[k]['pts'], t[k]['rw'], t[k]['row'], t[k]['w'], t[k]['gd']] for k in order]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
try:
return solve(*args)
except Exception as exc:
return 'raised ' + type(exc).__name__
cases = [[('control regulation win',
([['Bears', 3, 'Hawks', 1, 'REG', None]],),
[['Bears', 2, 1, 1, 1, 2], ['Hawks', 0, 0, 0, 0, -2]]),
('boundary overtime loss point',
([['Bears', 2, 'Hawks', 3, 'OT', None]],),
[['Hawks', 2, 0, 1, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary shootout goal credit',
([['Bears', 2, 'Hawks', 2, 'SO', 'Hawks']],),
[['Hawks', 2, 0, 0, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary RW breaks tie',
([['Bears', 1, 'Lynx', 0, 'REG', None], ['Hawks', 1, 'Otters', 0, 'OT', None]],),
[['Bears', 2, 1, 1, 1, 1],
['Hawks', 2, 0, 1, 1, 1],
['Otters', 1, 0, 0, 0, -1],
['Lynx', 0, 0, 0, 0, -1]]),
('regression: row shootout exclusion',
([['Lynx', 1, 'Bears', 1, 'SO', 'Lynx'],
['Otters', 1, 'Bears', 0, 'OT', None],
['Bears', 3, 'Otters', 4, 'OT', None],
['Bears', 1, 'Otters', 3, 'REG', None],
['Lynx', 3, 'Bears', 4, 'OT', None],
['Lynx', 3, 'Otters', 1, 'REG', None]],),
[['Otters', 6, 1, 3, 3, 2], ['Lynx', 5, 1, 1, 2, 2], ['Bears', 5, 0, 1, 1, -4]]),
('variant scenario 1',
([['Lynx', 1, 'Otters', 1, 'SO', 'Lynx'],
['Hawks', 1, 'Bears', 0, 'OT', None],
['Hawks', 0, 'Lynx', 5, 'REG', None],
['Otters', 1, 'Hawks', 1, 'SO', 'Otters'],
['Lynx', 3, 'Bears', 4, 'REG', None]],),
[['Lynx', 4, 1, 1, 2, 5],
['Bears', 3, 1, 1, 1, 0],
['Hawks', 3, 0, 1, 1, -5],
['Otters', 3, 0, 0, 1, 0]]),
('variant scenario 2',
([['Lynx', 3, 'Hawks', 5, 'REG', None],
['Bears', 3, 'Hawks', 4, 'REG', None],
['Lynx', 5, 'Otters', 3, 'REG', None],
['Hawks', 1, 'Lynx', 0, 'OT', None]],),
[['Hawks', 6, 2, 3, 3, 4],
['Lynx', 3, 1, 1, 1, -1],
['Bears', 0, 0, 0, 0, -1],
['Otters', 0, 0, 0, 0, -2]])],
[('control regulation win',
([['Bears', 3, 'Hawks', 1, 'REG', None]],),
[['Bears', 2, 1, 1, 1, 2], ['Hawks', 0, 0, 0, 0, -2]]),
('boundary overtime loss point',
([['Bears', 2, 'Hawks', 3, 'OT', None]],),
[['Hawks', 2, 0, 1, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary shootout goal credit',
([['Bears', 2, 'Hawks', 2, 'SO', 'Hawks']],),
[['Hawks', 2, 0, 0, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary RW breaks tie',
([['Bears', 1, 'Lynx', 0, 'REG', None], ['Hawks', 1, 'Otters', 0, 'OT', None]],),
[['Bears', 2, 1, 1, 1, 1],
['Hawks', 2, 0, 1, 1, 1],
['Otters', 1, 0, 0, 0, -1],
['Lynx', 0, 0, 0, 0, -1]]),
('regression: row shootout exclusion',
([['Hawks', 1, 'Otters', 2, 'OT', None],
['Otters', 4, 'Hawks', 2, 'REG', None],
['Lynx', 0, 'Otters', 5, 'REG', None],
['Bears', 1, 'Otters', 2, 'REG', None],
['Bears', 3, 'Otters', 1, 'REG', None]],),
[['Otters', 8, 3, 4, 4, 7],
['Bears', 2, 1, 1, 1, 1],
['Hawks', 1, 0, 0, 0, -3],
['Lynx', 0, 0, 0, 0, -5]]),
('regression: row shootout exclusion',
([['Lynx', 4, 'Bears', 3, 'OT', None],
['Otters', 3, 'Lynx', 3, 'SO', 'Lynx'],
['Lynx', 1, 'Otters', 0, 'OT', None],
['Otters', 3, 'Hawks', 3, 'SO', 'Otters'],
['Lynx', 0, 'Bears', 2, 'REG', None],
['Hawks', 0, 'Otters', 1, 'OT', None]],),
[['Lynx', 6, 0, 2, 3, 1],
['Otters', 6, 0, 1, 2, 0],
['Bears', 3, 1, 1, 1, 1],
['Hawks', 2, 0, 0, 0, -2]]),
('variant scenario 1',
([['Otters', 3, 'Lynx', 4, 'OT', None],
['Hawks', 4, 'Lynx', 3, 'REG', None],
['Bears', 1, 'Hawks', 3, 'REG', None]],),
[['Hawks', 4, 2, 2, 2, 3],
['Lynx', 2, 0, 1, 1, 0],
['Otters', 1, 0, 0, 0, -1],
['Bears', 0, 0, 0, 0, -2]]),
('variant scenario 2',
([['Bears', 0, 'Hawks', 0, 'SO', 'Hawks'],
['Bears', 5, 'Hawks', 3, 'REG', None],
['Hawks', 1, 'Bears', 0, 'OT', None],
['Bears', 1, 'Otters', 5, 'REG', None],
['Bears', 5, 'Lynx', 1, 'REG', None]],),
[['Bears', 6, 2, 2, 2, 0],
['Hawks', 4, 0, 1, 2, 0],
['Otters', 2, 1, 1, 1, 4],
['Lynx', 0, 0, 0, 0, -4]])],
[('control regulation win',
([['Bears', 3, 'Hawks', 1, 'REG', None]],),
[['Bears', 2, 1, 1, 1, 2], ['Hawks', 0, 0, 0, 0, -2]]),
('boundary overtime loss point',
([['Bears', 2, 'Hawks', 3, 'OT', None]],),
[['Hawks', 2, 0, 1, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary shootout goal credit',
([['Bears', 2, 'Hawks', 2, 'SO', 'Hawks']],),
[['Hawks', 2, 0, 0, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary RW breaks tie',
([['Bears', 1, 'Lynx', 0, 'REG', None], ['Hawks', 1, 'Otters', 0, 'OT', None]],),
[['Bears', 2, 1, 1, 1, 1],
['Hawks', 2, 0, 1, 1, 1],
['Otters', 1, 0, 0, 0, -1],
['Lynx', 0, 0, 0, 0, -1]]),
('regression: row shootout exclusion',
([['Otters', 0, 'Hawks', 3, 'REG', None],
['Bears', 0, 'Hawks', 3, 'REG', None],
['Lynx', 2, 'Otters', 2, 'SO', 'Lynx'],
['Otters', 0, 'Hawks', 0, 'SO', 'Otters'],
['Bears', 1, 'Lynx', 1, 'SO', 'Bears'],
['Hawks', 0, 'Bears', 0, 'SO', 'Hawks'],
['Otters', 0, 'Hawks', 0, 'SO', 'Hawks']],),
[['Hawks', 9, 2, 2, 4, 7],
['Otters', 4, 0, 0, 1, -4],
['Lynx', 3, 0, 0, 1, 0],
['Bears', 3, 0, 0, 1, -3]]),
('regression: row shootout exclusion',
([['Bears', 0, 'Hawks', 3, 'REG', None],
['Bears', 3, 'Lynx', 3, 'SO', 'Lynx'],
['Hawks', 1, 'Bears', 5, 'REG', None],
['Otters', 3, 'Lynx', 4, 'OT', None],
['Lynx', 0, 'Hawks', 2, 'REG', None],
['Otters', 5, 'Hawks', 4, 'OT', None],
['Lynx', 5, 'Hawks', 4, 'REG', None]],),
[['Lynx', 6, 1, 2, 3, 1],
['Hawks', 5, 2, 2, 2, -1],
['Bears', 3, 1, 1, 1, 0],
['Otters', 3, 0, 1, 1, 0]]),
('variant scenario 1',
([['Hawks', 3, 'Otters', 4, 'OT', None],
['Otters', 1, 'Hawks', 3, 'REG', None],
['Hawks', 0, 'Bears', 0, 'SO', 'Hawks'],
['Bears', 1, 'Lynx', 5, 'REG', None],
['Otters', 4, 'Bears', 4, 'SO', 'Otters'],
['Hawks', 3, 'Otters', 4, 'REG', None],
['Hawks', 0, 'Bears', 2, 'REG', None],
['Lynx', 4, 'Otters', 4, 'SO', 'Lynx']],),
[['Otters', 7, 1, 2, 3, 0],
['Hawks', 5, 1, 1, 2, -1],
['Lynx', 4, 1, 1, 2, 5],
['Bears', 4, 1, 1, 1, -4]]),
('variant scenario 2',
([['Otters', 1, 'Bears', 1, 'SO', 'Otters'],
['Lynx', 1, 'Hawks', 1, 'SO', 'Hawks'],
['Otters', 5, 'Hawks', 1, 'REG', None],
['Lynx', 0, 'Otters', 1, 'OT', None],
['Hawks', 2, 'Lynx', 3, 'REG', None]],),
[['Otters', 6, 1, 2, 3, 6],
['Lynx', 4, 1, 1, 1, -1],
['Hawks', 2, 0, 0, 1, -4],
['Bears', 1, 0, 0, 0, -1]])],
[('control regulation win',
([['Bears', 3, 'Hawks', 1, 'REG', None]],),
[['Bears', 2, 1, 1, 1, 2], ['Hawks', 0, 0, 0, 0, -2]]),
('boundary overtime loss point',
([['Bears', 2, 'Hawks', 3, 'OT', None]],),
[['Hawks', 2, 0, 1, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary shootout goal credit',
([['Bears', 2, 'Hawks', 2, 'SO', 'Hawks']],),
[['Hawks', 2, 0, 0, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary RW breaks tie',
([['Bears', 1, 'Lynx', 0, 'REG', None], ['Hawks', 1, 'Otters', 0, 'OT', None]],),
[['Bears', 2, 1, 1, 1, 1],
['Hawks', 2, 0, 1, 1, 1],
['Otters', 1, 0, 0, 0, -1],
['Lynx', 0, 0, 0, 0, -1]]),
('regression: row shootout exclusion',
([['Lynx', 2, 'Otters', 0, 'REG', None],
['Otters', 3, 'Bears', 3, 'SO', 'Bears'],
['Bears', 4, 'Lynx', 3, 'REG', None],
['Otters', 0, 'Hawks', 3, 'REG', None]],),
[['Bears', 4, 1, 1, 2, 2],
['Hawks', 2, 1, 1, 1, 3],
['Lynx', 2, 1, 1, 1, 1],
['Otters', 1, 0, 0, 0, -6]]),
('regression: row shootout exclusion',
([['Otters', 3, 'Lynx', 2, 'REG', None],
['Lynx', 0, 'Hawks', 4, 'REG', None],
['Otters', 1, 'Hawks', 0, 'REG', None],
['Bears', 2, 'Hawks', 2, 'SO', 'Bears'],
['Bears', 3, 'Otters', 2, 'OT', None],
['Hawks', 1, 'Bears', 4, 'REG', None],
['Bears', 0, 'Hawks', 2, 'REG', None],
['Otters', 5, 'Hawks', 1, 'REG', None],
['Lynx', 3, 'Otters', 2, 'OT', None]],),
[['Otters', 8, 3, 3, 3, 4],
['Bears', 6, 1, 2, 3, 3],
['Hawks', 5, 2, 2, 2, -3],
['Lynx', 2, 0, 1, 1, -4]]),
('variant scenario 1',
([['Otters', 3, 'Lynx', 0, 'REG', None],
['Bears', 4, 'Lynx', 4, 'SO', 'Bears'],
['Hawks', 0, 'Lynx', 0, 'SO', 'Lynx'],
['Otters', 4, 'Hawks', 2, 'REG', None],
['Bears', 3, 'Hawks', 2, 'REG', None],
['Bears', 1, 'Otters', 2, 'REG', None],
['Otters', 1, 'Bears', 4, 'REG', None],
['Otters', 1, 'Bears', 1, 'SO', 'Bears'],
['Bears', 4, 'Otters', 4, 'SO', 'Bears']],),
[['Bears', 10, 2, 2, 5, 6],
['Otters', 8, 3, 3, 3, 1],
['Lynx', 3, 0, 0, 1, -3],
['Hawks', 1, 0, 0, 0, -4]]),
('variant scenario 2',
([['Lynx', 4, 'Otters', 3, 'REG', None],
['Bears', 5, 'Otters', 4, 'OT', None],
['Bears', 4, 'Lynx', 0, 'REG', None],
['Bears', 3, 'Hawks', 3, 'SO', 'Hawks'],
['Hawks', 3, 'Lynx', 3, 'SO', 'Lynx']],),
[['Bears', 5, 1, 2, 2, 4],
['Lynx', 4, 1, 1, 2, -2],
['Hawks', 3, 0, 0, 1, 0],
['Otters', 1, 0, 0, 0, -2]])],
[('control regulation win',
([['Bears', 3, 'Hawks', 1, 'REG', None]],),
[['Bears', 2, 1, 1, 1, 2], ['Hawks', 0, 0, 0, 0, -2]]),
('boundary overtime loss point',
([['Bears', 2, 'Hawks', 3, 'OT', None]],),
[['Hawks', 2, 0, 1, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary shootout goal credit',
([['Bears', 2, 'Hawks', 2, 'SO', 'Hawks']],),
[['Hawks', 2, 0, 0, 1, 1], ['Bears', 1, 0, 0, 0, -1]]),
('boundary RW breaks tie',
([['Bears', 1, 'Lynx', 0, 'REG', None], ['Hawks', 1, 'Otters', 0, 'OT', None]],),
[['Bears', 2, 1, 1, 1, 1],
['Hawks', 2, 0, 1, 1, 1],
['Otters', 1, 0, 0, 0, -1],
['Lynx', 0, 0, 0, 0, -1]]),
('regression: row shootout exclusion',
([['Hawks', 5, 'Bears', 1, 'REG', None],
['Bears', 0, 'Lynx', 0, 'SO', 'Bears'],
['Hawks', 0, 'Bears', 0, 'SO', 'Bears'],
['Hawks', 2, 'Lynx', 1, 'OT', None],
['Otters', 1, 'Bears', 5, 'REG', None],
['Hawks', 1, 'Otters', 2, 'OT', None],
['Lynx', 0, 'Hawks', 4, 'REG', None],
['Lynx', 0, 'Bears', 4, 'REG', None],
['Otters', 3, 'Bears', 2, 'REG', None],
['Otters', 1, 'Bears', 2, 'REG', None]],),
[['Bears', 10, 3, 3, 5, 6],
['Hawks', 8, 2, 3, 3, 7],
['Otters', 4, 1, 2, 2, -3],
['Lynx', 2, 0, 0, 0, -10]]),
('variant scenario 1',
([['Hawks', 4, 'Otters', 3, 'OT', None],
['Lynx', 1, 'Bears', 1, 'SO', 'Bears'],
['Bears', 4, 'Otters', 2, 'REG', None],
['Otters', 0, 'Lynx', 1, 'REG', None],
['Bears', 1, 'Hawks', 4, 'REG', None],
['Otters', 4, 'Lynx', 5, 'REG', None],
['Hawks', 2, 'Bears', 3, 'OT', None],
['Lynx', 0, 'Bears', 1, 'OT', None],
['Hawks', 2, 'Otters', 3, 'REG', None],
['Otters', 4, 'Lynx', 4, 'SO', 'Lynx']],),
[['Lynx', 8, 2, 2, 3, 1],
['Bears', 8, 1, 3, 4, 2],
['Hawks', 5, 1, 2, 2, 2],
['Otters', 4, 1, 1, 1, -5]]),
('variant scenario 2',
([['Bears', 4, 'Lynx', 4, 'SO', 'Bears'],
['Bears', 2, 'Lynx', 3, 'OT', None],
['Lynx', 2, 'Otters', 2, 'SO', 'Lynx'],
['Lynx', 3, 'Hawks', 5, 'REG', None],
['Bears', 1, 'Lynx', 2, 'OT', None],
['Bears', 3, 'Lynx', 4, 'REG', None],
['Hawks', 2, 'Bears', 0, 'REG', None],
['Otters', 0, 'Lynx', 3, 'REG', None]],),
[['Lynx', 11, 2, 4, 5, 4],
['Hawks', 4, 2, 2, 2, 4],
['Bears', 4, 0, 0, 1, -4],
['Otters', 1, 0, 0, 0, -4]])]]
for label, args, expected in cases[N - 1]:
check(label, run(args), expected)
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 |
|---|---|---|---|
| control regulation win | [['Bears', 2, 1, 1, 1, 2], ['Hawks', 0, 0, 0, 0, -2]] | [['Bears', 2, 1, 1, 1, 2], ['Hawks', 0, 0, 0, 0, -2]] | Passed |
| boundary overtime loss point | [['Hawks', 2, 0, 0, 1, 1], ['Bears', 1, 0, 0, 0, -1]] | [['Hawks', 2, 0, 1, 1, 1], ['Bears', 1, 0, 0, 0, -1]] | Failed |
| boundary shootout goal credit | [['Hawks', 2, 0, 0, 1, 1], ['Bears', 1, 0, 0, 0, -1]] | [['Hawks', 2, 0, 0, 1, 1], ['Bears', 1, 0, 0, 0, -1]] | Passed |
| boundary RW breaks tie | [['Bears', 2, 1, 1, 1, 1], ['Hawks', 2, 0, 0, 1, 1], ['Otters', 1, 0, 0, 0, -1], ['Lynx', 0, 0, 0, 0, -1]] | [['Bears', 2, 1, 1, 1, 1], ['Hawks', 2, 0, 1, 1, 1], ['Otters', 1, 0, 0, 0, -1], ['Lynx', 0, 0, 0, 0, -1]] | Failed |
| regression: row shootout exclusion | [['Otters', 6, 1, 1, 3, 2], ['Lynx', 5, 1, 1, 2, 2], ['Bears', 5, 0, 0, 1, -4]] | [['Otters', 6, 1, 3, 3, 2], ['Lynx', 5, 1, 1, 2, 2], ['Bears', 5, 0, 1, 1, -4]] | Failed |
| variant scenario 1 | [['Lynx', 4, 1, 1, 2, 5], ['Bears', 3, 1, 1, 1, 0], ['Otters', 3, 0, 0, 1, 0], ['Hawks', 3, 0, 0, 1, -5]] | [['Lynx', 4, 1, 1, 2, 5], ['Bears', 3, 1, 1, 1, 0], ['Hawks', 3, 0, 1, 1, -5], ['Otters', 3, 0, 0, 1, 0]] | Failed |
| variant scenario 2 | [['Hawks', 6, 2, 2, 3, 4], ['Lynx', 3, 1, 1, 1, -1], ['Bears', 0, 0, 0, 0, -1], ['Otters', 0, 0, 0, 0, -2]] | [['Hawks', 6, 2, 3, 3, 4], ['Lynx', 3, 1, 1, 1, -1], ['Bears', 0, 0, 0, 0, -1], ['Otters', 0, 0, 0, 0, -2]] | Failed |
SHA-256 / 85b23f47783cb8c5da555d107744f34c893b43d86ffcb13b5123649fd8afad0e
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
Stipulated, bounded toy contract stated in the contract field; not a claim of conformance with any governing body rulebook or operator house rules. 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:50:27.307040+00:00.
Case digest / d9eaf6177d3c9836a24118a6dcfae3d685733f0ce7b2bf4a18e879a3580dedf3