Skip to content

adrianmikoda/predators-and-prey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Predators And Prey - interactive simulation app

Table of Contents

Introduction

Java desktop app that models simulation inspired by the Charles Darwin's theory of natural selection.

Project realized by:

539876542-fa763c3e-b872-43bf-995a-6eb37ca79ce9

Interactive app usage

  1. Download the latest release from the Releases section.
  2. Open a terminal, go to the folder where the .jar file is located, and run the application using the following command:
java -jar Predators_And_Prey-1.0.0.jar

About

Predators 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.

Features

Configuration

The simulation is fully customizable, allowing users to adjust a wide range of parameters or choose from pre-configured settings.

image

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

Simulation frame step controls

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.

Placing Animals and Predators

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.

recording

Logs

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.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Java desktop application modeling evolutionary processes inspired by Charles Darwin’s theory of natural selection.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors