Brians Brain

No preview image

1 collaborator

Uri_dolphin3 Uri Wilensky (Author)

Tags

(This model has yet to be categorized with any tags)
Model group CCL | Visible to everyone | Changeable by group members (CCL)
Model was written in NetLogo 4.1RC7 • Viewed 143 times • Downloaded 9 times • Run 0 times
Download the 'Brians 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 an academic publication, we ask that you include these citations for the model itself and for the NetLogo software:

- Wilensky, U. (2002). NetLogo Brians Brain model. http://ccl.northwestern.edu/netlogo/models/BriansBrain. 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 2002 Uri Wilensky. All rights reserved. See http://ccl.northwestern.edu/netlogo/models/BriansBrain for terms of use.

COPYRIGHT NOTICE

Copyright 2002 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 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

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

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 ]
end 

to setup-random
  clear-all
  ask patches
    [ ifelse random-float 1.0 < initial-density
      [ cell-birth ]
      [ cell-death ] ]
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. All rights reserved.
; The full copyright notice is in the Information tab.

There are 6 versions of this model.

Uploaded by When Description Download
Uri Wilensky almost 9 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky almost 9 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky almost 9 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky almost 9 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky almost 9 years ago Model from NetLogo distribution Download this version
Uri Wilensky almost 9 years ago Brians Brain Download this version

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.