This project simulates the ecosystem of Rossumøya, an island inhabited by herbivores and carnivores. The simulation models their yearly life cycle—feeding, migration, aging, weight loss, and death—based on probabilities and resource availability. Herbivores rely on plants in lowlands and highlands, while carnivores hunt herbivores. The island is divided into cells with four landscape types (lowland, highland, desert, water), each defining food availability and livability. The model is used to study species viability and ecosystem stability over time.
-
Demo Video
🎥 Watch the 1000-year BioSim simulation on YouTube -
Project Documentation
📄 Read the full documentation
-
Source Code
📂 src/biosim- animal_kingdom.py
- landscape_structure.py
- island_manager.py
- simulation.py
- visualization.py
-
Tests
- 📂 Full test suite: tests/
- Total coverage: 95% (excluding
visualization_manager
) - Test files:
- test_animal_kingdom.py – covers
animal_kingdom
(98%) - test_landscape_structure.py – covers
landscape_structure
(98%) - test_island_manager.py – covers
island_manager
(99%) - test_simulation.py – covers
simulation
(96%)
- test_animal_kingdom.py – covers
-
Extra Features
- Population statistics in the visualisation
- Animal count showing total population
-
Examples
- 📂 Usage examples are available in the examples folder.
- experiment_01.py: Simulates 500 herbivores for 40 years, then 50 carnivores for 60 years; outputs MP4, GIF, and PDF, repeated over multiple seeds.
- experiment_02.py: Simulates herbivores on Desert-Low-Island for 20 years, then adds carnivores for 40 years, repeated over 3 seeds.
- updated_check_sim_1000years.py: Simulates 1000 years: 150 herbivores initially, with 40 carnivores introduced after 300 years.
- migration_check.py: Test file to verify migration: with probability set to 1, animals form a chess-like pattern if migration works correctly.
- animal_landscape_check_carn_with_delta15.ipynb: This file helps us understand whether the Animal and Landscape class works properly or not.
- 📂 Usage examples are available in the examples folder.