NetLogo: a retrospective

NetLogo
Published

May 18, 2025

In this post, I briefly reflect on my experiences with NetLogo, which played a key role in my professional life.

My meandering graduate school research experiences were all broadly related to predator-prey interactions, foraging behavior, and animal movement. During my PhD (the 2nd try), I was studying the movement behavior of ladybug larvae after they consumed low-quality, potentially toxic, prey. I was interested in modeling their movement with the potential of eventually exploring how high-quality prey could benefit from the association with low-quality prey.

My PhD advisor, an R programmer, understandably encouraged me to pursue this modeling project with R, but I had stumbled across a paper with a simple animal movement or foraging model that included the NetLogo code in the appendix. I was primarily using R for statistics at the time and I had a clearer vision for how I would get started on this project in NetLogo than in R, which is not surprising because NetLogo is much better suited for 2D movement modeling than R.

I briefly scanned my library of old papers, but my memory is too hazy on the details to find the actual paper.

I was quickly hooked on NetLogo. The NetLogo environment is beginner friendly, the core ideas and approach are intuitive, and the built-in graphical approach provides quick visual feedback on whether your code is doing what you think it is doing. Detractors will say that NetLogo is only useful for toy models and prototyping, but it is a capable platform for agent-based models. I think it is fair to say that my current love of programming grew more out of my experiences with NetLogo than MATLAB or R.

My initial attempts to build a model of ladybird larvae movement centered on how to best implement the behavioral rules governing their movement. I was mostly flailing around while trying different ideas (which was fun!) and largely ignorant of the state of the art, particularly in the physics literature. After presenting on my initial modeling attempts to the grad students and faculty in my department, my dear, late friend, Ben Nolting, gently nudged me in the direction of more elegant approaches. Our work together on this project eventually led to this paper. We didn’t publish the NetLogo code with the paper, but I later put it on GitHub.

Ben also played a critical and supportive role in a short-lived consulting business.

Even after leaving academia for consulting, I hoped to work in my free time on extending our model to incorporate a second resource type to pursue my original interest in using the model to study shared predation. I made some progress [code], but my motivation was insufficient to stay on top of the literature and chase down any novel ideas that might arise from using our movement model as the mechanism of shared predation.

My last tango with NetLogo involved trying to replicate Hill et al. (2003). I had discovered ReScience C, which has the goal of encouraging replication of published computational research. Not only was I philosophically aligned with the ReScience mission, but I was excited at the prospect of doing research where the emphasis wasn’t on novelty and selling my ideas. I reached out to Ben about the possibility of collaborating on a side project for ReScience and proposed replicating Hill et al. (2003), which complemented our paper.

Our work, which represents very general search behavior, and that of Hill et al. (2003), which focused on a specific system, provide complementary evidence for the potential importance of composite foraging strategies that are not based on time.

Ben thought it sounded like a fun side project. We exchanged numerous emails about how to implement the model in NetLogo [code], but couldn’t reconcile some early discrepancies in the results and lost our momentum. Replication is difficult. Human language lacks the precision of programming languages and trying to figure out what someone else meant was not enough fun to keep pushing forward on this side project.

I spent many years (too many!) as a graduate student where I dreamed of a productive career as a research scientist. I have had a very hard time letting go of that dream. In my first job after my PhD, I worked for a company, Cramer Fish Sciences, that conducted original research, published papers, etc. I wasn’t doing much research myself, but the proximity to research slowed and masked the death of my research scientist dream. I’m finally comfortable acknowledging that original research is in my rearview mirror and fully embrace my future as a data scientist and programmer. With that, I say a fond farewell to NetLogo and the central role it played in my programming journey.