Unlike a per-animal, per-ranger point simulation, this 2D version treats poaching risk and wildlife density as continuous fields on a grid and evolves them with coupled reaction-diffusion equations, solved with finite differences every frame:
Risk field (elliptic, relaxed to steady state each frame):
D_r · ∇²R − k_r · R = 0, R = P at the fence (Dirichlet)
L = √(D_r / k_r) — the risk penetration depth
Analytic check (1D slab): R(x) = P · cosh(x/L) / cosh(HALF/L)
Wildlife density (parabolic, integrated forward in simulated months):
∂n/∂t = D_n·∇²n + r·n·(1 − n/K_cell) − λ(x,z)·n
λ(x,z) = R(x,z) · (1 − C(x,z)) C = Σᵢ exp(−dᵢ²/2σ²), capped at 1
The risk field R is not a hand-plugged exponential — it is the steady-state solution of a real diffusion-reaction PDE, found by Jacobi relaxation every frame (risk seeps in from the fence, spreads inward, and decays at rate k_r as it goes). Because the whole boundary sits at the same pressure P, the correct closed form on a finite symmetric domain is a cosh profile, not a one-sided exponential — this implementation was checked numerically against that cosh solution before being wired up (max error < 0.01%).
Wildlife density n(x,z) is a metapopulation field: animals disperse between neighbouring cells (diffusion), reproduce logistically toward each cell's share of carrying capacity, and are lost to poaching at a rate proportional to local risk × local density — mean-field mortality rather than individual Poisson trials, but numerically equivalent in aggregate and directly comparable to the 3D version's population curve.
- Ranger teams — each contributes its own Gaussian deterrence bubble to C(x,z), sampled directly on the grid every frame (not diffused — patrol presence is treated as instantaneous, unlike the pressure field).
- Risk-based — rangers loop along the high-risk boundary strip.
- Uniform grid — rangers are spread evenly across the whole reserve regardless of where risk is highest.
- Unplanned — rangers wander with no fixed pattern, a low-effectiveness baseline.
- External poaching pressure — sets P, the fixed risk value imposed at the reserve boundary before any patrol suppression.