Predators  and preys 
The historical introduction to the problem of predator and preys can be found in the other example with a similar name (which you should see first). In that example, the classical approach of Lotka and Volterra was introduced.
In this simulation, we will try to really simulate how predators and preys coexist in a reduced piece of land. We need to describe how preys reproduce and feed predators (so to say), and how predators reproduce accordingly. To make it a bit more realistic, both, predators and pres move in each evolution step, and it is only if they meet that a predator can find its lunch!
The goal is to be able to produce a setting in which both species coexist with their respective population showing a (more or less) stable alternating behaviour.

There are plenty of activities that can be done here. Although you are presented with three slighty different solutions for this problem which give reasonable results, perhaps the most interesting activity is to clear the corresponding evolution pages and ask your students to provide their own specification for what the mutual interaction of these two species should be. This can be presented to your students as a kind of team competition game. The team which produces a more stable final solution wins!

1. Even if you give them the solution included in the example, you can ask them to find appropriate values for the parameters. It took me a lot of time to get to find the ones I include here. If you look closer at them, they look more parameters for an infection than parameters for tigers and rabbits. There is a reason for this. Simple models (like Lotka-Volterra) are suitable for simple situations only.
2. Try to improve the haunting scheme (make it more intelligent, let predators smell food from longer distances,...) and see if you can improve the result.
3. Implement a reservoir of preys, where predators can not get in and see if you can improve the result. 

/htdocs/ntnujava/ejsuser/2/users/examples/PredatorAndPreySimulation_pkg/PredatorAndPreySimulation.propertiesFull screen applet or Problem viewing java?Add to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
Download EJS jar file(1424.2kB):double click downloaded file to run it. (9 times by 5 users) , Download EJS source (3 times by 2 users) View EJS source