Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

A (one dimensional) cellular automaton is a function1 F : Σ → Σ with the property that there is a K > 0 such that F (x)i depends only on the 2K + 1 coordinates xi−K , xi−K+1, . . . , xi−1, xi, xi+1, . . . , xi+K . A periodic point of σ is any x such that σ^p (x) = x for some p ∈ N, and a periodic point of F is any x such that F^q (x) = x for some q ∈ N. Given a cellular automaton F, a point x ∈ Σ is jointly periodic if there are p, q ∈ N such that σ^p (x) = F^q (x) = x, that is, it is a periodic point under both functions.

This project aims to explore the nature of one-dimensional Cellular Automata, in the hope of finding the structure of cellular automata through its periodic points.

2037 views
License: MIT
ubuntu2004
1
from tomato.classes import cell
2
3
4
class Cell(cell.CellTemplate):
5
6
def update(self, state_matrix):
7
self.state_matrix = state_matrix
8
9
if self.value == 0:
10
if self.live_neighbors == 1:
11
self.value = 1
12
13
@property
14
def neighbors(self):
15
return self.moore_neighborhood
16
17
@property
18
def live_neighbors(self):
19
return sum(self.neighbors)
20
21
@staticmethod
22
def display(val):
23
return (255, 255, 255) if val else (0, 0, 0)
24
25
@staticmethod
26
def from_display(val):
27
return 0 if (val == (0, 0, 0)).all() else 1
28
29