Skip to content
/ Earfh Public

A Prey-Predator simulation, imitating an actual ecosystem. Each entity has its own characteristics but random movement.

Notifications You must be signed in to change notification settings

FadlGh/Earfh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prey-Predator Simulation

Overview

This is a simple prey-predator simulation implemented in Python using the Pygame library. The simulation involves entities representing prey and predators interacting within a defined environment.

Features

  • Entities: The simulation includes two types of entities - prey and predators.

  • Movement: Entities move within the simulation space based on predefined rules and randomly, and interact with eachothers in a specific range.

  • Interactions: Predators can interact with prey entities, and Preys can interact with trees. Specific behaviors, such as catching prey, are simulated.

  • Delay Mechanism: The code includes a delay mechanism to control the frequency of specific actions, preventing entities from moving or interacting too frequently.

Action Delay
Move 1s
Reproduce (If mate in range) 20s
Energy Loss 1 bar every 1s
Energy Gain 3 bars on eating
Regenerate Trees 10s

earfh

About

A Prey-Predator simulation, imitating an actual ecosystem. Each entity has its own characteristics but random movement.

Topics

Resources

Stars

Watchers

Forks

Languages