CS 420/527 — Biologically Inspired Computation
NetLogo Simulation


This page was automatically generated by NetLogo 5.0beta2. Questions, problems? Contact feedback@ccl.northwestern.edu.

The applet requires Java 5 or higher. Java must be enabled in your browser settings. Mac users must have Mac OS X 10.4 or higher. Windows and Linux users may obtain the latest Java from Sun's Java site. If the display appear cut off with Firefox, then try another browser (Safari works).

powered by NetLogo

view/download model file: SlimeSpiral.nlogo


This program simulates waves of motion and chemical relaying in the cellular slime mold Dictyostelium discoideum. When Dictyostelium amoebae are starved on an agar surface they begin to aggregate, forming complex spatial patterns as they do so. Aggregation leads to the formation of a multicellular organism, called a slug, consisting of about 10,000 to 100,000 cells, that can move about on the substrate for some time. Eventually, the slug develops into a fruiting body, a spherical stalk with a cap on top that contains spores. Under the appropriate conditions the spores can be released and germinate, thus completing the cycle.

The amoebae coordinate their movement by secreting cyclic adenosine monophosphate (cAMP) and by moving up the resulting cAMP gradient. This program ignores the cell motion because it is several times slower than the cAMP wave propogation. Accordingly, the rules governing the cells’ behavior are as follows:

With each time step, patches share 50% of their cAMP content with the eight neighboring patches.


The SETUP button prints a color key in the command window and creates a random distribution of slime mold cells, some of which release a pulse of cAMP into the environment.

The GO button runs the simulation according to the rules outlined above.

The DENSITY slider specifies the initial density of slime mold cells.

The NUMBER slider indicates how many cells will release cAMP at the start of the simulation. In reality, these cells might be starved more severely than the others, thus prompting them to start initiate the chemical signal.

The THRESHOLD slider specifies the amount of cAMP needed in a patch for the cell to relay the signal by releasing more cAMP.

The PERIOD slider controls the length of the cells’ refractory period.


Spirals of cAMP form as wave fronts are broken by density perturbances; accordingly, the threshold and density sliders affect the extent of wave propogation.


Modified by B. J. MacLennan Sep. 2003 for Java StarLogo 2.0.2 and Aug. 31, 2007 for NetLogo from version by Bill Thies on Scott Camazine’s “StarLogo Simulations of Self-Organized Phenomena” http://www.scottcamazine.com/personal/selforganization/starlogo/starlogo.htm.


patches-own [chemical                             ; amount of cAMP in patch
             refractory]                          ; remaining time that patch will be refractory

TO SETUP ;-----------------------------------------------------------------------------------------
ca                                                ; clears display, patches, and turtles

ask patches [set chemical 0]                      ; resets chemical to zero

ask patches [
 ifelse ((random 100) < density)
  [set pcolor white                               ; colors "density" percent of patches white
   set refractory 0]
  [set pcolor 4                                   ; colors other patches grey and sets "refractory"
   set refractory -1]                             ;   to -1, indicating that they're never receptive

ask patches [                                     ; gives a random patches 300 units of chemical,
 if ((random 100) < number)                       ;   with probability given by number
 [set chemical 300] 


TO GO ;--------------------------------------------------------------------------------------------

diffuse chemical 0.5                              ; each patch shares 50% of its chemical w/ 8 neighbors

ask patches [
 if refractory >= 0
  [ifelse refractory = 0
    [ifelse chemical > threshold
      [set refractory period                      ; receptive patches that detect a threshold level of
       set pcolor red                             ;   chemical become refractory, turn red, and emit 100
       set chemical chemical + 100]               ;   units of chemical

      [set pcolor white]]                         ; receptive patches with chemical concentrations less
                                                  ;   than the threshold are colored white

    [set refractory refractory - 1                ; refractory patches decrement "refractory", decrement
     set pcolor brown                             ;   chemical, and are colored grey
     set chemical max list 0 (chemical - int (100 / period + 1))]]

Return to COSC 420/527 home page

Return to MacLennan's home page

Send mail to Bruce MacLennan / MacLennan@utk.edu

Valid HTML 4.01!This page is web.eecs.utk.edu/~mclennan/Classes/420/NetLogo/SlimeSpiral.html
Last updated: 2012-02-02.