FAILURE MAP
← Case archive

FA-65426 / Ecological population dynamics / Open access

Lotka-Volterra predator-prey Euler integration: non-negativity floor · case 01

Large steps drive prey negative, which then feeds predators negatively.

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

ROOT CAUSE

The prey update is not floored at zero.

THE FAILURE

The prey update is not floored at zero.

Unsuccessful approach: Reflecting negative values creates prey out of an overshoot.

Case contract

dx = alpha*x - beta*x*y, dy = delta*x*y - gamma*y evaluated from the same start-of-step state; Euler update with each population floored at 0; return [path of [x,y] rounded 4 including start, coexistence equilibrium [gamma/delta, alpha/beta] rounded 4 or None when beta or delta is not positive].

Why this case matters

Population projections set harvest quotas, conservation status and pest-control timing; a wrong update order, boundary or rate conversion silently changes management advice.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(prey0, pred0, alpha, beta, delta, gamma, dt, steps):
    x, y = float(prey0), float(pred0)
    path = [[round(x, 4), round(y, 4)]]
    for _ in range(steps):
        dx = alpha * x - beta * x * y
        dy = delta * x * y - gamma * y
        x = x + dx * dt
        y = max(y + dy * dt, 0.0)
        path.append([round(x, 4), round(y, 4)])
    eq = [round(gamma / delta, 4), round(alpha / beta, 4)] if beta > 0 and delta > 0 else None
    return [path, eq]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('control: hare and lynx',
   (40, 9, 0.1, 0.02, 0.01, 0.1, 0.5, 6),
   [[[40.0, 9.0],
     [38.4, 10.35],
     [36.3456, 11.8197],
     [33.8669, 13.3767],
     [31.03, 14.973],
     [27.9354, 16.5474],
     [24.7096, 18.0313]],
    [10.0, 5.0]]),
  ('regression: large step overshoot',
   (10, 50, 0.5, 0.1, 0.02, 0.4, 1.0, 4),
   [[[10.0, 50.0], [0.0, 40.0], [0.0, 24.0], [0.0, 14.4], [0.0, 8.64]], [20.0, 5.0]]),
  ('control: predators absent',
   (20, 0, 0.3, 0.05, 0.02, 0.2, 0.5, 4),
   [[[20.0, 0.0], [23.0, 0.0], [26.45, 0.0], [30.4175, 0.0], [34.9801, 0.0]], [10.0, 6.0]]),
  ('control: prey absent',
   (0, 10, 0.3, 0.05, 0.02, 0.2, 0.5, 4),
   [[[0.0, 10.0], [0.0, 9.0], [0.0, 8.1], [0.0, 7.29], [0.0, 6.561]], [10.0, 6.0]]),
  ('control: no interaction',
   (30, 5, 0.2, 0.0, 0.0, 0.1, 1.0, 3),
   [[[30.0, 5.0], [36.0, 4.5], [43.2, 4.05], [51.84, 3.645]], None]),
  ('control: at equilibrium',
   (10, 5, 0.5, 0.1, 0.02, 0.2, 0.25, 4),
   [[[10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0]], [10.0, 5.0]]),
  ('regression: predator crash',
   (5, 30, 0.4, 0.2, 0.01, 0.9, 1.0, 3),
   [[[5.0, 30.0], [0.0, 4.5], [0.0, 0.45], [0.0, 0.045]], [90.0, 2.0]])],
 [('control: hare and lynx',
   (40, 9, 0.1, 0.02, 0.01, 0.1, 0.5, 6),
   [[[40.0, 9.0],
     [38.4, 10.35],
     [36.3456, 11.8197],
     [33.8669, 13.3767],
     [31.03, 14.973],
     [27.9354, 16.5474],
     [24.7096, 18.0313]],
    [10.0, 5.0]]),
  ('regression: large step overshoot',
   (10, 50, 0.5, 0.1, 0.02, 0.4, 1.0, 4),
   [[[10.0, 50.0], [0.0, 40.0], [0.0, 24.0], [0.0, 14.4], [0.0, 8.64]], [20.0, 5.0]]),
  ('control: prey absent',
   (0, 10, 0.3, 0.05, 0.02, 0.2, 0.5, 4),
   [[[0.0, 10.0], [0.0, 9.0], [0.0, 8.1], [0.0, 7.29], [0.0, 6.561]], [10.0, 6.0]]),
  ('control: no interaction',
   (30, 5, 0.2, 0.0, 0.0, 0.1, 1.0, 3),
   [[[30.0, 5.0], [36.0, 4.5], [43.2, 4.05], [51.84, 3.645]], None]),
  ('control: at equilibrium',
   (10, 5, 0.5, 0.1, 0.02, 0.2, 0.25, 4),
   [[[10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0]], [10.0, 5.0]]),
  ('control: fine steps',
   (15, 4, 0.8, 0.1, 0.05, 0.6, 0.1, 8),
   [[[15.0, 4.0],
     [15.6, 4.06],
     [16.2146, 4.1331],
     [16.8416, 4.2202],
     [17.4782, 4.3223],
     [18.121, 4.4407],
     [18.766, 4.5766],
     [19.4084, 4.7315],
     [20.0428, 4.9067]],
    [12.0, 8.0]]),
  ('regression: predator crash',
   (5, 30, 0.4, 0.2, 0.01, 0.9, 1.0, 3),
   [[[5.0, 30.0], [0.0, 4.5], [0.0, 0.45], [0.0, 0.045]], [90.0, 2.0]])],
 [('control: hare and lynx',
   (40, 9, 0.1, 0.02, 0.01, 0.1, 0.5, 6),
   [[[40.0, 9.0],
     [38.4, 10.35],
     [36.3456, 11.8197],
     [33.8669, 13.3767],
     [31.03, 14.973],
     [27.9354, 16.5474],
     [24.7096, 18.0313]],
    [10.0, 5.0]]),
  ('regression: large step overshoot',
   (10, 50, 0.5, 0.1, 0.02, 0.4, 1.0, 4),
   [[[10.0, 50.0], [0.0, 40.0], [0.0, 24.0], [0.0, 14.4], [0.0, 8.64]], [20.0, 5.0]]),
  ('control: predators absent',
   (20, 0, 0.3, 0.05, 0.02, 0.2, 0.5, 4),
   [[[20.0, 0.0], [23.0, 0.0], [26.45, 0.0], [30.4175, 0.0], [34.9801, 0.0]], [10.0, 6.0]]),
  ('control: prey absent',
   (0, 10, 0.3, 0.05, 0.02, 0.2, 0.5, 4),
   [[[0.0, 10.0], [0.0, 9.0], [0.0, 8.1], [0.0, 7.29], [0.0, 6.561]], [10.0, 6.0]]),
  ('control: no interaction',
   (30, 5, 0.2, 0.0, 0.0, 0.1, 1.0, 3),
   [[[30.0, 5.0], [36.0, 4.5], [43.2, 4.05], [51.84, 3.645]], None]),
  ('control: fine steps',
   (15, 4, 0.8, 0.1, 0.05, 0.6, 0.1, 8),
   [[[15.0, 4.0],
     [15.6, 4.06],
     [16.2146, 4.1331],
     [16.8416, 4.2202],
     [17.4782, 4.3223],
     [18.121, 4.4407],
     [18.766, 4.5766],
     [19.4084, 4.7315],
     [20.0428, 4.9067]],
    [12.0, 8.0]]),
  ('regression: predator crash',
   (5, 30, 0.4, 0.2, 0.01, 0.9, 1.0, 3),
   [[[5.0, 30.0], [0.0, 4.5], [0.0, 0.45], [0.0, 0.045]], [90.0, 2.0]])],
 [('regression: large step overshoot',
   (10, 50, 0.5, 0.1, 0.02, 0.4, 1.0, 4),
   [[[10.0, 50.0], [0.0, 40.0], [0.0, 24.0], [0.0, 14.4], [0.0, 8.64]], [20.0, 5.0]]),
  ('control: predators absent',
   (20, 0, 0.3, 0.05, 0.02, 0.2, 0.5, 4),
   [[[20.0, 0.0], [23.0, 0.0], [26.45, 0.0], [30.4175, 0.0], [34.9801, 0.0]], [10.0, 6.0]]),
  ('control: prey absent',
   (0, 10, 0.3, 0.05, 0.02, 0.2, 0.5, 4),
   [[[0.0, 10.0], [0.0, 9.0], [0.0, 8.1], [0.0, 7.29], [0.0, 6.561]], [10.0, 6.0]]),
  ('control: no interaction',
   (30, 5, 0.2, 0.0, 0.0, 0.1, 1.0, 3),
   [[[30.0, 5.0], [36.0, 4.5], [43.2, 4.05], [51.84, 3.645]], None]),
  ('control: at equilibrium',
   (10, 5, 0.5, 0.1, 0.02, 0.2, 0.25, 4),
   [[[10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0]], [10.0, 5.0]]),
  ('control: fine steps',
   (15, 4, 0.8, 0.1, 0.05, 0.6, 0.1, 8),
   [[[15.0, 4.0],
     [15.6, 4.06],
     [16.2146, 4.1331],
     [16.8416, 4.2202],
     [17.4782, 4.3223],
     [18.121, 4.4407],
     [18.766, 4.5766],
     [19.4084, 4.7315],
     [20.0428, 4.9067]],
    [12.0, 8.0]]),
  ('regression: predator crash',
   (5, 30, 0.4, 0.2, 0.01, 0.9, 1.0, 3),
   [[[5.0, 30.0], [0.0, 4.5], [0.0, 0.45], [0.0, 0.045]], [90.0, 2.0]])],
 [('control: hare and lynx',
   (40, 9, 0.1, 0.02, 0.01, 0.1, 0.5, 6),
   [[[40.0, 9.0],
     [38.4, 10.35],
     [36.3456, 11.8197],
     [33.8669, 13.3767],
     [31.03, 14.973],
     [27.9354, 16.5474],
     [24.7096, 18.0313]],
    [10.0, 5.0]]),
  ('regression: large step overshoot',
   (10, 50, 0.5, 0.1, 0.02, 0.4, 1.0, 4),
   [[[10.0, 50.0], [0.0, 40.0], [0.0, 24.0], [0.0, 14.4], [0.0, 8.64]], [20.0, 5.0]]),
  ('control: predators absent',
   (20, 0, 0.3, 0.05, 0.02, 0.2, 0.5, 4),
   [[[20.0, 0.0], [23.0, 0.0], [26.45, 0.0], [30.4175, 0.0], [34.9801, 0.0]], [10.0, 6.0]]),
  ('control: no interaction',
   (30, 5, 0.2, 0.0, 0.0, 0.1, 1.0, 3),
   [[[30.0, 5.0], [36.0, 4.5], [43.2, 4.05], [51.84, 3.645]], None]),
  ('control: at equilibrium',
   (10, 5, 0.5, 0.1, 0.02, 0.2, 0.25, 4),
   [[[10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0]], [10.0, 5.0]]),
  ('control: fine steps',
   (15, 4, 0.8, 0.1, 0.05, 0.6, 0.1, 8),
   [[[15.0, 4.0],
     [15.6, 4.06],
     [16.2146, 4.1331],
     [16.8416, 4.2202],
     [17.4782, 4.3223],
     [18.121, 4.4407],
     [18.766, 4.5766],
     [19.4084, 4.7315],
     [20.0428, 4.9067]],
    [12.0, 8.0]]),
  ('regression: predator crash',
   (5, 30, 0.4, 0.2, 0.01, 0.9, 1.0, 3),
   [[[5.0, 30.0], [0.0, 4.5], [0.0, 0.45], [0.0, 0.045]], [90.0, 2.0]])]]
for label, args, expected in fixtures[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
control: hare and lynx[[[40.0, 9.0], [38.4, 10.35], [36.3456, 11.8197], [33.8669, 13.3767], [31.03, 14.973], [27.9354, 16.5474], [24.7096, 18.0313]], [10.0, 5.0]][[[40.0, 9.0], [38.4, 10.35], [36.3456, 11.8197], [33.8669, 13.3767], [31.03, 14.973], [27.9354, 16.5474], [24.7096, 18.0313]], [10.0, 5.0]]Passed
regression: large step overshoot[[[10.0, 50.0], [-35.0, 40.0], [87.5, 0.0], [131.25, 0.0], [196.875, 0.0]], [20.0, 5.0]][[[10.0, 50.0], [0.0, 40.0], [0.0, 24.0], [0.0, 14.4], [0.0, 8.64]], [20.0, 5.0]]Failed
control: predators absent[[[20.0, 0.0], [23.0, 0.0], [26.45, 0.0], [30.4175, 0.0], [34.9801, 0.0]], [10.0, 6.0]][[[20.0, 0.0], [23.0, 0.0], [26.45, 0.0], [30.4175, 0.0], [34.9801, 0.0]], [10.0, 6.0]]Passed
control: prey absent[[[0.0, 10.0], [0.0, 9.0], [0.0, 8.1], [0.0, 7.29], [0.0, 6.561]], [10.0, 6.0]][[[0.0, 10.0], [0.0, 9.0], [0.0, 8.1], [0.0, 7.29], [0.0, 6.561]], [10.0, 6.0]]Passed
control: no interaction[[[30.0, 5.0], [36.0, 4.5], [43.2, 4.05], [51.84, 3.645]], None][[[30.0, 5.0], [36.0, 4.5], [43.2, 4.05], [51.84, 3.645]], None]Passed
control: at equilibrium[[[10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0]], [10.0, 5.0]][[[10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0]], [10.0, 5.0]]Passed
regression: predator crash[[[5.0, 30.0], [-23.0, 4.5], [-11.5, 0.0], [-16.1, 0.0]], [90.0, 2.0]][[[5.0, 30.0], [0.0, 4.5], [0.0, 0.45], [0.0, 0.045]], [90.0, 2.0]]Failed

SHA-256 / b7dd888a667b0f8d58be070fbc92e5dd81198a4a4909354e6843b83feb2bd4cd

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(prey0, pred0, alpha, beta, delta, gamma, dt, steps):
    x, y = float(prey0), float(pred0)
    path = [[round(x, 4), round(y, 4)]]
    for _ in range(steps):
        dx = alpha * x - beta * x * y
        dy = delta * x * y - gamma * y
        x = abs(x + dx * dt)
        y = max(y + dy * dt, 0.0)
        path.append([round(x, 4), round(y, 4)])
    eq = [round(gamma / delta, 4), round(alpha / beta, 4)] if beta > 0 and delta > 0 else None
    return [path, eq]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('control: hare and lynx',
   (40, 9, 0.1, 0.02, 0.01, 0.1, 0.5, 6),
   [[[40.0, 9.0],
     [38.4, 10.35],
     [36.3456, 11.8197],
     [33.8669, 13.3767],
     [31.03, 14.973],
     [27.9354, 16.5474],
     [24.7096, 18.0313]],
    [10.0, 5.0]]),
  ('regression: large step overshoot',
   (10, 50, 0.5, 0.1, 0.02, 0.4, 1.0, 4),
   [[[10.0, 50.0], [0.0, 40.0], [0.0, 24.0], [0.0, 14.4], [0.0, 8.64]], [20.0, 5.0]]),
  ('control: predators absent',
   (20, 0, 0.3, 0.05, 0.02, 0.2, 0.5, 4),
   [[[20.0, 0.0], [23.0, 0.0], [26.45, 0.0], [30.4175, 0.0], [34.9801, 0.0]], [10.0, 6.0]]),
  ('control: prey absent',
   (0, 10, 0.3, 0.05, 0.02, 0.2, 0.5, 4),
   [[[0.0, 10.0], [0.0, 9.0], [0.0, 8.1], [0.0, 7.29], [0.0, 6.561]], [10.0, 6.0]]),
  ('control: no interaction',
   (30, 5, 0.2, 0.0, 0.0, 0.1, 1.0, 3),
   [[[30.0, 5.0], [36.0, 4.5], [43.2, 4.05], [51.84, 3.645]], None]),
  ('control: at equilibrium',
   (10, 5, 0.5, 0.1, 0.02, 0.2, 0.25, 4),
   [[[10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0]], [10.0, 5.0]]),
  ('regression: predator crash',
   (5, 30, 0.4, 0.2, 0.01, 0.9, 1.0, 3),
   [[[5.0, 30.0], [0.0, 4.5], [0.0, 0.45], [0.0, 0.045]], [90.0, 2.0]])],
 [('control: hare and lynx',
   (40, 9, 0.1, 0.02, 0.01, 0.1, 0.5, 6),
   [[[40.0, 9.0],
     [38.4, 10.35],
     [36.3456, 11.8197],
     [33.8669, 13.3767],
     [31.03, 14.973],
     [27.9354, 16.5474],
     [24.7096, 18.0313]],
    [10.0, 5.0]]),
  ('regression: large step overshoot',
   (10, 50, 0.5, 0.1, 0.02, 0.4, 1.0, 4),
   [[[10.0, 50.0], [0.0, 40.0], [0.0, 24.0], [0.0, 14.4], [0.0, 8.64]], [20.0, 5.0]]),
  ('control: prey absent',
   (0, 10, 0.3, 0.05, 0.02, 0.2, 0.5, 4),
   [[[0.0, 10.0], [0.0, 9.0], [0.0, 8.1], [0.0, 7.29], [0.0, 6.561]], [10.0, 6.0]]),
  ('control: no interaction',
   (30, 5, 0.2, 0.0, 0.0, 0.1, 1.0, 3),
   [[[30.0, 5.0], [36.0, 4.5], [43.2, 4.05], [51.84, 3.645]], None]),
  ('control: at equilibrium',
   (10, 5, 0.5, 0.1, 0.02, 0.2, 0.25, 4),
   [[[10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0]], [10.0, 5.0]]),
  ('control: fine steps',
   (15, 4, 0.8, 0.1, 0.05, 0.6, 0.1, 8),
   [[[15.0, 4.0],
     [15.6, 4.06],
     [16.2146, 4.1331],
     [16.8416, 4.2202],
     [17.4782, 4.3223],
     [18.121, 4.4407],
     [18.766, 4.5766],
     [19.4084, 4.7315],
     [20.0428, 4.9067]],
    [12.0, 8.0]]),
  ('regression: predator crash',
   (5, 30, 0.4, 0.2, 0.01, 0.9, 1.0, 3),
   [[[5.0, 30.0], [0.0, 4.5], [0.0, 0.45], [0.0, 0.045]], [90.0, 2.0]])],
 [('control: hare and lynx',
   (40, 9, 0.1, 0.02, 0.01, 0.1, 0.5, 6),
   [[[40.0, 9.0],
     [38.4, 10.35],
     [36.3456, 11.8197],
     [33.8669, 13.3767],
     [31.03, 14.973],
     [27.9354, 16.5474],
     [24.7096, 18.0313]],
    [10.0, 5.0]]),
  ('regression: large step overshoot',
   (10, 50, 0.5, 0.1, 0.02, 0.4, 1.0, 4),
   [[[10.0, 50.0], [0.0, 40.0], [0.0, 24.0], [0.0, 14.4], [0.0, 8.64]], [20.0, 5.0]]),
  ('control: predators absent',
   (20, 0, 0.3, 0.05, 0.02, 0.2, 0.5, 4),
   [[[20.0, 0.0], [23.0, 0.0], [26.45, 0.0], [30.4175, 0.0], [34.9801, 0.0]], [10.0, 6.0]]),
  ('control: prey absent',
   (0, 10, 0.3, 0.05, 0.02, 0.2, 0.5, 4),
   [[[0.0, 10.0], [0.0, 9.0], [0.0, 8.1], [0.0, 7.29], [0.0, 6.561]], [10.0, 6.0]]),
  ('control: no interaction',
   (30, 5, 0.2, 0.0, 0.0, 0.1, 1.0, 3),
   [[[30.0, 5.0], [36.0, 4.5], [43.2, 4.05], [51.84, 3.645]], None]),
  ('control: fine steps',
   (15, 4, 0.8, 0.1, 0.05, 0.6, 0.1, 8),
   [[[15.0, 4.0],
     [15.6, 4.06],
     [16.2146, 4.1331],
     [16.8416, 4.2202],
     [17.4782, 4.3223],
     [18.121, 4.4407],
     [18.766, 4.5766],
     [19.4084, 4.7315],
     [20.0428, 4.9067]],
    [12.0, 8.0]]),
  ('regression: predator crash',
   (5, 30, 0.4, 0.2, 0.01, 0.9, 1.0, 3),
   [[[5.0, 30.0], [0.0, 4.5], [0.0, 0.45], [0.0, 0.045]], [90.0, 2.0]])],
 [('regression: large step overshoot',
   (10, 50, 0.5, 0.1, 0.02, 0.4, 1.0, 4),
   [[[10.0, 50.0], [0.0, 40.0], [0.0, 24.0], [0.0, 14.4], [0.0, 8.64]], [20.0, 5.0]]),
  ('control: predators absent',
   (20, 0, 0.3, 0.05, 0.02, 0.2, 0.5, 4),
   [[[20.0, 0.0], [23.0, 0.0], [26.45, 0.0], [30.4175, 0.0], [34.9801, 0.0]], [10.0, 6.0]]),
  ('control: prey absent',
   (0, 10, 0.3, 0.05, 0.02, 0.2, 0.5, 4),
   [[[0.0, 10.0], [0.0, 9.0], [0.0, 8.1], [0.0, 7.29], [0.0, 6.561]], [10.0, 6.0]]),
  ('control: no interaction',
   (30, 5, 0.2, 0.0, 0.0, 0.1, 1.0, 3),
   [[[30.0, 5.0], [36.0, 4.5], [43.2, 4.05], [51.84, 3.645]], None]),
  ('control: at equilibrium',
   (10, 5, 0.5, 0.1, 0.02, 0.2, 0.25, 4),
   [[[10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0]], [10.0, 5.0]]),
  ('control: fine steps',
   (15, 4, 0.8, 0.1, 0.05, 0.6, 0.1, 8),
   [[[15.0, 4.0],
     [15.6, 4.06],
     [16.2146, 4.1331],
     [16.8416, 4.2202],
     [17.4782, 4.3223],
     [18.121, 4.4407],
     [18.766, 4.5766],
     [19.4084, 4.7315],
     [20.0428, 4.9067]],
    [12.0, 8.0]]),
  ('regression: predator crash',
   (5, 30, 0.4, 0.2, 0.01, 0.9, 1.0, 3),
   [[[5.0, 30.0], [0.0, 4.5], [0.0, 0.45], [0.0, 0.045]], [90.0, 2.0]])],
 [('control: hare and lynx',
   (40, 9, 0.1, 0.02, 0.01, 0.1, 0.5, 6),
   [[[40.0, 9.0],
     [38.4, 10.35],
     [36.3456, 11.8197],
     [33.8669, 13.3767],
     [31.03, 14.973],
     [27.9354, 16.5474],
     [24.7096, 18.0313]],
    [10.0, 5.0]]),
  ('regression: large step overshoot',
   (10, 50, 0.5, 0.1, 0.02, 0.4, 1.0, 4),
   [[[10.0, 50.0], [0.0, 40.0], [0.0, 24.0], [0.0, 14.4], [0.0, 8.64]], [20.0, 5.0]]),
  ('control: predators absent',
   (20, 0, 0.3, 0.05, 0.02, 0.2, 0.5, 4),
   [[[20.0, 0.0], [23.0, 0.0], [26.45, 0.0], [30.4175, 0.0], [34.9801, 0.0]], [10.0, 6.0]]),
  ('control: no interaction',
   (30, 5, 0.2, 0.0, 0.0, 0.1, 1.0, 3),
   [[[30.0, 5.0], [36.0, 4.5], [43.2, 4.05], [51.84, 3.645]], None]),
  ('control: at equilibrium',
   (10, 5, 0.5, 0.1, 0.02, 0.2, 0.25, 4),
   [[[10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0]], [10.0, 5.0]]),
  ('control: fine steps',
   (15, 4, 0.8, 0.1, 0.05, 0.6, 0.1, 8),
   [[[15.0, 4.0],
     [15.6, 4.06],
     [16.2146, 4.1331],
     [16.8416, 4.2202],
     [17.4782, 4.3223],
     [18.121, 4.4407],
     [18.766, 4.5766],
     [19.4084, 4.7315],
     [20.0428, 4.9067]],
    [12.0, 8.0]]),
  ('regression: predator crash',
   (5, 30, 0.4, 0.2, 0.01, 0.9, 1.0, 3),
   [[[5.0, 30.0], [0.0, 4.5], [0.0, 0.45], [0.0, 0.045]], [90.0, 2.0]])]]
for label, args, expected in fixtures[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
control: hare and lynx[[[40.0, 9.0], [38.4, 10.35], [36.3456, 11.8197], [33.8669, 13.3767], [31.03, 14.973], [27.9354, 16.5474], [24.7096, 18.0313]], [10.0, 5.0]][[[40.0, 9.0], [38.4, 10.35], [36.3456, 11.8197], [33.8669, 13.3767], [31.03, 14.973], [27.9354, 16.5474], [24.7096, 18.0313]], [10.0, 5.0]]Passed
regression: large step overshoot[[[10.0, 50.0], [35.0, 40.0], [87.5, 52.0], [323.75, 122.2], [3470.6, 864.565]], [20.0, 5.0]][[[10.0, 50.0], [0.0, 40.0], [0.0, 24.0], [0.0, 14.4], [0.0, 8.64]], [20.0, 5.0]]Failed
control: predators absent[[[20.0, 0.0], [23.0, 0.0], [26.45, 0.0], [30.4175, 0.0], [34.9801, 0.0]], [10.0, 6.0]][[[20.0, 0.0], [23.0, 0.0], [26.45, 0.0], [30.4175, 0.0], [34.9801, 0.0]], [10.0, 6.0]]Passed
control: prey absent[[[0.0, 10.0], [0.0, 9.0], [0.0, 8.1], [0.0, 7.29], [0.0, 6.561]], [10.0, 6.0]][[[0.0, 10.0], [0.0, 9.0], [0.0, 8.1], [0.0, 7.29], [0.0, 6.561]], [10.0, 6.0]]Passed
control: no interaction[[[30.0, 5.0], [36.0, 4.5], [43.2, 4.05], [51.84, 3.645]], None][[[30.0, 5.0], [36.0, 4.5], [43.2, 4.05], [51.84, 3.645]], None]Passed
control: at equilibrium[[[10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0]], [10.0, 5.0]][[[10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0], [10.0, 5.0]], [10.0, 5.0]]Passed
regression: predator crash[[[5.0, 30.0], [23.0, 4.5], [11.5, 1.485], [12.6845, 0.3193]], [90.0, 2.0]][[[5.0, 30.0], [0.0, 4.5], [0.0, 0.45], [0.0, 0.045]], [90.0, 2.0]]Failed

SHA-256 / 9dca4bacb354ed0657760d769272098e5d1a2bd78bc44227003013df1fd5a586

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 7 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 bounded teaching model with a stipulated contract; not a validated scientific or public-health modelling library. 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:47:33.996290+00:00.

Case digest / 445bf20f35ab5f9c125eb884dde382bfb88bdb2e9d76d1d254674626d9fc5dfe