FA-86146 / Game economy crafting balance / Open access
Repeatable quest rewards: Half tier spans ten completions · case 01
Players farm five extra half-reward completions.
ROOT CAUSE
The half-reward window is measured as ten completions after the full tier.
VERIFIED REPAIR
Restore `elif k < 10:` at the half tier boundary step.
Unsuccessful approach: An inclusive bound still pays one extra half reward.
Case 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.
Why this case matters
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.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(done_today, count, base, player_level, quest_level):
if player_level - quest_level >= 5:
gap = 20
elif player_level - quest_level >= 3:
gap = 60
else:
gap = 100
out = []
for k in range(done_today, done_today + count):
if k < 5:
tier = 100
elif k < 15:
tier = 50
else:
tier = 0
out.append(base * tier * gap // 10000)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
('regression half tier boundary #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0]),
('regression half tier boundary #2', [9, 4, 3, 24, 23], [1, 0, 0, 0]),
('regression half tier boundary #3', [8, 6, 99, 11, 18], [49, 49, 0, 0, 0, 0]),
('regression half tier boundary #4', [8, 4, 99, 8, 6], [49, 49, 0, 0]),
('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
('control #1', [3, 4, 101, 31, 28], [60, 60, 30, 30])],
[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
('regression half tier boundary #1', [9, 4, 3, 24, 23], [1, 0, 0, 0]),
('regression half tier boundary #2', [8, 6, 99, 11, 18], [49, 49, 0, 0, 0, 0]),
('regression half tier boundary #3', [8, 4, 99, 8, 6], [49, 49, 0, 0]),
('regression half tier boundary #4', [8, 4, 99, 29, 33], [49, 49, 0, 0]),
('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
('control #1', [3, 4, 101, 31, 28], [60, 60, 30, 30])],
[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
('fault site half tier boundary #1', [12, 2, 107, 5, -1], [0, 0]),
('regression half tier boundary #1', [8, 4, 99, 8, 6], [49, 49, 0, 0]),
('regression half tier boundary #2', [8, 4, 99, 29, 33], [49, 49, 0, 0]),
('regression half tier boundary #3', [9, 5, 101, 15, 10], [10, 0, 0, 0, 0]),
('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
('control #1', [3, 4, 101, 31, 28], [60, 60, 30, 30])],
[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
('regression half tier boundary #1', [8, 4, 99, 29, 33], [49, 49, 0, 0]),
('regression half tier boundary #2', [9, 5, 101, 15, 10], [10, 0, 0, 0, 0]),
('regression half tier boundary #3', [10, 2, 7, 12, 14], [0, 0]),
('regression half tier boundary #4', [10, 5, 467, 9, 16], [0, 0, 0, 0, 0]),
('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
('control #1', [8, 2, 1, 33, 25], [0, 0])],
[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
('regression half tier boundary #1', [10, 2, 7, 12, 14], [0, 0]),
('fault site half tier boundary #1', [12, 5, 7, 23, 22], [0, 0, 0, 0, 0]),
('regression half tier boundary #2', [10, 5, 467, 9, 16], [0, 0, 0, 0, 0]),
('regression half tier boundary #3', [9, 4, 132, 55, 59], [66, 0, 0, 0]),
('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
('control #1', [3, 6, 99, 59, 64], [99, 99, 49, 49, 49, 49])]]
for label, args, expected in cases[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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| harder quest no penalty #1 | [25, 25, 25] | [25, 25, 0] | Failed |
| regression half tier boundary #1 | [107, 107, 107, 107, 107, 107] | [107, 107, 107, 107, 0, 0] | Failed |
| regression half tier boundary #2 | [1, 1, 1, 1] | [1, 0, 0, 0] | Failed |
| regression half tier boundary #3 | [49, 49, 49, 49, 49, 49] | [49, 49, 0, 0, 0, 0] | Failed |
| regression half tier boundary #4 | [49, 49, 49, 49] | [49, 49, 0, 0] | Failed |
| crossing into half tier #1 | [101, 101, 50, 50] | [101, 101, 50, 50] | Passed |
| gray quest #1 | [19, 19] | [19, 19] | Passed |
| control #1 | [60, 60, 30, 30] | [60, 60, 30, 30] | Passed |
SHA-256 / bb0a73bf76211d1710c2bd65087fb28f0ab892c80cbcfc09f345e63e4e012098
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(done_today, count, base, player_level, quest_level):
if player_level - quest_level >= 5:
gap = 20
elif player_level - quest_level >= 3:
gap = 60
else:
gap = 100
out = []
for k in range(done_today, done_today + count):
if k < 5:
tier = 100
elif k <= 10:
tier = 50
else:
tier = 0
out.append(base * tier * gap // 10000)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
('regression half tier boundary #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0]),
('regression half tier boundary #2', [9, 4, 3, 24, 23], [1, 0, 0, 0]),
('regression half tier boundary #3', [8, 6, 99, 11, 18], [49, 49, 0, 0, 0, 0]),
('regression half tier boundary #4', [8, 4, 99, 8, 6], [49, 49, 0, 0]),
('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
('control #1', [3, 4, 101, 31, 28], [60, 60, 30, 30])],
[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
('regression half tier boundary #1', [9, 4, 3, 24, 23], [1, 0, 0, 0]),
('regression half tier boundary #2', [8, 6, 99, 11, 18], [49, 49, 0, 0, 0, 0]),
('regression half tier boundary #3', [8, 4, 99, 8, 6], [49, 49, 0, 0]),
('regression half tier boundary #4', [8, 4, 99, 29, 33], [49, 49, 0, 0]),
('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
('control #1', [3, 4, 101, 31, 28], [60, 60, 30, 30])],
[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
('fault site half tier boundary #1', [12, 2, 107, 5, -1], [0, 0]),
('regression half tier boundary #1', [8, 4, 99, 8, 6], [49, 49, 0, 0]),
('regression half tier boundary #2', [8, 4, 99, 29, 33], [49, 49, 0, 0]),
('regression half tier boundary #3', [9, 5, 101, 15, 10], [10, 0, 0, 0, 0]),
('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
('control #1', [3, 4, 101, 31, 28], [60, 60, 30, 30])],
[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
('regression half tier boundary #1', [8, 4, 99, 29, 33], [49, 49, 0, 0]),
('regression half tier boundary #2', [9, 5, 101, 15, 10], [10, 0, 0, 0, 0]),
('regression half tier boundary #3', [10, 2, 7, 12, 14], [0, 0]),
('regression half tier boundary #4', [10, 5, 467, 9, 16], [0, 0, 0, 0, 0]),
('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
('control #1', [8, 2, 1, 33, 25], [0, 0])],
[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
('regression half tier boundary #1', [10, 2, 7, 12, 14], [0, 0]),
('fault site half tier boundary #1', [12, 5, 7, 23, 22], [0, 0, 0, 0, 0]),
('regression half tier boundary #2', [10, 5, 467, 9, 16], [0, 0, 0, 0, 0]),
('regression half tier boundary #3', [9, 4, 132, 55, 59], [66, 0, 0, 0]),
('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
('control #1', [3, 6, 99, 59, 64], [99, 99, 49, 49, 49, 49])]]
for label, args, expected in cases[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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| harder quest no penalty #1 | [25, 25, 25] | [25, 25, 0] | Failed |
| regression half tier boundary #1 | [107, 107, 107, 107, 107, 0] | [107, 107, 107, 107, 0, 0] | Failed |
| regression half tier boundary #2 | [1, 1, 0, 0] | [1, 0, 0, 0] | Failed |
| regression half tier boundary #3 | [49, 49, 49, 0, 0, 0] | [49, 49, 0, 0, 0, 0] | Failed |
| regression half tier boundary #4 | [49, 49, 49, 0] | [49, 49, 0, 0] | Failed |
| crossing into half tier #1 | [101, 101, 50, 50] | [101, 101, 50, 50] | Passed |
| gray quest #1 | [19, 19] | [19, 19] | Passed |
| control #1 | [60, 60, 30, 30] | [60, 60, 30, 30] | Passed |
SHA-256 / 6350ad7667fc7eb05114c2f141f262fbe5bfed40190798dc8eb2d7b66ced54aa
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(done_today, count, base, player_level, quest_level):
if player_level - quest_level >= 5:
gap = 20
elif player_level - quest_level >= 3:
gap = 60
else:
gap = 100
out = []
for k in range(done_today, done_today + count):
if k < 5:
tier = 100
elif k < 10:
tier = 50
else:
tier = 0
out.append(base * tier * gap // 10000)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
('regression half tier boundary #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0]),
('regression half tier boundary #2', [9, 4, 3, 24, 23], [1, 0, 0, 0]),
('regression half tier boundary #3', [8, 6, 99, 11, 18], [49, 49, 0, 0, 0, 0]),
('regression half tier boundary #4', [8, 4, 99, 8, 6], [49, 49, 0, 0]),
('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
('control #1', [3, 4, 101, 31, 28], [60, 60, 30, 30])],
[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
('regression half tier boundary #1', [9, 4, 3, 24, 23], [1, 0, 0, 0]),
('regression half tier boundary #2', [8, 6, 99, 11, 18], [49, 49, 0, 0, 0, 0]),
('regression half tier boundary #3', [8, 4, 99, 8, 6], [49, 49, 0, 0]),
('regression half tier boundary #4', [8, 4, 99, 29, 33], [49, 49, 0, 0]),
('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
('control #1', [3, 4, 101, 31, 28], [60, 60, 30, 30])],
[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
('fault site half tier boundary #1', [12, 2, 107, 5, -1], [0, 0]),
('regression half tier boundary #1', [8, 4, 99, 8, 6], [49, 49, 0, 0]),
('regression half tier boundary #2', [8, 4, 99, 29, 33], [49, 49, 0, 0]),
('regression half tier boundary #3', [9, 5, 101, 15, 10], [10, 0, 0, 0, 0]),
('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
('control #1', [3, 4, 101, 31, 28], [60, 60, 30, 30])],
[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
('regression half tier boundary #1', [8, 4, 99, 29, 33], [49, 49, 0, 0]),
('regression half tier boundary #2', [9, 5, 101, 15, 10], [10, 0, 0, 0, 0]),
('regression half tier boundary #3', [10, 2, 7, 12, 14], [0, 0]),
('regression half tier boundary #4', [10, 5, 467, 9, 16], [0, 0, 0, 0, 0]),
('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
('control #1', [8, 2, 1, 33, 25], [0, 0])],
[('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
('regression half tier boundary #1', [10, 2, 7, 12, 14], [0, 0]),
('fault site half tier boundary #1', [12, 5, 7, 23, 22], [0, 0, 0, 0, 0]),
('regression half tier boundary #2', [10, 5, 467, 9, 16], [0, 0, 0, 0, 0]),
('regression half tier boundary #3', [9, 4, 132, 55, 59], [66, 0, 0, 0]),
('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
('control #1', [3, 6, 99, 59, 64], [99, 99, 49, 49, 49, 49])]]
for label, args, expected in cases[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)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| harder quest no penalty #1 | [25, 25, 0] | [25, 25, 0] | Passed |
| regression half tier boundary #1 | [107, 107, 107, 107, 0, 0] | [107, 107, 107, 107, 0, 0] | Passed |
| regression half tier boundary #2 | [1, 0, 0, 0] | [1, 0, 0, 0] | Passed |
| regression half tier boundary #3 | [49, 49, 0, 0, 0, 0] | [49, 49, 0, 0, 0, 0] | Passed |
| regression half tier boundary #4 | [49, 49, 0, 0] | [49, 49, 0, 0] | Passed |
| crossing into half tier #1 | [101, 101, 50, 50] | [101, 101, 50, 50] | Passed |
| gray quest #1 | [19, 19] | [19, 19] | Passed |
| control #1 | [60, 60, 30, 30] | [60, 60, 30, 30] | Passed |
SHA-256 / 2e4008557bb422847aa263367fc49d9902070a9d0ffcccbe41c49d3cc66964e4
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:50:46.950202+00:00.
Case digest / 94831df9a5afd45788a6a9f3cd9d86aa893034550854e6c59e3f06135a7ef7bf