broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(game):
    pa = game['pa_total'] - game['pa_offense_returns']
    tiers = [(0, 1000), (6, 700), (13, 400), (20, 100), (27, 0), (34, -100)]
    pts = -400
    for limit, value in tiers:
        if pa <= limit:
            pts = value
            break
    ya = game['yards_allowed']
    ytiers = [(99, 500), (199, 300), (299, 200), (349, 0), (399, -100), (449, -300)]
    ypts = -500
    for limit, value in ytiers:
        if ya <= limit:
            ypts = value
    pts += ypts
    pts += game['sack_halves'] * 50
    pts += game['ints'] * 200 + game['fum_rec'] * 200
    pts += game['safeties'] * 200
    pts += (game['def_td'] + game['st_td']) * 600
    pts += game['blocked_kicks'] * 200
    return pts
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: yards tier early exit',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 14,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 349}],
   2450),
  ('partial repair probe: yards tier early exit',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 23,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 100}],
   2400),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 1,
     'pa_offense_returns': 2,
     'pa_total': 9,
     'sack_halves': 2,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 299}],
   1900),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 450}],
   500),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 32,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 449}],
   1550),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 21,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 450}],
   1350),
  ('normal control 4',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 14,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 450}],
   1150)],
 [('regression: yards tier early exit',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 7,
     'pa_total': 13,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 350}],
   2250),
  ('partial repair probe: yards tier early exit',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 6,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 399}],
   2650),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 28,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 399}],
   1050),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 7,
     'sack_halves': 6,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 449}],
   1600),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 7,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 450}],
   1550),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 37,
     'sack_halves': 1,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   1550),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 14,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 449}],
   1650)],
 [('regression: yards tier early exit',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 7,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 300}],
   1850),
  ('partial repair probe: yards tier early exit',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 6,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 99}],
   3350),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 27,
     'sack_halves': 4,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 300}],
   1000),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 20,
     'sack_halves': 2,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 441}],
   500),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 7,
     'pa_total': 7,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 449}],
   2600),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 19,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 449}],
   2650),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 27,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 449}],
   850)],
 [('regression: yards tier early exit',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 27,
     'sack_halves': 2,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 300}],
   900),
  ('partial repair probe: yards tier early exit',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 20,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 199}],
   2150),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 20,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 332}],
   1500),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 14,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 400}],
   1650),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 449}],
   1350),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 35,
     'sack_halves': 2,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 400}],
   2100),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 9,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   2550)],
 [('regression: yards tier early exit',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 34,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 100}],
   1700),
  ('partial repair probe: yards tier early exit',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 399}],
   1350),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 27,
     'sack_halves': 9,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 299}],
   1450),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 449}],
   2800),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 12,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 450}],
   450),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 41,
     'sack_halves': 9,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 400}],
   750),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 6,
     'sack_halves': 2,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 449}],
   2600)]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(game):
    pa = game['pa_total'] - game['pa_offense_returns']
    tiers = [(0, 1000), (6, 700), (13, 400), (20, 100), (27, 0), (34, -100)]
    pts = -400
    for limit, value in tiers:
        if pa <= limit:
            pts = value
            break
    ya = game['yards_allowed']
    ytiers = [(99, 500), (199, 300), (299, 200), (349, 0), (399, -100), (449, -300)]
    ypts = -500
    for limit, value in reversed(ytiers):
        if ya <= limit:
            ypts = value
            break
    pts += ypts
    pts += game['sack_halves'] * 50
    pts += game['ints'] * 200 + game['fum_rec'] * 200
    pts += game['safeties'] * 200
    pts += (game['def_td'] + game['st_td']) * 600
    pts += game['blocked_kicks'] * 200
    return pts
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: yards tier early exit',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 14,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 349}],
   2450),
  ('partial repair probe: yards tier early exit',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 23,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 100}],
   2400),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 1,
     'pa_offense_returns': 2,
     'pa_total': 9,
     'sack_halves': 2,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 299}],
   1900),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 450}],
   500),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 32,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 449}],
   1550),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 21,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 450}],
   1350),
  ('normal control 4',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 14,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 450}],
   1150)],
 [('regression: yards tier early exit',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 7,
     'pa_total': 13,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 350}],
   2250),
  ('partial repair probe: yards tier early exit',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 6,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 399}],
   2650),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 28,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 399}],
   1050),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 7,
     'sack_halves': 6,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 449}],
   1600),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 7,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 450}],
   1550),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 37,
     'sack_halves': 1,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   1550),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 14,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 449}],
   1650)],
 [('regression: yards tier early exit',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 7,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 300}],
   1850),
  ('partial repair probe: yards tier early exit',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 6,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 99}],
   3350),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 27,
     'sack_halves': 4,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 300}],
   1000),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 20,
     'sack_halves': 2,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 441}],
   500),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 7,
     'pa_total': 7,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 449}],
   2600),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 19,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 449}],
   2650),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 27,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 449}],
   850)],
 [('regression: yards tier early exit',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 27,
     'sack_halves': 2,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 300}],
   900),
  ('partial repair probe: yards tier early exit',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 20,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 199}],
   2150),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 20,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 332}],
   1500),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 14,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 400}],
   1650),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 449}],
   1350),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 35,
     'sack_halves': 2,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 400}],
   2100),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 9,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   2550)],
 [('regression: yards tier early exit',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 34,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 100}],
   1700),
  ('partial repair probe: yards tier early exit',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 399}],
   1350),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 27,
     'sack_halves': 9,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 299}],
   1450),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 449}],
   2800),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 12,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 450}],
   450),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 41,
     'sack_halves': 9,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 400}],
   750),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 6,
     'sack_halves': 2,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 449}],
   2600)]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*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)

prompt:
Every defense allowing under 450 yards receives -3 yards points.

Score a team defense/special teams unit in hundredths. Points allowed exclude points the opponent scored on returns against our offense. Tiers: 0 -> 10, 1-6 -> 7, 7-13 -> 4, 14-20 -> 1, 21-27 -> 0, 28-34 -> -1, 35+ -> -4. Yards allowed: <=99 -> 5, 100-199 -> 3, 200-299 -> 2, 300-349 -> 0, 350-399 -> -1, 400-449 -> -3, 450+ -> -5. Sacks are recorded in half-sack units and score 1 per full sack (0.5 per half). Interceptions and opponent fumbles recovered 2 each (own fumble recoveries score nothing), safety 2, defensive or special-teams TD 6, blocked kick 2.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(game):
    pa = game['pa_total'] - game['pa_offense_returns']
    tiers = [(0, 1000), (6, 700), (13, 400), (20, 100), (27, 0), (34, -100)]
    pts = -400
    for limit, value in tiers:
        if pa <= limit:
            pts = value
            break
    ya = game['yards_allowed']
    ytiers = [(99, 500), (199, 300), (299, 200), (349, 0), (399, -100), (449, -300)]
    ypts = -500
    for limit, value in ytiers:
        if ya <= limit:
            ypts = value
            break
    pts += ypts
    pts += game['sack_halves'] * 100
    pts += game['ints'] * 200 + game['fum_rec'] * 200
    pts += game['safeties'] * 200
    pts += (game['def_td'] + game['st_td']) * 600
    pts += game['blocked_kicks'] * 200
    return pts
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: half sack units',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 28,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 199}],
   1250),
  ('partial repair probe: half sack units',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 7,
     'pa_total': 34,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 425}],
   50),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 2,
     'pa_total': 37,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 349}],
   1700),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 29,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 200}],
   1800),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 0,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 100}],
   2100),
  ('normal control 3',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 7,
     'pa_total': 14,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 200}],
   2400),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 7,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 350}],
   2300)],
 [('regression: half sack units',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 28,
     'sack_halves': 4,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   1200),
  ('partial repair probe: half sack units',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 200}],
   1050),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 34,
     'sack_halves': 2,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 400}],
   1100),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 27,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 300}],
   1300),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 27,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 449}],
   1400),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 20,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 199}],
   1400),
  ('normal control 4',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 0,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 200}],
   3000)],
 [('regression: half sack units',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 0,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 399}],
   2100),
  ('partial repair probe: half sack units',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 7,
     'sack_halves': 9,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 350}],
   1150),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 34,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 300}],
   1650),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 28,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 400}],
   -100),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 21,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 199}],
   1800),
  ('normal control 3',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 28,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 350}],
   1100),
  ('normal control 4',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 20,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 100}],
   1600)],
 [('regression: half sack units',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 20,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 100}],
   1950),
  ('partial repair probe: half sack units',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 23,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 99}],
   2550),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 22,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 200}],
   2150),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 30,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 200}],
   2600),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 13,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 399}],
   800),
  ('normal control 3',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 26,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 199}],
   1200),
  ('normal control 4',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 24,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 299}],
   1000)],
 [('regression: half sack units',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 40,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 199}],
   1650),
  ('partial repair probe: half sack units',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 3,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 99}],
   2050),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 41,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 300}],
   2150),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 7,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 300}],
   1400),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 27,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 200}],
   1600),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 6,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 200}],
   1500),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 7,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 400}],
   1300)]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*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)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(game):
    pa = game['pa_total'] - game['pa_offense_returns']
    tiers = [(0, 1000), (6, 700), (13, 400), (20, 100), (27, 0), (34, -100)]
    pts = -400
    for limit, value in tiers:
        if pa <= limit:
            pts = value
            break
    ya = game['yards_allowed']
    ytiers = [(99, 500), (199, 300), (299, 200), (349, 0), (399, -100), (449, -300)]
    ypts = -500
    for limit, value in ytiers:
        if ya <= limit:
            ypts = value
            break
    pts += ypts
    pts += game['sack_halves'] // 2 * 100
    pts += game['ints'] * 200 + game['fum_rec'] * 200
    pts += game['safeties'] * 200
    pts += (game['def_td'] + game['st_td']) * 600
    pts += game['blocked_kicks'] * 200
    return pts
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: half sack units',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 28,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 199}],
   1250),
  ('partial repair probe: half sack units',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 7,
     'pa_total': 34,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 425}],
   50),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 2,
     'pa_total': 37,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 349}],
   1700),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 29,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 200}],
   1800),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 0,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 100}],
   2100),
  ('normal control 3',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 7,
     'pa_total': 14,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 200}],
   2400),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 7,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 350}],
   2300)],
 [('regression: half sack units',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 28,
     'sack_halves': 4,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   1200),
  ('partial repair probe: half sack units',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 200}],
   1050),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 34,
     'sack_halves': 2,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 400}],
   1100),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 27,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 300}],
   1300),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 27,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 449}],
   1400),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 20,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 199}],
   1400),
  ('normal control 4',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 0,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 200}],
   3000)],
 [('regression: half sack units',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 0,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 399}],
   2100),
  ('partial repair probe: half sack units',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 7,
     'sack_halves': 9,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 350}],
   1150),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 34,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 300}],
   1650),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 28,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 400}],
   -100),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 21,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 199}],
   1800),
  ('normal control 3',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 28,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 350}],
   1100),
  ('normal control 4',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 20,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 100}],
   1600)],
 [('regression: half sack units',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 20,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 100}],
   1950),
  ('partial repair probe: half sack units',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 23,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 99}],
   2550),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 22,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 200}],
   2150),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 30,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 200}],
   2600),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 7,
     'pa_total': 13,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 399}],
   800),
  ('normal control 3',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 26,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 199}],
   1200),
  ('normal control 4',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 24,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 299}],
   1000)],
 [('regression: half sack units',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 40,
     'sack_halves': 9,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 199}],
   1650),
  ('partial repair probe: half sack units',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 3,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 99}],
   2050),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 41,
     'sack_halves': 3,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 300}],
   2150),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 7,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 300}],
   1400),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 27,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 200}],
   1600),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 6,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 200}],
   1500),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 7,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 400}],
   1300)]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*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)

prompt:
A defense with 2.5 sacks scores 5 sack points.

Score a team defense/special teams unit in hundredths. Points allowed exclude points the opponent scored on returns against our offense. Tiers: 0 -> 10, 1-6 -> 7, 7-13 -> 4, 14-20 -> 1, 21-27 -> 0, 28-34 -> -1, 35+ -> -4. Yards allowed: <=99 -> 5, 100-199 -> 3, 200-299 -> 2, 300-349 -> 0, 350-399 -> -1, 400-449 -> -3, 450+ -> -5. Sacks are recorded in half-sack units and score 1 per full sack (0.5 per half). Interceptions and opponent fumbles recovered 2 each (own fumble recoveries score nothing), safety 2, defensive or special-teams TD 6, blocked kick 2.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(game):
    pa = game['pa_total'] - game['pa_offense_returns']
    tiers = [(0, 1000), (6, 700), (13, 400), (20, 100), (27, 0), (34, -100)]
    pts = -400
    for limit, value in tiers:
        if pa <= limit:
            pts = value
            break
    ya = game['yards_allowed']
    ytiers = [(99, 500), (199, 300), (299, 200), (349, 0), (399, -100), (449, -300)]
    ypts = -500
    for limit, value in ytiers:
        if ya <= limit:
            ypts = value
            break
    pts += ypts
    pts += game['sack_halves'] * 50
    pts += game['ints'] * 200 + (game['fum_rec'] + game['own_fum_rec']) * 200
    pts += game['safeties'] * 200
    pts += (game['def_td'] + game['st_td']) * 600
    pts += game['blocked_kicks'] * 200
    return pts
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: own fumble recoveries',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 23,
     'sack_halves': 8,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 300}],
   1600),
  ('partial repair probe: own fumble recoveries',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 34,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 299}],
   1550),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 34,
     'sack_halves': 8,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 300}],
   2300),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 28,
     'sack_halves': 1,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 450}],
   650),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 31,
     'sack_halves': 2,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 400}],
   100),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 7,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 399}],
   1900),
  ('normal control 4',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 14,
     'sack_halves': 6,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 437}],
   600)],
 [('regression: own fumble recoveries',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 34,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 449}],
   600),
  ('partial repair probe: own fumble recoveries',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 13,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 350}],
   2050),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 28,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 350}],
   1400),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 7,
     'sack_halves': 8,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 300}],
   2400),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 35,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 399}],
   1150),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 35,
     'sack_halves': 1,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 399}],
   1250),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 27,
     'sack_halves': 8,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 99}],
   2700)],
 [('regression: own fumble recoveries',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 2,
     'pa_total': 15,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 99}],
   1650),
  ('partial repair probe: own fumble recoveries',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 2,
     'pa_total': 16,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 199}],
   1050),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 2,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 450}],
   1700),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 9,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 199}],
   2750),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 36,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 399}],
   750),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 12,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 299}],
   2750),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 28,
     'sack_halves': 3,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 200}],
   1450)],
 [('regression: own fumble recoveries',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 0,
     'sack_halves': 1,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 449}],
   3350),
  ('partial repair probe: own fumble recoveries',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 19,
     'sack_halves': 8,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 199}],
   1500),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 6,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   2100),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 400}],
   1650),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 41,
     'sack_halves': 2,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 200}],
   900),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 300}],
   1700),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 34,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 400}],
   400)],
 [('regression: own fumble recoveries',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 1,
     'pa_offense_returns': 7,
     'pa_total': 41,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 400}],
   1500),
  ('partial repair probe: own fumble recoveries',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 33,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 300}],
   950),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 39,
     'sack_halves': 8,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 277}],
   2100),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 7,
     'sack_halves': 8,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   2700),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 15,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 350}],
   2550),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 7,
     'sack_halves': 2,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 100}],
   3200),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 27,
     'sack_halves': 3,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 449}],
   450)]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(game):
    pa = game['pa_total'] - game['pa_offense_returns']
    tiers = [(0, 1000), (6, 700), (13, 400), (20, 100), (27, 0), (34, -100)]
    pts = -400
    for limit, value in tiers:
        if pa <= limit:
            pts = value
            break
    ya = game['yards_allowed']
    ytiers = [(99, 500), (199, 300), (299, 200), (349, 0), (399, -100), (449, -300)]
    ypts = -500
    for limit, value in ytiers:
        if ya <= limit:
            ypts = value
            break
    pts += ypts
    pts += game['sack_halves'] * 50
    pts += game['ints'] * 200 + (game['fum_rec'] - game['own_fum_rec']) * 200
    pts += game['safeties'] * 200
    pts += (game['def_td'] + game['st_td']) * 600
    pts += game['blocked_kicks'] * 200
    return pts
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: own fumble recoveries',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 23,
     'sack_halves': 8,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 300}],
   1600),
  ('partial repair probe: own fumble recoveries',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 34,
     'sack_halves': 1,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 299}],
   1550),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 34,
     'sack_halves': 8,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 300}],
   2300),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 28,
     'sack_halves': 1,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 450}],
   650),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 31,
     'sack_halves': 2,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 400}],
   100),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 7,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 399}],
   1900),
  ('normal control 4',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 14,
     'sack_halves': 6,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 437}],
   600)],
 [('regression: own fumble recoveries',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 0,
     'pa_total': 34,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 449}],
   600),
  ('partial repair probe: own fumble recoveries',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 13,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 350}],
   2050),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 28,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 350}],
   1400),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 7,
     'sack_halves': 8,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 300}],
   2400),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 35,
     'sack_halves': 5,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 399}],
   1150),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 35,
     'sack_halves': 1,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 399}],
   1250),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 27,
     'sack_halves': 8,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 99}],
   2700)],
 [('regression: own fumble recoveries',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 1,
     'own_fum_rec': 1,
     'pa_offense_returns': 2,
     'pa_total': 15,
     'sack_halves': 7,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 99}],
   1650),
  ('partial repair probe: own fumble recoveries',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 0,
     'own_fum_rec': 1,
     'pa_offense_returns': 2,
     'pa_total': 16,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 199}],
   1050),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 2,
     'own_fum_rec': 2,
     'pa_offense_returns': 2,
     'pa_total': 2,
     'sack_halves': 4,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 450}],
   1700),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 9,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 199}],
   2750),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 36,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 399}],
   750),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 12,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 299}],
   2750),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 28,
     'sack_halves': 3,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 200}],
   1450)],
 [('regression: own fumble recoveries',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 3,
     'own_fum_rec': 1,
     'pa_offense_returns': 0,
     'pa_total': 0,
     'sack_halves': 1,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 449}],
   3350),
  ('partial repair probe: own fumble recoveries',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 19,
     'sack_halves': 8,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 199}],
   1500),
  ('second regression',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 3,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 6,
     'sack_halves': 0,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   2100),
  ('normal control 1',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 21,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 400}],
   1650),
  ('normal control 2',
   [{'blocked_kicks': 0,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 6,
     'pa_total': 41,
     'sack_halves': 2,
     'safeties': 0,
     'st_td': 1,
     'yards_allowed': 200}],
   900),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 13,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 300}],
   1700),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 0,
     'ints': 3,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 34,
     'sack_halves': 0,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 400}],
   400)],
 [('regression: own fumble recoveries',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 1,
     'pa_offense_returns': 7,
     'pa_total': 41,
     'sack_halves': 6,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 400}],
   1500),
  ('partial repair probe: own fumble recoveries',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 2,
     'pa_offense_returns': 6,
     'pa_total': 33,
     'sack_halves': 7,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 300}],
   950),
  ('second regression',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 1,
     'ints': 2,
     'own_fum_rec': 1,
     'pa_offense_returns': 6,
     'pa_total': 39,
     'sack_halves': 8,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 277}],
   2100),
  ('normal control 1',
   [{'blocked_kicks': 0,
     'def_td': 1,
     'fum_rec': 1,
     'ints': 1,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 7,
     'sack_halves': 8,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 450}],
   2700),
  ('normal control 2',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 2,
     'pa_total': 15,
     'sack_halves': 5,
     'safeties': 1,
     'st_td': 1,
     'yards_allowed': 350}],
   2550),
  ('normal control 3',
   [{'blocked_kicks': 1,
     'def_td': 1,
     'fum_rec': 2,
     'ints': 2,
     'own_fum_rec': 0,
     'pa_offense_returns': 7,
     'pa_total': 7,
     'sack_halves': 2,
     'safeties': 1,
     'st_td': 0,
     'yards_allowed': 100}],
   3200),
  ('normal control 4',
   [{'blocked_kicks': 1,
     'def_td': 0,
     'fum_rec': 2,
     'ints': 0,
     'own_fum_rec': 0,
     'pa_offense_returns': 0,
     'pa_total': 27,
     'sack_halves': 3,
     'safeties': 0,
     'st_td': 0,
     'yards_allowed': 449}],
   450)]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*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)

prompt:
Special teams recovering their own fumble adds 2 defense points.

Score a team defense/special teams unit in hundredths. Points allowed exclude points the opponent scored on returns against our offense. Tiers: 0 -> 10, 1-6 -> 7, 7-13 -> 4, 14-20 -> 1, 21-27 -> 0, 28-34 -> -1, 35+ -> -4. Yards allowed: <=99 -> 5, 100-199 -> 3, 200-299 -> 2, 300-349 -> 0, 350-399 -> -1, 400-449 -> -3, 450+ -> -5. Sacks are recorded in half-sack units and score 1 per full sack (0.5 per half). Interceptions and opponent fumbles recovered 2 each (own fumble recoveries score nothing), safety 2, defensive or special-teams TD 6, blocked kick 2.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(kicks):
    pts = 0
    longest = 0
    for k in kicks:
        if k['type'] == 'pat':
            if k['result'] == 'made':
                pts += 1
            elif k['result'] == 'missed':
                pts -= 1
            continue
        dist = k['yardline'] + 10
        if k['result'] == 'made':
            pts += 3 if dist <= 39 else 4 if dist <= 49 else 5
            longest = max(longest, dist)
        elif k['result'] == 'missed':
            pts += -2 if dist <= 39 else -1 if dist <= 49 else 0
    return [pts, longest]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: snap and hold offset', [[{'result': 'missed', 'type': 'fg', 'yardline': 34}]], [0, 0]),
  ('partial repair probe: snap and hold offset',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [9, 51]),
  ('second regression',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [13, 51]),
  ('normal control 1',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [0, 0]),
  ('normal control 2', [[{'result': 'missed', 'type': 'fg', 'yardline': 20}]], [-2, 0]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [1, 0]),
  ('normal control 4',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'fg', 'yardline': 12}]],
   [-2, 0])],
 [('regression: snap and hold offset',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 34}, {'result': 'blocked', 'type': 'fg', 'yardline': 41},
     {'result': 'blocked', 'type': 'fg', 'yardline': 9}, {'result': 'made', 'type': 'fg', 'yardline': 21}]],
   [3, 38]),
  ('partial repair probe: snap and hold offset',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 23}]],
   [-1, 0]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'missed', 'type': 'fg', 'yardline': 22}]],
   [6, 51]),
  ('normal control 1',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'fg', 'yardline': 33}]],
   [-2, 0]),
  ('normal control 2', [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}]], [0, 0]),
  ('normal control 3', [[{'result': 'blocked', 'type': 'fg', 'yardline': 23}]], [0, 0]),
  ('normal control 4',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [-2, 0])],
 [('regression: snap and hold offset',
   [[{'result': 'made', 'type': 'fg', 'yardline': 1}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 34}]],
   [10, 51]),
  ('partial repair probe: snap and hold offset',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'blocked', 'type': 'fg', 'yardline': 38},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [4, 39]),
  ('second regression',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 24}]],
   [8, 50]),
  ('normal control 1',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 34}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [0, 0]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 22}]],
   [1, 0]),
  ('normal control 3', [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}]], [0, 0]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [1, 0])],
 [('regression: snap and hold offset',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [9, 51]),
  ('partial repair probe: snap and hold offset',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 19}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32}]],
   [1, 49]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'fg', 'yardline': 22}]],
   [3, 50]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [0, 0]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 33}]],
   [1, 0]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [1, 0]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 45}]],
   [1, 0])],
 [('regression: snap and hold offset',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [1, 49]),
  ('partial repair probe: snap and hold offset',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 11}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 37}, {'result': 'missed', 'type': 'fg', 'yardline': 33},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [1, 54]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}]],
   [10, 49]),
  ('normal control 1',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'fg', 'yardline': 12},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [3, 0]),
  ('normal control 2',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 23},
     {'result': 'blocked', 'type': 'fg', 'yardline': 23}]],
   [0, 0]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 23}]],
   [2, 0]),
  ('normal control 4',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [3, 0])]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(kicks):
    pts = 0
    longest = 0
    for k in kicks:
        if k['type'] == 'pat':
            if k['result'] == 'made':
                pts += 1
            elif k['result'] == 'missed':
                pts -= 1
            continue
        dist = k['yardline'] + 7
        if k['result'] == 'made':
            pts += 3 if dist <= 39 else 4 if dist <= 49 else 5
            longest = max(longest, dist)
        elif k['result'] == 'missed':
            pts += -2 if dist <= 39 else -1 if dist <= 49 else 0
    return [pts, longest]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: snap and hold offset', [[{'result': 'missed', 'type': 'fg', 'yardline': 34}]], [0, 0]),
  ('partial repair probe: snap and hold offset',
   [[{'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [9, 51]),
  ('second regression',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'fg', 'yardline': 22}]],
   [13, 51]),
  ('normal control 1',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 32}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [0, 0]),
  ('normal control 2', [[{'result': 'missed', 'type': 'fg', 'yardline': 20}]], [-2, 0]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [1, 0]),
  ('normal control 4',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'fg', 'yardline': 12}]],
   [-2, 0])],
 [('regression: snap and hold offset',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 34}, {'result': 'blocked', 'type': 'fg', 'yardline': 41},
     {'result': 'blocked', 'type': 'fg', 'yardline': 9}, {'result': 'made', 'type': 'fg', 'yardline': 21}]],
   [3, 38]),
  ('partial repair probe: snap and hold offset',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 23}]],
   [-1, 0]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 34}, {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'missed', 'type': 'fg', 'yardline': 22}]],
   [6, 51]),
  ('normal control 1',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'fg', 'yardline': 33}]],
   [-2, 0]),
  ('normal control 2', [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}]], [0, 0]),
  ('normal control 3', [[{'result': 'blocked', 'type': 'fg', 'yardline': 23}]], [0, 0]),
  ('normal control 4',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [-2, 0])],
 [('regression: snap and hold offset',
   [[{'result': 'made', 'type': 'fg', 'yardline': 1}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 22},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 34}]],
   [10, 51]),
  ('partial repair probe: snap and hold offset',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'blocked', 'type': 'fg', 'yardline': 38},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15}]],
   [4, 39]),
  ('second regression',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 24}]],
   [8, 50]),
  ('normal control 1',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 34}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [0, 0]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 22}]],
   [1, 0]),
  ('normal control 3', [[{'result': 'blocked', 'type': 'pat', 'yardline': 15}]], [0, 0]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 34}]],
   [1, 0])],
 [('regression: snap and hold offset',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 32}]],
   [9, 51]),
  ('partial repair probe: snap and hold offset',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 19}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 32}]],
   [1, 49]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 33}, {'result': 'missed', 'type': 'fg', 'yardline': 22}]],
   [3, 50]),
  ('normal control 1',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'fg', 'yardline': 22},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [0, 0]),
  ('normal control 2',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 33}]],
   [1, 0]),
  ('normal control 3',
   [[{'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [1, 0]),
  ('normal control 4',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'missed', 'type': 'fg', 'yardline': 45}]],
   [1, 0])],
 [('regression: snap and hold offset',
   [[{'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 33},
     {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [1, 49]),
  ('partial repair probe: snap and hold offset',
   [[{'result': 'missed', 'type': 'fg', 'yardline': 11}, {'result': 'missed', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 37}, {'result': 'missed', 'type': 'fg', 'yardline': 33},
     {'result': 'missed', 'type': 'pat', 'yardline': 15}]],
   [1, 54]),
  ('second regression',
   [[{'result': 'made', 'type': 'fg', 'yardline': 32}, {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'fg', 'yardline': 22}, {'result': 'made', 'type': 'fg', 'yardline': 32},
     {'result': 'blocked', 'type': 'pat', 'yardline': 15},
     {'result': 'missed', 'type': 'fg', 'yardline': 32}]],
   [10, 49]),
  ('normal control 1',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 33}, {'result': 'blocked', 'type': 'fg', 'yardline': 12},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [3, 0]),
  ('normal control 2',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 23},
     {'result': 'blocked', 'type': 'fg', 'yardline': 23}]],
   [0, 0]),
  ('normal control 3',
   [[{'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'blocked', 'type': 'fg', 'yardline': 23}]],
   [2, 0]),
  ('normal control 4',
   [[{'result': 'blocked', 'type': 'fg', 'yardline': 23}, {'result': 'made', 'type': 'pat', 'yardline': 15},
     {'result': 'made', 'type': 'pat', 'yardline': 15}, {'result': 'blocked', 'type': 'fg', 'yardline': 34},
     {'result': 'made', 'type': 'pat', 'yardline': 15}]],
   [3, 0])]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*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)

prompt:
A 43-yard field goal is scored as a 36-yarder worth 3 points.

Score a kicker. Kick distance is the line-of-scrimmage yardline plus 17 (10 yards of end zone and a 7-yard hold). Made FG: <=39 yards 3, 40-49 4, 50+ 5. Missed FG: <=39 -2, 40-49 -1, 50+ 0. Blocked FG and blocked PAT score 0. PAT made +1, missed -1. Return [points, longest made FG distance or 0].

split: open-access