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.

2034 views
License: MIT
ubuntu2004
U

���c�	�@sPddlmZdd�Zedd��Zedd��Zedd	��Zed
d��Zdd
�ZdS)���wrapscs$ddd��t����fdd��}|S)N�-�*)r�cs$td��fdd�|D����|�S)N�csg|]}�|�qS�r)�.0�s)�mappingr�-/home/user/Code/Simple_Cell_Automata/Rules.py�
<listcomp>sz9print_star_dashes.<locals>.print_rule.<locals>.<listcomp>)�print�join��state�r�rulerr�
print_rulesz%print_star_dashes.<locals>.print_ruler)rrrrr�print_star_dashess
rcCs|S)Nrrrrr�repeat_rulesrcCs�g}t|�D]~\}}|dkr8|�|ddkr0dnd�q|t|�dkrd|�|ddkr\dnd�q|�||d||dkr�dnd�q|S)Nrr�����)�	enumerate�append�len�r�	new_state�index�cellrrr�simple_rules(rcCs�ttt|��}g}t|�D]�\}}|dkrJ|�d||||dBA�q|t|�dkrz|�||d||dBA�q|�||d||||dBA�q|S)Nrr)�list�map�intrrrrrrr�rule_30s  (r#cCs�ttt|��}g}ttttttd��dd��d����}t|�D]�\}}|dkrv|�|d||||d�qB|t|�dkr�|�|d||dd||�qB|�|d||dd||||d�qB|S)N�n��rr�)	r r!r"�str�bin�zfillrrr�rrrrrrrr�rule_110,s($(4r,cst�fdd��}|S)Nc	s�ttt|��}g}tttttttt���dd��d������}t|�D]�\}}|dkr~|�|d||||d�qJ|t	|�dkr�|�|d||dd||�qJ|�|d||dd||||d�qJ|S)Nr%r&rrr')
r r!r"�reversedr(r)r*rrrr+��rule_numrr�
apply_ruleCs0$(4z)apply_elementary_rule.<locals>.apply_rule)r)r/r0rr.r�apply_elementary_ruleAsr1N)�	functoolsrrrrr#r,r1rrrr�<module>s