CS 420/527 — Biologically Inspired Computation
NetLogo Simulation

Continuous Activator-Inhibitor System


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: Activator-Inhibitor.nlogo

WHAT IS IT?

Could it be that a single mechanism underlies such diverse patterns such as the stripes on a zebra, the spots on a leopard, and the blobs on a giraffe? This model is a possible explanation of how the patterns on animals’ skin self-organize. If the model is right, then even though the animals may appear to have altogether different patterns, the rules underlying the formation of these patterns are the same and only some of the values (the numbers that the rules work on) are slightly different.

Thinking of the formation of fur in terms of rules also helps us understand how offspring of animals may have the same type of pattern, but not the same exact pattern. This is because what they have inherited is the rules and the values rather than a fixed picture. The process by which the rules and values generate a pattern is affected by chance factors, so each individual’s pattern is different, but as long as the offspring receive the same rules and values, their own fur will self organize into the same type of pattern as their parents’.

HOW IT WORKS

This program simulates vertebrate skin patterns by use of a short-range activator and a long-range inhibitor. Both chemicals diffuse at specified rates in the X and Y directions, and then each patch is evaluated. Patches with more activator than inhibitor become lighter, and patches with more inhibitor than activator become darker. As cells become more active they produce more activator and inhibitor; as they become less active, they produce less of each. (The chemical concentrations are limited to the range 0 to 100.) The process is then repeated; a steady-state pattern gradually emerges.

These are the partial differential equations for the morphogen concentrations:

dA/dt = DAx Axx + DAy Ayy + kA (A + B - I)
dI/dt = DIx Ixx + DIy Iyy + kI (A + B - I)

Here, A and I are the activator and inhibitor concentrations, respectively, and Axx, Ayy, Ixx, and Iyy are their second derivatives with respect to x and y. B is the bias, and kA and kI are activator and inhibitor reaction rates (unmodifiable in this simulation). DAx, DAy, DIx, and DIy are the diffusion rates of the morphogens in the x and y directions. Note that the concentrations are limited to the range 0 to 100, so these differential equations apply only in that range.

HOW TO USE IT

The SETUP button randomly colors each patch and deposits the morphogens on patches that are white.

The GO button executes the model according to the rules above.

The GO ONCE button executes a single cycle of the simulation, sp that the changes are easier to see.

The DRAW WHITE and DRAW BLACK buttons allow the user to use the mouse to draw white and black patches, respectively.

The X_ACTIVE, Y_ACTIVE, X_INHIBIT, and Y_INHIBIT sliders control the diffusion rates of the activator and inhibitor morphogens in each direction. More specifically, the slider
variables control the percentage of a morphogen that each patch shares with its two neighbors (in the given direction), such that each patch is left with an equal share of the patch’s original morphogens.

BIAS biases the cells towards more activity (lighter) for positive values, or less (darker) for negative values. (Same units as activator and inhibitor.)

NOISE adds a specified amount of noise to the determination of whether the cell is becoming more or less active. (Same units as activator, inhibitor, and bias.)

INITIAL_DENSITY controls the initial density of activated cells (white patches).

The FIELD DISPLAY chooser controls the information displayed. In its default position (NONE) is shows the color (white to black) of the cells. If ACTIVATOR is chosen, then the concentration of the activator morphogen is displayed as a shade of red. If INHIBITOR is chosen, then the concentration of the inhibitor morphogen is displayed as a shade of blue. In either case the concentration is displayed after the morphogen has diffused, but before an activated cell secretes more of the morphogens.

The SET SEED button allows seeding the random number generator.

THINGS TO NOTICE

Modification of the absolute and relative sizes of the slider variables can cause a variety of patterns to emerge, resembling everything from zebras to vermiculated rabbit fish.

The display shows the average absolute activator change of cells (patches) on each time step, and plots this as a function of time. Notice that even when the pattern stabilizes, some of the quantitiies are still changing, showing that the pattern is not static but rather is a “stationary state.” You can see this by changing some of the parameters (diffusion rates and bias), which may destabilize the pattern and cause it to converge to a new stationary state.

THINGS TO TRY

Run the model with different INITIAL_DENSITY settings. How, if at all, does the value of the INITIAL_DENSITY affect the emergent pattern? Do you get the same pattern? Do you get a different pattern? Does it take longer? Try very large and very small values (e.g., 99%, 1%).

Note how fragile the self organization of the cells is to slight changes in parameters. If you hold all other factors and slightly change just the BIAS, from trial to trial, you will note that for large positive numbers you will invariably get completely white fur and for large negative numbers you will invariably get completely black fur (why is that?). For values in between it fluctuates. That happens partially because the initial setting of black/white coloration has a random element to it.

Try changing the sliders to have different values in the X and Y directions.

Once the pattern has stabilized, use the DRAW WHITE and DRAW BLACK controls to damage the pattern. Then use GO or GO ONCE to see whether the pattern will heal and how quickly. Does healing always restore the original pattern?

Try introducing noise into the computation to see its effect. Sometimes increasing noise can destabiliize a pattern, so that if the noise is slowly decreased it restabilizes into a more orderly pattern.

EXTENDING THE MODEL

How about adding more colors? What could be the logic here? If you introduced, say, red, you would have to decide on specific conditions under which that color would appear. Also, you’d have to decide how that color influences other cells.

RELATED MODELS

The Voting model, in the Social Science section of the NetLogo model library, is based on simpler rules but generates patterns that are similar in some respects.

CREDITS AND REFERENCES

Modified by Bruce J. MacLennan Sep. 7, 2003 for Java StarLogo 2.0.2, Sep. 15, 2007 for NetLogo 3.2.4, and Sep. 12, 2008 for NetLogo 4.0.3, and Sep. 8, 2010 for NetLogo 4.1 from original version by William Thies on Scott Camazine’s website. Modifications included continuous-time simulation of state change, modified diffusion, monitoring of cell state-change, field displays, and documentation.

Some of the above documentation is adapted from the Fur model in the NetLogo model library (which is programmed differently, however):

Wilensky, U. (2003). NetLogo Fur model. http://ccl.northwestern.edu/netlogo/models/Fur. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

In other publications, please use: Copyright 2003 Uri Wilensky. All rights reserved. See http://ccl.northwestern.edu/netlogo/models/Fur for terms of use.

PROCEDURES

globals [ 
  activator-rate       ; reaction rate of activator
  inhibitor-rate       ; reaction rate of inhibitor
  changes              ; total absolute change in activator concentration
  updates              ; average absolute activator change (per cell)
  time                 ; simulation time for graphing
  ]

patches-own [ activator      ; activator concentration (0 .. 100)
              inhibitor      ; inhibitor concentration (0 .. 100)
              new_activator  ; activator after diffusion
              new_inhibitor  ; inhibitor after diffusion
              difference     ; net stimulis of activator + bias - inhibitor
              hold_activator ; old activator concentration
              hold_inhibitor ; old inhibitor concentration
              ]

TO SETUP ;-----------------------------------------------------------------------------------------

ca

set updates 0
set time 0

set activator-rate 0.1 ; set activator reaction rate
set inhibitor-rate 0.1 ; set inhibitor reaction rate

ask patches [
 ifelse random-float 100.0 < initial_density
 [set activator 100
  set inhibitor 100
  set pcolor white 
  ]
 [set activator 0
  set inhibitor 0
  set pcolor black 
  ]
]

reset-ticks

end


TO DRAW_WHITE ;--------------------------------------------------------------------------------------
if mouse-down?
 [ask patches
  [if ((abs (pxcor - mouse-xcor)) < 2) and ((abs (pycor - mouse-ycor)) < 2)
   [set pcolor white
    set activator 100 ; creates active white cells where mouse button is depressed
    set inhibitor 100]]
 ]
end

TO DRAW_BLACK ;--------------------------------------------------------------------------------------
if mouse-down?
 [ask patches
  [if ((abs (pxcor - mouse-xcor)) < 2) and ((abs (pycor - mouse-ycor)) < 2)
   [set pcolor black
    set activator 0  ; creates inactive black cells where mouse button is depressed
    set inhibitor 0]]
 ]
end


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

set changes 0

ask-concurrent patches [ ; simulate diffusion of activator and inhibitor

 set new_activator activator
   + (([activator / 2] of patch-at 1 0) + ([activator / 2] of patch-at (-1) 0) - activator) * x_active / 100
   + (([activator / 2] of patch-at 0 1) + ([activator / 2] of patch-at 0 (-1)) - activator) * y_active / 100

 set new_inhibitor inhibitor
   + (([inhibitor / 2] of patch-at 1 0) + ([inhibitor / 2] of patch-at (-1) 0) - inhibitor) * x_inhibit / 100
   + (([inhibitor / 2] of patch-at 0 1) + ([inhibitor / 2] of patch-at 0 (-1)) - inhibitor) * y_inhibit / 100
]

ask-concurrent patches [ 
  set activator new_activator 
  set inhibitor new_inhibitor ]

ask-concurrent patches [
  
 set hold_activator activator
 set hold_inhibitor inhibitor

 set difference bias + activator - inhibitor + (random (2 * noise)) - noise
 set activator limit 0 100 (activator + activator-rate * difference)
 set inhibitor limit 0 100 (inhibitor + inhibitor-rate * difference)
   
; set patch color based on chosen display mode

  ifelse field_display = "none" 
  [ set pcolor scale-color white hold_activator 0 100 ]
  [ ifelse field_display = "activator"
    [ set pcolor scale-color red hold_activator 0 100 ]
    [ set pcolor scale-color blue hold_inhibitor 0 100 ]
  ]

 set changes changes + abs (activator - hold_activator)
]

set updates changes / (world-width * world-height)
set time time + 1
plot updates

display

end ; GO

to-report limit [lwb upb val] ; limit value to within lower and upper bounds
  ifelse val < lwb [report lwb]
  [ ifelse val > upb [report upb]
    [report val]]
end

to set-random-seed
  random-seed read-from-string user-input "Random seed?"
end

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/Activator-Inhibitor.html
Last updated: 2012-01-30.