FA-65756 / Ecological population dynamics / Open access
MacArthur-Wilson island equilibrium: area effect on extinction · case 01
Large islands lose species faster than small ones.
ROOT CAUSE
The area ratio is inverted.
THE FAILURE
The area ratio is inverted.
Unsuccessful approach: Dropping the reference area makes extinction depend on the area unit.
Case contract
I0 = imax*exp(-distance/d0); E0 = emax*a0/area; S* = I0*P/(I0+E0); turnover = I0*E0/(I0+E0); return [S*, turnover, I0, E0] rounded 4; None for non-positive parameters or negative distance.
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(pool, imax, emax, distance, d0, area, a0):
if min(pool, imax, emax, d0, a0, area) <= 0 or distance < 0:
return None
i0 = imax * math.exp(-distance / d0)
e0 = emax * area / a0
s_eq = i0 * pool / (i0 + e0)
turnover = i0 * e0 / (i0 + e0)
return [round(s_eq, 4), round(turnover, 4), round(i0, 4), round(e0, 4)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: near large island', (200, 5.0, 2.0, 10, 50, 100, 10), [190.6839, 0.1907, 4.0937, 0.2]),
('regression: remote small island', (200, 5.0, 2.0, 300, 50, 2, 10), [0.2476, 0.0124, 0.0124, 10.0]),
('regression: mainland adjacent', (120, 3.0, 1.0, 0, 40, 10, 10), [90.0, 0.75, 3.0, 1.0]),
('regression: reference area', (80, 2.0, 2.0, 40, 40, 10, 10), [21.5153, 0.5379, 0.7358, 2.0]),
('control: invalid area', (80, 2.0, 2.0, 40, 40, 0, 10), None),
('control: negative distance', (80, 2.0, 2.0, -5, 40, 10, 10), None),
('regression: archipelago mid', (150, 4.0, 3.0, 60, 30, 25, 5), [71.1454, 0.2846, 0.5413, 0.6])],
[('regression: near large island', (200, 5.0, 2.0, 10, 50, 100, 10), [190.6839, 0.1907, 4.0937, 0.2]),
('regression: remote small island', (200, 5.0, 2.0, 300, 50, 2, 10), [0.2476, 0.0124, 0.0124, 10.0]),
('regression: mainland adjacent', (120, 3.0, 1.0, 0, 40, 10, 10), [90.0, 0.75, 3.0, 1.0]),
('regression: reference area', (80, 2.0, 2.0, 40, 40, 10, 10), [21.5153, 0.5379, 0.7358, 2.0]),
('control: invalid area', (80, 2.0, 2.0, 40, 40, 0, 10), None),
('control: negative distance', (80, 2.0, 2.0, -5, 40, 10, 10), None),
('regression: archipelago mid', (150, 4.0, 3.0, 60, 30, 25, 5), [71.1454, 0.2846, 0.5413, 0.6])],
[('regression: near large island', (200, 5.0, 2.0, 10, 50, 100, 10), [190.6839, 0.1907, 4.0937, 0.2]),
('regression: remote small island', (200, 5.0, 2.0, 300, 50, 2, 10), [0.2476, 0.0124, 0.0124, 10.0]),
('regression: mainland adjacent', (120, 3.0, 1.0, 0, 40, 10, 10), [90.0, 0.75, 3.0, 1.0]),
('regression: reference area', (80, 2.0, 2.0, 40, 40, 10, 10), [21.5153, 0.5379, 0.7358, 2.0]),
('control: invalid area', (80, 2.0, 2.0, 40, 40, 0, 10), None),
('control: negative distance', (80, 2.0, 2.0, -5, 40, 10, 10), None),
('regression: archipelago mid', (150, 4.0, 3.0, 60, 30, 25, 5), [71.1454, 0.2846, 0.5413, 0.6])],
[('regression: near large island', (200, 5.0, 2.0, 10, 50, 100, 10), [190.6839, 0.1907, 4.0937, 0.2]),
('regression: remote small island', (200, 5.0, 2.0, 300, 50, 2, 10), [0.2476, 0.0124, 0.0124, 10.0]),
('regression: mainland adjacent', (120, 3.0, 1.0, 0, 40, 10, 10), [90.0, 0.75, 3.0, 1.0]),
('regression: reference area', (80, 2.0, 2.0, 40, 40, 10, 10), [21.5153, 0.5379, 0.7358, 2.0]),
('control: invalid area', (80, 2.0, 2.0, 40, 40, 0, 10), None),
('control: negative distance', (80, 2.0, 2.0, -5, 40, 10, 10), None),
('regression: archipelago mid', (150, 4.0, 3.0, 60, 30, 25, 5), [71.1454, 0.2846, 0.5413, 0.6])],
[('regression: near large island', (200, 5.0, 2.0, 10, 50, 100, 10), [190.6839, 0.1907, 4.0937, 0.2]),
('regression: remote small island', (200, 5.0, 2.0, 300, 50, 2, 10), [0.2476, 0.0124, 0.0124, 10.0]),
('regression: mainland adjacent', (120, 3.0, 1.0, 0, 40, 10, 10), [90.0, 0.75, 3.0, 1.0]),
('regression: reference area', (80, 2.0, 2.0, 40, 40, 10, 10), [21.5153, 0.5379, 0.7358, 2.0]),
('control: invalid area', (80, 2.0, 2.0, 40, 40, 0, 10), None),
('control: negative distance', (80, 2.0, 2.0, -5, 40, 10, 10), None),
('regression: archipelago mid', (150, 4.0, 3.0, 60, 30, 25, 5), [71.1454, 0.2846, 0.5413, 0.6])]]
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: near large island | [33.9812, 3.3981, 4.0937, 20.0] | [190.6839, 0.1907, 4.0937, 0.2] | Failed |
| regression: remote small island | [6.0106, 0.012, 0.0124, 0.4] | [0.2476, 0.0124, 0.0124, 10.0] | Failed |
| regression: mainland adjacent | [90.0, 0.75, 3.0, 1.0] | [90.0, 0.75, 3.0, 1.0] | Passed |
| regression: reference area | [21.5153, 0.5379, 0.7358, 2.0] | [21.5153, 0.5379, 0.7358, 2.0] | Passed |
| control: invalid area | None | None | Passed |
| control: negative distance | None | None | Passed |
| regression: archipelago mid | [5.2248, 0.5225, 0.5413, 15.0] | [71.1454, 0.2846, 0.5413, 0.6] | Failed |
SHA-256 / 2a4e8894ad415f65b736ed711f744a4a9de87a64a5e53f321ad696d7a313af55
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(pool, imax, emax, distance, d0, area, a0):
if min(pool, imax, emax, d0, a0, area) <= 0 or distance < 0:
return None
i0 = imax * math.exp(-distance / d0)
e0 = emax / area
s_eq = i0 * pool / (i0 + e0)
turnover = i0 * e0 / (i0 + e0)
return [round(s_eq, 4), round(turnover, 4), round(i0, 4), round(e0, 4)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: near large island', (200, 5.0, 2.0, 10, 50, 100, 10), [190.6839, 0.1907, 4.0937, 0.2]),
('regression: remote small island', (200, 5.0, 2.0, 300, 50, 2, 10), [0.2476, 0.0124, 0.0124, 10.0]),
('regression: mainland adjacent', (120, 3.0, 1.0, 0, 40, 10, 10), [90.0, 0.75, 3.0, 1.0]),
('regression: reference area', (80, 2.0, 2.0, 40, 40, 10, 10), [21.5153, 0.5379, 0.7358, 2.0]),
('control: invalid area', (80, 2.0, 2.0, 40, 40, 0, 10), None),
('control: negative distance', (80, 2.0, 2.0, -5, 40, 10, 10), None),
('regression: archipelago mid', (150, 4.0, 3.0, 60, 30, 25, 5), [71.1454, 0.2846, 0.5413, 0.6])],
[('regression: near large island', (200, 5.0, 2.0, 10, 50, 100, 10), [190.6839, 0.1907, 4.0937, 0.2]),
('regression: remote small island', (200, 5.0, 2.0, 300, 50, 2, 10), [0.2476, 0.0124, 0.0124, 10.0]),
('regression: mainland adjacent', (120, 3.0, 1.0, 0, 40, 10, 10), [90.0, 0.75, 3.0, 1.0]),
('regression: reference area', (80, 2.0, 2.0, 40, 40, 10, 10), [21.5153, 0.5379, 0.7358, 2.0]),
('control: invalid area', (80, 2.0, 2.0, 40, 40, 0, 10), None),
('control: negative distance', (80, 2.0, 2.0, -5, 40, 10, 10), None),
('regression: archipelago mid', (150, 4.0, 3.0, 60, 30, 25, 5), [71.1454, 0.2846, 0.5413, 0.6])],
[('regression: near large island', (200, 5.0, 2.0, 10, 50, 100, 10), [190.6839, 0.1907, 4.0937, 0.2]),
('regression: remote small island', (200, 5.0, 2.0, 300, 50, 2, 10), [0.2476, 0.0124, 0.0124, 10.0]),
('regression: mainland adjacent', (120, 3.0, 1.0, 0, 40, 10, 10), [90.0, 0.75, 3.0, 1.0]),
('regression: reference area', (80, 2.0, 2.0, 40, 40, 10, 10), [21.5153, 0.5379, 0.7358, 2.0]),
('control: invalid area', (80, 2.0, 2.0, 40, 40, 0, 10), None),
('control: negative distance', (80, 2.0, 2.0, -5, 40, 10, 10), None),
('regression: archipelago mid', (150, 4.0, 3.0, 60, 30, 25, 5), [71.1454, 0.2846, 0.5413, 0.6])],
[('regression: near large island', (200, 5.0, 2.0, 10, 50, 100, 10), [190.6839, 0.1907, 4.0937, 0.2]),
('regression: remote small island', (200, 5.0, 2.0, 300, 50, 2, 10), [0.2476, 0.0124, 0.0124, 10.0]),
('regression: mainland adjacent', (120, 3.0, 1.0, 0, 40, 10, 10), [90.0, 0.75, 3.0, 1.0]),
('regression: reference area', (80, 2.0, 2.0, 40, 40, 10, 10), [21.5153, 0.5379, 0.7358, 2.0]),
('control: invalid area', (80, 2.0, 2.0, 40, 40, 0, 10), None),
('control: negative distance', (80, 2.0, 2.0, -5, 40, 10, 10), None),
('regression: archipelago mid', (150, 4.0, 3.0, 60, 30, 25, 5), [71.1454, 0.2846, 0.5413, 0.6])],
[('regression: near large island', (200, 5.0, 2.0, 10, 50, 100, 10), [190.6839, 0.1907, 4.0937, 0.2]),
('regression: remote small island', (200, 5.0, 2.0, 300, 50, 2, 10), [0.2476, 0.0124, 0.0124, 10.0]),
('regression: mainland adjacent', (120, 3.0, 1.0, 0, 40, 10, 10), [90.0, 0.75, 3.0, 1.0]),
('regression: reference area', (80, 2.0, 2.0, 40, 40, 10, 10), [21.5153, 0.5379, 0.7358, 2.0]),
('control: invalid area', (80, 2.0, 2.0, 40, 40, 0, 10), None),
('control: negative distance', (80, 2.0, 2.0, -5, 40, 10, 10), None),
('regression: archipelago mid', (150, 4.0, 3.0, 60, 30, 25, 5), [71.1454, 0.2846, 0.5413, 0.6])]]
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: near large island | [199.0276, 0.0199, 4.0937, 0.02] | [190.6839, 0.1907, 4.0937, 0.2] | Failed |
| regression: remote small island | [2.4484, 0.0122, 0.0124, 1.0] | [0.2476, 0.0124, 0.0124, 10.0] | Failed |
| regression: mainland adjacent | [116.129, 0.0968, 3.0, 0.1] | [90.0, 0.75, 3.0, 1.0] | Failed |
| regression: reference area | [62.9016, 0.1573, 0.7358, 0.2] | [21.5153, 0.5379, 0.7358, 2.0] | Failed |
| control: invalid area | None | None | Passed |
| control: negative distance | None | None | Passed |
| regression: archipelago mid | [122.7826, 0.0982, 0.5413, 0.12] | [71.1454, 0.2846, 0.5413, 0.6] | Failed |
SHA-256 / a7449adbc334648835a5a2e8519c96c26f24269231a94b0b98ce102b428a241b
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:37.102668+00:00.
Case digest / 07e2d484bcc3a78161daad635693494b1d5dc4b79a06f34648a81f1d97a542b7