Java desktop app that models simulation inspired by the Charles Darwin's theory of natural selection.
Project realized by:
- Adrian Mikoda [adrianmikoda]
- Paweł Małkowski [pawelmalkowski4]
- Download the latest release from the Releases section.
- Open a terminal, go to the folder where the
.jarfile is located, and run the application using the following command:
java -jar Predators_And_Prey-1.0.0.jarPredators and Prey is an interactive simulation that models the dynamic interactions between carnivores and herbivores in a customizable ecosystem. The app allows users to explore how populations of animals evolve over time based on their interactions, and environmental factors.
Key Features:
- Interactive Simulation: Watch carnivores hunt and herbivores graze in real time, add your own animals onto the world by clicking on a desired spot.
- Customizable Environment: Adjust parameters like population size, reproduction costs, and ecosystem settings to affect the balance of nature.
- Real-Time Visualization: Visualize the movement, feeding, and interactions of animals.
- Graphical Analysis: View statistics and graphs of population changes to analyze trends.
- Educational Insights: Observe ecological concepts like predator-prey cycles, population dynamics, and food chain interactions.
The simulation is fully customizable, allowing users to adjust a wide range of parameters or choose from pre-configured settings.
The user can choose:
Animal Settings
- startingEnergyLevel
- maxEnergyLevel
- dailyEnergyLevelLoss
- proliferationCost
- minProliferationEnergyLevel
Genotype Settings
- genotypeLength
- minMutationCount
- maxMutationCount
Plant Settings
- maxPlantEnergyLevel
- plantsGrowthRate
Map Settings
- width and height
- jungleStartLongitude [%]
- jungleEndLongitude [%]
Initial Population
- initialPreyCount
- initialPredatorCount
- initialPlantCount
You can control the simulation frame-by-frame in two ways:
- Step buttons: Click the forward or backward controls to move the simulation one frame at a time.
- Step slider: Drag the simulation step slider to quickly jump to a specific frame or scrub back and forth through the simulation.
Both options let the user precisely inspect how the simulation evolves over time.
When the simulation is paused or displaying the last frame, you can add animals or predators by clicking on the desired spot in the simulation area. This allows the user to adjust the population before continuing the simulation.
The application can save simulation logs to a CSV file if this option is enabled in the start window.
All files are stored in a simulation_data/ directory.
Important
If the simulation_data/ folder does not exist in the root directory, it will be created automatically when launching a simulation with this option enabled.
This project is licensed under the MIT License. See the LICENSE file for details.

