How to resolve the algorithm Elementary cellular automaton/Infinite length step by step in the Phix programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Elementary cellular automaton/Infinite length step by step in the Phix programming language

Table of Contents

Problem Statement

The purpose of this task is to create a version of an Elementary cellular automaton whose number of cells is only limited by the memory size of the computer. To be precise, consider the state of the automaton to be made of an infinite number of cells, but with a bounded support. In other words, to describe the state of the automaton, you need a finite number of adjacent cells, along with their individual state, and you then consider that the individual state of each of all other cells is the negation of the closest individual cell among the previously defined finite number of cells. Examples: More complex methods can be imagined, provided it is possible to somehow encode the infinite sections. But for this task we will stick to this simple version.

Let's start with the solution: