{"abstract":"Parlays with a half-won Asian leg are over- or under-paid.","category":"Betting odds conversion","checks":9,"contract":"Accumulator settlement. legs rows are [decimal price, result] with results win, lose, push, void, half-win (half the stake wins at the price, half is refunded: factor (1 + d) / 2) and half-lose (half refunded: factor 1/2). push and void legs have factor 1, win factor d, lose makes the whole bet lose. Return [combined factor rounded half up to four decimals as a string, payout in cents rounded down].","evaluation_group":"w2-odds-conversion-parlay-leg-adjustments","failed_approach":"Halving the price forgets the refunded half stake.","family":"w2-odds-conversion-parlay-leg-adjustments-half-win-factor","id":"FA-84471","implementations":{"attempt":{"sha256":"56889da77db7db53491fc1b9ba771bc2ca45d7139476064954db0b999a9fff8f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(legs, stake_cents):\n    factor = Fraction(1)\n    for price, result in legs:\n        d = Fraction(price)\n        if result == 'lose':\n            factor = Fraction(0)\n            break\n        if result == 'win':\n            factor *= d\n        elif result == 'half-win':\n            factor *= d / 2\n        elif result == 'half-lose':\n            factor *= Fraction(1, 2)\n    q = math.floor(factor * 10000 + Fraction(1, 2))\n    return ['%d.%04d' % (q // 10000, q % 10000), math.floor(stake_cents * factor)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: half win factor',\n   ([['2.35', 'win'], ['1.77', 'void'], ['1.28', 'half-lose'], ['3.07', 'half-win']], 1000),\n   ['2.3911', 2391]),\n  ('variant scenario 1',\n   ([['2.04', 'half-win'],\n     ['1.30', 'half-win'],\n     ['2.75', 'win'],\n     ['2.56', 'half-lose'],\n     ['3.90', 'lose']],\n    1999),\n   ['0.0000', 0]),\n  ('variant scenario 2', ([['3.10', 'win'], ['2.58', 'void']], 100), ['3.1000', 310])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: half win factor',\n   ([['2.78', 'win'],\n     ['3.36', 'half-lose'],\n     ['1.51', 'half-win'],\n     ['1.53', 'win'],\n     ['2.82', 'win']],\n    333),\n   ['7.5266', 2506]),\n  ('variant scenario 1',\n   ([['1.69', 'win'], ['3.30', 'win'], ['1.27', 'win'], ['2.88', 'half-lose'], ['3.75', 'push']],\n    1000),\n   ['3.5414', 3541]),\n  ('variant scenario 2', ([['3.90', 'win'], ['2.38', 'half-lose']], 1000), ['1.9500', 1950])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: half win factor',\n   ([['3.66', 'push'],\n     ['1.61', 'half-lose'],\n     ['3.40', 'half-win'],\n     ['2.67', 'half-win'],\n     ['2.27', 'half-win']],\n    250),\n   ['3.3002', 825]),\n  ('variant scenario 1',\n   ([['1.64', 'void'], ['1.40', 'lose'], ['2.39', 'half-lose']], 333),\n   ['0.0000', 0]),\n  ('variant scenario 2',\n   ([['1.78', 'push'], ['1.46', 'half-lose'], ['2.49', 'win']], 333),\n   ['1.2450', 414])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: half win factor',\n   ([['3.26', 'void'], ['3.52', 'half-win'], ['2.05', 'half-lose'], ['3.79', 'void']], 100),\n   ['1.1300', 113]),\n  ('variant scenario 1',\n   ([['1.32', 'win'], ['2.63', 'push'], ['1.31', 'void'], ['1.97', 'win'], ['2.37', 'win']], 333),\n   ['6.1629', 2052]),\n  ('variant scenario 2',\n   ([['1.29', 'void'], ['1.56', 'half-lose'], ['2.62', 'win'], ['1.98', 'void'], ['2.10', 'win']],\n    333),\n   ['2.7510', 916])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: half win factor',\n   ([['2.90', 'half-lose'],\n     ['2.13', 'win'],\n     ['2.30', 'half-win'],\n     ['1.23', 'half-win'],\n     ['1.38', 'win']],\n    100),\n   ['2.7039', 270]),\n  ('variant scenario 1',\n   ([['3.43', 'void'], ['1.58', 'win'], ['1.37', 'push'], ['3.02', 'win'], ['3.24', 'win']], 100),\n   ['15.4600', 1545]),\n  ('variant scenario 2', ([['3.08', 'win'], ['3.61', 'void']], 333), ['3.0800', 1025])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(args), 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":"f05391e5a1ef974cd98b1d49a716d42daaec8bbff3285edd91ac368e33d96f9f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(legs, stake_cents):\n    factor = Fraction(1)\n    for price, result in legs:\n        d = Fraction(price)\n        if result == 'lose':\n            factor = Fraction(0)\n            break\n        if result == 'win':\n            factor *= d\n        elif result == 'half-win':\n            factor *= d\n        elif result == 'half-lose':\n            factor *= Fraction(1, 2)\n    q = math.floor(factor * 10000 + Fraction(1, 2))\n    return ['%d.%04d' % (q // 10000, q % 10000), math.floor(stake_cents * factor)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: half win factor',\n   ([['2.35', 'win'], ['1.77', 'void'], ['1.28', 'half-lose'], ['3.07', 'half-win']], 1000),\n   ['2.3911', 2391]),\n  ('variant scenario 1',\n   ([['2.04', 'half-win'],\n     ['1.30', 'half-win'],\n     ['2.75', 'win'],\n     ['2.56', 'half-lose'],\n     ['3.90', 'lose']],\n    1999),\n   ['0.0000', 0]),\n  ('variant scenario 2', ([['3.10', 'win'], ['2.58', 'void']], 100), ['3.1000', 310])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: half win factor',\n   ([['2.78', 'win'],\n     ['3.36', 'half-lose'],\n     ['1.51', 'half-win'],\n     ['1.53', 'win'],\n     ['2.82', 'win']],\n    333),\n   ['7.5266', 2506]),\n  ('variant scenario 1',\n   ([['1.69', 'win'], ['3.30', 'win'], ['1.27', 'win'], ['2.88', 'half-lose'], ['3.75', 'push']],\n    1000),\n   ['3.5414', 3541]),\n  ('variant scenario 2', ([['3.90', 'win'], ['2.38', 'half-lose']], 1000), ['1.9500', 1950])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: half win factor',\n   ([['3.66', 'push'],\n     ['1.61', 'half-lose'],\n     ['3.40', 'half-win'],\n     ['2.67', 'half-win'],\n     ['2.27', 'half-win']],\n    250),\n   ['3.3002', 825]),\n  ('variant scenario 1',\n   ([['1.64', 'void'], ['1.40', 'lose'], ['2.39', 'half-lose']], 333),\n   ['0.0000', 0]),\n  ('variant scenario 2',\n   ([['1.78', 'push'], ['1.46', 'half-lose'], ['2.49', 'win']], 333),\n   ['1.2450', 414])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: half win factor',\n   ([['3.26', 'void'], ['3.52', 'half-win'], ['2.05', 'half-lose'], ['3.79', 'void']], 100),\n   ['1.1300', 113]),\n  ('variant scenario 1',\n   ([['1.32', 'win'], ['2.63', 'push'], ['1.31', 'void'], ['1.97', 'win'], ['2.37', 'win']], 333),\n   ['6.1629', 2052]),\n  ('variant scenario 2',\n   ([['1.29', 'void'], ['1.56', 'half-lose'], ['2.62', 'win'], ['1.98', 'void'], ['2.10', 'win']],\n    333),\n   ['2.7510', 916])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: half win factor',\n   ([['2.90', 'half-lose'],\n     ['2.13', 'win'],\n     ['2.30', 'half-win'],\n     ['1.23', 'half-win'],\n     ['1.38', 'win']],\n    100),\n   ['2.7039', 270]),\n  ('variant scenario 1',\n   ([['3.43', 'void'], ['1.58', 'win'], ['1.37', 'push'], ['3.02', 'win'], ['3.24', 'win']], 100),\n   ['15.4600', 1545]),\n  ('variant scenario 2', ([['3.08', 'win'], ['3.61', 'void']], 333), ['3.0800', 1025])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(args), 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":"d022c25e11268e9dc5038e2caac270bd4ce9e3b0295f12e425b4fe9de0711fa9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(legs, stake_cents):\n    factor = Fraction(1)\n    for price, result in legs:\n        d = Fraction(price)\n        if result == 'lose':\n            factor = Fraction(0)\n            break\n        if result == 'win':\n            factor *= d\n        elif result == 'half-win':\n            factor *= (1 + d) / 2\n        elif result == 'half-lose':\n            factor *= Fraction(1, 2)\n    q = math.floor(factor * 10000 + Fraction(1, 2))\n    return ['%d.%04d' % (q // 10000, q % 10000), math.floor(stake_cents * factor)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: half win factor',\n   ([['2.35', 'win'], ['1.77', 'void'], ['1.28', 'half-lose'], ['3.07', 'half-win']], 1000),\n   ['2.3911', 2391]),\n  ('variant scenario 1',\n   ([['2.04', 'half-win'],\n     ['1.30', 'half-win'],\n     ['2.75', 'win'],\n     ['2.56', 'half-lose'],\n     ['3.90', 'lose']],\n    1999),\n   ['0.0000', 0]),\n  ('variant scenario 2', ([['3.10', 'win'], ['2.58', 'void']], 100), ['3.1000', 310])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: half win factor',\n   ([['2.78', 'win'],\n     ['3.36', 'half-lose'],\n     ['1.51', 'half-win'],\n     ['1.53', 'win'],\n     ['2.82', 'win']],\n    333),\n   ['7.5266', 2506]),\n  ('variant scenario 1',\n   ([['1.69', 'win'], ['3.30', 'win'], ['1.27', 'win'], ['2.88', 'half-lose'], ['3.75', 'push']],\n    1000),\n   ['3.5414', 3541]),\n  ('variant scenario 2', ([['3.90', 'win'], ['2.38', 'half-lose']], 1000), ['1.9500', 1950])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: half win factor',\n   ([['3.66', 'push'],\n     ['1.61', 'half-lose'],\n     ['3.40', 'half-win'],\n     ['2.67', 'half-win'],\n     ['2.27', 'half-win']],\n    250),\n   ['3.3002', 825]),\n  ('variant scenario 1',\n   ([['1.64', 'void'], ['1.40', 'lose'], ['2.39', 'half-lose']], 333),\n   ['0.0000', 0]),\n  ('variant scenario 2',\n   ([['1.78', 'push'], ['1.46', 'half-lose'], ['2.49', 'win']], 333),\n   ['1.2450', 414])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: half win factor',\n   ([['3.26', 'void'], ['3.52', 'half-win'], ['2.05', 'half-lose'], ['3.79', 'void']], 100),\n   ['1.1300', 113]),\n  ('variant scenario 1',\n   ([['1.32', 'win'], ['2.63', 'push'], ['1.31', 'void'], ['1.97', 'win'], ['2.37', 'win']], 333),\n   ['6.1629', 2052]),\n  ('variant scenario 2',\n   ([['1.29', 'void'], ['1.56', 'half-lose'], ['2.62', 'win'], ['1.98', 'void'], ['2.10', 'win']],\n    333),\n   ['2.7510', 916])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: half win factor',\n   ([['2.90', 'half-lose'],\n     ['2.13', 'win'],\n     ['2.30', 'half-win'],\n     ['1.23', 'half-win'],\n     ['1.38', 'win']],\n    100),\n   ['2.7039', 270]),\n  ('variant scenario 1',\n   ([['3.43', 'void'], ['1.58', 'win'], ['1.37', 'push'], ['3.02', 'win'], ['3.24', 'win']], 100),\n   ['15.4600', 1545]),\n  ('variant scenario 2', ([['3.08', 'win'], ['3.61', 'void']], 333), ['3.0800', 1025])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(args), 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":"Stipulated, bounded toy contract stated in the contract field; not a claim of conformance with any operator, exchange or regulator rule set. 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-odds-conversion-parlay-leg-adjustments-half-win-factor","generated_at":"2026-09-29T14:50:31.204368+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Settlement engines must collapse pushed, voided and Asian half results inside multiples.","repair":"Use (1 + d) / 2: half at the price and half refunded.","root_cause":"The half-win factor uses the full price.","sha256":"15c8c0a4fbddfd13442e58822f82e7db09a92e89b56c235402887f37b71f1e22","title":"Half-win leg settled as a full win or as half the price · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.811,"exit_code":1,"observations":[{"actual":["3.0000",3000],"check":"control two winners","expected":["3.0000",3000],"passed":true},{"actual":["2.0000",2000],"check":"boundary pushed leg","expected":["2.0000",2000],"passed":true},{"actual":["2.0000",2000],"check":"boundary half-win leg","expected":["3.0000",3000],"passed":false},{"actual":["1.5000",1500],"check":"boundary half-lose leg","expected":["1.5000",1500],"passed":true},{"actual":["0.0000",0],"check":"control losing leg","expected":["0.0000",0],"passed":true},{"actual":["1.3300",442],"check":"control payout rounds down","expected":["1.3300",442],"passed":true},{"actual":["1.8036",1803],"check":"regression: half win factor","expected":["2.3911",2391],"passed":false},{"actual":["0.0000",0],"check":"variant scenario 1","expected":["0.0000",0],"passed":true},{"actual":["3.1000",310],"check":"variant scenario 2","expected":["3.1000",310],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control two winners\", \"actual\": [\"3.0000\", 3000], \"expected\": [\"3.0000\", 3000], \"passed\": true}, {\"check\": \"boundary pushed leg\", \"actual\": [\"2.0000\", 2000], \"expected\": [\"2.0000\", 2000], \"passed\": true}, {\"check\": \"boundary half-win leg\", \"actual\": [\"2.0000\", 2000], \"expected\": [\"3.0000\", 3000], \"passed\": false}, {\"check\": \"boundary half-lose leg\", \"actual\": [\"1.5000\", 1500], \"expected\": [\"1.5000\", 1500], \"passed\": true}, {\"check\": \"control losing leg\", \"actual\": [\"0.0000\", 0], \"expected\": [\"0.0000\", 0], \"passed\": true}, {\"check\": \"control payout rounds down\", \"actual\": [\"1.3300\", 442], \"expected\": [\"1.3300\", 442], \"passed\": true}, {\"check\": \"regression: half win factor\", \"actual\": [\"1.8036\", 1803], \"expected\": [\"2.3911\", 2391], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [\"0.0000\", 0], \"expected\": [\"0.0000\", 0], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [\"3.1000\", 310], \"expected\": [\"3.1000\", 310], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.403,"exit_code":1,"observations":[{"actual":["3.0000",3000],"check":"control two winners","expected":["3.0000",3000],"passed":true},{"actual":["2.0000",2000],"check":"boundary pushed leg","expected":["2.0000",2000],"passed":true},{"actual":["4.0000",4000],"check":"boundary half-win leg","expected":["3.0000",3000],"passed":false},{"actual":["1.5000",1500],"check":"boundary half-lose leg","expected":["1.5000",1500],"passed":true},{"actual":["0.0000",0],"check":"control losing leg","expected":["0.0000",0],"passed":true},{"actual":["1.3300",442],"check":"control payout rounds down","expected":["1.3300",442],"passed":true},{"actual":["3.6073",3607],"check":"regression: half win factor","expected":["2.3911",2391],"passed":false},{"actual":["0.0000",0],"check":"variant scenario 1","expected":["0.0000",0],"passed":true},{"actual":["3.1000",310],"check":"variant scenario 2","expected":["3.1000",310],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control two winners\", \"actual\": [\"3.0000\", 3000], \"expected\": [\"3.0000\", 3000], \"passed\": true}, {\"check\": \"boundary pushed leg\", \"actual\": [\"2.0000\", 2000], \"expected\": [\"2.0000\", 2000], \"passed\": true}, {\"check\": \"boundary half-win leg\", \"actual\": [\"4.0000\", 4000], \"expected\": [\"3.0000\", 3000], \"passed\": false}, {\"check\": \"boundary half-lose leg\", \"actual\": [\"1.5000\", 1500], \"expected\": [\"1.5000\", 1500], \"passed\": true}, {\"check\": \"control losing leg\", \"actual\": [\"0.0000\", 0], \"expected\": [\"0.0000\", 0], \"passed\": true}, {\"check\": \"control payout rounds down\", \"actual\": [\"1.3300\", 442], \"expected\": [\"1.3300\", 442], \"passed\": true}, {\"check\": \"regression: half win factor\", \"actual\": [\"3.6073\", 3607], \"expected\": [\"2.3911\", 2391], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [\"0.0000\", 0], \"expected\": [\"0.0000\", 0], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [\"3.1000\", 310], \"expected\": [\"3.1000\", 310], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.181,"exit_code":0,"observations":[{"actual":["3.0000",3000],"check":"control two winners","expected":["3.0000",3000],"passed":true},{"actual":["2.0000",2000],"check":"boundary pushed leg","expected":["2.0000",2000],"passed":true},{"actual":["3.0000",3000],"check":"boundary half-win leg","expected":["3.0000",3000],"passed":true},{"actual":["1.5000",1500],"check":"boundary half-lose leg","expected":["1.5000",1500],"passed":true},{"actual":["0.0000",0],"check":"control losing leg","expected":["0.0000",0],"passed":true},{"actual":["1.3300",442],"check":"control payout rounds down","expected":["1.3300",442],"passed":true},{"actual":["2.3911",2391],"check":"regression: half win factor","expected":["2.3911",2391],"passed":true},{"actual":["0.0000",0],"check":"variant scenario 1","expected":["0.0000",0],"passed":true},{"actual":["3.1000",310],"check":"variant scenario 2","expected":["3.1000",310],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control two winners\", \"actual\": [\"3.0000\", 3000], \"expected\": [\"3.0000\", 3000], \"passed\": true}, {\"check\": \"boundary pushed leg\", \"actual\": [\"2.0000\", 2000], \"expected\": [\"2.0000\", 2000], \"passed\": true}, {\"check\": \"boundary half-win leg\", \"actual\": [\"3.0000\", 3000], \"expected\": [\"3.0000\", 3000], \"passed\": true}, {\"check\": \"boundary half-lose leg\", \"actual\": [\"1.5000\", 1500], \"expected\": [\"1.5000\", 1500], \"passed\": true}, {\"check\": \"control losing leg\", \"actual\": [\"0.0000\", 0], \"expected\": [\"0.0000\", 0], \"passed\": true}, {\"check\": \"control payout rounds down\", \"actual\": [\"1.3300\", 442], \"expected\": [\"1.3300\", 442], \"passed\": true}, {\"check\": \"regression: half win factor\", \"actual\": [\"2.3911\", 2391], \"expected\": [\"2.3911\", 2391], \"passed\": true}, {\"check\": \"variant scenario 1\", \"actual\": [\"0.0000\", 0], \"expected\": [\"0.0000\", 0], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [\"3.1000\", 310], \"expected\": [\"3.1000\", 310], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}