Log In  

This is a Cellular Automaton implemented by Pico-8.

Each cell has 3 states, empty, blue or red, is encoded as 0,1,2.
Everything with three states can be simply simulated by this simulator.

You can think of it as the three states of a tree, dead, normal, or burning.
Of course,it can also be interpreted as human death, healthy or illness.

The probability of each cell state transition is related to the state of surrounding cells. The more surrounding red cells, the higher the probability that the cells will turn red. The more blue cells around you, the higher the chance that the cell will turn blue.

press x to change a cell from state 1 to 2, or press z to change a cell from state 2 to 1.

The state transition probabilities are written in the function _init(), Where p01 represents the probability of transition from state 0 to state 1.
You can try to modify it and observe the evolution results.

Each time _update () is executed, it will perform state transition on each cell according to the transition probability.
Since _update() runs thirty times per second, so the state transition probability per second is approximately equal to 30*p.

This is my first pico-8 project, thank you for your attention.

Cart #celluar_automata-4 | 2020-03-16 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#73968 2020-03-16 02:52 ( Edited 2020-03-18 02:32)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-02-06 16:25:25 | 0.005s | Q:11