Agent Based Model

Click here to check the repository

Content list

This model is created to monitor wolves hunt sheep events. It simulates wolves chasing the sheep, catching it, and eating it. This model contains four files: GIS.py, agentframework.py, agentwolf.py, and in1.txt.(Click to download)

How to run

This model runs in python, after clicking run file, it will pop up a menu. And click Model in the menu bar, click Run model the model will start to run. Sheep will move randomly and wolves will move faster. There will be 3 wolves with random colors black, green and blue, and all the sheep(40) are white. Wolves and sheep are set to move 50 times. If sheep are within the 30 unit range of wolves, the sheep would be caught and die. This is a screen shot of the model showing 3 dead sheep. If the model keeps running, then all the sheep are supposed to die.

Tests

To ensure the model has no significant error or flaw, several tests were conducted: url drag tests, envronment background tests, catch function tests, and update function tests.

Issues

The model has a bug which is in the hunting part. All the sheep will be hunted and die according to the code, but no matter setting how many iterations, only three sheep will die. Though the record in the console shows multiple kills, the animation only shows three dead sheep.

Readme

The detailed introduction of model please see here Readme.

License

MIT © Yuming Zhang

pandamouse