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.
License: MIT
ubuntu2004
U ���c� � @ sP d dl mZ dd� Zedd� �Zedd� �Zedd � �Zed d� �Zdd � ZdS )� ��wrapsc s$ ddd�� t ��� �fdd��}|S )N�-�*)r � c s$ t d�� fdd�| D ��� �| �S )N� c s g | ]}� | �qS � r )�.0�s)�mappingr �-/home/user/Code/Simple_Cell_Automata/Rules.py� <listcomp> s z9print_star_dashes.<locals>.print_rule.<locals>.<listcomp>)�print�join��state�r �ruler r � print_rule s z%print_star_dashes.<locals>.print_ruler )r r r r r �print_star_dashes s r c C s | S )Nr r r r r �repeat_rule s r c C s� g }t | �D ]~\}}|dkr8|�| d dkr0dnd� q|t| �d krd|�| d dkr\dnd� q|�| |d | |d kr�dnd� q|S )Nr r �����)� enumerate�append�len�r � new_state�index�cellr r r �simple_rule s (r c C s� t tt| ��} g }t| �D ]�\}}|dkrJ|�d| | | |d B A � q|t| �d krz|�| |d | | dB A � q|�| |d | | | |d B A � q|S )Nr r )�list�map�intr r r r r r r �rule_30 s (r# c C s� t tt| ��} g }t ttt ttd��dd � �d����}t| �D ]�\}}|dkrv|�|d| | | |d � qB|t| �d kr�|�|d| |d d| | � qB|�|d| |d d| | | |d � qB|S )N�n � � r r � ) r r! r"