Skip to content

ymaltsman/Optimal-Foraging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Optimal-Foraging

Background

A striking characteristic of locusts is that when they are repeatedly stimulated by other locusts, they undergo a behavioural and physiological phase change in which they become gregarious. This gregarization is a neccessary component for destructive locust swarms to form, which can include millions of locusts flying in unison.

Over the course of summer 2020, I worked under the guidance of Prof. Andrew Bernoff and Prof. Jasper Weinburd of Harvey Mudd College to build a minimal model that could shed light into why, evolutionary, locusts find it advantageous to gregarize. I developed an agent based genetic algorithm as well as an ODE model to attempt to answer this question. I write about these models and their results in this report.

Agent Based Genetic Algorithm

In genalg.py we investigate marching locusts on a 2d grid with varying propensities to gregarize (gregarization thresholds). The population evolves based on whichever locusts have the best and worst foraging efficiencies, potentially converging to a homogenous population. For a fuller illustration of the model, see the following flowchart.

ODE Model

In ODEmodel.ipynb we build up to a five dimensional system of ODEs that investigates the population dynamics of competing solitary locusts and gregarious locusts, as well as the resources that they consume. We borrow from the idea of producer-scrounger games in game theory.

Navigation

The locust class in fasterlocust.py contains the properties and methods for individual locusts, such as their rules for eating and moving. The gridpoint class in gridpoint.py contains the properties and methods for individual points that make up the 2d grid. These include the number of locusts and resources on a point, and rules for depletion and gain of resources. genalg.py contains a function dictating the simulation of the genetic algorithm itself, and contains parameters for the time period, size of the grid, and number and makeup of the locusts. bayesiansimulation.py runs a bayesian optimization on the model.

Installing from git source

git clone https://github.com/ymaltsman/optimal-foraging.git

About

A genetic algorithm to evaluate evolutionary competitiveness of gregarization in locusts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published