Загрузка страницы

Cellular Automata: Rule 30 + Conway’s Game of Life

A 1D cellular automaton, Rule 30 (bottom), being fed as input to a 2D cellular automaton, Conway’s Game of Life (top).

How It Works:

The colors represent a gird of cells (pixels) that are alive (are white pixels) or are dead (non-white pixels, where the color represents how long it's been since that cell has been alive, so when it dies it fades through several colors and then eventually fades to black). The rules for deciding which cells are alive and dead are as follow.

The grid starts off with a single alive cell in the middle of the bottom row with all other cells dead. This bottom row is shifted up and the row below it is created using the following rule: each cell looks at the three cells above it (up and to the left, directly above, and up and to the right) and is set to alive or dead based on the following rules (□ = an alive cell, ■ = a dead cell):
□□□ → ■
□□■ → ■
□■□ → ■
□■■ → □
■□□ → □
■□■ → □
■■□ → □
■■■ → ■

So we can see that if only 1 of the 3 cells above it are alive, the cell is set to alive, or if only the right 2 are alive and the left is dead, it is also set to alive. In all other cases, the cell is set to dead. This set of rules is called Rule 30. The reason for the name 30 is that when these patterns were being studied by Stephen Wolfram, he gave each rule a number based on the sequence of the resulting states for that rule (the states to the right of the arrows as listed above), which in our case is ■■■□□□□■ (the resulting states from top to bottom), which if translated into 1s and 0s is 00011110, which is the binary number for 30. To see what the other possible rules look like, check out: https://mathworld.wolfram.com/ElementaryCellularAutomaton.html

The rows produced by Rule 30 keep getting shifted up until they are copied into the bottom row of the top half of the screen. The rules that the cells follow once they are in the top half of the screen are called Conway's Game of Life (invented by John Conway). The rules are as follows, each cell looks at all 8 of its neighbors (above, below, left, right, and the 4 diagonals) and counts how many of those cells are alive. It then updates its state based on the following:
• If 3 of its neighbors are alive → the cell will be alive in the next step.
• If 2 of its neighbors are alive and the current cell is alive → it will be alive in the next step.
• In all other cases → it will be dead in the next step.

These rules are then applied over and over at each time step.

The code that generated this video:
💻https://github.com/elliotwaite/rule-30-and-game-of-life

Another similar video, "Rule 110 fed into Conway's Game of Life":
📼https://www.youtube.com/watch?v=P2uhhAXd7PI

Join our Discord community:
💬 https://discord.gg/cdQhRgw

Connect with me:
🐦 Twitter - https://twitter.com/elliotwaite
📷 Instagram - https://www.instagram.com/elliotwaite
👱 Facebook - https://www.facebook.com/elliotwaite
💼 LinkedIn - https://www.linkedin.com/in/elliotwaite

🎵 kokoro - i miss you
→ https://soundcloud.com/beatsbykokoro
→ https://www.youtube.com/channel/UCLbuCBun8B_qQYF6_Bboi9A
→ https://open.spotify.com/artist/1uJZwuCV2hXbQDSdJvj198

Видео Cellular Automata: Rule 30 + Conway’s Game of Life канала Elliot Waite
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
20 июня 2019 г. 3:15:30
00:03:26
Яндекс.Метрика