{"abstract":"Odd base rewards lose a coin on diminished gray quests.","category":"Game economy crafting balance","checks":8,"contract":"Completion k (0-based across the day, starting at done_today) pays tier 100% for k < 5, 50% for 5 <= k < 10, 0 after. Gap = player_level - quest_level: >= 5 pays 20%, >= 3 pays 60%, otherwise 100% (higher level quests are never penalized). Each reward = floor(base*tier*gap/10000). Returns the list of the next count rewards.","contract_signature":"done_today, count, base, player_level, quest_level","evaluation_group":"w2-game-economy-crafting-balance-quest-diminish","failed_approach":"Rounding to nearest overpays fractional rewards.","family":"w2-game-economy-crafting-balance-quest-diminish-reward-rounding-stage","id":"FA-86161","implementations":{"attempt":{"sha256":"f2eeb27a2344550a5d133afdd6e4e73835e59084c5798b113dcf188876fcc7a5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(done_today, count, base, player_level, quest_level):\n    if player_level - quest_level >= 5:\n        gap = 20\n    elif player_level - quest_level >= 3:\n        gap = 60\n    else:\n        gap = 100\n    out = []\n    for k in range(done_today, done_today + count):\n        if k < 5:\n            tier = 100\n        elif k < 10:\n            tier = 50\n        else:\n            tier = 0\n        out.append(round(base * tier * gap / 10000))\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site reward rounding stage #1', [2, 4, 7, 16, 12], [4, 4, 4, 2]),\n  ('fault site reward rounding stage #2', [2, 5, 7, 20, 16], [4, 4, 4, 2, 2]),\n  ('partial repair boundary #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0]),\n  ('partial repair boundary #2', [3, 4, 101, 31, 28], [60, 60, 30, 30]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [8, 2, 1, 33, 25], [0, 0])],\n [('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site reward rounding stage #1', [8, 6, 7, 23, 19], [2, 2, 0, 0, 0, 0]),\n  ('fault site reward rounding stage #2', [3, 6, 7, 49, 46], [4, 4, 2, 2, 2, 2]),\n  ('partial repair boundary #1', [3, 4, 101, 31, 28], [60, 60, 30, 30]),\n  ('partial repair boundary #2', [9, 4, 3, 24, 23], [1, 0, 0, 0]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [8, 2, 1, 33, 25], [0, 0])],\n [('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site reward rounding stage #1', [7, 4, 7, 51, 48], [2, 2, 2, 0]),\n  ('fault site reward rounding stage #2', [1, 6, 7, 18, 14], [4, 4, 4, 4, 2, 2]),\n  ('partial repair boundary #1', [3, 6, 99, 59, 64], [99, 99, 49, 49, 49, 49]),\n  ('partial repair boundary #2', [7, 1, 7, 40, 47], [3]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [8, 2, 1, 33, 25], [0, 0])],\n [('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site reward rounding stage #1', [9, 4, 267, 56, 53], [80, 0, 0, 0]),\n  ('fault site reward rounding stage #2', [2, 4, 7, 16, 12], [4, 4, 4, 2]),\n  ('partial repair boundary #1', [1, 6, 7, 45, 37], [1, 1, 1, 1, 0, 0]),\n  ('partial repair boundary #2', [8, 6, 99, 11, 18], [49, 49, 0, 0, 0, 0]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [11, 1, 1, 10, 16], [0])],\n [('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site reward rounding stage #1', [2, 5, 7, 20, 16], [4, 4, 4, 2, 2]),\n  ('fault site reward rounding stage #2', [8, 6, 7, 23, 19], [2, 2, 0, 0, 0, 0]),\n  ('partial repair boundary #1', [2, 6, 99, 10, 9], [99, 99, 99, 49, 49, 49]),\n  ('partial repair boundary #2', [8, 4, 99, 8, 6], [49, 49, 0, 0]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [12, 2, 107, 5, -1], [0, 0])]]\nfor label, args, expected in cases[N-1]:\n    check(label, solve(*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":"15ba1d18fbc04fe4d95adcf6f89667706b14f2aace75922a0b8434cda1e1c36b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(done_today, count, base, player_level, quest_level):\n    if player_level - quest_level >= 5:\n        gap = 20\n    elif player_level - quest_level >= 3:\n        gap = 60\n    else:\n        gap = 100\n    out = []\n    for k in range(done_today, done_today + count):\n        if k < 5:\n            tier = 100\n        elif k < 10:\n            tier = 50\n        else:\n            tier = 0\n        out.append(base * tier // 100 * gap // 100)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site reward rounding stage #1', [2, 4, 7, 16, 12], [4, 4, 4, 2]),\n  ('fault site reward rounding stage #2', [2, 5, 7, 20, 16], [4, 4, 4, 2, 2]),\n  ('partial repair boundary #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0]),\n  ('partial repair boundary #2', [3, 4, 101, 31, 28], [60, 60, 30, 30]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [8, 2, 1, 33, 25], [0, 0])],\n [('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site reward rounding stage #1', [8, 6, 7, 23, 19], [2, 2, 0, 0, 0, 0]),\n  ('fault site reward rounding stage #2', [3, 6, 7, 49, 46], [4, 4, 2, 2, 2, 2]),\n  ('partial repair boundary #1', [3, 4, 101, 31, 28], [60, 60, 30, 30]),\n  ('partial repair boundary #2', [9, 4, 3, 24, 23], [1, 0, 0, 0]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [8, 2, 1, 33, 25], [0, 0])],\n [('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site reward rounding stage #1', [7, 4, 7, 51, 48], [2, 2, 2, 0]),\n  ('fault site reward rounding stage #2', [1, 6, 7, 18, 14], [4, 4, 4, 4, 2, 2]),\n  ('partial repair boundary #1', [3, 6, 99, 59, 64], [99, 99, 49, 49, 49, 49]),\n  ('partial repair boundary #2', [7, 1, 7, 40, 47], [3]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [8, 2, 1, 33, 25], [0, 0])],\n [('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site reward rounding stage #1', [9, 4, 267, 56, 53], [80, 0, 0, 0]),\n  ('fault site reward rounding stage #2', [2, 4, 7, 16, 12], [4, 4, 4, 2]),\n  ('partial repair boundary #1', [1, 6, 7, 45, 37], [1, 1, 1, 1, 0, 0]),\n  ('partial repair boundary #2', [8, 6, 99, 11, 18], [49, 49, 0, 0, 0, 0]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [11, 1, 1, 10, 16], [0])],\n [('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),\n  ('fault site reward rounding stage #1', [2, 5, 7, 20, 16], [4, 4, 4, 2, 2]),\n  ('fault site reward rounding stage #2', [8, 6, 7, 23, 19], [2, 2, 0, 0, 0, 0]),\n  ('partial repair boundary #1', [2, 6, 99, 10, 9], [99, 99, 99, 49, 49, 49]),\n  ('partial repair boundary #2', [8, 4, 99, 8, 6], [49, 49, 0, 0]),\n  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),\n  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),\n  ('control #1', [12, 2, 107, 5, -1], [0, 0])]]\nfor label, args, expected in cases[N-1]:\n    check(label, solve(*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":"Deterministic toy contract stipulated for this model; integer or exact arithmetic only, not a reproduction of any specific game engine. 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-game-economy-crafting-balance-quest-diminish-reward-rounding-stage","generated_at":"2026-09-29T14:50:46.988716+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Game economies leak or destroy currency when one crafting or pricing rule is off by one boundary, rounding stage or state update; the defect is observable in exact integer outcomes.","root_cause":"The tier multiplier is floored before the gap multiplier.","sha256":"de1104d7c2ee538718001fab45990f30b9ad2cb53510e102b8e61c05c3baabdc","title":"Repeatable quest rewards: Reward floors between multipliers · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":44.445,"exit_code":1,"observations":[{"actual":[20,20],"check":"gray quest #1","expected":[19,19],"passed":false},{"actual":[4,4,4,2],"check":"fault site reward rounding stage #1","expected":[4,4,4,2],"passed":true},{"actual":[4,4,4,2,2],"check":"fault site reward rounding stage #2","expected":[4,4,4,2,2],"passed":true},{"actual":[108,108,108,108,0,0],"check":"partial repair boundary #1","expected":[107,107,107,107,0,0],"passed":false},{"actual":[61,61,30,30],"check":"partial repair boundary #2","expected":[60,60,30,30],"passed":false},{"actual":[101,101,50,50],"check":"crossing into half tier #1","expected":[101,101,50,50],"passed":true},{"actual":[25,25,0],"check":"harder quest no penalty #1","expected":[25,25,0],"passed":true},{"actual":[0,0],"check":"control #1","expected":[0,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"gray quest #1\", \"actual\": [20, 20], \"expected\": [19, 19], \"passed\": false}, {\"check\": \"fault site reward rounding stage #1\", \"actual\": [4, 4, 4, 2], \"expected\": [4, 4, 4, 2], \"passed\": true}, {\"check\": \"fault site reward rounding stage #2\", \"actual\": [4, 4, 4, 2, 2], \"expected\": [4, 4, 4, 2, 2], \"passed\": true}, {\"check\": \"partial repair boundary #1\", \"actual\": [108, 108, 108, 108, 0, 0], \"expected\": [107, 107, 107, 107, 0, 0], \"passed\": false}, {\"check\": \"partial repair boundary #2\", \"actual\": [61, 61, 30, 30], \"expected\": [60, 60, 30, 30], \"passed\": false}, {\"check\": \"crossing into half tier #1\", \"actual\": [101, 101, 50, 50], \"expected\": [101, 101, 50, 50], \"passed\": true}, {\"check\": \"harder quest no penalty #1\", \"actual\": [25, 25, 0], \"expected\": [25, 25, 0], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.444,"exit_code":1,"observations":[{"actual":[19,19],"check":"gray quest #1","expected":[19,19],"passed":true},{"actual":[4,4,4,1],"check":"fault site reward rounding stage #1","expected":[4,4,4,2],"passed":false},{"actual":[4,4,4,1,1],"check":"fault site reward rounding stage #2","expected":[4,4,4,2,2],"passed":false},{"actual":[107,107,107,107,0,0],"check":"partial repair boundary #1","expected":[107,107,107,107,0,0],"passed":true},{"actual":[60,60,30,30],"check":"partial repair boundary #2","expected":[60,60,30,30],"passed":true},{"actual":[101,101,50,50],"check":"crossing into half tier #1","expected":[101,101,50,50],"passed":true},{"actual":[25,25,0],"check":"harder quest no penalty #1","expected":[25,25,0],"passed":true},{"actual":[0,0],"check":"control #1","expected":[0,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"gray quest #1\", \"actual\": [19, 19], \"expected\": [19, 19], \"passed\": true}, {\"check\": \"fault site reward rounding stage #1\", \"actual\": [4, 4, 4, 1], \"expected\": [4, 4, 4, 2], \"passed\": false}, {\"check\": \"fault site reward rounding stage #2\", \"actual\": [4, 4, 4, 1, 1], \"expected\": [4, 4, 4, 2, 2], \"passed\": false}, {\"check\": \"partial repair boundary #1\", \"actual\": [107, 107, 107, 107, 0, 0], \"expected\": [107, 107, 107, 107, 0, 0], \"passed\": true}, {\"check\": \"partial repair boundary #2\", \"actual\": [60, 60, 30, 30], \"expected\": [60, 60, 30, 30], \"passed\": true}, {\"check\": \"crossing into half tier #1\", \"actual\": [101, 101, 50, 50], \"expected\": [101, 101, 50, 50], \"passed\": true}, {\"check\": \"harder quest no penalty #1\", \"actual\": [25, 25, 0], \"expected\": [25, 25, 0], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}