Tiling in Golly 1: Pentagonal (and HexStar & PentHex) Tiling
Posted: June 12th, 2013, 2:20 am
This set of postings is about 1) CAs that run on various alternative grids and 2) how to emulate those CAs in Golly using the square grid. I'll focus on rules which are lifelike (two state, semi-totalistic, and don't use B0).
If you want to skip all the text below, here's what you want to download:
================================================================
Open this link:
https://drive.google.com/folderview?id= ... sp=sharing
Select "For Golly 2.4" or "For Golly 2.5", and then download ""Tiling Project Parts 1 & 2"
================================================================
As a starting point, I took a look at the 22 uniform or dual-uniform tilings listed here:
http://en.wikipedia.org/wiki/List_of_co ... rm_tilings
and the 14 pentagonal tilings enumerated here:
http://www.mathpuzzle.com/tilepent.html
First, a quick comment about two other programs:
Tiled CA (viewtopic.php?f=11&t=1025) and Ready (viewtopic.php?f=11&t=1004).
I haven't had nearly as much chance as I'd like to use Tiled CA, as it uses Windows (and I usually don't) but I'm hoping that TiledCA can handle many or even all of the tilings listed in the links above. As for Ready, I would greatly appreciate a tutorial on how to change Ready's underlying grid to the tilings listed above. Even if both programs can implement the tilings, I wanted to create Golly implementations because I wanted to take advantage of Golly's editing features, its infinite plane, its speed, and its user base. However, that's not to discount either program: aside from any intrinsic advantages either program offers, below I'll talk about why TiledCA or Ready could be very helpful when creating new tiling rules for Golly.
In the Tiling Project download, you'll find a folder for rules and icons, a folder for scripts to generate more rules, a collection of patterns, and most importantly, a folder for neighborhoods which show how a particular tiling has a topological equivalent on the square grid, or on the hexagonal grid, using the familiar trick of ignoring the square grid's northwest and southeast neighbors.
Each neighborhood shows eight square cells arranged around a central square cell. For most neighborhoods, the square cells are split into non-square tiles. Each central tile is marked with a large rectangle, and each of its designated neighbors is marked with a single pixel. It may be easiest to view the neighborhoods using a black background.
The rules can be categorized two ways: by the number of states required to emulate a two state rule, and by whether they use alternating types of square cells.
Number of states: Each script's name notes the number of states it takes to emulate its neighborhood. The number of states needed turned out to be the major issue for this project. For each tiling, I first used my own program to generate the CAs, and since my program uses transition functions very similar to those used with Golly's make-ruletree script, it was easiest for me to use Golly's ruletree approach, and create scripts which are similar to Andrew's TriLife-gen.py script distributed with Golly. The python version of Golly's make-ruletree code is rather slow to create ruletrees which use more than 5 states, and is painfully slow to create ruletrees that use more than 8 states. On my mac (with a 2.4 GHz i5 processor), ruletree files with 8 states take roughly 15 minutes to generate, ruletrees with 9 states take roughly 30 minutes, and so on.
(Late in the project, I realized that the C++ version of make-ruletree is much faster -- a 16 state rule, which would be completely out of reach with python, takes only around 4 hours, and even a 19 state rule takes roughly 24 hours, which is my limit for this sort of thing! More practically, 10 state rules take roughly 6 minutes.)
This is where TiledCA, Ready, and perhaps other programs can help. Many of the tilings in the following comments (particularly in Part 2) require a large number of states, and so it is too time-consuming to search for interesting rules. TiledCA, Ready, and my own program (which isn't ready for other users yet) are each limited to a small torus and relatively slow speeds, but they have the benefit of being able to switch to a new rule instantly once a tiling's rule family is specified. I'm hoping that TiledCA and Ready can be used to scout out interesting rules, and then the scripts I'm providing here can help create a Golly version if desired.
Alternating vs Non-Alternating: The need to keep the number of states low in Golly meant that many of the tilings use alternating types of cells, usually with a checkerboard pattern. Alternating types of cells means you can't just scribble a pattern, and you can't use Golly's built-in random-fill operation on a selection. There are work-arounds I discuss below, but regardless, rules with alternating cells are more of a pain to work with in Golly, so I divided the Patterns folder into Alternating and Non-Alternating rules.
Lets get into the particulars below with Cairo Pentagonal Tiling, a tiling which is at the intersection of both tiling lists.
If you want to skip all the text below, here's what you want to download:
================================================================
Open this link:
https://drive.google.com/folderview?id= ... sp=sharing
Select "For Golly 2.4" or "For Golly 2.5", and then download ""Tiling Project Parts 1 & 2"
================================================================
As a starting point, I took a look at the 22 uniform or dual-uniform tilings listed here:
http://en.wikipedia.org/wiki/List_of_co ... rm_tilings
and the 14 pentagonal tilings enumerated here:
http://www.mathpuzzle.com/tilepent.html
First, a quick comment about two other programs:
Tiled CA (viewtopic.php?f=11&t=1025) and Ready (viewtopic.php?f=11&t=1004).
I haven't had nearly as much chance as I'd like to use Tiled CA, as it uses Windows (and I usually don't) but I'm hoping that TiledCA can handle many or even all of the tilings listed in the links above. As for Ready, I would greatly appreciate a tutorial on how to change Ready's underlying grid to the tilings listed above. Even if both programs can implement the tilings, I wanted to create Golly implementations because I wanted to take advantage of Golly's editing features, its infinite plane, its speed, and its user base. However, that's not to discount either program: aside from any intrinsic advantages either program offers, below I'll talk about why TiledCA or Ready could be very helpful when creating new tiling rules for Golly.
In the Tiling Project download, you'll find a folder for rules and icons, a folder for scripts to generate more rules, a collection of patterns, and most importantly, a folder for neighborhoods which show how a particular tiling has a topological equivalent on the square grid, or on the hexagonal grid, using the familiar trick of ignoring the square grid's northwest and southeast neighbors.
Each neighborhood shows eight square cells arranged around a central square cell. For most neighborhoods, the square cells are split into non-square tiles. Each central tile is marked with a large rectangle, and each of its designated neighbors is marked with a single pixel. It may be easiest to view the neighborhoods using a black background.
The rules can be categorized two ways: by the number of states required to emulate a two state rule, and by whether they use alternating types of square cells.
Number of states: Each script's name notes the number of states it takes to emulate its neighborhood. The number of states needed turned out to be the major issue for this project. For each tiling, I first used my own program to generate the CAs, and since my program uses transition functions very similar to those used with Golly's make-ruletree script, it was easiest for me to use Golly's ruletree approach, and create scripts which are similar to Andrew's TriLife-gen.py script distributed with Golly. The python version of Golly's make-ruletree code is rather slow to create ruletrees which use more than 5 states, and is painfully slow to create ruletrees that use more than 8 states. On my mac (with a 2.4 GHz i5 processor), ruletree files with 8 states take roughly 15 minutes to generate, ruletrees with 9 states take roughly 30 minutes, and so on.
(Late in the project, I realized that the C++ version of make-ruletree is much faster -- a 16 state rule, which would be completely out of reach with python, takes only around 4 hours, and even a 19 state rule takes roughly 24 hours, which is my limit for this sort of thing! More practically, 10 state rules take roughly 6 minutes.)
This is where TiledCA, Ready, and perhaps other programs can help. Many of the tilings in the following comments (particularly in Part 2) require a large number of states, and so it is too time-consuming to search for interesting rules. TiledCA, Ready, and my own program (which isn't ready for other users yet) are each limited to a small torus and relatively slow speeds, but they have the benefit of being able to switch to a new rule instantly once a tiling's rule family is specified. I'm hoping that TiledCA and Ready can be used to scout out interesting rules, and then the scripts I'm providing here can help create a Golly version if desired.
Alternating vs Non-Alternating: The need to keep the number of states low in Golly meant that many of the tilings use alternating types of cells, usually with a checkerboard pattern. Alternating types of cells means you can't just scribble a pattern, and you can't use Golly's built-in random-fill operation on a selection. There are work-arounds I discuss below, but regardless, rules with alternating cells are more of a pain to work with in Golly, so I divided the Patterns folder into Alternating and Non-Alternating rules.
Lets get into the particulars below with Cairo Pentagonal Tiling, a tiling which is at the intersection of both tiling lists.