This-is-awesome!
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This CA has elements that are in three distinct states. Patches can either be turned on, off or toasted. Toasted cells do not change into on or off anymore - they remain toasted for the duration of the model.
The user can start multiple cells to gather random CA behavior. Each cell is unique in its form. To test this, just lay down two "seeds" in two sides of the screen before hitting the Action button, and observe the difference.
PS. The visualization looks way cooler when time is slowed down.
Comments and Questions
globals [ #-of-toasted-cells ] patches-own [ alive ;; indicates that the cell is turned on toast ;; indicates that the cell has burned out. it can no longer affect others. on-neighbors ;; counts how many cells around the original cell is alive ] to setup clear-all ask patches [ turn-off ] set #-of-toasted-cells 0 end to turn-on set alive true set pcolor orange + 1 end to turn-off set alive false set pcolor white end to toast-a-cell set toast true set alive false set pcolor gray end ;; ask the user to start the sequence by laying down a turned on cell to draw-cells let erasing? [alive] of patch mouse-xcor mouse-ycor while [mouse-down?] [ ask patch mouse-xcor mouse-ycor [ ifelse erasing? [ turn-off ] [ turn-on ] ] display ] end to go ;; the following ensures continous growth until target is reached ask patches with [ alive = true ] [ set on-neighbors count neighbors with [alive] ask one-of neighbors [ turn-on ] ] ;; ask patches with [ alive = true ] [ ifelse on-neighbors <= 4 [ turn-on ] [ if on-neighbors > 4 [ turn-off ] ] if on-neighbors = 8 [ toast-a-cell set #-of-toasted-cells #-of-toasted-cells + 1 ] ] ;; the following makes sure that the toasted cells never get turned on again ask patches with [ toast = true ] [ toast-a-cell ] if #-of-toasted-cells > end-number [ stop ] tick end
There is only one version of this model, created about 14 years ago by Mert Iseri.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.