Sandpile

No preview image

1 collaborator

Default-person David Weintrop (Author)

Tags

(This model has yet to be categorized with any tags)
Parent of 1 model: Child of Sandpile
Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.0beta3 • Viewed 475 times • Downloaded 31 times • Run 3 times
Download the 'Sandpile' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


Bak-Tang-Wiesenfeld Sandpile - A model of self-organizing criticality

Bak, P., Tang, C., & Wiesenfeld, K. (1987). Self-organized criticality: An explanation of the 1/f noise. Physical Review Letters, 59(4), 381. doi:10.1103/PhysRevLett.59.381

the Bak_Tang_Wiesenfeld sandpile model is the first discovered example of a dynamical system displaying self-organized criticality

for info go here: http://en.wikipedia.org/wiki/Bak%E2%80%93Tang%E2%80%93Wiesenfeld_sandpile

from self-organizing criticality wikipedia page:

Bak, Tang and Wiesenfeld's 1987 paper linked together these factors: a simple cellular automaton was shown to produce several characteristic features observed in natural complexity (fractal geometry, 1/f noise and power laws) in a way that could be linked to critical-point phenomena. Crucially, however, the paper demonstrated that the complexity observed emerged in a robust manner that did not depend on finely tuned details of the system: variable parameters in the model could be changed widely without affecting the emergence of critical behaviour (hence, self-organized criticality). Thus, the key result of BTW's paper was its discovery of a mechanism by which the emergence of complexity from simple local interactions could be spontaneous _ and therefore plausible as a source of natural complexity _ rather than something that was only possible in the lab (or lab computer) where it was possible to tune control parameters to precise values. The publication of this research sparked considerable interest from both theoreticians and experimentalists, and important papers on the subject are among the most cited papers in the scientific literature.

around 18,750 it wraps

around 23,000 (i think it is 23160 to be exact) the system can no longer find its critical point (due to world wrapping)

## WHAT IS IT?

This program is an example of a two-dimensional cellular automaton. This particular cellular automaton is called The Game of Life.

A cellular automaton is a computational machine that performs actions based on certain rules. It can be thought of as a board which is divided into cells (such as square cells of a checkerboard). Each cell can be either "alive" or "dead." This is called the "state" of the cell. According to specified rules, each cell will be alive or dead at the next time step.

## HOW IT WORKS

The rules of the game are as follows. Each cell checks the state of itself and its eight surrounding neighbors and then sets itself to either alive or dead. If there are less than two alive neighbors, then the cell dies. If there are more than three alive neighbors, the cell dies. If there are 2 alive neighbors, the cell remains in the state it is in. If there are exactly three alive neighbors, the cell becomes alive. This is done in parallel and continues forever.

There are certain recurring shapes in Life, for example, the "glider" and the "blinker". The glider is composed of 5 cells which form a small arrow-headed shape, like this:

O

O

OOO

This glider will wiggle across the world, retaining its shape. A blinker is a block of three cells (either up and down or left and right) that rotates between horizontal and vertical orientations.

## HOW TO USE IT

The INITIAL-DENSITY slider determines the initial density of cells that are alive. SETUP-RANDOM places these cells. GO-FOREVER runs the rule forever. GO-ONCE runs the rule once.

If you want to draw your own pattern, use the DRAW-CELLS button and then use the mouse to "draw" and "erase" in the view.

## THINGS TO NOTICE

Find some objects that are alive, but motionless.

Is there a "critical density" - one at which all change and motion stops/eternal motion begins?

## THINGS TO TRY

Are there any recurring shapes other than gliders and blinkers?

Build some objects that don't die (using DRAW-CELLS)

How much life can the board hold and still remain motionless and unchanging? (use DRAW-CELLS)

The glider gun is a large conglomeration of cells that repeatedly spits out gliders. Find a "glider gun" (very, very difficult!).

## EXTENDING THE MODEL

Give some different rules to life and see what happens.

Experiment with using neighbors4 instead of neighbors (see below).

## NETLOGO FEATURES

The neighbors primitive returns the agentset of the patches to the north, south, east, west, northeast, northwest, southeast, and southwest. So `count neighbors with [living?]` counts how many of those eight patches have the `living?` patch variable set to true.

`neighbors4` is like `neighbors` but only uses the patches to the north, south, east, and west. Some cellular automata, like this one, are defined using the 8-neighbors rule, others the 4-neighbors.

## RELATED MODELS

Life Turtle-Based --- same as this, but implemented using turtles instead of patches, for a more attractive display

CA 1D Elementary --- a model that shows all 256 possible simple 1D cellular automata

CA 1D Totalistic --- a model that shows all 2,187 possible 1D 3-color totalistic cellular automata

CA 1D Rule 30 --- the basic rule 30 model

CA 1D Rule 30 Turtle --- the basic rule 30 model implemented using turtles

CA 1D Rule 90 --- the basic rule 90 model

CA 1D Rule 110 --- the basic rule 110 model

CA 1D Rule 250 --- the basic rule 250 model

## CREDITS AND REFERENCES

The Game of Life was invented by John Horton Conway.

See also:

Von Neumann, J. and Burks, A. W., Eds, 1966. Theory of Self-Reproducing Automata. University of Illinois Press, Champaign, IL.

"LifeLine: A Quarterly Newsletter for Enthusiasts of John Conway's Game of Life", nos. 1-11, 1971-1973.

Martin Gardner, "Mathematical Games: The fantastic combinations of John Conway's new solitaire game `life',", Scientific American, October, 1970, pp. 120-123.

Martin Gardner, "Mathematical Games: On cellular automata, self-reproduction, the Garden of Eden, and the game `life',", Scientific American, February, 1971, pp. 112-117.

Berlekamp, Conway, and Guy, Winning Ways for your Mathematical Plays, Academic Press: New York, 1982.

William Poundstone, The Recursive Universe, William Morrow: New York, 1985.

## HOW TO CITE

If you mention this model in an academic publication, we ask that you include these citations for the model itself and for the NetLogo software:

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

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

In other publications, please use:

- Copyright 1998 Uri Wilensky. All rights reserved. See http://ccl.northwestern.edu/netlogo/models/Life for terms of use.

## COPYRIGHT NOTICE

Copyright 1998 Uri Wilensky. All rights reserved.

Permission to use, modify or redistribute this model is hereby granted, provided that both of the following requirements are followed:

a) this copyright notice is included.

b) this model will not be redistributed for profit without permission from Uri Wilensky. Contact Uri Wilensky for appropriate licenses for redistribution for profit.

This model was created as part of the project: CONNECTED MATHEMATICS: MAKING SENSE OF COMPLEX PHENOMENA THROUGH BUILDING OBJECT-BASED PARALLEL MODELS (OBPML). The project gratefully acknowledges the support of the National Science Foundation (Applications of Advanced Technologies Program) -- grant numbers RED #9552950 and REC #9632612.

This model was converted to NetLogo as part of the projects: PARTICIPATORY SIMULATIONS: NETWORK-BASED DESIGN FOR SYSTEMS LEARNING IN CLASSROOMS and/or INTEGRATED SIMULATION AND MODELING ENVIRONMENT. The project gratefully acknowledges the support of the National Science Foundation (REPP & ROLE programs) -- grant numbers REC #9814682 and REC-0126227. Converted from StarLogoT to NetLogo, 2001.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

globals [
  threshold
]

patches-own [
  slope         ;; indicates if the slope of the given patch
]

to setup-blank
  clear-all
  set threshold 4
  ask patches [ set slope 0 ]
  ask patches [set pcolor get-color 0]
  reset-ticks
end 

to setup-random
  clear-all
  set threshold 4
  ask patches
    [ set slope random threshold
      set pcolor get-color slope ]
  reset-ticks
end 

to go
  ask patches
    [       
      if (slope >= threshold)
      [ ask neighbors4 [ set slope slope + 1 ] 
        set slope slope - threshold
        ]         
      set pcolor get-color slope
;;        set pcolor item (slope mod threshold) [white red blue black]
      ]
  tick
end 

to add-sand  
  ;;ask patch random-pxcor random-pycor [set slope slope + 1]
  ask patch 0 0 [set slope slope + 1]
end 

to add-sand-random
  ask patch random-pxcor random-pycor [set slope slope + 1]
end 

to-report get-color [curren-slope]
  if curren-slope = 0
  [report color1]
  if curren-slope = 1
  [report color2]
  if curren-slope = 2
  [report color3]
  if curren-slope >= 3
  [report color4]
end 

to-report sum-slope
  let summer 0
  ask patches [set summer summer + slope]
  report summer
end 

; Copyright 1998 Uri Wilensky. All rights reserved.
; The full copyright notice is in the Info tab.

There is only one version of this model, created over 13 years ago by David Weintrop.

Attached files

No files

This model does not have any ancestors.

Children:

Graph of models related to 'Sandpile'