Try it out: ingredient based recipe search.

Predator Prey Multi Agent Simulation Model (JAVA & REPAST).


How do characteristic of individual animals (agents in simulation) affect global population of the species? When is ecosystem 'stable', and when does extinction occur? Do time series of stable ecosystems show properties of periodicity, chaos or bios?


Predator Prey model simulates the dynamics of the system with 3 different agent types: predator, prey, and grass.

With default parameters the system is stable (all 3 agents are surviving), while if you change any of the parameters a little, you will see the extinction of predators, or preys (and therefore also predators).

Simulation was developed in Java programming language using REPAST.

screenshot of the application
REPAST multi agent predator prey simulation


Download a jar application that includes a REPAST libraries (2 Megabytes).

Or instead of this file, download a source code (16 kilobytes) file with the following 5 classes

You can download REPAST libraries from their website.


If you are new to REPAST, I wormly recommend that you start with this Java tutorial.

If you are relatively new to JAVA programming or programming in general, you will also find this tutorial very useful, because it will show you a methodology of implementing an idea from words into a computer program in a step by step instructions. This application is just an expanded tutorial. For a slightly different multi agent simulation, see Magnetism simulation.

Questions from past visitors:

Q: I wish to use it [code] in order to make a test in how it would run concurrently (each agent in a thread). I wish to have your permission and I need your indication on the reference for the paper/article.
A: You have my permission. Reference is: Sabelli H. and Kovacevic L. Biotic complexity of population dynamics. Complexity 13-4:47-55, 2007. You can also read about related time series data analysis.

Send a feedback

© 2008, Predator Prey by Lazar

Last modified: June 04 2009 04:21:31. (UTC-8)

Take a look at one of my hobby projects:       <   @ Garage Sale   >