Brian's Brain

Brian's Brain preview image

1 collaborator

Uri_dolphin3 Uri Wilensky (Author)

Tags

ccl 

Tagged by Modeling Commons System almost 13 years ago

cellular automata 

Tagged by Reuven M. Lerner over 11 years ago

computer science 

Tagged by Reuven M. Lerner over 11 years ago

Model group CCL | Visible to everyone | Changeable by group members (CCL)
Model was written in NetLogo 5.0.4 • Viewed 988 times • Downloaded 62 times • Run 0 times
Download the 'Brian's Brain' modelDownload this modelEmbed this model

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


WHAT IS IT?

This program is an example of a two-dimensional cellular automaton. If you are not already familiar with 2D CA, see the model "Life" for a basic discussion.

Typical CAs use two cell states (live and dead), but Brian's Brian uses three: firing (white), refractory (red), and dead (black).

This CA is especially interesting to watch because it has many configurations that move steadily across the grid (as opposed to Life, which has only relatively few such configurations).

HOW IT WORKS

Firing (white) cells always become refractory (red) at the next time step.

Refractory (red) cells always die (turn black) at the next time step.

A new firing (white) cell is born in any black cell that has exactly two firing (white) neighbors (of its eight surrounding cells).

HOW TO USE IT

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

If you want to draw an initial pattern yourself, or alter the pattern in the middle of a run, turn on the DRAW WHITE CELLS or DRAW RED CELLS button, then "draw" and "erase" with the mouse in the view.

THINGS TO NOTICE

Lots of patterns stay stable and move steadily across the grid. Such patterns are often referred to as "gliders". How many different types of gliders do you see? Why does this happen? How do the rules of the CA result in this behavior?

THINGS TO TRY

Are there any stable shapes that don't move?

Are there any "glider guns" (objects that emit a steady stream of gliders)?

On a small enough grid, usually the CA reaches a steady state where there may be movement but nothing new happens. In Brian's Brain, a square grid usually reaches a steady state more quickly than a rectangular grid (try it!). Why?

EXTENDING THE MODEL

Many other interesting 3-state 2D automata exist. Experiment with variations on the rules in this model.

RELATED MODELS

See all of the other models in the Cellular Automata subsection of the Computer Science section of the NetLogo Models Library.

CREDITS AND REFERENCES

Brian's Brain was invented by Brian Silverman.

HOW TO CITE

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

  • Wilensky, U. (2002). NetLogo Brian's Brain model. http://ccl.northwestern.edu/netlogo/models/Brian'sBrain. Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, Northwestern University, Evanston, IL.
  • Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, Northwestern University, Evanston, IL.

COPYRIGHT AND LICENSE

Copyright 2002 Uri Wilensky.

CC BY-NC-SA 3.0

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.

This model was created 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.

Comments and Questions

Click to Run Model

patches-own [
  firing?           ;; white cells
  refractory?       ;; red cells
  firing-neighbors  ;; counts how many neighboring cells are firing
]

to setup-blank
  clear-all
  ask patches
    [ cell-death ]
  reset-ticks
end 

to setup-random
  clear-all
  ask patches
    [ ifelse random-float 1.0 < initial-density
      [ cell-birth ]
      [ cell-death ] ]
  reset-ticks
end 

to cell-birth  ;; patch procedure
  set firing? true
  set refractory? false
  set pcolor white
end 

to cell-aging  ;; patch procedure
  set firing? false
  set refractory? true
  set pcolor red
end 

to cell-death  ;; patch procedure
  set firing? false
  set refractory? false
  set pcolor black
end 

to go
  ask patches
    [ set firing-neighbors count neighbors with [firing?] ]
  ;; Starting a new "ask patches" here ensures that all the patches
  ;; finish executing the first ask before any of them start executing
  ;; the second ask.  This keeps all the patches in sync with each other,
  ;; so the births and deaths at each generation all happen in lockstep.
  ask patches
    [ ifelse firing?
      [ cell-aging ]
      [ ifelse refractory?
        [ cell-death ]
        [ if firing-neighbors = 2
          [ cell-birth ] ] ] ]
  tick
end 

to draw-cells [target-color]
  let erasing? target-color = [pcolor] of patch mouse-xcor mouse-ycor
  while [mouse-down?]
    [ ask patch mouse-xcor mouse-ycor
      [ ifelse erasing?
        [ cell-death ]
        [ ifelse target-color = white
          [ cell-birth ]
          [ cell-aging ] ] ]
      display ]
end 


; Copyright 2002 Uri Wilensky.
; See Info tab for full copyright and license.

There are 4 versions of this model.

Uploaded by When Description Download
Uri Wilensky over 11 years ago Updated to NetLogo 5.0.4 Download this version
Uri Wilensky about 12 years ago Updated version tag Download this version
Uri Wilensky about 12 years ago Updated to version from NetLogo 5.0.3 distribution Download this version
Uri Wilensky almost 13 years ago Updated from NetLogo 5.0 Download this version

Attached files

File Type Description Last updated
Brian's Brain.png preview Preview for 'Brian's Brain' over 11 years ago, by Uri Wilensky Download

This model does not have any ancestors.

This model does not have any descendants.