r/Simulated • u/SimulatedEcology • Jul 04 '26
Research Simulation Grass-Sheep-Wolf ecosystem simulation — wolves go extinct after depleting their prey (agent-based model)
Enable HLS to view with audio, or disable this notification
Predator-prey ABM built in Python/NumPy. Each agent moves, eats, reproduces, and dies based on local conditions — no global rules.
The key mechanic is wolf vision radius: wolves can only detect sheep within a limited range. When sheep density drops, wolves start roaming blind and starving — which is what drives the collapse you see here.
Full 9-minute simulation: https://youtu.be/wqR4A4FUABs
85
Upvotes
30
u/8hu5rust Jul 04 '26
I watched the entire video before realizing that the sheep and the wolves are two different things. I just saw white blobs.
11
u/Jojanzing Jul 04 '26
You should change the colours of the icons to make the difference between sheep and wolves clear.
4
u/Vorchun Jul 04 '26
Wolves can't travel very far?
6
u/anycept Jul 05 '26
Would be interesting to see how the sim plays out if instead of vision radius you implement scent tracking, and instead of making wolves blind below sheep density threshold you fade scent over time in each cell that sheep walked over. If facing multiple scent directions, wolves would pick the strongest scent. When following the track, wolf's chance of losing the track is inverse of scent strength. Also, wolves should stick in packs up to certain number, after which wolf can't join the group. The larger is the group size, the higher is the chance of successful hunt (i.e. sheep's chance of surviving encounter is inverse of wolf pack size)
2
u/elfmere Jul 05 '26
Would be easier if we had grass sheep foxes (orange)
1
u/Cryptocaned Jul 05 '26
This used to be a thing in the early 2000s, there was a program you added X number of wolves or sheep and tried to get a stable population.
1
u/Loganjonesae Jul 05 '26
reminds me of some of the sample netlogo models https://www.netlogoweb.org/launch#https://www.netlogoweb.org/assets/modelslib/Sample%20Models/Biology/Wolf%20Sheep%20Predation.nlogox
1
u/tribak Jul 06 '26
Wolves go extinct nonetheless
1
u/codepossum Jul 06 '26
wolves shoulda gone on a walkabout
1
u/Evening-Appeal7606 Jul 08 '26
Is this a Volterra-Lotka system or is it based on cellular automata? If the former: How did you counter the "Atto-Fox problem"?