“Smiley” was a brown trout captured 13 times between 1986 and 1992 from the same location in the Tule River, California. Over those six years Smiley’s length increased by 5 cm while her weight decreased by about 400 g, indicating a changing tradeoff between growth and predator avoidance. (Photo by T. K. Studley, Pacific Gas & Electric.)

Modeling Populations of Adaptive Individuals

Modeling Populations of Adaptive Individuals is the new book (May 2020) by Steve Railsback and Bret Harvey in Princeton University Press’s Monographs in Population Biology series. It discusses and provides guidance on using IBMs to represent population or community dynamics in ways that capture the effects of individual tradeoff decisions. This page provides supporting materials for the book.

Links to related sites:


Full description of the facultative anadromy model of Chapter 7

Chapter 7 of the book describes a model of facultative anadromy in the salmonid fish species Oncorhynchus mykiss (steelhead and rainbow trout). The full description of this model can be downloaded here. It was published as a supplemental material to this publication:

Railsback, S. F., B. C. Harvey, and J. L. White. 2014. Facultative anadromy in salmonids: Linking habitat, individual life history decisions, and population-level consequences. Canadian Journal of Fisheries and Aquatic Sciences 71:1270-78.


Example models from chapters 4, 5, and 6

The following table provides working software for models used in chapters 4, 5, and 6 of Modeling Populations of Adaptive Individuals. The models are all implemented in the NetLogo software platform, which includes a programming language and graphical interfaces for individual-based models.

On-line models are available from the table’s second column. These are web pages that each contain a model version and graphical interfaces to control and observe it (in JavaScript, produced via NetLogo’s “NetLogo Web” feature). The NetLogo code can also be read. These versions take some time to load and execute within your browser, not on our server.

Downloadable NetLogo files are available from the right column. The NetLogo model files to be downloaded and run on any computer that has NetLogo installed. They are best downloaded by right-clicking on the link and using “Save link as” or “Save target as”. Some browsers change the extension of some files (i.e., changing NetLogo programs from .nlogo to .htm). You can either correct the file extension in the “Save As” window, or rename the file once it has downloaded.

If you are not familiar with NetLogo, we recommend using the on-line model. More information about the model version and how to use the software is available by clicking the “Model information” button near the bottom of the on-line models and the “Info” tab of the downloadable version.

The on-line and downloadable versions should be identical except for these differences: (1) the optional file output is available only with the downloadable versions, (2) NetLogo’s “BehaviorSpace” tool for automated simulation experiments–used to evaluate response to food availability and predation risk in the patch selection model–is available only with the downloadable versions, and (3) downloadable versions should execute faster, although execution is fast for all models except the population versions of the daphnia model.

NetLogo files were built in version 6.0.2 but should work in any newer versions of NetLogo.

NetLogo is available free from this site at Northwestern University. We encourage frequent users to contribute to the NetLogo project. Information on the textbook on modeling with NetLogo by Railsback and Grimm is here.

Model and version

Link to on-line model

NetLogo file

Chapter 4: Patch selection 1 with experiments varying food and risk

Chapter 4: Patch selection 2, foraging with competition

Chapter 4: Patch selection 3, continuous starvation risk

Chapter 5: Daphnia vertical migration version 1

Chapter 5: Daphnia vertical migration version 2, predicted offspring

Chapter 5: Daphnia vertical migration version 3, diurnal prediction

Chapter 6: Limpet foraging version 0 (maximize expected energy reserves at current time step)

Chapter 6: Limpet foraging version 1 (maximize expected energy reserves two time steps in future)

Chapter 6: Limpet foraging version 2 (maximize mean expected energy reserves over the remainder of the current day)