Wolf Sheep Predation

Simulation Link

Based on Project Work given by Dr. Mikel D. Petty

Simuland

  • Predator-prey ecosystem
  • Wolves eat sheep
  • Sheep eat grass, turning grass to dirt
  • Grass regrows, after time has passed
  • Movement requires energy
  • Wolves and sheep starve if they don’t eat enough

Abstractions and assumptions

  • Wolf and sheep locations discretized
  • Wolves and sheep move randomly;
    • i.e., wolves don’t pursue sheep, sheep don’t evade wolves
  • Wolves and sheep move at same speed
  • Sheep and wolves move individually (no flocks or packs)
  • Wolves and sheep reproduce by “fission”

Agents

  • Types: (wolf, sheep)
  • Attributes (both types): x, y, movement direction, energy

Environment

  • 2D grid of square cells, 50  50
  • Grid treated as torus, i.e, right edge adjacent to left edge,
    • top edge adjacent to bottom edge
  • Cell states: (grass, dirt); if dirt, also a regrow counter
  • Agents located in cells; multiple agents may be in same cell

Interactions

  • Sheep-Grass: if sheep agent in grass cell, then sheep eats grass;
    • cell becomes dirt cell, sheep gains energy
  • Wolf-Sheep: if wolf agent and sheep agent in same cell, the wolf eats sheep; sheep agent removed, wolf gains energy

Logic overview

  1. For each dirt cell, determine if the cell has regrown to grass
  2. Move each agent and reduce the moving agent's energy
  3. If any cells contain both wolves and sheep, the wolves eat the sheep and gain energy
  4. If any grass cells contain sheep, the sheep eats the grass and gain energy and the cell becomes dirt
  5. For each agent,determine if the agent reproduces, and if it does, create the offspring agent
  6. If any agent has energy ≤0, the agent starves