FA-65631 / Ecological population dynamics / Open access
Nicholson-Bailey host-parasitoid generations: parasitoid emergence · case 01
Parasitoids emerge from hosts that escaped attack.
ROOT CAUSE
The attacked fraction is replaced by the escaped fraction.
THE FAILURE
The attacked fraction is replaced by the escaped fraction.
Unsuccessful approach: Emergence scaled by parasitoid numbers ignores the host supply.
Case contract
Escape fraction exp(-a*P); H' = lam*H*escape and P' = c*H*(1-escape) computed from the same generation; equilibrium [lam*ln(lam)/((lam-1)*a*c), ln(lam)/a] rounded 4 when lam>1, a>0, c>0 else None; return [equilibrium, trajectory of [H,P] rounded 4].
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(lam, a, c, h0, p0, gens):
if lam <= 1 or a <= 0 or c <= 0:
eq = None
else:
eq = [round(lam * math.log(lam) / ((lam - 1) * a * c), 4), round(math.log(lam) / a, 4)]
h, p = float(h0), float(p0)
traj = []
for _ in range(gens):
escape = math.exp(-a * p)
h, p = lam * h * escape, c * h * escape
traj.append([round(h, 4), round(p, 4)])
return [eq, traj]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: greenhouse whitefly',
(2.0, 0.05, 1.0, 30, 10, 5),
[[27.7259, 13.8629],
[[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
('regression: fecund host',
(5.0, 0.1, 0.8, 20, 5, 4),
[[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
('regression: no parasitoids',
(1.5, 0.1, 1.0, 10, 0, 4),
[[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
('regression: no hosts',
(2.0, 0.1, 1.0, 0, 10, 3),
[[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
('regression: non-growing host',
(1.0, 0.1, 1.0, 10, 2, 3),
[None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
('regression: inefficient parasitoid',
(3.0, 0.01, 0.5, 100, 20, 4),
[[329.5837, 109.8612],
[[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
('regression: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]])],
[('regression: greenhouse whitefly',
(2.0, 0.05, 1.0, 30, 10, 5),
[[27.7259, 13.8629],
[[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
('regression: fecund host',
(5.0, 0.1, 0.8, 20, 5, 4),
[[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
('regression: no hosts',
(2.0, 0.1, 1.0, 0, 10, 3),
[[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
('regression: non-growing host',
(1.0, 0.1, 1.0, 10, 2, 3),
[None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
('regression: inefficient parasitoid',
(3.0, 0.01, 0.5, 100, 20, 4),
[[329.5837, 109.8612],
[[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
('regression: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
('regression: gregarious parasitoid',
(2.5, 0.03, 2.0, 40, 8, 5),
[[25.4525, 30.543],
[[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])],
[('regression: greenhouse whitefly',
(2.0, 0.05, 1.0, 30, 10, 5),
[[27.7259, 13.8629],
[[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
('regression: fecund host',
(5.0, 0.1, 0.8, 20, 5, 4),
[[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
('regression: no parasitoids',
(1.5, 0.1, 1.0, 10, 0, 4),
[[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
('regression: no hosts',
(2.0, 0.1, 1.0, 0, 10, 3),
[[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
('regression: non-growing host',
(1.0, 0.1, 1.0, 10, 2, 3),
[None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
('regression: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
('regression: gregarious parasitoid',
(2.5, 0.03, 2.0, 40, 8, 5),
[[25.4525, 30.543],
[[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])],
[('regression: fecund host',
(5.0, 0.1, 0.8, 20, 5, 4),
[[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
('regression: no parasitoids',
(1.5, 0.1, 1.0, 10, 0, 4),
[[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
('regression: no hosts',
(2.0, 0.1, 1.0, 0, 10, 3),
[[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
('regression: non-growing host',
(1.0, 0.1, 1.0, 10, 2, 3),
[None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
('regression: inefficient parasitoid',
(3.0, 0.01, 0.5, 100, 20, 4),
[[329.5837, 109.8612],
[[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
('regression: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
('regression: gregarious parasitoid',
(2.5, 0.03, 2.0, 40, 8, 5),
[[25.4525, 30.543],
[[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])],
[('regression: greenhouse whitefly',
(2.0, 0.05, 1.0, 30, 10, 5),
[[27.7259, 13.8629],
[[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
('regression: fecund host',
(5.0, 0.1, 0.8, 20, 5, 4),
[[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
('regression: no parasitoids',
(1.5, 0.1, 1.0, 10, 0, 4),
[[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
('regression: non-growing host',
(1.0, 0.1, 1.0, 10, 2, 3),
[None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
('regression: inefficient parasitoid',
(3.0, 0.01, 0.5, 100, 20, 4),
[[329.5837, 109.8612],
[[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
('regression: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
('regression: gregarious parasitoid',
(2.5, 0.03, 2.0, 40, 8, 5),
[[25.4525, 30.543],
[[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: greenhouse whitefly | [[27.7259, 13.8629], [[36.3918, 18.1959], [29.3032, 14.6516], [28.1702, 14.0851], [27.859, 13.9295], [27.7664, 13.8832]]] | [[27.7259, 13.8629], [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]] | Failed |
| regression: fecund host | [[25.1475, 16.0944], [[60.6531, 9.7045], [114.9111, 18.3858], [91.3793, 14.6207], [105.8887, 16.9422]]] | [[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]] | Failed |
| regression: no parasitoids | [[12.164, 4.0547], [[15.0, 10.0], [8.2773, 5.5182], [7.1503, 4.7669], [6.6588, 4.4392]]] | [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]] | Failed |
| regression: no hosts | [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]] | [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]] | Passed |
| regression: non-growing host | [None, [[8.1873, 8.1873], [3.6105, 3.6105], [2.5163, 2.5163]]] | [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]] | Failed |
| regression: inefficient parasitoid | [[329.5837, 109.8612], [[245.6192, 40.9365], [489.3262, 81.5544], [649.4319, 108.2386], [660.0554, 110.0092]]] | [[329.5837, 109.8612], [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]] | Failed |
| regression: invalid search | [None, [[20.0, 10.0], [40.0, 20.0], [80.0, 40.0]]] | [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]] | Failed |
SHA-256 / b0340d1e5848ae0837c13faabe8f790dc8d6a286ef52990477cbf81b1e252ea7
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(lam, a, c, h0, p0, gens):
if lam <= 1 or a <= 0 or c <= 0:
eq = None
else:
eq = [round(lam * math.log(lam) / ((lam - 1) * a * c), 4), round(math.log(lam) / a, 4)]
h, p = float(h0), float(p0)
traj = []
for _ in range(gens):
escape = math.exp(-a * p)
h, p = lam * h * escape, c * p * (1 - escape)
traj.append([round(h, 4), round(p, 4)])
return [eq, traj]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: greenhouse whitefly',
(2.0, 0.05, 1.0, 30, 10, 5),
[[27.7259, 13.8629],
[[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
('regression: fecund host',
(5.0, 0.1, 0.8, 20, 5, 4),
[[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
('regression: no parasitoids',
(1.5, 0.1, 1.0, 10, 0, 4),
[[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
('regression: no hosts',
(2.0, 0.1, 1.0, 0, 10, 3),
[[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
('regression: non-growing host',
(1.0, 0.1, 1.0, 10, 2, 3),
[None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
('regression: inefficient parasitoid',
(3.0, 0.01, 0.5, 100, 20, 4),
[[329.5837, 109.8612],
[[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
('regression: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]])],
[('regression: greenhouse whitefly',
(2.0, 0.05, 1.0, 30, 10, 5),
[[27.7259, 13.8629],
[[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
('regression: fecund host',
(5.0, 0.1, 0.8, 20, 5, 4),
[[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
('regression: no hosts',
(2.0, 0.1, 1.0, 0, 10, 3),
[[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
('regression: non-growing host',
(1.0, 0.1, 1.0, 10, 2, 3),
[None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
('regression: inefficient parasitoid',
(3.0, 0.01, 0.5, 100, 20, 4),
[[329.5837, 109.8612],
[[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
('regression: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
('regression: gregarious parasitoid',
(2.5, 0.03, 2.0, 40, 8, 5),
[[25.4525, 30.543],
[[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])],
[('regression: greenhouse whitefly',
(2.0, 0.05, 1.0, 30, 10, 5),
[[27.7259, 13.8629],
[[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
('regression: fecund host',
(5.0, 0.1, 0.8, 20, 5, 4),
[[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
('regression: no parasitoids',
(1.5, 0.1, 1.0, 10, 0, 4),
[[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
('regression: no hosts',
(2.0, 0.1, 1.0, 0, 10, 3),
[[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
('regression: non-growing host',
(1.0, 0.1, 1.0, 10, 2, 3),
[None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
('regression: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
('regression: gregarious parasitoid',
(2.5, 0.03, 2.0, 40, 8, 5),
[[25.4525, 30.543],
[[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])],
[('regression: fecund host',
(5.0, 0.1, 0.8, 20, 5, 4),
[[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
('regression: no parasitoids',
(1.5, 0.1, 1.0, 10, 0, 4),
[[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
('regression: no hosts',
(2.0, 0.1, 1.0, 0, 10, 3),
[[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]),
('regression: non-growing host',
(1.0, 0.1, 1.0, 10, 2, 3),
[None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
('regression: inefficient parasitoid',
(3.0, 0.01, 0.5, 100, 20, 4),
[[329.5837, 109.8612],
[[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
('regression: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
('regression: gregarious parasitoid',
(2.5, 0.03, 2.0, 40, 8, 5),
[[25.4525, 30.543],
[[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])],
[('regression: greenhouse whitefly',
(2.0, 0.05, 1.0, 30, 10, 5),
[[27.7259, 13.8629],
[[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]]),
('regression: fecund host',
(5.0, 0.1, 0.8, 20, 5, 4),
[[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]]),
('regression: no parasitoids',
(1.5, 0.1, 1.0, 10, 0, 4),
[[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]]),
('regression: non-growing host',
(1.0, 0.1, 1.0, 10, 2, 3),
[None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]]),
('regression: inefficient parasitoid',
(3.0, 0.01, 0.5, 100, 20, 4),
[[329.5837, 109.8612],
[[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]]),
('regression: invalid search', (2.0, 0.0, 1.0, 10, 2, 3), [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]]),
('regression: gregarious parasitoid',
(2.5, 0.03, 2.0, 40, 8, 5),
[[25.4525, 30.543],
[[78.6628, 17.0698], [117.8447, 63.0498], [44.4411, 200.1366], [0.2743, 88.6628], [0.048, 0.5102]]])]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: greenhouse whitefly | [[27.7259, 13.8629], [[36.3918, 3.9347], [59.7851, 0.7027], [115.4421, 0.0243], [230.6043, 0.0], [461.2079, 0.0]]] | [[27.7259, 13.8629], [[36.3918, 11.8041], [40.3377, 16.223], [35.848, 22.4138], [23.3768, 24.1595], [13.97, 16.3918]]] | Failed |
| regression: fecund host | [[25.1475, 16.0944], [[60.6531, 1.5739], [259.1016, 0.1834], [1271.9702, 0.0027], [6358.1562, 0.0]]] | [[25.1475, 16.0944], [[60.6531, 6.2955], [161.5892, 22.6682], [83.7366, 115.8735], [0.0039, 66.9887]]] | Failed |
| regression: no parasitoids | [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]] | [[12.164, 4.0547], [[15.0, 0.0], [22.5, 0.0], [33.75, 0.0], [50.625, 0.0]]] | Passed |
| regression: no hosts | [[13.8629, 6.9315], [[0.0, 6.3212], [0.0, 2.9617], [0.0, 0.7592]]] | [[13.8629, 6.9315], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]] | Failed |
| regression: non-growing host | [None, [[8.1873, 0.3625], [7.8958, 0.0129], [7.8856, 0.0]]] | [None, [[8.1873, 1.8127], [6.8299, 1.3574], [5.963, 0.8669]]] | Failed |
| regression: inefficient parasitoid | [[329.5837, 109.8612], [[245.6192, 1.8127], [723.621, 0.0163], [2170.5097, 0.0], [6511.5291, 0.0]]] | [[329.5837, 109.8612], [[245.6192, 9.0635], [673.01, 10.6413], [1815.2157, 33.969], [3877.2504, 261.3994]]] | Failed |
| regression: invalid search | [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]] | [None, [[20.0, 0.0], [40.0, 0.0], [80.0, 0.0]]] | Passed |
SHA-256 / ac5d82076527f210cc4c731bb5255ec96b735ae09296d36959f143f117341188
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:35.927878+00:00.
Case digest / 0e3fcce745aa3b23659038f933b9c88e56e0cbce07989abb1676e6116833c5fb