Dark theme

Matplotlib


In this section we'll give you some ideas for enhancing your model. We're not expecting you to do any, unless you want to and have the time, but they are good practice and will add to your knowledge of agent based models.


You can find some lectures on ABM modelling here. They were written for Java, rather than Python, but they are mostly language agnostic.


If you want some more practice, here's some ideas for continuing to develop your models:

Add some more behaviour to your model: make the nibblers change dynamics based on how much they have in their stores. For example, you could make them steal more resources from others if they are low, or move quicker if they have more resources.

Add a new type of agent: for example, add wolves that eat nearby sheep. The one thing we haven't done is change the number of agents (remember we discussed removing things from lists in the lecture on loops). In addition, you could add breeding to the sheep and/or wolves to make a full population model.

Adapt the model to represent something different, for example, a simple cops and robbers model (see example here).

Implement more complicated decision making, for example building a spatial version of Axelrod's tournament


  1. matplotlib extras
  2. This page