Kelvin229 / preditor-prey-pursuit

Using Genetic programming, to evolve stategies that preditors and preys will use in a simulated environment, such that Preditors get better at catching preys over time (generations).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Predator-Prey (Pursuit)

Getting Started

  1. Install program (macOS, Linux)
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install -e .
  1. Install program (Windows)
$ python -m venv .venv
$ .venv\Scripts\activate
$ pip install -e .
  1. Run the training
$ pursuit -o=tmp/best-001.ind -c=0.9 -m=0.1 --seed=123
  1. Generate trace of predator-prey movements
$ execute -i=tmp/best-001.ind -o=tmp/trace-001.json
  1. Visualize trace
$ viz -i=tmp/trace-001.json --mapfile=examples/spredatorafe.txt

References:

  • F.-A. Fortin, F.-M. De Rainville, M.-A. Gardner, M. Parizeau, and C. Gagné, “DEAP: Evolutionary algorithms made easy,” Journal of Machine Learning Research, vol. 13, pp. 2171–2175, jul 2012. https://deap.readthedocs.io/en/master/

About

Using Genetic programming, to evolve stategies that preditors and preys will use in a simulated environment, such that Preditors get better at catching preys over time (generations).


Languages

Language:Python 100.0%