Statistikk og Simulering

# Økt 17-18. Implementasjon av predator/prey

## Statistikk og Simulering

### 16. Økt 17-18. Implementasjon av predator/prey

Hopefully, you start the second week with a good model of the eco-system with predator and prey from last week, as well as an object-oriented software model for the simulator (Exercise 15.7). Now it is time to implement it.

Remember that Barnes and Kölling have a similar project in their textbook and they have also published sample code. Feel free to use their examples. If you cannot find the sample code, please ask the lecturer. The Barnes and Kölling example is a very good starting point but does not suffice for the current project. The agent behaviour is too simple, and you should have one with more detail.

It is suggested that you use Java. You are allowed to use other languages if you please, but you may then not be able to benefit from the example from Barnes and Kölling.

Some requirements to note

1.
The simulator must be able to produce a log file recording statistically data. As a minimum, it must record the age and time of death for every agent. (Comma-separated values is a suitable format; easy to read and easy to parse.)

It may be useful to record other data as well, such as the population size.

2.
Make some (not all) of the model features configurable, so that you can experiment with variations of the model (e.g. starting population size, grid size, etc.).
3.
Visualise the location of individual agents at each time step. (The example from Barnes and Kolling tells you how to do this.)