FAILURE MAP
← Case archive

FA-86161 / Game economy crafting balance / Open access

Repeatable quest rewards: Reward floors between multipliers · case 01

Odd base rewards lose a coin on diminished gray quests.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The tier multiplier is floored before the gap multiplier.

THE FAILURE

The tier multiplier is floored before the gap multiplier.

Unsuccessful approach: Rounding to nearest overpays fractional rewards.

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 < 10:
            tier = 50
        else:
            tier = 0
        out.append(base * tier // 100 * gap // 100)
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
  ('fault site reward rounding stage #1', [2, 4, 7, 16, 12], [4, 4, 4, 2]),
  ('fault site reward rounding stage #2', [2, 5, 7, 20, 16], [4, 4, 4, 2, 2]),
  ('partial repair boundary #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0]),
  ('partial repair boundary #2', [3, 4, 101, 31, 28], [60, 60, 30, 30]),
  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
  ('control #1', [8, 2, 1, 33, 25], [0, 0])],
 [('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
  ('fault site reward rounding stage #1', [8, 6, 7, 23, 19], [2, 2, 0, 0, 0, 0]),
  ('fault site reward rounding stage #2', [3, 6, 7, 49, 46], [4, 4, 2, 2, 2, 2]),
  ('partial repair boundary #1', [3, 4, 101, 31, 28], [60, 60, 30, 30]),
  ('partial repair boundary #2', [9, 4, 3, 24, 23], [1, 0, 0, 0]),
  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
  ('control #1', [8, 2, 1, 33, 25], [0, 0])],
 [('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
  ('fault site reward rounding stage #1', [7, 4, 7, 51, 48], [2, 2, 2, 0]),
  ('fault site reward rounding stage #2', [1, 6, 7, 18, 14], [4, 4, 4, 4, 2, 2]),
  ('partial repair boundary #1', [3, 6, 99, 59, 64], [99, 99, 49, 49, 49, 49]),
  ('partial repair boundary #2', [7, 1, 7, 40, 47], [3]),
  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
  ('control #1', [8, 2, 1, 33, 25], [0, 0])],
 [('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
  ('fault site reward rounding stage #1', [9, 4, 267, 56, 53], [80, 0, 0, 0]),
  ('fault site reward rounding stage #2', [2, 4, 7, 16, 12], [4, 4, 4, 2]),
  ('partial repair boundary #1', [1, 6, 7, 45, 37], [1, 1, 1, 1, 0, 0]),
  ('partial repair boundary #2', [8, 6, 99, 11, 18], [49, 49, 0, 0, 0, 0]),
  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
  ('control #1', [11, 1, 1, 10, 16], [0])],
 [('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
  ('fault site reward rounding stage #1', [2, 5, 7, 20, 16], [4, 4, 4, 2, 2]),
  ('fault site reward rounding stage #2', [8, 6, 7, 23, 19], [2, 2, 0, 0, 0, 0]),
  ('partial repair boundary #1', [2, 6, 99, 10, 9], [99, 99, 99, 49, 49, 49]),
  ('partial repair boundary #2', [8, 4, 99, 8, 6], [49, 49, 0, 0]),
  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
  ('control #1', [12, 2, 107, 5, -1], [0, 0])]]
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 fixtureActualExpectedOutcome
gray quest #1[19, 19][19, 19]Passed
fault site reward rounding stage #1[4, 4, 4, 1][4, 4, 4, 2]Failed
fault site reward rounding stage #2[4, 4, 4, 1, 1][4, 4, 4, 2, 2]Failed
partial repair boundary #1[107, 107, 107, 107, 0, 0][107, 107, 107, 107, 0, 0]Passed
partial repair boundary #2[60, 60, 30, 30][60, 60, 30, 30]Passed
crossing into half tier #1[101, 101, 50, 50][101, 101, 50, 50]Passed
harder quest no penalty #1[25, 25, 0][25, 25, 0]Passed
control #1[0, 0][0, 0]Passed

SHA-256 / 15ba1d18fbc04fe4d95adcf6f89667706b14f2aace75922a0b8434cda1e1c36b

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(round(base * tier * gap / 10000))
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
  ('fault site reward rounding stage #1', [2, 4, 7, 16, 12], [4, 4, 4, 2]),
  ('fault site reward rounding stage #2', [2, 5, 7, 20, 16], [4, 4, 4, 2, 2]),
  ('partial repair boundary #1', [6, 6, 215, 11, 12], [107, 107, 107, 107, 0, 0]),
  ('partial repair boundary #2', [3, 4, 101, 31, 28], [60, 60, 30, 30]),
  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
  ('control #1', [8, 2, 1, 33, 25], [0, 0])],
 [('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
  ('fault site reward rounding stage #1', [8, 6, 7, 23, 19], [2, 2, 0, 0, 0, 0]),
  ('fault site reward rounding stage #2', [3, 6, 7, 49, 46], [4, 4, 2, 2, 2, 2]),
  ('partial repair boundary #1', [3, 4, 101, 31, 28], [60, 60, 30, 30]),
  ('partial repair boundary #2', [9, 4, 3, 24, 23], [1, 0, 0, 0]),
  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
  ('control #1', [8, 2, 1, 33, 25], [0, 0])],
 [('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
  ('fault site reward rounding stage #1', [7, 4, 7, 51, 48], [2, 2, 2, 0]),
  ('fault site reward rounding stage #2', [1, 6, 7, 18, 14], [4, 4, 4, 4, 2, 2]),
  ('partial repair boundary #1', [3, 6, 99, 59, 64], [99, 99, 49, 49, 49, 49]),
  ('partial repair boundary #2', [7, 1, 7, 40, 47], [3]),
  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
  ('control #1', [8, 2, 1, 33, 25], [0, 0])],
 [('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
  ('fault site reward rounding stage #1', [9, 4, 267, 56, 53], [80, 0, 0, 0]),
  ('fault site reward rounding stage #2', [2, 4, 7, 16, 12], [4, 4, 4, 2]),
  ('partial repair boundary #1', [1, 6, 7, 45, 37], [1, 1, 1, 1, 0, 0]),
  ('partial repair boundary #2', [8, 6, 99, 11, 18], [49, 49, 0, 0, 0, 0]),
  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
  ('control #1', [11, 1, 1, 10, 16], [0])],
 [('gray quest #1', [0, 2, 99, 30, 25], [19, 19]),
  ('fault site reward rounding stage #1', [2, 5, 7, 20, 16], [4, 4, 4, 2, 2]),
  ('fault site reward rounding stage #2', [8, 6, 7, 23, 19], [2, 2, 0, 0, 0, 0]),
  ('partial repair boundary #1', [2, 6, 99, 10, 9], [99, 99, 99, 49, 49, 49]),
  ('partial repair boundary #2', [8, 4, 99, 8, 6], [49, 49, 0, 0]),
  ('crossing into half tier #1', [3, 4, 101, 20, 20], [101, 101, 50, 50]),
  ('harder quest no penalty #1', [8, 3, 50, 10, 18], [25, 25, 0]),
  ('control #1', [12, 2, 107, 5, -1], [0, 0])]]
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 fixtureActualExpectedOutcome
gray quest #1[20, 20][19, 19]Failed
fault site reward rounding stage #1[4, 4, 4, 2][4, 4, 4, 2]Passed
fault site reward rounding stage #2[4, 4, 4, 2, 2][4, 4, 4, 2, 2]Passed
partial repair boundary #1[108, 108, 108, 108, 0, 0][107, 107, 107, 107, 0, 0]Failed
partial repair boundary #2[61, 61, 30, 30][60, 60, 30, 30]Failed
crossing into half tier #1[101, 101, 50, 50][101, 101, 50, 50]Passed
harder quest no penalty #1[25, 25, 0][25, 25, 0]Passed
control #1[0, 0][0, 0]Passed

SHA-256 / f2eeb27a2344550a5d133afdd6e4e73835e59084c5798b113dcf188876fcc7a5

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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.988716+00:00.

Case digest / de1104d7c2ee538718001fab45990f30b9ad2cb53510e102b8e61c05c3baabdc