Skip to content

simple python script modelling predator-prey 2d cell system

Notifications You must be signed in to change notification settings

gebetix/predator-prey-life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

predator-prey-life

Simple python script modelling predator-prey ocean system. Ocean is represented with 2d cell system. Each cell can contain either one of predator, prey, obstacle or be empty.

The script uses the tkinter graphics interface: red cells are predators, green are prey, black are obstacles and blue are empty.

Each time tick all cells are processed:

  1. Each creature can make a move to a neighbour cell.
  2. Predator eats prey if they happen to come to one cell.
  3. If predator stays hungry for some time - he dies.
  4. After some time each creature produces a child to a neighnour cell.
  5. If that cell is not empty - the child dies.

About

simple python script modelling predator-prey 2d cell system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published