Sample 1, early in the evolution of a system

Tricolor (cellular automata)

While investigating Conway’s game of life I wanted to see if I could easily extend the framework I’d developed to explore other systems. One of the more interesting cellular automata is the rock-paper-scissors system where three populations feed on each other.

Links

Live page
GitHub repository

Overview

The algorithm used to make the rock-paper-scissors cellular automata is does not seem to be well documented in an easy to obtain source, so I had to interpet much of the algorithm based on subjective descriptions. Each cells has a health which can take a value between \(0\) and \(10\). If a prey species is adjacent to its predator species then the prey species gives a health point to the predator species. When the prey species health reaches \(0\) it is replaced by a predator species. The result is that this creates spiral patterns on the canvas.

Challenges

Challenge: The algorithm needed some experimentation and tweaking to get right.
Solution: There are numerous papers and articles about how these algorithms work, but I couldn’t find a source that was explicit or that I could understand. As a result I had to create my own algorithm and tweak it until it was stable. Hopefully others users can read my code and develop it further. (Resolved)

Sample outputs

Sample 1, early in the evolution of a system
Sample 1, early in the evolution of a system
Sample 2, late in the evolution of a system
Sample 2, late in the evolution of a system

3 thoughts on “Tricolor (cellular automata)”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.