FAILURE MAP
← Case archive

FA-84071 / Sports scoring and tiebreakers / Open access

Shootout decisive goal not reflected in goal difference · case 01

After a shootout both teams show an unchanged goal difference.

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

ROOT CAUSE

The extra shootout goal is never added to the game score.

VERIFIED REPAIR

Add one goal for the shootout winner, which also counts as one against the loser.

Unsuccessful approach: Adjusting only the winner's goal difference leaves the loser's goals against unchanged.

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:
        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 != 'SO':
                    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: shootout goal credit',
   ([['Hawks', 1, 'Lynx', 2, 'OT', None],
     ['Hawks', 0, 'Bears', 0, 'SO', 'Hawks'],
     ['Otters', 2, 'Hawks', 2, 'SO', 'Otters'],
     ['Otters', 2, 'Lynx', 1, 'REG', None]],),
   [['Otters', 4, 1, 1, 2, 2],
    ['Hawks', 4, 0, 0, 1, -1],
    ['Lynx', 2, 0, 1, 1, 0],
    ['Bears', 1, 0, 0, 0, -1]]),
  ('variant scenario 1',
   ([['Lynx', 2, 'Otters', 3, 'OT', None],
     ['Lynx', 1, 'Otters', 1, 'SO', 'Otters'],
     ['Hawks', 4, 'Lynx', 5, 'OT', None],
     ['Lynx', 5, 'Bears', 2, 'REG', None]],),
   [['Lynx', 6, 1, 2, 2, 2],
    ['Otters', 4, 0, 1, 2, 2],
    ['Hawks', 1, 0, 0, 0, -1],
    ['Bears', 0, 0, 0, 0, -3]]),
  ('variant scenario 2',
   ([['Otters', 3, 'Lynx', 2, 'OT', None],
     ['Lynx', 2, 'Otters', 4, 'REG', None],
     ['Bears', 0, 'Otters', 5, 'REG', None],
     ['Hawks', 5, 'Lynx', 2, 'REG', None],
     ['Hawks', 2, 'Otters', 3, 'OT', None]],),
   [['Otters', 8, 2, 4, 4, 9],
    ['Hawks', 3, 1, 1, 1, 2],
    ['Lynx', 1, 0, 0, 0, -6],
    ['Bears', 0, 0, 0, 0, -5]])],
 [('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: shootout goal credit',
   ([['Otters', 2, 'Lynx', 4, 'REG', None],
     ['Bears', 0, 'Lynx', 0, 'SO', 'Bears'],
     ['Hawks', 4, 'Bears', 4, 'SO', 'Hawks'],
     ['Hawks', 4, 'Lynx', 5, 'OT', None],
     ['Bears', 0, 'Hawks', 3, 'REG', None],
     ['Otters', 2, 'Lynx', 0, 'REG', None]],),
   [['Lynx', 5, 1, 2, 2, 0],
    ['Hawks', 5, 1, 1, 2, 3],
    ['Bears', 3, 0, 0, 1, -3],
    ['Otters', 2, 1, 1, 1, 0]]),
  ('variant scenario 1',
   ([['Lynx', 4, 'Hawks', 4, 'SO', 'Lynx'],
     ['Lynx', 1, 'Bears', 1, 'SO', 'Bears'],
     ['Otters', 1, 'Bears', 1, 'SO', 'Otters'],
     ['Bears', 0, 'Lynx', 1, 'OT', None],
     ['Hawks', 1, 'Bears', 4, 'REG', None],
     ['Bears', 3, 'Hawks', 3, 'SO', 'Hawks']],),
   [['Bears', 7, 1, 1, 2, 1],
    ['Lynx', 5, 0, 1, 2, 1],
    ['Hawks', 3, 0, 0, 1, -3],
    ['Otters', 2, 0, 0, 1, 1]]),
  ('variant scenario 2',
   ([['Lynx', 4, 'Hawks', 5, 'REG', None],
     ['Hawks', 0, 'Bears', 0, 'SO', 'Hawks'],
     ['Otters', 4, 'Bears', 0, 'REG', None],
     ['Lynx', 5, 'Otters', 4, 'REG', None],
     ['Hawks', 5, 'Otters', 2, 'REG', None],
     ['Otters', 2, 'Bears', 2, 'SO', 'Bears'],
     ['Hawks', 3, 'Lynx', 2, 'OT', None]],),
   [['Hawks', 8, 2, 3, 4, 6],
    ['Lynx', 3, 1, 1, 1, -1],
    ['Otters', 3, 1, 1, 1, -1],
    ['Bears', 3, 0, 0, 1, -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: shootout goal credit',
   ([['Lynx', 4, 'Otters', 3, 'OT', None],
     ['Bears', 0, 'Lynx', 3, 'REG', None],
     ['Lynx', 3, 'Bears', 5, 'REG', None],
     ['Lynx', 0, 'Otters', 0, 'SO', 'Otters'],
     ['Otters', 3, 'Bears', 5, 'REG', None],
     ['Otters', 3, 'Hawks', 3, 'SO', 'Otters'],
     ['Otters', 1, 'Bears', 1, 'SO', 'Bears']],),
   [['Bears', 6, 2, 2, 3, 2],
    ['Otters', 6, 0, 0, 2, -2],
    ['Lynx', 5, 1, 2, 2, 1],
    ['Hawks', 1, 0, 0, 0, -1]]),
  ('variant scenario 1',
   ([['Bears', 3, 'Otters', 2, 'OT', None],
     ['Hawks', 0, 'Lynx', 4, 'REG', None],
     ['Otters', 4, 'Lynx', 4, 'SO', 'Lynx'],
     ['Bears', 4, 'Otters', 4, 'SO', 'Otters'],
     ['Bears', 1, 'Hawks', 0, 'OT', None],
     ['Lynx', 3, 'Otters', 2, 'OT', None],
     ['Otters', 2, 'Hawks', 2, 'SO', 'Hawks']],),
   [['Lynx', 6, 1, 2, 3, 6],
    ['Otters', 6, 0, 0, 1, -3],
    ['Bears', 5, 0, 2, 2, 1],
    ['Hawks', 3, 0, 0, 1, -4]]),
  ('variant scenario 2',
   ([['Hawks', 2, 'Otters', 3, 'OT', None],
     ['Hawks', 5, 'Lynx', 4, 'REG', None],
     ['Bears', 2, 'Hawks', 5, 'REG', None],
     ['Otters', 2, 'Bears', 5, 'REG', None]],),
   [['Hawks', 5, 2, 2, 2, 3],
    ['Bears', 2, 1, 1, 1, 0],
    ['Otters', 2, 0, 1, 1, -2],
    ['Lynx', 0, 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: shootout goal credit',
   ([['Lynx', 0, 'Bears', 1, 'REG', None],
     ['Lynx', 4, 'Otters', 5, 'REG', None],
     ['Otters', 4, 'Hawks', 1, 'REG', None],
     ['Hawks', 1, 'Lynx', 1, 'SO', 'Lynx'],
     ['Bears', 3, 'Hawks', 3, 'SO', 'Bears'],
     ['Hawks', 4, 'Lynx', 5, 'OT', None],
     ['Bears', 2, 'Otters', 0, 'REG', None],
     ['Otters', 4, 'Hawks', 4, 'SO', 'Otters']],),
   [['Bears', 6, 2, 2, 3, 4],
    ['Otters', 6, 2, 2, 3, 3],
    ['Lynx', 4, 0, 1, 2, 0],
    ['Hawks', 4, 0, 0, 0, -7]]),
  ('variant scenario 1',
   ([['Lynx', 1, 'Hawks', 1, 'SO', 'Lynx'],
     ['Otters', 0, 'Lynx', 0, 'SO', 'Lynx'],
     ['Otters', 2, 'Bears', 2, 'SO', 'Otters'],
     ['Bears', 2, 'Otters', 2, 'SO', 'Otters'],
     ['Hawks', 2, 'Lynx', 3, 'REG', None],
     ['Bears', 0, 'Otters', 5, 'REG', None],
     ['Otters', 2, 'Lynx', 2, 'SO', 'Otters'],
     ['Hawks', 1, 'Otters', 1, 'SO', 'Otters'],
     ['Lynx', 0, 'Otters', 2, 'REG', None]],),
   [['Otters', 13, 2, 2, 6, 10],
    ['Lynx', 7, 1, 1, 3, 0],
    ['Hawks', 2, 0, 0, 0, -3],
    ['Bears', 2, 0, 0, 0, -7]]),
  ('variant scenario 2',
   ([['Otters', 4, 'Bears', 4, 'SO', 'Otters'],
     ['Lynx', 4, 'Otters', 3, 'OT', None],
     ['Hawks', 1, 'Otters', 3, 'REG', None]],),
   [['Otters', 5, 1, 1, 2, 2],
    ['Lynx', 2, 0, 1, 1, 1],
    ['Bears', 1, 0, 0, 0, -1],
    ['Hawks', 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: shootout goal credit',
   ([['Lynx', 5, 'Otters', 4, 'REG', None],
     ['Lynx', 2, 'Bears', 4, 'REG', None],
     ['Hawks', 4, 'Bears', 5, 'REG', None],
     ['Hawks', 0, 'Otters', 1, 'REG', None],
     ['Bears', 3, 'Otters', 3, 'SO', 'Otters'],
     ['Bears', 1, 'Hawks', 0, 'OT', None],
     ['Hawks', 1, 'Otters', 1, 'SO', 'Hawks']],),
   [['Bears', 7, 2, 3, 3, 3],
    ['Otters', 5, 1, 1, 2, 0],
    ['Hawks', 3, 0, 0, 1, -2],
    ['Lynx', 2, 1, 1, 1, -1]]),
  ('variant scenario 1',
   ([['Lynx', 0, 'Bears', 3, 'REG', None],
     ['Bears', 3, 'Lynx', 2, 'OT', None],
     ['Lynx', 2, 'Hawks', 2, 'SO', 'Lynx'],
     ['Hawks', 0, 'Lynx', 0, 'SO', 'Lynx'],
     ['Lynx', 1, 'Hawks', 2, 'OT', None]],),
   [['Lynx', 6, 0, 0, 2, -3], ['Bears', 4, 1, 2, 2, 4], ['Hawks', 4, 0, 1, 1, -1]]),
  ('variant scenario 2',
   ([['Bears', 2, 'Otters', 3, 'OT', None],
     ['Hawks', 3, 'Bears', 0, 'REG', None],
     ['Otters', 5, 'Bears', 2, 'REG', None],
     ['Bears', 1, 'Hawks', 3, 'REG', None],
     ['Hawks', 3, 'Otters', 5, 'REG', None],
     ['Lynx', 4, 'Bears', 4, 'SO', 'Bears'],
     ['Lynx', 4, 'Otters', 5, 'OT', None]],),
   [['Otters', 8, 2, 4, 4, 7],
    ['Hawks', 4, 2, 2, 2, 3],
    ['Bears', 3, 0, 0, 1, -8],
    ['Lynx', 2, 0, 0, 0, -2]])]]
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 fixtureActualExpectedOutcome
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[['Bears', 1, 0, 0, 0, 0], ['Hawks', 1, 0, 0, 0, 0]][['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: shootout goal credit[['Otters', 3, 1, 1, 1, 1], ['Hawks', 3, 0, 0, 0, -1], ['Lynx', 2, 0, 1, 1, 0], ['Bears', 1, 0, 0, 0, 0]][['Otters', 4, 1, 1, 2, 2], ['Hawks', 4, 0, 0, 1, -1], ['Lynx', 2, 0, 1, 1, 0], ['Bears', 1, 0, 0, 0, -1]]Failed
variant scenario 1[['Lynx', 6, 1, 2, 2, 3], ['Otters', 3, 0, 1, 1, 1], ['Hawks', 1, 0, 0, 0, -1], ['Bears', 0, 0, 0, 0, -3]][['Lynx', 6, 1, 2, 2, 2], ['Otters', 4, 0, 1, 2, 2], ['Hawks', 1, 0, 0, 0, -1], ['Bears', 0, 0, 0, 0, -3]]Failed
variant scenario 2[['Otters', 8, 2, 4, 4, 9], ['Hawks', 3, 1, 1, 1, 2], ['Lynx', 1, 0, 0, 0, -6], ['Bears', 0, 0, 0, 0, -5]][['Otters', 8, 2, 4, 4, 9], ['Hawks', 3, 1, 1, 1, 2], ['Lynx', 1, 0, 0, 0, -6], ['Bears', 0, 0, 0, 0, -5]]Passed

SHA-256 / 4764fc159af0cda88a2b42c931fba37ed702a986ed028ce4f2eccf2c0697103b

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 decided == 'SO' and team == so_winner:
                row['gd'] += 1
            if f > g:
                row['pts'] += 2
                row['w'] += 1
                if decided == 'REG':
                    row['rw'] += 1
                if decided != 'SO':
                    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: shootout goal credit',
   ([['Hawks', 1, 'Lynx', 2, 'OT', None],
     ['Hawks', 0, 'Bears', 0, 'SO', 'Hawks'],
     ['Otters', 2, 'Hawks', 2, 'SO', 'Otters'],
     ['Otters', 2, 'Lynx', 1, 'REG', None]],),
   [['Otters', 4, 1, 1, 2, 2],
    ['Hawks', 4, 0, 0, 1, -1],
    ['Lynx', 2, 0, 1, 1, 0],
    ['Bears', 1, 0, 0, 0, -1]]),
  ('variant scenario 1',
   ([['Lynx', 2, 'Otters', 3, 'OT', None],
     ['Lynx', 1, 'Otters', 1, 'SO', 'Otters'],
     ['Hawks', 4, 'Lynx', 5, 'OT', None],
     ['Lynx', 5, 'Bears', 2, 'REG', None]],),
   [['Lynx', 6, 1, 2, 2, 2],
    ['Otters', 4, 0, 1, 2, 2],
    ['Hawks', 1, 0, 0, 0, -1],
    ['Bears', 0, 0, 0, 0, -3]]),
  ('variant scenario 2',
   ([['Otters', 3, 'Lynx', 2, 'OT', None],
     ['Lynx', 2, 'Otters', 4, 'REG', None],
     ['Bears', 0, 'Otters', 5, 'REG', None],
     ['Hawks', 5, 'Lynx', 2, 'REG', None],
     ['Hawks', 2, 'Otters', 3, 'OT', None]],),
   [['Otters', 8, 2, 4, 4, 9],
    ['Hawks', 3, 1, 1, 1, 2],
    ['Lynx', 1, 0, 0, 0, -6],
    ['Bears', 0, 0, 0, 0, -5]])],
 [('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: shootout goal credit',
   ([['Otters', 2, 'Lynx', 4, 'REG', None],
     ['Bears', 0, 'Lynx', 0, 'SO', 'Bears'],
     ['Hawks', 4, 'Bears', 4, 'SO', 'Hawks'],
     ['Hawks', 4, 'Lynx', 5, 'OT', None],
     ['Bears', 0, 'Hawks', 3, 'REG', None],
     ['Otters', 2, 'Lynx', 0, 'REG', None]],),
   [['Lynx', 5, 1, 2, 2, 0],
    ['Hawks', 5, 1, 1, 2, 3],
    ['Bears', 3, 0, 0, 1, -3],
    ['Otters', 2, 1, 1, 1, 0]]),
  ('variant scenario 1',
   ([['Lynx', 4, 'Hawks', 4, 'SO', 'Lynx'],
     ['Lynx', 1, 'Bears', 1, 'SO', 'Bears'],
     ['Otters', 1, 'Bears', 1, 'SO', 'Otters'],
     ['Bears', 0, 'Lynx', 1, 'OT', None],
     ['Hawks', 1, 'Bears', 4, 'REG', None],
     ['Bears', 3, 'Hawks', 3, 'SO', 'Hawks']],),
   [['Bears', 7, 1, 1, 2, 1],
    ['Lynx', 5, 0, 1, 2, 1],
    ['Hawks', 3, 0, 0, 1, -3],
    ['Otters', 2, 0, 0, 1, 1]]),
  ('variant scenario 2',
   ([['Lynx', 4, 'Hawks', 5, 'REG', None],
     ['Hawks', 0, 'Bears', 0, 'SO', 'Hawks'],
     ['Otters', 4, 'Bears', 0, 'REG', None],
     ['Lynx', 5, 'Otters', 4, 'REG', None],
     ['Hawks', 5, 'Otters', 2, 'REG', None],
     ['Otters', 2, 'Bears', 2, 'SO', 'Bears'],
     ['Hawks', 3, 'Lynx', 2, 'OT', None]],),
   [['Hawks', 8, 2, 3, 4, 6],
    ['Lynx', 3, 1, 1, 1, -1],
    ['Otters', 3, 1, 1, 1, -1],
    ['Bears', 3, 0, 0, 1, -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: shootout goal credit',
   ([['Lynx', 4, 'Otters', 3, 'OT', None],
     ['Bears', 0, 'Lynx', 3, 'REG', None],
     ['Lynx', 3, 'Bears', 5, 'REG', None],
     ['Lynx', 0, 'Otters', 0, 'SO', 'Otters'],
     ['Otters', 3, 'Bears', 5, 'REG', None],
     ['Otters', 3, 'Hawks', 3, 'SO', 'Otters'],
     ['Otters', 1, 'Bears', 1, 'SO', 'Bears']],),
   [['Bears', 6, 2, 2, 3, 2],
    ['Otters', 6, 0, 0, 2, -2],
    ['Lynx', 5, 1, 2, 2, 1],
    ['Hawks', 1, 0, 0, 0, -1]]),
  ('variant scenario 1',
   ([['Bears', 3, 'Otters', 2, 'OT', None],
     ['Hawks', 0, 'Lynx', 4, 'REG', None],
     ['Otters', 4, 'Lynx', 4, 'SO', 'Lynx'],
     ['Bears', 4, 'Otters', 4, 'SO', 'Otters'],
     ['Bears', 1, 'Hawks', 0, 'OT', None],
     ['Lynx', 3, 'Otters', 2, 'OT', None],
     ['Otters', 2, 'Hawks', 2, 'SO', 'Hawks']],),
   [['Lynx', 6, 1, 2, 3, 6],
    ['Otters', 6, 0, 0, 1, -3],
    ['Bears', 5, 0, 2, 2, 1],
    ['Hawks', 3, 0, 0, 1, -4]]),
  ('variant scenario 2',
   ([['Hawks', 2, 'Otters', 3, 'OT', None],
     ['Hawks', 5, 'Lynx', 4, 'REG', None],
     ['Bears', 2, 'Hawks', 5, 'REG', None],
     ['Otters', 2, 'Bears', 5, 'REG', None]],),
   [['Hawks', 5, 2, 2, 2, 3],
    ['Bears', 2, 1, 1, 1, 0],
    ['Otters', 2, 0, 1, 1, -2],
    ['Lynx', 0, 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: shootout goal credit',
   ([['Lynx', 0, 'Bears', 1, 'REG', None],
     ['Lynx', 4, 'Otters', 5, 'REG', None],
     ['Otters', 4, 'Hawks', 1, 'REG', None],
     ['Hawks', 1, 'Lynx', 1, 'SO', 'Lynx'],
     ['Bears', 3, 'Hawks', 3, 'SO', 'Bears'],
     ['Hawks', 4, 'Lynx', 5, 'OT', None],
     ['Bears', 2, 'Otters', 0, 'REG', None],
     ['Otters', 4, 'Hawks', 4, 'SO', 'Otters']],),
   [['Bears', 6, 2, 2, 3, 4],
    ['Otters', 6, 2, 2, 3, 3],
    ['Lynx', 4, 0, 1, 2, 0],
    ['Hawks', 4, 0, 0, 0, -7]]),
  ('variant scenario 1',
   ([['Lynx', 1, 'Hawks', 1, 'SO', 'Lynx'],
     ['Otters', 0, 'Lynx', 0, 'SO', 'Lynx'],
     ['Otters', 2, 'Bears', 2, 'SO', 'Otters'],
     ['Bears', 2, 'Otters', 2, 'SO', 'Otters'],
     ['Hawks', 2, 'Lynx', 3, 'REG', None],
     ['Bears', 0, 'Otters', 5, 'REG', None],
     ['Otters', 2, 'Lynx', 2, 'SO', 'Otters'],
     ['Hawks', 1, 'Otters', 1, 'SO', 'Otters'],
     ['Lynx', 0, 'Otters', 2, 'REG', None]],),
   [['Otters', 13, 2, 2, 6, 10],
    ['Lynx', 7, 1, 1, 3, 0],
    ['Hawks', 2, 0, 0, 0, -3],
    ['Bears', 2, 0, 0, 0, -7]]),
  ('variant scenario 2',
   ([['Otters', 4, 'Bears', 4, 'SO', 'Otters'],
     ['Lynx', 4, 'Otters', 3, 'OT', None],
     ['Hawks', 1, 'Otters', 3, 'REG', None]],),
   [['Otters', 5, 1, 1, 2, 2],
    ['Lynx', 2, 0, 1, 1, 1],
    ['Bears', 1, 0, 0, 0, -1],
    ['Hawks', 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: shootout goal credit',
   ([['Lynx', 5, 'Otters', 4, 'REG', None],
     ['Lynx', 2, 'Bears', 4, 'REG', None],
     ['Hawks', 4, 'Bears', 5, 'REG', None],
     ['Hawks', 0, 'Otters', 1, 'REG', None],
     ['Bears', 3, 'Otters', 3, 'SO', 'Otters'],
     ['Bears', 1, 'Hawks', 0, 'OT', None],
     ['Hawks', 1, 'Otters', 1, 'SO', 'Hawks']],),
   [['Bears', 7, 2, 3, 3, 3],
    ['Otters', 5, 1, 1, 2, 0],
    ['Hawks', 3, 0, 0, 1, -2],
    ['Lynx', 2, 1, 1, 1, -1]]),
  ('variant scenario 1',
   ([['Lynx', 0, 'Bears', 3, 'REG', None],
     ['Bears', 3, 'Lynx', 2, 'OT', None],
     ['Lynx', 2, 'Hawks', 2, 'SO', 'Lynx'],
     ['Hawks', 0, 'Lynx', 0, 'SO', 'Lynx'],
     ['Lynx', 1, 'Hawks', 2, 'OT', None]],),
   [['Lynx', 6, 0, 0, 2, -3], ['Bears', 4, 1, 2, 2, 4], ['Hawks', 4, 0, 1, 1, -1]]),
  ('variant scenario 2',
   ([['Bears', 2, 'Otters', 3, 'OT', None],
     ['Hawks', 3, 'Bears', 0, 'REG', None],
     ['Otters', 5, 'Bears', 2, 'REG', None],
     ['Bears', 1, 'Hawks', 3, 'REG', None],
     ['Hawks', 3, 'Otters', 5, 'REG', None],
     ['Lynx', 4, 'Bears', 4, 'SO', 'Bears'],
     ['Lynx', 4, 'Otters', 5, 'OT', None]],),
   [['Otters', 8, 2, 4, 4, 7],
    ['Hawks', 4, 2, 2, 2, 3],
    ['Bears', 3, 0, 0, 1, -8],
    ['Lynx', 2, 0, 0, 0, -2]])]]
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 fixtureActualExpectedOutcome
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, 0, 1, 2], ['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: shootout goal credit[['Otters', 4, 1, 1, 2, 3], ['Hawks', 4, 0, 0, 1, 0], ['Lynx', 2, 0, 1, 1, 0], ['Bears', 1, 0, 0, 0, -1]][['Otters', 4, 1, 1, 2, 2], ['Hawks', 4, 0, 0, 1, -1], ['Lynx', 2, 0, 1, 1, 0], ['Bears', 1, 0, 0, 0, -1]]Failed
variant scenario 1[['Lynx', 6, 1, 2, 2, 2], ['Otters', 4, 0, 1, 2, 3], ['Hawks', 1, 0, 0, 0, -1], ['Bears', 0, 0, 0, 0, -3]][['Lynx', 6, 1, 2, 2, 2], ['Otters', 4, 0, 1, 2, 2], ['Hawks', 1, 0, 0, 0, -1], ['Bears', 0, 0, 0, 0, -3]]Failed
variant scenario 2[['Otters', 8, 2, 4, 4, 9], ['Hawks', 3, 1, 1, 1, 2], ['Lynx', 1, 0, 0, 0, -6], ['Bears', 0, 0, 0, 0, -5]][['Otters', 8, 2, 4, 4, 9], ['Hawks', 3, 1, 1, 1, 2], ['Lynx', 1, 0, 0, 0, -6], ['Bears', 0, 0, 0, 0, -5]]Passed

SHA-256 / 7b9175c0be83b96805bf74e79a78956d8caae6e5e6a3177b44ad2f7ffe80e2b4

3 / The verified repair

Exit 0
"""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 != 'SO':
                    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: shootout goal credit',
   ([['Hawks', 1, 'Lynx', 2, 'OT', None],
     ['Hawks', 0, 'Bears', 0, 'SO', 'Hawks'],
     ['Otters', 2, 'Hawks', 2, 'SO', 'Otters'],
     ['Otters', 2, 'Lynx', 1, 'REG', None]],),
   [['Otters', 4, 1, 1, 2, 2],
    ['Hawks', 4, 0, 0, 1, -1],
    ['Lynx', 2, 0, 1, 1, 0],
    ['Bears', 1, 0, 0, 0, -1]]),
  ('variant scenario 1',
   ([['Lynx', 2, 'Otters', 3, 'OT', None],
     ['Lynx', 1, 'Otters', 1, 'SO', 'Otters'],
     ['Hawks', 4, 'Lynx', 5, 'OT', None],
     ['Lynx', 5, 'Bears', 2, 'REG', None]],),
   [['Lynx', 6, 1, 2, 2, 2],
    ['Otters', 4, 0, 1, 2, 2],
    ['Hawks', 1, 0, 0, 0, -1],
    ['Bears', 0, 0, 0, 0, -3]]),
  ('variant scenario 2',
   ([['Otters', 3, 'Lynx', 2, 'OT', None],
     ['Lynx', 2, 'Otters', 4, 'REG', None],
     ['Bears', 0, 'Otters', 5, 'REG', None],
     ['Hawks', 5, 'Lynx', 2, 'REG', None],
     ['Hawks', 2, 'Otters', 3, 'OT', None]],),
   [['Otters', 8, 2, 4, 4, 9],
    ['Hawks', 3, 1, 1, 1, 2],
    ['Lynx', 1, 0, 0, 0, -6],
    ['Bears', 0, 0, 0, 0, -5]])],
 [('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: shootout goal credit',
   ([['Otters', 2, 'Lynx', 4, 'REG', None],
     ['Bears', 0, 'Lynx', 0, 'SO', 'Bears'],
     ['Hawks', 4, 'Bears', 4, 'SO', 'Hawks'],
     ['Hawks', 4, 'Lynx', 5, 'OT', None],
     ['Bears', 0, 'Hawks', 3, 'REG', None],
     ['Otters', 2, 'Lynx', 0, 'REG', None]],),
   [['Lynx', 5, 1, 2, 2, 0],
    ['Hawks', 5, 1, 1, 2, 3],
    ['Bears', 3, 0, 0, 1, -3],
    ['Otters', 2, 1, 1, 1, 0]]),
  ('variant scenario 1',
   ([['Lynx', 4, 'Hawks', 4, 'SO', 'Lynx'],
     ['Lynx', 1, 'Bears', 1, 'SO', 'Bears'],
     ['Otters', 1, 'Bears', 1, 'SO', 'Otters'],
     ['Bears', 0, 'Lynx', 1, 'OT', None],
     ['Hawks', 1, 'Bears', 4, 'REG', None],
     ['Bears', 3, 'Hawks', 3, 'SO', 'Hawks']],),
   [['Bears', 7, 1, 1, 2, 1],
    ['Lynx', 5, 0, 1, 2, 1],
    ['Hawks', 3, 0, 0, 1, -3],
    ['Otters', 2, 0, 0, 1, 1]]),
  ('variant scenario 2',
   ([['Lynx', 4, 'Hawks', 5, 'REG', None],
     ['Hawks', 0, 'Bears', 0, 'SO', 'Hawks'],
     ['Otters', 4, 'Bears', 0, 'REG', None],
     ['Lynx', 5, 'Otters', 4, 'REG', None],
     ['Hawks', 5, 'Otters', 2, 'REG', None],
     ['Otters', 2, 'Bears', 2, 'SO', 'Bears'],
     ['Hawks', 3, 'Lynx', 2, 'OT', None]],),
   [['Hawks', 8, 2, 3, 4, 6],
    ['Lynx', 3, 1, 1, 1, -1],
    ['Otters', 3, 1, 1, 1, -1],
    ['Bears', 3, 0, 0, 1, -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: shootout goal credit',
   ([['Lynx', 4, 'Otters', 3, 'OT', None],
     ['Bears', 0, 'Lynx', 3, 'REG', None],
     ['Lynx', 3, 'Bears', 5, 'REG', None],
     ['Lynx', 0, 'Otters', 0, 'SO', 'Otters'],
     ['Otters', 3, 'Bears', 5, 'REG', None],
     ['Otters', 3, 'Hawks', 3, 'SO', 'Otters'],
     ['Otters', 1, 'Bears', 1, 'SO', 'Bears']],),
   [['Bears', 6, 2, 2, 3, 2],
    ['Otters', 6, 0, 0, 2, -2],
    ['Lynx', 5, 1, 2, 2, 1],
    ['Hawks', 1, 0, 0, 0, -1]]),
  ('variant scenario 1',
   ([['Bears', 3, 'Otters', 2, 'OT', None],
     ['Hawks', 0, 'Lynx', 4, 'REG', None],
     ['Otters', 4, 'Lynx', 4, 'SO', 'Lynx'],
     ['Bears', 4, 'Otters', 4, 'SO', 'Otters'],
     ['Bears', 1, 'Hawks', 0, 'OT', None],
     ['Lynx', 3, 'Otters', 2, 'OT', None],
     ['Otters', 2, 'Hawks', 2, 'SO', 'Hawks']],),
   [['Lynx', 6, 1, 2, 3, 6],
    ['Otters', 6, 0, 0, 1, -3],
    ['Bears', 5, 0, 2, 2, 1],
    ['Hawks', 3, 0, 0, 1, -4]]),
  ('variant scenario 2',
   ([['Hawks', 2, 'Otters', 3, 'OT', None],
     ['Hawks', 5, 'Lynx', 4, 'REG', None],
     ['Bears', 2, 'Hawks', 5, 'REG', None],
     ['Otters', 2, 'Bears', 5, 'REG', None]],),
   [['Hawks', 5, 2, 2, 2, 3],
    ['Bears', 2, 1, 1, 1, 0],
    ['Otters', 2, 0, 1, 1, -2],
    ['Lynx', 0, 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: shootout goal credit',
   ([['Lynx', 0, 'Bears', 1, 'REG', None],
     ['Lynx', 4, 'Otters', 5, 'REG', None],
     ['Otters', 4, 'Hawks', 1, 'REG', None],
     ['Hawks', 1, 'Lynx', 1, 'SO', 'Lynx'],
     ['Bears', 3, 'Hawks', 3, 'SO', 'Bears'],
     ['Hawks', 4, 'Lynx', 5, 'OT', None],
     ['Bears', 2, 'Otters', 0, 'REG', None],
     ['Otters', 4, 'Hawks', 4, 'SO', 'Otters']],),
   [['Bears', 6, 2, 2, 3, 4],
    ['Otters', 6, 2, 2, 3, 3],
    ['Lynx', 4, 0, 1, 2, 0],
    ['Hawks', 4, 0, 0, 0, -7]]),
  ('variant scenario 1',
   ([['Lynx', 1, 'Hawks', 1, 'SO', 'Lynx'],
     ['Otters', 0, 'Lynx', 0, 'SO', 'Lynx'],
     ['Otters', 2, 'Bears', 2, 'SO', 'Otters'],
     ['Bears', 2, 'Otters', 2, 'SO', 'Otters'],
     ['Hawks', 2, 'Lynx', 3, 'REG', None],
     ['Bears', 0, 'Otters', 5, 'REG', None],
     ['Otters', 2, 'Lynx', 2, 'SO', 'Otters'],
     ['Hawks', 1, 'Otters', 1, 'SO', 'Otters'],
     ['Lynx', 0, 'Otters', 2, 'REG', None]],),
   [['Otters', 13, 2, 2, 6, 10],
    ['Lynx', 7, 1, 1, 3, 0],
    ['Hawks', 2, 0, 0, 0, -3],
    ['Bears', 2, 0, 0, 0, -7]]),
  ('variant scenario 2',
   ([['Otters', 4, 'Bears', 4, 'SO', 'Otters'],
     ['Lynx', 4, 'Otters', 3, 'OT', None],
     ['Hawks', 1, 'Otters', 3, 'REG', None]],),
   [['Otters', 5, 1, 1, 2, 2],
    ['Lynx', 2, 0, 1, 1, 1],
    ['Bears', 1, 0, 0, 0, -1],
    ['Hawks', 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: shootout goal credit',
   ([['Lynx', 5, 'Otters', 4, 'REG', None],
     ['Lynx', 2, 'Bears', 4, 'REG', None],
     ['Hawks', 4, 'Bears', 5, 'REG', None],
     ['Hawks', 0, 'Otters', 1, 'REG', None],
     ['Bears', 3, 'Otters', 3, 'SO', 'Otters'],
     ['Bears', 1, 'Hawks', 0, 'OT', None],
     ['Hawks', 1, 'Otters', 1, 'SO', 'Hawks']],),
   [['Bears', 7, 2, 3, 3, 3],
    ['Otters', 5, 1, 1, 2, 0],
    ['Hawks', 3, 0, 0, 1, -2],
    ['Lynx', 2, 1, 1, 1, -1]]),
  ('variant scenario 1',
   ([['Lynx', 0, 'Bears', 3, 'REG', None],
     ['Bears', 3, 'Lynx', 2, 'OT', None],
     ['Lynx', 2, 'Hawks', 2, 'SO', 'Lynx'],
     ['Hawks', 0, 'Lynx', 0, 'SO', 'Lynx'],
     ['Lynx', 1, 'Hawks', 2, 'OT', None]],),
   [['Lynx', 6, 0, 0, 2, -3], ['Bears', 4, 1, 2, 2, 4], ['Hawks', 4, 0, 1, 1, -1]]),
  ('variant scenario 2',
   ([['Bears', 2, 'Otters', 3, 'OT', None],
     ['Hawks', 3, 'Bears', 0, 'REG', None],
     ['Otters', 5, 'Bears', 2, 'REG', None],
     ['Bears', 1, 'Hawks', 3, 'REG', None],
     ['Hawks', 3, 'Otters', 5, 'REG', None],
     ['Lynx', 4, 'Bears', 4, 'SO', 'Bears'],
     ['Lynx', 4, 'Otters', 5, 'OT', None]],),
   [['Otters', 8, 2, 4, 4, 7],
    ['Hawks', 4, 2, 2, 2, 3],
    ['Bears', 3, 0, 0, 1, -8],
    ['Lynx', 2, 0, 0, 0, -2]])]]
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 fixtureActualExpectedOutcome
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, 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, 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: shootout goal credit[['Otters', 4, 1, 1, 2, 2], ['Hawks', 4, 0, 0, 1, -1], ['Lynx', 2, 0, 1, 1, 0], ['Bears', 1, 0, 0, 0, -1]][['Otters', 4, 1, 1, 2, 2], ['Hawks', 4, 0, 0, 1, -1], ['Lynx', 2, 0, 1, 1, 0], ['Bears', 1, 0, 0, 0, -1]]Passed
variant scenario 1[['Lynx', 6, 1, 2, 2, 2], ['Otters', 4, 0, 1, 2, 2], ['Hawks', 1, 0, 0, 0, -1], ['Bears', 0, 0, 0, 0, -3]][['Lynx', 6, 1, 2, 2, 2], ['Otters', 4, 0, 1, 2, 2], ['Hawks', 1, 0, 0, 0, -1], ['Bears', 0, 0, 0, 0, -3]]Passed
variant scenario 2[['Otters', 8, 2, 4, 4, 9], ['Hawks', 3, 1, 1, 1, 2], ['Lynx', 1, 0, 0, 0, -6], ['Bears', 0, 0, 0, 0, -5]][['Otters', 8, 2, 4, 4, 9], ['Hawks', 3, 1, 1, 1, 2], ['Lynx', 1, 0, 0, 0, -6], ['Bears', 0, 0, 0, 0, -5]]Passed

SHA-256 / dcf0efb993794cf59714ee207684e64a908cf590f7ef5a9e768db0bb96286f35

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

Case digest / 45d77079accfde929cd96a578669ccf932e8698401708e1ba5b71c9d51032863