Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

CRB pheromone simulation

Simulation of CRB response to pheromone sources

I am thinking of putting together a simulation of CRB response to pheromone sources. I will probably use NetLogo for an agent-based sim.

Started out with a Gemini query.

Gemini prompt

NetLogo simulation model of moth navigating to a pheromone source

Gemini response

A NetLogo simulation of a moth navigating to a pheromone source typically models anemotaxis (wind-directed movement) combined with chemotaxis (chemical sensing). Because pheromone plumes in nature are turbulent and filamentous rather than smooth gradients, moths use a “surge and cast” strategy: they surge upwind when they detect pheromone and “cast” (zigzag crosswind) when they lose the signal. [1, 2, 3, 4] Below is a logic-based framework and code structure for building this model in NetLogo.

🧪 Core Simulation Logic

  1. Pheromone Dispersion: Pheromone is released from a source and moves with the wind. It is best modeled using patches that “diffuse” and “evaporate” or by using moving “scent” particles.

  2. Moth States:


💻 NetLogo Model Code Structure

globals [ wind-direction ] ; e.g., 0 (North), 90 (East), etc.
patches-own [ pheromone ]

to setup
  clear-all
  set wind-direction 90 ; Wind blowing from West to East
  setup-patches
  setup-moths
  reset-ticks
end

to setup-patches
  ask patch (min-pxcor) 0 [ set pheromone 100 ] ; Pheromone source
  ask patches [ set pcolor scale-color white pheromone 0 50 ]
end

to setup-moths
  create-turtles 1 [
    set color yellow
    set xcor max-pxcor - 5 ; Start downwind
    set ycor 0
  ]
end

to go
  diffuse-pheromone
  ask turtles [ navigate ]
  tick
end

to diffuse-pheromone
  ask patches [
    ; Wind effect: Move pheromone toward wind-direction
    set pheromone pheromone * 0.9 ; Evaporation
    let target patch-at-heading-and-distance wind-direction 1
    if target != nobody [
      ask target [ set pheromone pheromone + ([pheromone] of myself * 0.1) ]
    ]
  ]
  ask patches [ set pcolor scale-color white pheromone 0 50 ]
end

to navigate
  ifelse pheromone > 0.1 [
    ; SURGE: Fly upwind (opposite of wind-direction)
    set heading wind-direction + 180
    fd 0.5
  ] [
    ; CAST: Zigzag crosswind to find the plume again
    rt (random 60 - 30)
    fd 0.3
  ]
end

🛠️ Advanced Features to Add

💡 Probing Questions

To help you refine this model, consider:

[1] https://pmc.ncbi.nlm.nih.gov

[2] https://journals.plos.org

[3] https://www.researchgate.net

[4] https://academicweb.nd.edu

[5] https://www.researchgate.net

[6] https://stackoverflow.com

[7] https://pmc.ncbi.nlm.nih.gov

[8] https://pmc.ncbi.nlm.nih.gov

[9] https://www.scitepress.org

References
  1. Liberzon, A., Harrington, K., Daniel, N., Gurka, R., Harari, A., & Zilman, G. (2018). Moth-inspired navigation algorithm in a turbulent odor plume from a pulsating source. PLOS ONE, 13(6), e0198422. 10.1371/journal.pone.0198422