{"abstract":"exd5 also deletes the white knight on d4.","category":"Chess move legality","checks":8,"contract":"Input: {\"board\", \"moves\": [uci strings]}. Apply the moves in order and return the final board sorted by square. A king moving two files castles: the rook jumps from h to f (g-file destination) or from a to d (c-file destination). A pawn moving diagonally onto an empty square captures en passant, removing the pawn on the destination file and origin rank. A fifth character promotes to that piece in the mover's colour.","evaluation_group":"w2-chess_move_legality-uci-move-application","failed_approach":"Treating every move onto an empty square as en passant breaks ordinary pushes.","family":"w2-chess_move_legality-uci-move-application-en-passant-detection","id":"FA-82741","implementations":{"attempt":{"sha256":"01085fd71514058c1a060da08df6a9c69c307ff3dcb9573851ee4853f1142ecc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    b=dict(x['board'])\n    for u in x['moves']:\n        fr,to,pr=u[:2],u[2:4],u[4:]\n        p=b.pop(fr)\n        if p in ('K','k') and abs(ord(to[0])-ord(fr[0]))==2:\n            if to[0]=='g': b['f'+to[1]]=b.pop('h'+to[1])\n            else: b['d'+to[1]]=b.pop('a'+to[1])\n        if p in ('P','p') and to not in b:\n            del b[to[0]+fr[1]]\n        if pr: p=pr.upper() if p=='P' else pr.lower()\n        b[to]=p\n    return dict(sorted(b.items()))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('white long castle', {'board': {'a1': 'R', 'e1': 'K', 'e8': 'k'}, 'moves': ['e1c1']},\n   {'c1': 'K', 'd1': 'R', 'e8': 'k'}),\n  ('black short castle', {'board': {'e1': 'K', 'e8': 'k', 'h8': 'r'}, 'moves': ['e8g8']},\n   {'e1': 'K', 'f8': 'r', 'g8': 'k'}),\n  ('king step to g1', {'board': {'e8': 'k', 'f1': 'K', 'h1': 'R'}, 'moves': ['f1g1']},\n   {'e8': 'k', 'g1': 'K', 'h1': 'R'}),\n  ('king step to c8', {'board': {'a8': 'r', 'd8': 'k', 'e1': 'K'}, 'moves': ['d8c8']},\n   {'a8': 'r', 'c8': 'k', 'e1': 'K'}),\n  ('white en passant',\n   {'board': {'d7': 'p', 'e1': 'K', 'e5': 'P', 'e8': 'k'}, 'moves': ['d7d5', 'e5d6']},\n   {'d6': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('black en passant',\n   {'board': {'d4': 'p', 'e1': 'K', 'e2': 'P', 'e8': 'k'}, 'moves': ['e2e4', 'd4e3']},\n   {'e1': 'K', 'e3': 'p', 'e8': 'k'}),\n  ('ordinary pawn capture',\n   {'board': {'d4': 'N', 'd5': 'p', 'e1': 'K', 'e4': 'P', 'e8': 'k'}, 'moves': ['e4d5']},\n   {'d4': 'N', 'd5': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('quiet sequence',\n   {'board': {'b8': 'n', 'e1': 'K', 'e8': 'k', 'g1': 'N'}, 'moves': ['g1f3', 'b8c6', 'f3e5']},\n   {'c6': 'n', 'e1': 'K', 'e5': 'N', 'e8': 'k'})],\n [('king step to c8', {'board': {'a8': 'r', 'd8': 'k', 'e1': 'K'}, 'moves': ['d8c8']},\n   {'a8': 'r', 'c8': 'k', 'e1': 'K'}),\n  ('white en passant',\n   {'board': {'d7': 'p', 'e1': 'K', 'e5': 'P', 'e8': 'k'}, 'moves': ['d7d5', 'e5d6']},\n   {'d6': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('black en passant',\n   {'board': {'d4': 'p', 'e1': 'K', 'e2': 'P', 'e8': 'k'}, 'moves': ['e2e4', 'd4e3']},\n   {'e1': 'K', 'e3': 'p', 'e8': 'k'}),\n  ('ordinary pawn capture',\n   {'board': {'d4': 'N', 'd5': 'p', 'e1': 'K', 'e4': 'P', 'e8': 'k'}, 'moves': ['e4d5']},\n   {'d4': 'N', 'd5': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('white promotion', {'board': {'b7': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['b7b8q']},\n   {'b8': 'Q', 'e1': 'K', 'e8': 'k'}),\n  ('black underpromotion', {'board': {'e1': 'K', 'e8': 'k', 'g2': 'p'}, 'moves': ['g2g1n']},\n   {'e1': 'K', 'e8': 'k', 'g1': 'n'}),\n  ('quiet sequence',\n   {'board': {'b8': 'n', 'e1': 'K', 'e8': 'k', 'g1': 'N'}, 'moves': ['g1f3', 'b8c6', 'f3e5']},\n   {'c6': 'n', 'e1': 'K', 'e5': 'N', 'e8': 'k'}),\n  ('pawn push', {'board': {'c2': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['c2c4']},\n   {'c4': 'P', 'e1': 'K', 'e8': 'k'})],\n [('white long castle', {'board': {'a1': 'R', 'e1': 'K', 'e8': 'k'}, 'moves': ['e1c1']},\n   {'c1': 'K', 'd1': 'R', 'e8': 'k'}),\n  ('black short castle', {'board': {'e1': 'K', 'e8': 'k', 'h8': 'r'}, 'moves': ['e8g8']},\n   {'e1': 'K', 'f8': 'r', 'g8': 'k'}),\n  ('king step to g1', {'board': {'e8': 'k', 'f1': 'K', 'h1': 'R'}, 'moves': ['f1g1']},\n   {'e8': 'k', 'g1': 'K', 'h1': 'R'}),\n  ('black en passant',\n   {'board': {'d4': 'p', 'e1': 'K', 'e2': 'P', 'e8': 'k'}, 'moves': ['e2e4', 'd4e3']},\n   {'e1': 'K', 'e3': 'p', 'e8': 'k'}),\n  ('ordinary pawn capture',\n   {'board': {'d4': 'N', 'd5': 'p', 'e1': 'K', 'e4': 'P', 'e8': 'k'}, 'moves': ['e4d5']},\n   {'d4': 'N', 'd5': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('white promotion', {'board': {'b7': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['b7b8q']},\n   {'b8': 'Q', 'e1': 'K', 'e8': 'k'}),\n  ('black underpromotion', {'board': {'e1': 'K', 'e8': 'k', 'g2': 'p'}, 'moves': ['g2g1n']},\n   {'e1': 'K', 'e8': 'k', 'g1': 'n'}),\n  ('pawn push', {'board': {'c2': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['c2c4']},\n   {'c4': 'P', 'e1': 'K', 'e8': 'k'})],\n [('white long castle', {'board': {'a1': 'R', 'e1': 'K', 'e8': 'k'}, 'moves': ['e1c1']},\n   {'c1': 'K', 'd1': 'R', 'e8': 'k'}),\n  ('black short castle', {'board': {'e1': 'K', 'e8': 'k', 'h8': 'r'}, 'moves': ['e8g8']},\n   {'e1': 'K', 'f8': 'r', 'g8': 'k'}),\n  ('king step to g1', {'board': {'e8': 'k', 'f1': 'K', 'h1': 'R'}, 'moves': ['f1g1']},\n   {'e8': 'k', 'g1': 'K', 'h1': 'R'}),\n  ('king step to c8', {'board': {'a8': 'r', 'd8': 'k', 'e1': 'K'}, 'moves': ['d8c8']},\n   {'a8': 'r', 'c8': 'k', 'e1': 'K'}),\n  ('ordinary pawn capture',\n   {'board': {'d4': 'N', 'd5': 'p', 'e1': 'K', 'e4': 'P', 'e8': 'k'}, 'moves': ['e4d5']},\n   {'d4': 'N', 'd5': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('black underpromotion', {'board': {'e1': 'K', 'e8': 'k', 'g2': 'p'}, 'moves': ['g2g1n']},\n   {'e1': 'K', 'e8': 'k', 'g1': 'n'}),\n  ('quiet sequence',\n   {'board': {'b8': 'n', 'e1': 'K', 'e8': 'k', 'g1': 'N'}, 'moves': ['g1f3', 'b8c6', 'f3e5']},\n   {'c6': 'n', 'e1': 'K', 'e5': 'N', 'e8': 'k'}),\n  ('pawn push', {'board': {'c2': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['c2c4']},\n   {'c4': 'P', 'e1': 'K', 'e8': 'k'})],\n [('black short castle', {'board': {'e1': 'K', 'e8': 'k', 'h8': 'r'}, 'moves': ['e8g8']},\n   {'e1': 'K', 'f8': 'r', 'g8': 'k'}),\n  ('king step to g1', {'board': {'e8': 'k', 'f1': 'K', 'h1': 'R'}, 'moves': ['f1g1']},\n   {'e8': 'k', 'g1': 'K', 'h1': 'R'}),\n  ('king step to c8', {'board': {'a8': 'r', 'd8': 'k', 'e1': 'K'}, 'moves': ['d8c8']},\n   {'a8': 'r', 'c8': 'k', 'e1': 'K'}),\n  ('white en passant',\n   {'board': {'d7': 'p', 'e1': 'K', 'e5': 'P', 'e8': 'k'}, 'moves': ['d7d5', 'e5d6']},\n   {'d6': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('black en passant',\n   {'board': {'d4': 'p', 'e1': 'K', 'e2': 'P', 'e8': 'k'}, 'moves': ['e2e4', 'd4e3']},\n   {'e1': 'K', 'e3': 'p', 'e8': 'k'}),\n  ('ordinary pawn capture',\n   {'board': {'d4': 'N', 'd5': 'p', 'e1': 'K', 'e4': 'P', 'e8': 'k'}, 'moves': ['e4d5']},\n   {'d4': 'N', 'd5': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('quiet sequence',\n   {'board': {'b8': 'n', 'e1': 'K', 'e8': 'k', 'g1': 'N'}, 'moves': ['g1f3', 'b8c6', 'f3e5']},\n   {'c6': 'n', 'e1': 'K', 'e5': 'N', 'e8': 'k'}),\n  ('pawn push', {'board': {'c2': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['c2c4']},\n   {'c4': 'P', 'e1': 'K', 'e8': 'k'})]]\nfor label, args, expected in fixtures[N-1]:\n    try:\n        actual = solve(args)\n    except Exception as exc:\n        actual = 'error:' + type(exc).__name__\n    check(label, actual, expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"663acb4dab443ff1d143b819b26688739ee3582aab6d939ec646fcb1e5fd94cf","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    b=dict(x['board'])\n    for u in x['moves']:\n        fr,to,pr=u[:2],u[2:4],u[4:]\n        p=b.pop(fr)\n        if p in ('K','k') and abs(ord(to[0])-ord(fr[0]))==2:\n            if to[0]=='g': b['f'+to[1]]=b.pop('h'+to[1])\n            else: b['d'+to[1]]=b.pop('a'+to[1])\n        if p in ('P','p') and fr[0]!=to[0]:\n            del b[to[0]+fr[1]]\n        if pr: p=pr.upper() if p=='P' else pr.lower()\n        b[to]=p\n    return dict(sorted(b.items()))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('white long castle', {'board': {'a1': 'R', 'e1': 'K', 'e8': 'k'}, 'moves': ['e1c1']},\n   {'c1': 'K', 'd1': 'R', 'e8': 'k'}),\n  ('black short castle', {'board': {'e1': 'K', 'e8': 'k', 'h8': 'r'}, 'moves': ['e8g8']},\n   {'e1': 'K', 'f8': 'r', 'g8': 'k'}),\n  ('king step to g1', {'board': {'e8': 'k', 'f1': 'K', 'h1': 'R'}, 'moves': ['f1g1']},\n   {'e8': 'k', 'g1': 'K', 'h1': 'R'}),\n  ('king step to c8', {'board': {'a8': 'r', 'd8': 'k', 'e1': 'K'}, 'moves': ['d8c8']},\n   {'a8': 'r', 'c8': 'k', 'e1': 'K'}),\n  ('white en passant',\n   {'board': {'d7': 'p', 'e1': 'K', 'e5': 'P', 'e8': 'k'}, 'moves': ['d7d5', 'e5d6']},\n   {'d6': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('black en passant',\n   {'board': {'d4': 'p', 'e1': 'K', 'e2': 'P', 'e8': 'k'}, 'moves': ['e2e4', 'd4e3']},\n   {'e1': 'K', 'e3': 'p', 'e8': 'k'}),\n  ('ordinary pawn capture',\n   {'board': {'d4': 'N', 'd5': 'p', 'e1': 'K', 'e4': 'P', 'e8': 'k'}, 'moves': ['e4d5']},\n   {'d4': 'N', 'd5': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('quiet sequence',\n   {'board': {'b8': 'n', 'e1': 'K', 'e8': 'k', 'g1': 'N'}, 'moves': ['g1f3', 'b8c6', 'f3e5']},\n   {'c6': 'n', 'e1': 'K', 'e5': 'N', 'e8': 'k'})],\n [('king step to c8', {'board': {'a8': 'r', 'd8': 'k', 'e1': 'K'}, 'moves': ['d8c8']},\n   {'a8': 'r', 'c8': 'k', 'e1': 'K'}),\n  ('white en passant',\n   {'board': {'d7': 'p', 'e1': 'K', 'e5': 'P', 'e8': 'k'}, 'moves': ['d7d5', 'e5d6']},\n   {'d6': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('black en passant',\n   {'board': {'d4': 'p', 'e1': 'K', 'e2': 'P', 'e8': 'k'}, 'moves': ['e2e4', 'd4e3']},\n   {'e1': 'K', 'e3': 'p', 'e8': 'k'}),\n  ('ordinary pawn capture',\n   {'board': {'d4': 'N', 'd5': 'p', 'e1': 'K', 'e4': 'P', 'e8': 'k'}, 'moves': ['e4d5']},\n   {'d4': 'N', 'd5': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('white promotion', {'board': {'b7': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['b7b8q']},\n   {'b8': 'Q', 'e1': 'K', 'e8': 'k'}),\n  ('black underpromotion', {'board': {'e1': 'K', 'e8': 'k', 'g2': 'p'}, 'moves': ['g2g1n']},\n   {'e1': 'K', 'e8': 'k', 'g1': 'n'}),\n  ('quiet sequence',\n   {'board': {'b8': 'n', 'e1': 'K', 'e8': 'k', 'g1': 'N'}, 'moves': ['g1f3', 'b8c6', 'f3e5']},\n   {'c6': 'n', 'e1': 'K', 'e5': 'N', 'e8': 'k'}),\n  ('pawn push', {'board': {'c2': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['c2c4']},\n   {'c4': 'P', 'e1': 'K', 'e8': 'k'})],\n [('white long castle', {'board': {'a1': 'R', 'e1': 'K', 'e8': 'k'}, 'moves': ['e1c1']},\n   {'c1': 'K', 'd1': 'R', 'e8': 'k'}),\n  ('black short castle', {'board': {'e1': 'K', 'e8': 'k', 'h8': 'r'}, 'moves': ['e8g8']},\n   {'e1': 'K', 'f8': 'r', 'g8': 'k'}),\n  ('king step to g1', {'board': {'e8': 'k', 'f1': 'K', 'h1': 'R'}, 'moves': ['f1g1']},\n   {'e8': 'k', 'g1': 'K', 'h1': 'R'}),\n  ('black en passant',\n   {'board': {'d4': 'p', 'e1': 'K', 'e2': 'P', 'e8': 'k'}, 'moves': ['e2e4', 'd4e3']},\n   {'e1': 'K', 'e3': 'p', 'e8': 'k'}),\n  ('ordinary pawn capture',\n   {'board': {'d4': 'N', 'd5': 'p', 'e1': 'K', 'e4': 'P', 'e8': 'k'}, 'moves': ['e4d5']},\n   {'d4': 'N', 'd5': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('white promotion', {'board': {'b7': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['b7b8q']},\n   {'b8': 'Q', 'e1': 'K', 'e8': 'k'}),\n  ('black underpromotion', {'board': {'e1': 'K', 'e8': 'k', 'g2': 'p'}, 'moves': ['g2g1n']},\n   {'e1': 'K', 'e8': 'k', 'g1': 'n'}),\n  ('pawn push', {'board': {'c2': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['c2c4']},\n   {'c4': 'P', 'e1': 'K', 'e8': 'k'})],\n [('white long castle', {'board': {'a1': 'R', 'e1': 'K', 'e8': 'k'}, 'moves': ['e1c1']},\n   {'c1': 'K', 'd1': 'R', 'e8': 'k'}),\n  ('black short castle', {'board': {'e1': 'K', 'e8': 'k', 'h8': 'r'}, 'moves': ['e8g8']},\n   {'e1': 'K', 'f8': 'r', 'g8': 'k'}),\n  ('king step to g1', {'board': {'e8': 'k', 'f1': 'K', 'h1': 'R'}, 'moves': ['f1g1']},\n   {'e8': 'k', 'g1': 'K', 'h1': 'R'}),\n  ('king step to c8', {'board': {'a8': 'r', 'd8': 'k', 'e1': 'K'}, 'moves': ['d8c8']},\n   {'a8': 'r', 'c8': 'k', 'e1': 'K'}),\n  ('ordinary pawn capture',\n   {'board': {'d4': 'N', 'd5': 'p', 'e1': 'K', 'e4': 'P', 'e8': 'k'}, 'moves': ['e4d5']},\n   {'d4': 'N', 'd5': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('black underpromotion', {'board': {'e1': 'K', 'e8': 'k', 'g2': 'p'}, 'moves': ['g2g1n']},\n   {'e1': 'K', 'e8': 'k', 'g1': 'n'}),\n  ('quiet sequence',\n   {'board': {'b8': 'n', 'e1': 'K', 'e8': 'k', 'g1': 'N'}, 'moves': ['g1f3', 'b8c6', 'f3e5']},\n   {'c6': 'n', 'e1': 'K', 'e5': 'N', 'e8': 'k'}),\n  ('pawn push', {'board': {'c2': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['c2c4']},\n   {'c4': 'P', 'e1': 'K', 'e8': 'k'})],\n [('black short castle', {'board': {'e1': 'K', 'e8': 'k', 'h8': 'r'}, 'moves': ['e8g8']},\n   {'e1': 'K', 'f8': 'r', 'g8': 'k'}),\n  ('king step to g1', {'board': {'e8': 'k', 'f1': 'K', 'h1': 'R'}, 'moves': ['f1g1']},\n   {'e8': 'k', 'g1': 'K', 'h1': 'R'}),\n  ('king step to c8', {'board': {'a8': 'r', 'd8': 'k', 'e1': 'K'}, 'moves': ['d8c8']},\n   {'a8': 'r', 'c8': 'k', 'e1': 'K'}),\n  ('white en passant',\n   {'board': {'d7': 'p', 'e1': 'K', 'e5': 'P', 'e8': 'k'}, 'moves': ['d7d5', 'e5d6']},\n   {'d6': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('black en passant',\n   {'board': {'d4': 'p', 'e1': 'K', 'e2': 'P', 'e8': 'k'}, 'moves': ['e2e4', 'd4e3']},\n   {'e1': 'K', 'e3': 'p', 'e8': 'k'}),\n  ('ordinary pawn capture',\n   {'board': {'d4': 'N', 'd5': 'p', 'e1': 'K', 'e4': 'P', 'e8': 'k'}, 'moves': ['e4d5']},\n   {'d4': 'N', 'd5': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('quiet sequence',\n   {'board': {'b8': 'n', 'e1': 'K', 'e8': 'k', 'g1': 'N'}, 'moves': ['g1f3', 'b8c6', 'f3e5']},\n   {'c6': 'n', 'e1': 'K', 'e5': 'N', 'e8': 'k'}),\n  ('pawn push', {'board': {'c2': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['c2c4']},\n   {'c4': 'P', 'e1': 'K', 'e8': 'k'})]]\nfor label, args, expected in fixtures[N-1]:\n    try:\n        actual = solve(args)\n    except Exception as exc:\n        actual = 'error:' + type(exc).__name__\n    check(label, actual, expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"fbb331d9ed6fa60dc15ec992fe683ee93c0452119f3f5ef3beca51fe9e23d051","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    b=dict(x['board'])\n    for u in x['moves']:\n        fr,to,pr=u[:2],u[2:4],u[4:]\n        p=b.pop(fr)\n        if p in ('K','k') and abs(ord(to[0])-ord(fr[0]))==2:\n            if to[0]=='g': b['f'+to[1]]=b.pop('h'+to[1])\n            else: b['d'+to[1]]=b.pop('a'+to[1])\n        if p in ('P','p') and fr[0]!=to[0] and to not in b:\n            del b[to[0]+fr[1]]\n        if pr: p=pr.upper() if p=='P' else pr.lower()\n        b[to]=p\n    return dict(sorted(b.items()))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('white long castle', {'board': {'a1': 'R', 'e1': 'K', 'e8': 'k'}, 'moves': ['e1c1']},\n   {'c1': 'K', 'd1': 'R', 'e8': 'k'}),\n  ('black short castle', {'board': {'e1': 'K', 'e8': 'k', 'h8': 'r'}, 'moves': ['e8g8']},\n   {'e1': 'K', 'f8': 'r', 'g8': 'k'}),\n  ('king step to g1', {'board': {'e8': 'k', 'f1': 'K', 'h1': 'R'}, 'moves': ['f1g1']},\n   {'e8': 'k', 'g1': 'K', 'h1': 'R'}),\n  ('king step to c8', {'board': {'a8': 'r', 'd8': 'k', 'e1': 'K'}, 'moves': ['d8c8']},\n   {'a8': 'r', 'c8': 'k', 'e1': 'K'}),\n  ('white en passant',\n   {'board': {'d7': 'p', 'e1': 'K', 'e5': 'P', 'e8': 'k'}, 'moves': ['d7d5', 'e5d6']},\n   {'d6': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('black en passant',\n   {'board': {'d4': 'p', 'e1': 'K', 'e2': 'P', 'e8': 'k'}, 'moves': ['e2e4', 'd4e3']},\n   {'e1': 'K', 'e3': 'p', 'e8': 'k'}),\n  ('ordinary pawn capture',\n   {'board': {'d4': 'N', 'd5': 'p', 'e1': 'K', 'e4': 'P', 'e8': 'k'}, 'moves': ['e4d5']},\n   {'d4': 'N', 'd5': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('quiet sequence',\n   {'board': {'b8': 'n', 'e1': 'K', 'e8': 'k', 'g1': 'N'}, 'moves': ['g1f3', 'b8c6', 'f3e5']},\n   {'c6': 'n', 'e1': 'K', 'e5': 'N', 'e8': 'k'})],\n [('king step to c8', {'board': {'a8': 'r', 'd8': 'k', 'e1': 'K'}, 'moves': ['d8c8']},\n   {'a8': 'r', 'c8': 'k', 'e1': 'K'}),\n  ('white en passant',\n   {'board': {'d7': 'p', 'e1': 'K', 'e5': 'P', 'e8': 'k'}, 'moves': ['d7d5', 'e5d6']},\n   {'d6': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('black en passant',\n   {'board': {'d4': 'p', 'e1': 'K', 'e2': 'P', 'e8': 'k'}, 'moves': ['e2e4', 'd4e3']},\n   {'e1': 'K', 'e3': 'p', 'e8': 'k'}),\n  ('ordinary pawn capture',\n   {'board': {'d4': 'N', 'd5': 'p', 'e1': 'K', 'e4': 'P', 'e8': 'k'}, 'moves': ['e4d5']},\n   {'d4': 'N', 'd5': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('white promotion', {'board': {'b7': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['b7b8q']},\n   {'b8': 'Q', 'e1': 'K', 'e8': 'k'}),\n  ('black underpromotion', {'board': {'e1': 'K', 'e8': 'k', 'g2': 'p'}, 'moves': ['g2g1n']},\n   {'e1': 'K', 'e8': 'k', 'g1': 'n'}),\n  ('quiet sequence',\n   {'board': {'b8': 'n', 'e1': 'K', 'e8': 'k', 'g1': 'N'}, 'moves': ['g1f3', 'b8c6', 'f3e5']},\n   {'c6': 'n', 'e1': 'K', 'e5': 'N', 'e8': 'k'}),\n  ('pawn push', {'board': {'c2': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['c2c4']},\n   {'c4': 'P', 'e1': 'K', 'e8': 'k'})],\n [('white long castle', {'board': {'a1': 'R', 'e1': 'K', 'e8': 'k'}, 'moves': ['e1c1']},\n   {'c1': 'K', 'd1': 'R', 'e8': 'k'}),\n  ('black short castle', {'board': {'e1': 'K', 'e8': 'k', 'h8': 'r'}, 'moves': ['e8g8']},\n   {'e1': 'K', 'f8': 'r', 'g8': 'k'}),\n  ('king step to g1', {'board': {'e8': 'k', 'f1': 'K', 'h1': 'R'}, 'moves': ['f1g1']},\n   {'e8': 'k', 'g1': 'K', 'h1': 'R'}),\n  ('black en passant',\n   {'board': {'d4': 'p', 'e1': 'K', 'e2': 'P', 'e8': 'k'}, 'moves': ['e2e4', 'd4e3']},\n   {'e1': 'K', 'e3': 'p', 'e8': 'k'}),\n  ('ordinary pawn capture',\n   {'board': {'d4': 'N', 'd5': 'p', 'e1': 'K', 'e4': 'P', 'e8': 'k'}, 'moves': ['e4d5']},\n   {'d4': 'N', 'd5': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('white promotion', {'board': {'b7': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['b7b8q']},\n   {'b8': 'Q', 'e1': 'K', 'e8': 'k'}),\n  ('black underpromotion', {'board': {'e1': 'K', 'e8': 'k', 'g2': 'p'}, 'moves': ['g2g1n']},\n   {'e1': 'K', 'e8': 'k', 'g1': 'n'}),\n  ('pawn push', {'board': {'c2': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['c2c4']},\n   {'c4': 'P', 'e1': 'K', 'e8': 'k'})],\n [('white long castle', {'board': {'a1': 'R', 'e1': 'K', 'e8': 'k'}, 'moves': ['e1c1']},\n   {'c1': 'K', 'd1': 'R', 'e8': 'k'}),\n  ('black short castle', {'board': {'e1': 'K', 'e8': 'k', 'h8': 'r'}, 'moves': ['e8g8']},\n   {'e1': 'K', 'f8': 'r', 'g8': 'k'}),\n  ('king step to g1', {'board': {'e8': 'k', 'f1': 'K', 'h1': 'R'}, 'moves': ['f1g1']},\n   {'e8': 'k', 'g1': 'K', 'h1': 'R'}),\n  ('king step to c8', {'board': {'a8': 'r', 'd8': 'k', 'e1': 'K'}, 'moves': ['d8c8']},\n   {'a8': 'r', 'c8': 'k', 'e1': 'K'}),\n  ('ordinary pawn capture',\n   {'board': {'d4': 'N', 'd5': 'p', 'e1': 'K', 'e4': 'P', 'e8': 'k'}, 'moves': ['e4d5']},\n   {'d4': 'N', 'd5': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('black underpromotion', {'board': {'e1': 'K', 'e8': 'k', 'g2': 'p'}, 'moves': ['g2g1n']},\n   {'e1': 'K', 'e8': 'k', 'g1': 'n'}),\n  ('quiet sequence',\n   {'board': {'b8': 'n', 'e1': 'K', 'e8': 'k', 'g1': 'N'}, 'moves': ['g1f3', 'b8c6', 'f3e5']},\n   {'c6': 'n', 'e1': 'K', 'e5': 'N', 'e8': 'k'}),\n  ('pawn push', {'board': {'c2': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['c2c4']},\n   {'c4': 'P', 'e1': 'K', 'e8': 'k'})],\n [('black short castle', {'board': {'e1': 'K', 'e8': 'k', 'h8': 'r'}, 'moves': ['e8g8']},\n   {'e1': 'K', 'f8': 'r', 'g8': 'k'}),\n  ('king step to g1', {'board': {'e8': 'k', 'f1': 'K', 'h1': 'R'}, 'moves': ['f1g1']},\n   {'e8': 'k', 'g1': 'K', 'h1': 'R'}),\n  ('king step to c8', {'board': {'a8': 'r', 'd8': 'k', 'e1': 'K'}, 'moves': ['d8c8']},\n   {'a8': 'r', 'c8': 'k', 'e1': 'K'}),\n  ('white en passant',\n   {'board': {'d7': 'p', 'e1': 'K', 'e5': 'P', 'e8': 'k'}, 'moves': ['d7d5', 'e5d6']},\n   {'d6': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('black en passant',\n   {'board': {'d4': 'p', 'e1': 'K', 'e2': 'P', 'e8': 'k'}, 'moves': ['e2e4', 'd4e3']},\n   {'e1': 'K', 'e3': 'p', 'e8': 'k'}),\n  ('ordinary pawn capture',\n   {'board': {'d4': 'N', 'd5': 'p', 'e1': 'K', 'e4': 'P', 'e8': 'k'}, 'moves': ['e4d5']},\n   {'d4': 'N', 'd5': 'P', 'e1': 'K', 'e8': 'k'}),\n  ('quiet sequence',\n   {'board': {'b8': 'n', 'e1': 'K', 'e8': 'k', 'g1': 'N'}, 'moves': ['g1f3', 'b8c6', 'f3e5']},\n   {'c6': 'n', 'e1': 'K', 'e5': 'N', 'e8': 'k'}),\n  ('pawn push', {'board': {'c2': 'P', 'e1': 'K', 'e8': 'k'}, 'moves': ['c2c4']},\n   {'c4': 'P', 'e1': 'K', 'e8': 'k'})]]\nfor label, args, expected in fixtures[N-1]:\n    try:\n        actual = solve(args)\n    except Exception as exc:\n        actual = 'error:' + type(exc).__name__\n    check(label, actual, expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"A deterministic toy model with an explicitly stated contract; boards are {square: piece} with white upper-case and black lower-case pieces; no claim of full FIDE Laws conformance. 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-chess_move_legality-uci-move-application-en-passant-detection","generated_at":"2026-09-29T14:50:14.857278+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Move application defines the position every later legality check sees.","repair":"Only a diagonal move onto an empty square is en passant.","root_cause":"Every diagonal pawn move is treated as en passant, even when it captures on the destination.","sha256":"60b5511849c06ae6fe1440215689ea633800c7e02495ef8ffc5a8d21b6d4f51b","title":"Ordinary pawn capture also removes a piece beside the pawn · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.007,"exit_code":1,"observations":[{"actual":{"c1":"K","d1":"R","e8":"k"},"check":"white long castle","expected":{"c1":"K","d1":"R","e8":"k"},"passed":true},{"actual":{"e1":"K","f8":"r","g8":"k"},"check":"black short castle","expected":{"e1":"K","f8":"r","g8":"k"},"passed":true},{"actual":{"e8":"k","g1":"K","h1":"R"},"check":"king step to g1","expected":{"e8":"k","g1":"K","h1":"R"},"passed":true},{"actual":{"a8":"r","c8":"k","e1":"K"},"check":"king step to c8","expected":{"a8":"r","c8":"k","e1":"K"},"passed":true},{"actual":"error:KeyError","check":"white en passant","expected":{"d6":"P","e1":"K","e8":"k"},"passed":false},{"actual":"error:KeyError","check":"black en passant","expected":{"e1":"K","e3":"p","e8":"k"},"passed":false},{"actual":{"d4":"N","d5":"P","e1":"K","e8":"k"},"check":"ordinary pawn capture","expected":{"d4":"N","d5":"P","e1":"K","e8":"k"},"passed":true},{"actual":{"c6":"n","e1":"K","e5":"N","e8":"k"},"check":"quiet sequence","expected":{"c6":"n","e1":"K","e5":"N","e8":"k"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"white long castle\", \"actual\": {\"c1\": \"K\", \"d1\": \"R\", \"e8\": \"k\"}, \"expected\": {\"c1\": \"K\", \"d1\": \"R\", \"e8\": \"k\"}, \"passed\": true}, {\"check\": \"black short castle\", \"actual\": {\"e1\": \"K\", \"f8\": \"r\", \"g8\": \"k\"}, \"expected\": {\"e1\": \"K\", \"f8\": \"r\", \"g8\": \"k\"}, \"passed\": true}, {\"check\": \"king step to g1\", \"actual\": {\"e8\": \"k\", \"g1\": \"K\", \"h1\": \"R\"}, \"expected\": {\"e8\": \"k\", \"g1\": \"K\", \"h1\": \"R\"}, \"passed\": true}, {\"check\": \"king step to c8\", \"actual\": {\"a8\": \"r\", \"c8\": \"k\", \"e1\": \"K\"}, \"expected\": {\"a8\": \"r\", \"c8\": \"k\", \"e1\": \"K\"}, \"passed\": true}, {\"check\": \"white en passant\", \"actual\": \"error:KeyError\", \"expected\": {\"d6\": \"P\", \"e1\": \"K\", \"e8\": \"k\"}, \"passed\": false}, {\"check\": \"black en passant\", \"actual\": \"error:KeyError\", \"expected\": {\"e1\": \"K\", \"e3\": \"p\", \"e8\": \"k\"}, \"passed\": false}, {\"check\": \"ordinary pawn capture\", \"actual\": {\"d4\": \"N\", \"d5\": \"P\", \"e1\": \"K\", \"e8\": \"k\"}, \"expected\": {\"d4\": \"N\", \"d5\": \"P\", \"e1\": \"K\", \"e8\": \"k\"}, \"passed\": true}, {\"check\": \"quiet sequence\", \"actual\": {\"c6\": \"n\", \"e1\": \"K\", \"e5\": \"N\", \"e8\": \"k\"}, \"expected\": {\"c6\": \"n\", \"e1\": \"K\", \"e5\": \"N\", \"e8\": \"k\"}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.946,"exit_code":1,"observations":[{"actual":{"c1":"K","d1":"R","e8":"k"},"check":"white long castle","expected":{"c1":"K","d1":"R","e8":"k"},"passed":true},{"actual":{"e1":"K","f8":"r","g8":"k"},"check":"black short castle","expected":{"e1":"K","f8":"r","g8":"k"},"passed":true},{"actual":{"e8":"k","g1":"K","h1":"R"},"check":"king step to g1","expected":{"e8":"k","g1":"K","h1":"R"},"passed":true},{"actual":{"a8":"r","c8":"k","e1":"K"},"check":"king step to c8","expected":{"a8":"r","c8":"k","e1":"K"},"passed":true},{"actual":{"d6":"P","e1":"K","e8":"k"},"check":"white en passant","expected":{"d6":"P","e1":"K","e8":"k"},"passed":true},{"actual":{"e1":"K","e3":"p","e8":"k"},"check":"black en passant","expected":{"e1":"K","e3":"p","e8":"k"},"passed":true},{"actual":{"d5":"P","e1":"K","e8":"k"},"check":"ordinary pawn capture","expected":{"d4":"N","d5":"P","e1":"K","e8":"k"},"passed":false},{"actual":{"c6":"n","e1":"K","e5":"N","e8":"k"},"check":"quiet sequence","expected":{"c6":"n","e1":"K","e5":"N","e8":"k"},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"white long castle\", \"actual\": {\"c1\": \"K\", \"d1\": \"R\", \"e8\": \"k\"}, \"expected\": {\"c1\": \"K\", \"d1\": \"R\", \"e8\": \"k\"}, \"passed\": true}, {\"check\": \"black short castle\", \"actual\": {\"e1\": \"K\", \"f8\": \"r\", \"g8\": \"k\"}, \"expected\": {\"e1\": \"K\", \"f8\": \"r\", \"g8\": \"k\"}, \"passed\": true}, {\"check\": \"king step to g1\", \"actual\": {\"e8\": \"k\", \"g1\": \"K\", \"h1\": \"R\"}, \"expected\": {\"e8\": \"k\", \"g1\": \"K\", \"h1\": \"R\"}, \"passed\": true}, {\"check\": \"king step to c8\", \"actual\": {\"a8\": \"r\", \"c8\": \"k\", \"e1\": \"K\"}, \"expected\": {\"a8\": \"r\", \"c8\": \"k\", \"e1\": \"K\"}, \"passed\": true}, {\"check\": \"white en passant\", \"actual\": {\"d6\": \"P\", \"e1\": \"K\", \"e8\": \"k\"}, \"expected\": {\"d6\": \"P\", \"e1\": \"K\", \"e8\": \"k\"}, \"passed\": true}, {\"check\": \"black en passant\", \"actual\": {\"e1\": \"K\", \"e3\": \"p\", \"e8\": \"k\"}, \"expected\": {\"e1\": \"K\", \"e3\": \"p\", \"e8\": \"k\"}, \"passed\": true}, {\"check\": \"ordinary pawn capture\", \"actual\": {\"d5\": \"P\", \"e1\": \"K\", \"e8\": \"k\"}, \"expected\": {\"d4\": \"N\", \"d5\": \"P\", \"e1\": \"K\", \"e8\": \"k\"}, \"passed\": false}, {\"check\": \"quiet sequence\", \"actual\": {\"c6\": \"n\", \"e1\": \"K\", \"e5\": \"N\", \"e8\": \"k\"}, \"expected\": {\"c6\": \"n\", \"e1\": \"K\", \"e5\": \"N\", \"e8\": \"k\"}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.672,"exit_code":0,"observations":[{"actual":{"c1":"K","d1":"R","e8":"k"},"check":"white long castle","expected":{"c1":"K","d1":"R","e8":"k"},"passed":true},{"actual":{"e1":"K","f8":"r","g8":"k"},"check":"black short castle","expected":{"e1":"K","f8":"r","g8":"k"},"passed":true},{"actual":{"e8":"k","g1":"K","h1":"R"},"check":"king step to g1","expected":{"e8":"k","g1":"K","h1":"R"},"passed":true},{"actual":{"a8":"r","c8":"k","e1":"K"},"check":"king step to c8","expected":{"a8":"r","c8":"k","e1":"K"},"passed":true},{"actual":{"d6":"P","e1":"K","e8":"k"},"check":"white en passant","expected":{"d6":"P","e1":"K","e8":"k"},"passed":true},{"actual":{"e1":"K","e3":"p","e8":"k"},"check":"black en passant","expected":{"e1":"K","e3":"p","e8":"k"},"passed":true},{"actual":{"d4":"N","d5":"P","e1":"K","e8":"k"},"check":"ordinary pawn capture","expected":{"d4":"N","d5":"P","e1":"K","e8":"k"},"passed":true},{"actual":{"c6":"n","e1":"K","e5":"N","e8":"k"},"check":"quiet sequence","expected":{"c6":"n","e1":"K","e5":"N","e8":"k"},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"white long castle\", \"actual\": {\"c1\": \"K\", \"d1\": \"R\", \"e8\": \"k\"}, \"expected\": {\"c1\": \"K\", \"d1\": \"R\", \"e8\": \"k\"}, \"passed\": true}, {\"check\": \"black short castle\", \"actual\": {\"e1\": \"K\", \"f8\": \"r\", \"g8\": \"k\"}, \"expected\": {\"e1\": \"K\", \"f8\": \"r\", \"g8\": \"k\"}, \"passed\": true}, {\"check\": \"king step to g1\", \"actual\": {\"e8\": \"k\", \"g1\": \"K\", \"h1\": \"R\"}, \"expected\": {\"e8\": \"k\", \"g1\": \"K\", \"h1\": \"R\"}, \"passed\": true}, {\"check\": \"king step to c8\", \"actual\": {\"a8\": \"r\", \"c8\": \"k\", \"e1\": \"K\"}, \"expected\": {\"a8\": \"r\", \"c8\": \"k\", \"e1\": \"K\"}, \"passed\": true}, {\"check\": \"white en passant\", \"actual\": {\"d6\": \"P\", \"e1\": \"K\", \"e8\": \"k\"}, \"expected\": {\"d6\": \"P\", \"e1\": \"K\", \"e8\": \"k\"}, \"passed\": true}, {\"check\": \"black en passant\", \"actual\": {\"e1\": \"K\", \"e3\": \"p\", \"e8\": \"k\"}, \"expected\": {\"e1\": \"K\", \"e3\": \"p\", \"e8\": \"k\"}, \"passed\": true}, {\"check\": \"ordinary pawn capture\", \"actual\": {\"d4\": \"N\", \"d5\": \"P\", \"e1\": \"K\", \"e8\": \"k\"}, \"expected\": {\"d4\": \"N\", \"d5\": \"P\", \"e1\": \"K\", \"e8\": \"k\"}, \"passed\": true}, {\"check\": \"quiet sequence\", \"actual\": {\"c6\": \"n\", \"e1\": \"K\", \"e5\": \"N\", \"e8\": \"k\"}, \"expected\": {\"c6\": \"n\", \"e1\": \"K\", \"e5\": \"N\", \"e8\": \"k\"}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}