BUGBOX Mathematical Modeling Simulations


The BUGBOX apps were updated for Netlogo version 7.x in December 2025. If you are running version 6.x, you will need to change the file extensions from nlogox to nlogo. However, it is preferable to upgrade your Netlogo implementation to the latest version.


BUGBOX software is for inquiry-based learning of mathematical modeling for population dynamics. The software creates a virtual laboratory space inhabited by virtual insects. Students conduct experiments and devise mathematical models to predict the experiment results.

In BUGBOX-predator-original, students do experiments to study the relationship between prey density and consumption by one predator. The program is a virtual adaptation of the human simulation described in a classic 1959 paper by C. S. Holling. Using this app helps students build the intuition needed to derive the Holling type 2 predation function.

BUGBOX-predator-analysis runs the same simulation as BUGBOX-predator-original, but with several additional features that facilitate empirical study of the model. A single button click runs 14 simulations, each with different aphid population sizes. Another button automatically runs code that fits the linear and Holling type 2 models to the data and calculates the AIC to assist in model selection.

In BUGBOX-population, students observe the changes in the insect population to discover aspects of the insects' life cycle. They can construct a simple linear difference equation model, using their observations to estimate the parameter values. Four different scenarios give a sequence of increasing life history complexity.

Everyone is welcome to use BUGBOX for their courses. I would just appreciate an email to let me know.


BUGBOX-predator was originally written in python 2, with extensive use of the pygame and pgu packages, and converted into an executable using py2exe. BUGBOX-population was originally written in python 3, with the built-in tkinter GUI package, and converted into a windows executable using cx_Freeze.

Netlogo has become the standard software for agent-based modeling such as is required for the BUGBOX software. There is extensive documentation on-line. People interested in writing agent-based models in Netlogo should also consult Agent-Based and Individual-Based Modeling, 2nd edition, by Steven F. Railsback and Volker Grimm.