A Notation for 3-State INT Rules (and a script to turn them into rulefiles)

For discussion of other cellular automata.
Post Reply
Cyclotrons
Posts: 132
Joined: January 26th, 2021, 12:19 am

A Notation for 3-State INT Rules (and a script to turn them into rulefiles)

Post by Cyclotrons »

Go to the 3rd post for a working notation and script!

I couldn't find a well-described way of notating 3-State Isotropic Not-Totalistic rules, so I made one myself.

---------------------------------------------------------------------

Transitions:

I lifted the notation describing transitions from here. To go over it:
BA... - conditions in which state a is born
BB... - conditions in which state b is born
TA... - conditions in which state a becomes state b
TB... - conditions in which state b becomes state a
SA... - conditions in which state a remains unchanged
SB... - conditions in which state b remains unchanged

BA and BB, TA and SA, and TB and SB can not have the same neighborhood configuration listed in both one and the other, as they contradict each other.
For all combinations of starting state and neighborhoods not specified in a rulestring, the cell will become state 0.
In the rulestring, they are listed as BA/BB/TA/TB/SA/SB.

---------------------------------------------------------------------

Neighborhood Configurations:

Neighborhood configurations are notated as such for a given neighborhood:

ns(ab)

Where n is the total number of live cells in a configuration, s is the hensel notation for the shape of the live cells (as in not distinguishing between the two live states) with the number excluded (the number for the shape is n), a is the hensel notation for the shape of the cells of state a (with the number included), and b is the hensel notation for the shape of the cells of state b (also with the number included).

In this, a and b can not have overlap and, when taken together, must have the shape of ns.

Take this example neighborhood
GFJ4UDB.png
GFJ4UDB.png (530 Bytes) Viewed 2021 times
where blue is state a, red is state b, and the dull yellow is the dead state.
In this notation, this neighborhood configuration is written as 2k(1e1c).

From here on out, I will be referring to the stuff in the parentheses as subconfigurations.

For any subconfigurations that map to the same configuration, they are listed consecutively after their respective configuration letter.
like this: s(ab)(ab)(ab)...

For configurations with the same number of live cells, they and their subconfigurations are listed consecutively after their respective number.
like this: ns(ab)s(ab)s(ab)...

If no subconfiguration is included after a configuration letter, it means that every subconfiguration for that configuration is included.

The same goes for number; if no configuration letter is listed after the number (or subconfiguration in the case of 8, as 8 no configuration letter in hensel notation), it means that every configuration for that number and every subconfiguration for each of those configurations are included.

---------------------------------------------------------------------

Edge Cases:
There are some complicating factors that need to be addressed.

Their are four combinations of configuration and subconfiguration that refer to two neighborhood configurations instead of one. In these cases, brackets containing either a 1 or a 2 are to be placed after the relevant subconfiguration.

Images of these neighborhood configurations, along with how they are notated:
49wmTYQ.png
49wmTYQ.png (601 Bytes) Viewed 2021 times
Top: 5q(3q2e)[1]
Bottom: 5q(3q2e)[2]
6i6iKzo.png
6i6iKzo.png (607 Bytes) Viewed 2021 times
Top: 5r(3r2c)[1]
Bottom: 5r(3r2c)[2]
GZw78s8.png
GZw78s8.png (605 Bytes) Viewed 2021 times
Top: 6k(4k2k)[1]
Bottom: 6k(4k2k)[2]
hxtbJmi.png
hxtbJmi.png (606 Bytes) Viewed 2021 times
Top: 6a(4a2a)[1]
Bottom: 6a(4a2a)[2]

There are also four combinations of configuration and subconfiguration in which a and b are identical, but you can't get the inverse of a neighborhood configuration (inverse meaning states a and b are switched) by any combination of rotation and reflection. To make it possible to distinguish between a neighborhood configuration and its inverse, a $ is to be placed after the appropriate configuration within the subconfiguration.

Images of these neighborhood configurations, along with how they are notated. Note that, for this set of images, the bottom neighborhood configuration is the inverse of the top:
7bGiaTq.png
7bGiaTq.png (570 Bytes) Viewed 2021 times
Top: 4k(2k2k$)
Bottom: 4k(2k$2k)
qlrUchx.png
qlrUchx.png (564 Bytes) Viewed 2021 times
Top: 4a(2a2a$)
Bottom: 4a(2a$2a)
Uebftiw.png
Uebftiw.png (556 Bytes) Viewed 2021 times
Top: 6c(3r3r$)
Bottom: 6c(3r$3r)
1Vjdljo.png
1Vjdljo.png (559 Bytes) Viewed 2021 times
Top: 6e(3q3q$)
Bottom: 6e(3q$3q)

---------------------------------------------------------------------

Here is an image of every possible neighborhood configuration (technically half; no inverses are included) in this rulespace, organized for use for this notation:
L1dkaTK.png
L1dkaTK.png (53.99 KiB) Viewed 2021 times
---------------------------------------------------------------------

As promised, I am also including a script for turning a rulestring for this notation into a rulefile:

Code: Select all

import string
import os
import golly

rulestring = golly.getstring("Input rulestring:")
longfilename = ""
for c in rulestring:
    if c != "/":
        longfilename = longfilename + c
    else:
        longfilename = longfilename + "_"
filename = longfilename[:150]
ruleStruct = [[0,["",["","",None,"00000000","00000000"]]],[1,["c",["1c","0",None,"00000001","00000002"]],["e",["1e","0",None,"00000010","00000020"]]],[2,["c",["2c","0",None,"00000101","00000202"],["1c","1c",None,"00000102","00000201"]],["e",["2e","0",None,"00001010","00002020"],["1e","1e",None,"00001020","00002010"]],["k",["2k","0",None,"00001001","00002002"],["1e","1c",None,"00001002","00002001"]],["a",["2a","0",None,"00000011","00000022"],["1e","1c",None,"00000012","00000021"]],["i",["2i","0",None,"00100010","00200020"],["1e","1e",None,"00100020","00200010"]],["n",["2n","0",None,"00010001","00020002"],["1c","1c",None,"00010002","00020001"]]],[3,["c",["3c","0",None,"00010101","00020202"],["2n","1c",None,"00010201","00020102"],["2c","1c",None,"00010102","00020201"]],["e",["3e","0",None,"00101010","00202020"],["2i","1c",None,"00102010","00201020"],["2e","1e",None,"00101020","00202010"]],["k",["3k","0",None,"00101001","00202002"],["2e","1c",None,"00101002","00202001"],["2k","1e",None,"00102001","00201002"]],["a",["3a","0",None,"00001110","00002220"],["2e","1c",None,"00001210","00002120"],["2a","1e",None,"00001120","00002210"]],["i",["3i","0",None,"00000111","00000222"],["2a","1c",None,"00000112","00000221"],["2c","1e",None,"00000121","00000212"]],["n",["3n","0",None,"00001101","00002202"],["2a","1c",None,"00001102","00002201"],["2k","1c",None,"00001201","00002102"],["2c","1e",None,"00002101","00001202"]],["y",["3y","0",None,"00100101","00200202"],["2k","1c",None,"00100102","00200201"],["2c","1e",None,"00200101","00100202"]],["q",["3q","0",None,"00010011","00020022"],["2a","1c",None,"00020011","00010022"],["2k","1c",None,"00010012","00020021"],["2n","1e",None,"00010021","00020012"]],["j",["3j","0",None,"00001011","00002022"],["2e","1c",None,"00001012","00002021"],["2a","1e",None,"00002011","00001022"],["2k","1e",None,"00001021","00002012"]],["r",["3r","0",None,"00100011","00200022"],["2i","1c",None,"00100012","00200021"],["2a","1e",None,"00200011","00100022"],["2k","1e",None,"00100021","00200012"]]],[4,["c",["4c","0",None,"01010101","02020202"],["3c","1c",None,"01010102","02020201"],["2c","2c",None,"01010202","02020101"],["2n","2n",None,"01020102","02010201"]],["e",["4e","0",None,"10101010","20202020"],["3e","1e",None,"10101020","20202010"],["2e","2e",None,"10102020","20201010"],["2i","2i",None,"10201020","20102010"]],["k",["4k","0",None,"00101101","00202202"],["3j","1c",None,"00101102","00202201"],["3k","1c",None,"00101201","00202102"],["3y","1e",None,"00102101","00201202"],["3n","1e",None,"00201101","00102202"],["2e","2c",None,"00101202","00202101"],["2k","2k$",None,"00102102","00201201"],["2k","2a",None,"00102201","00201102"]],["a",["4a","0",None,"00001111","00002222"],["3j","1c",None,"00001211","00002122"],["3a","1c",None,"00001112","00002221"],["3n","1e",None,"00001121","00002212"],["3i","1e",None,"00002111","00001222"],["2e","2c",None,"00001212","00002121"],["2a","2a$",None,"00001122","00002211"],["2k","2a",None,"00001221","00002112"]],["i",["4i","0",None,"00110110","00220220"],["3r","1c",None,"00110210","00220120"],["3n","1e",None,"00110120","00220210"],["2i","2c",None,"00120210","00210120"],["2k","2k",None,"00120120","00210210"],["2a","2a",None,"00110220","00220110"]],["n",["4n","0",None,"00010111","00020222"],["3q","1c",None,"00010211","00020122"],["3n","1c",None,"00010112","00020221"],["3i","1c",None,"00020111","00010222"],["3c","1e",None,"00010121","00020212"],["2k","2c",None,"00010212","00020121"],["2n","2a",None,"00010221","00020112"],["2c","2a",None,"00010122","00020211"]],["y",["4y","0",None,"00110101","00220202"],["3q","1c",None,"00110201","00220102"],["3y","1c",None,"00120101","00210202"],["3n","1c",None,"00110102","00220201"],["3c","1e",None,"00210101","00120202"],["2a","2c",None,"00110202","00220101"],["2k","2c",None,"00120201","00210102"],["2k","2n",None,"00120102","00210201"]],["q",["4q","0",None,"00111001","00222002"],["3a","1c",None,"00111002","00222001"],["3k","1c",None,"00121001","00212002"],["3q","1e",None,"00112001","00221002"],["2a","2k",None,"00112002","00221001"],["2e","2n",None,"00121002","00212001"]],["j",["4j","0",None,"00101011","00202022"],["3e","1c",None,"00101012","00202021"],["3r","1e",None,"00102011","00201022"],["3j","1e",None,"00201011","00102022"],["3k","1e",None,"00101021","00202012"],["2k","2e",None,"00102021","00201012"],["2i","2k",None,"00102012","00201021"],["2e","2a",None,"00101022","00202011"]],["r",["4r","0",None,"00101110","00202220"],["3e","1c",None,"00101210","00202120"],["3r","1e",None,"00102110","00201220"],["3j","1e",None,"00101120","00202210"],["3a","1e",None,"00201110","00102220"],["2k","2e",None,"00102120","00201210"],["2i","2a",None,"00102210","00201120"],["2e","2a",None,"00101220","00202110"]],["t",["4t","0",None,"00100111","00200222"],["3r","1c",None,"00100112","00200221"],["3y","1e",None,"00100121","00200212"],["3i","1e",None,"00200111","00100222"],["2i","2c",None,"00100212","00200121"],["2k","2a",None,"00100122","00200211"]],["w",["4w","0",None,"00011011","00022022"],["3j","1c",None,"00011012","00022021"],["3q","1e",None,"00011021","00022012"],["2n","2e",None,"00012021","00021012"],["2k","2k",None,"00012012","00021021"],["2a","2a",None,"00011022","00022011"]],["z",["4z","0",None,"00110011","00220022"],["3r","1c",None,"00110012","00220021"],["3q","1e",None,"00110021","00220012"],["2k","2k",None,"00120021","00210012"],["2a","2a",None,"00110022","00220011"],["2i","2n",None,"00120012","00210021"]]],[5,["c",["5c","0",None,"10101011","20202022"],["4e","1c",None,"10101012","20202021"],["4r","1e",None,"10102011","20201022"],["4j","1e",None,"10101021","20202012"],["3j","2e",None,"10102021","20201012"],["3a","2e",None,"10202011","20101022"],["3k","2e",None,"20101021","10202012"],["3e","2k",None,"10102012","20201021"],["3e","2a",None,"10101022","20202011"],["3r","2i",None,"10201021","20102012"]],["e",["5e","0",None,"01010111","02020222"],["4y","1c",None,"01010112","02020221"],["4n","1c",None,"02010111","01020222"],["4c","1e",None,"01010121","02020212"],["3y","2c",None,"01010212","02020121"],["3n","2c",None,"02010112","01020221"],["3i","2c",None,"02020111","01010222"],["3c","2k",None,"02010121","01020212"],["3c","2a",None,"01010122","02020211"],["3q","2n",None,"01020112","02010221"]],["k",["5k","0",None,"01011011","02022022"],["4w","1c",None,"02011011","01022022"],["4k","1c",None,"01011012","02022021"],["4y","1e",None,"01011021","02022012"],["3j","2c",None,"02021011","01012022"],["3c","2e",None,"01012021","02021012"],["3q","2k",None,"02012011","01021022"],["3y","2k",None,"01012012","02021021"],["3n","2a",None,"01011022","02022011"],["3k","2n",None,"01021012","02012021"]],["a",["5a","0",None,"00011111","00022222"],["4w","1c",None,"00011211","00022122"],["4a","1c",None,"00011112","00022221"],["4n","1e",None,"00011121","00022212"],["3j","2c",None,"00011212","00022121"],["3c","2e",None,"00012121","00021212"],["3n","2k",None,"00012112","00021221"],["3q","2a",None,"00011221","00022112"],["3i","2a",None,"00011122","00022211"],["3a","2n",None,"00021112","00012221"]],["i",["5i","0",None,"00111110","00222220"],["4r","1c",None,"00111210","00222120"],["4i","1e",None,"00112110","00221220"],["4a","1e",None,"00111120","00222210"],["3e","2c",None,"00121210","00212120"],["3n","2e",None,"00112120","00221210"],["3j","2k",None,"00121120","00212210"],["3r","2a",None,"00112210","00221120"],["3a","2a",None,"00111220","00222110"],["3i","2i",None,"00211120","00122210"]],["n",["5n","0",None,"00101111","00202222"],["4r","1c",None,"00101112","00202221"],["4j","1c",None,"00101211","00202122"],["4t","1e",None,"00102111","00201222"],["4a","1e",None,"00201111","00102222"],["4k","1e",None,"00101121","00202212"],["3e","2c",None,"00101212","00202121"],["3y","2e",None,"00102121","00201212"],["3i","2e",None,"00202111","00101222"],["3r","2k",None,"00102112","00201221"],["3j","2k",None,"00201211","00102122"],["3a","2k",None,"00201112","00102221"],["3r","2a",None,"00102211","00201122"],["3j","2a",None,"00101122","00202211"],["3k","2a",None,"00101221","00202112"],["3n","2i",None,"00201121","00102212"]],["y",["5y","0",None,"01101011","02202022"],["4j","1c",None,"01101012","02202021"],["4i","1e",None,"01102011","02201022"],["4k","1e",None,"01101021","02202012"],["3e","2c",None,"02101012","01202021"],["3n","2e",None,"01102021","02201012"],["3r","2k",None,"01102012","02201021"],["3k","2k",None,"01201012","02102021"],["3j","2a",None,"01101022","02202011"],["3y","2i",None,"01201021","02102012"]],["q",["5q","0",None,"00111011","00222022"],["4r","1c",None,"00111012","00222021"],["4j","1c",None,"00121011","00212022"],["4z","1e",None,"00112011","00221022"],["4w","1e",None,"00211011","00122022"],["4q","1e",None,"00111021","00222012"],["3q","2e",1,"00112021","00221012"],["3q","2e",2,"00212011","00121022"],["3r","2k",None,"00112012","00221021"],["3j","2k",None,"00211012","00122021"],["3k","2k",None,"00121021","00212012"],["3r","2a",None,"00122011","00211022"],["3j","2a",None,"00221011","00112022"],["3a","2a",None,"00111022","00222011"],["3q","2i",None,"00211021","00122012"],["3e","2n",None,"00121012","00212021"]],["j",["5j","0",None,"00111101","00222202"],["4q","1c",None,"00111201","00222102"],["4a","1c",None,"00111102","00222201"],["4k","1c",None,"00121101","00212202"],["4y","1e",None,"00112101","00221202"],["4n","1e",None,"00211101","00122202"],["3a","2c",None,"00111202","00222101"],["3k","2c",None,"00121201","00212102"],["3c","2e",None,"00212101","00121202"],["3q","2k",None,"00211201","00122102"],["3n","2k",None,"00112102","00221201"],["3i","2k",None,"00211102","00122201"],["3q","2a",None,"00112201","00221102"],["3y","2a",None,"00122101","00211202"],["3n","2a",None,"00221101","00112202"],["3j","2n",None,"00121102","00212201"]],["r",["5r","0",None,"00110111","00220222"],["4z","1c",None,"00110211","00220122"],["4t","1c",None,"00120111","00210222"],["4i","1c",None,"00110112","00220221"],["4y","1e",None,"00110121","00220212"],["4n","1e",None,"00210111","00120222"],["3r","2c",1,"00110212","00220121"],["3r","2c",2,"00120211","00210122"],["3q","2k",None,"00210211","00120122"],["3y","2k",None,"00120121","00210212"],["3n","2k",None,"00210112","00120221"],["3q","2a",None,"00110221","00220112"],["3n","2a",None,"00110122","00220211"],["3i","2a",None,"00220111","00110222"],["3c","2i",None,"00210121","00120212"],["3r","2n",None,"00120112","00210221"]]],[6,["c",["6c","0",None,"10101111","20202222"],["5c","1c",None,"10101112","20202221"],["5y","1e",None,"10101121","20202212"],["5n","1e",None,"10102111","20201222"],["5i","1e",None,"10201111","20102222"],["4e","2c",None,"10101212","20202121"],["4a","2e",None,"20201111","10102222"],["4k","2e",None,"10102121","20201212"],["4r","2k",None,"10201112","20102221"],["4j","2k",None,"10102112","20201221"],["4r","2a",None,"10102211","20201122"],["4j","2a",None,"10101122","20202211"],["4t","2i",None,"20102111","10201222"],["4i","2i",None,"10201121","20102212"],["3j","3a",None,"10102221","20201112"],["3e","3i",None,"10101222","20202111"],["3e","3n",None,"10102212","20201121"],["3e","3y",None,"10201212","20102121"],["3k","3j",None,"10102122","20201211"],["3r","3r$",None,"10201122","20102211"]],["e",["6e","0",None,"01011111","02022222"],["5j","1c",None,"01011112","02022221"],["5a","1c",None,"02011111","01022222"],["5k","1c",None,"01011211","02022122"],["5e","1e",None,"01011121","02022212"],["4a","2c",None,"02021111","01012222"],["4k","2c",None,"01011212","02022121"],["4c","2e",None,"01012121","02021212"],["4y","2k",None,"01012112","02021221"],["4n","2k",None,"02012111","01021222"],["4y","2a",None,"01011221","02022112"],["4n","2a",None,"01011122","02022211"],["4w","2n",None,"02011211","01022122"],["4q","2n",None,"01021112","02012221"],["3k","3c",None,"01021212","02012121"],["3c","3a",None,"01012221","02021112"],["3n","3i",None,"01011222","02022111"],["3y","3n",None,"01012212","02021121"],["3q","3q$",None,"01021122","02012211"],["3c","3j",None,"01012122","02021211"]],["k",["6k","0",None,"01101111","02202222"],["5q","1c",None,"01101112","02202221"],["5y","1c",None,"01101211","02202122"],["5n","1c",None,"02101111","01202222"],["5r","1e",None,"01102111","02201222"],["5j","1e",None,"01201111","02102222"],["5k","1e",None,"01101121","02202212"],["4r","2c",None,"02101112","01202221"],["4j","2c",None,"01101212","02202121"],["4y","2e",None,"01102121","02201212"],["4n","2e",None,"01202111","02101222"],["4z","2k",None,"01102112","02201221"],["4t","2k",None,"02102111","01201222"],["4q","2k",None,"01201112","02102221"],["4k","2k",1,"01201211","02102122"],["4k","2k",2,"02101121","01202212"],["4w","2a",None,"01101122","02202211"],["4i","2a",None,"01102211","02201122"],["4a","2a",None,"02201111","01102222"],["4k","2a",None,"01101221","02202112"],["4y","2i",None,"01201121","02102212"],["4j","2n",None,"02101211","01202122"],["3c","3e",None,"01202121","02101212"],["3q","3k",None,"01202112","02101221"],["3n","3a",None,"01102221","02201112"],["3j","3i",None,"01101222","02202111"],["3r","3n",None,"01102212","02201121"],["3k","3y",None,"01201212","02102121"],["3r","3q",None,"02102211","01201122"],["3q","3j",None,"01102122","02201211"],["3n","3j",None,"01202211","02101122"],["3y","3r",None,"01201221","02102112"]],["a",["6a","0",None,"00111111","00222222"],["5q","1c",None,"00111211","00222122"],["5n","1c",None,"00121111","00212222"],["5i","1c",None,"00111112","00222221"],["5r","1e",None,"00112111","00221222"],["5j","1e",None,"00111121","00222212"],["5a","1e",None,"00211111","00122222"],["4r","2c",None,"00111212","00222121"],["4j","2c",None,"00121211","00212122"],["4y","2e",None,"00112121","00221212"],["4n","2e",None,"00212111","00121222"],["4w","2k",None,"00211211","00122122"],["4i","2k",None,"00112112","00221221"],["4a","2k",None,"00211112","00122221"],["4k","2k",None,"00121121","00212212"],["4z","2a",None,"00112211","00221122"],["4t","2a",None,"00122111","00211222"],["4q","2a",None,"00111221","00222112"],["4a","2a",1,"00111122","00222211"],["4a","2a",2,"00221111","00112222"],["4n","2i",None,"00211121","00122212"],["4r","2n",None,"00121112","00212221"],["3e","3c",None,"00121212","00212121"],["3q","3a",None,"00112221","00221112"],["3r","3i",None,"00122211","00211122"],["3a","3i",None,"00111222","00222111"],["3r","3n",None,"00112212","00221121"],["3k","3n",None,"00121221","00212112"],["3r","3q",None,"00122112","00211221"],["3j","3q",None,"00121122","00212211"],["3y","3j",None,"00122121","00211212"],["3n","3j",None,"00112122","00221211"]],["i",["6i","0",None,"01110111","02220222"],["5r","1c",None,"01110112","02220221"],["5e","1e",None,"01110121","02220212"],["4t","2c",None,"01110212","02220121"],["4i","2c",None,"01120211","02210122"],["4y","2k",None,"01120121","02210212"],["4n","2a",None,"01110122","02220211"],["4c","2i",None,"01210121","02120212"],["4z","2n",None,"01120112","02210221"],["3r","3c",None,"01120212","02210121"],["3i","3i",None,"01110222","02220111"],["3n","3n",None,"01120221","02210112"],["3y","3y",None,"01210212","02120121"],["3q","3q",None,"01120122","02210211"]],["n",["6n","0",None,"10111011","20222022"],["5c","1c",None,"10111012","20222021"],["5q","1e",None,"10111021","20222012"],["4w","2e",None,"10112021","20221012"],["4q","2e",None,"10212011","20121022"],["4j","2k",None,"10112012","20221021"],["4r","2a",None,"10111022","20222011"],["4z","2i",None,"10211021","20122012"],["4e","2n",None,"10121012","20212021"],["3q","3q",None,"10212012","20121021"],["3a","3a",None,"10222011","20111022"],["3e","3q",None,"10121022","20212011"],["3j","3j",None,"10112022","20221011"],["3r","3r",None,"10211022","20122011"]]],[7,["c",["7c","0",None,"10111111","20222222"],["6n","1c",None,"10111211","20222122"],["6c","1c",None,"10111112","20222221"],["6a","1e",None,"10211111","20122222"],["6k","1e",None,"10111121","20222212"],["5c","2c",None,"10111212","20222121"],["5j","2e",None,"10212111","20121222"],["5a","2e",None,"20211111","10122222"],["5k","2e",None,"10112121","20221212"],["5q","2k",None,"10211211","20122122"],["5y","2k",None,"10112112","20221221"],["5n","2k",None,"10211112","20122221"],["5q","2a",None,"10111221","20222112"],["5n","2a",None,"10111122","20222211"],["5i","2a",None,"10221111","20112222"],["5r","2i",None,"10211121","20122212"],["5c","2n",None,"10121112","20212221"],["4e","3c",None,"10121212","20212121"],["4y","3e",None,"10212121","20121212"],["4n","3e",None,"20212111","10121222"],["4w","3k",None,"20211211","10122122"],["4k","3k",None,"10212112","20121221"],["4w","3a",None,"10112221","20221112"],["4a","3a",None,"10222111","20111222"],["4r","3i",None,"10111222","20222111"],["4r","3n",None,"10221211","20112122"],["4j","3n",None,"10112212","20221121"],["4j","3y",None,"10211212","20122121"],["4r","3q",None,"20121112","10212221"],["4j","3q",None,"10121122","20212211"],["4q","3j",None,"10212211","20121122"],["4a","3j",None,"20221111","10112222"],["4k","3j",None,"10112122","20221211"],["4z","3r",None,"10211221","20122112"],["4t","3r",None,"10211122","20122211"],["4i","3r",None,"10221121","20112212"]],["e",["7e","0",None,"01111111","02222222"],["6a","1c",None,"01111112","02222221"],["6k","1c",None,"01111211","02222122"],["6i","1e",None,"01112111","02221222"],["6e","1e",None,"01111121","02222212"],["5y","2c",None,"01121211","02212122"],["5n","2c",None,"01111212","02222121"],["5i","2c",None,"02111112","01222221"],["5e","2e",None,"01112121","02221212"],["5r","2k",None,"01112112","02221221"],["5j","2k",None,"01211112","02122221"],["5k","2k",None,"01121121","02212212"],["5r","2a",None,"01112211","02221122"],["5j","2a",None,"01111221","02222112"],["5a","2a",None,"01111122","02222211"],["5e","2i",None,"01211121","02122212"],["5q","2n",None,"01121112","02212221"],["4r","3c",None,"02121112","01212221"],["4j","3c",None,"01121212","02212121"],["4c","3e",None,"01212121","02121212"],["4y","3k",None,"01212112","02121221"],["4n","3a",None,"01112221","02221112"],["4i","3i",None,"01122211","02211122"],["4a","3i",None,"01111222","02222111"],["4t","3n",None,"01112212","02221121"],["4a","3n",None,"02211112","01122221"],["4k","3n",None,"01121221","02212112"],["4i","3y",None,"02112112","01221221"],["4k","3y",None,"01211212","02122121"],["4z","3q",None,"01122112","02211221"],["4w","3q",None,"01121122","02212211"],["4q","3q",None,"01221112","02112221"],["4y","3j",None,"01122121","02211212"],["4n","3j",None,"01112122","02221211"],["4y","3r",None,"01211221","02122112"],["4n","3r",None,"02211121","01122212"]]],[8,["",["8","0",None,"11111111","22222222"],["7c","1c",None,"11111112","22222221"],["7e","1e",None,"11111121","22222212"],["6c","2c",None,"11111212","22222121"],["6e","2e",None,"11112121","22221212"],["6k","2k",None,"11112112","22221221"],["6a","2a",None,"11111122","22222211"],["6i","2i",None,"11211121","22122212"],["6n","2n",None,"11121112","22212221"],["5c","3c",None,"11121212","22212121"],["5e","3e",None,"11212121","22121212"],["5k","3k",None,"11212112","22121221"],["5a","3a",None,"11112221","22221112"],["5i","3i",None,"11111222","22222111"],["5n","3n",None,"11112212","22221121"],["5y","3y",None,"11211212","22122121"],["5q","3q",None,"11121122","22212211"],["5j","3j",None,"11112122","22221211"],["5r","3r",None,"11211122","22122211"],["4e","4c",None,"12121212","21212121"],["4k","4k",None,"11212212","22121121"],["4a","4a",None,"11112222","22221111"],["4r","4n",None,"11121222","22212111"],["4y","4j",None,"11212122","22121211"],["4i","4t",None,"11211222","22122111"],["4q","4w",None,"11122122","22211211"],["4z","4z",None,"11221122","22112211"]]]]
top = "@RULE " + filename
header = "\n\n@TABLE\nn_states:3\nneighborhood:Moore\nsymmetries:rotate4reflect\n\nvar a={0,1,2}\nvar ab={0,1,2}\nvar ac={0,1,2}\nvar ad={0,1,2}\nvar ae={0,1,2}\nvar af={0,1,2}\nvar ag={0,1,2}\nvar ah={0,1,2}\nvar ai={0,1,2}\n"
body = "\n"
tail = rulestring

currentNum = ""
currentConfig = ""
currentSubconfig = ""
currentPos = 0
currentBeginEnd = [0,1]
isInSubconfig = False
getFullNumList = False
getFullConfigList = False

charlist = ["c","e","k","a","i","n","y","q","j","r","t","w","z"]

for c in rulestring:
    if c == "(" or c == "[":
        isInSubconfig = True
    if c == ")" or c == "]":
        isInSubconfig = False
    if isInSubconfig and c != "(":
        currentPos = currentPos + 1
        continue
    #note: am planning on detecting subconfig on "(" and getting the
    #numstring for it on ")"

    if c == "A" or c == "B" or c == "T" or c == "S":
        currentPos = currentPos + 1
        continue
    
    for n in [0,1,2,3,4,5,6,7,8]:
        if c == str(n):
            currentNum = n
            if currentPos + 1 < len(rulestring):
                if rulestring[currentPos+1] == str(n+1) or rulestring[currentPos+1] == "/":
                    getFullNumList = True
                else:
                    getFullNumList = False
            else:
                getFullNumList = True
            
    for k in charlist:
        if c == k:
            currentConfig = c
            if currentPos + 1 < len(rulestring):
                if rulestring[currentPos+1] != "(":
                    getFullConfigList = True
                else:
                    getFullConfigList = False
            else:
                getFullConfigList = True

    if c == "(":
        currentSubconfig = rulestring[currentPos+1:rulestring.find(")",currentPos)]
        if rulestring[rulestring.find(")",currentPos)+1:rulestring.find(")",currentPos)+2] == "[":
            currentVariant = int(rulestring[rulestring.find("[",currentPos)+1:rulestring.find("[",currentPos)+2])
        else:
            currentVariant = None

    if c == "/":
        if rulestring[currentPos:currentPos+3] == "/BB":
            currentBeginEnd = [0,2]
        if rulestring[currentPos:currentPos+3] == "/TA":
            currentBeginEnd = [1,2]
        if rulestring[currentPos:currentPos+3] == "/TB":
            currentBeginEnd = [2,1]
        if rulestring[currentPos:currentPos+3] == "/SA":
            currentBeginEnd = [1,1]
        if rulestring[currentPos:currentPos+3] == "/SB":
            currentBeginEnd = [2,2]
    
    if getFullNumList:
        for numbers in ruleStruct:
            if numbers[0] == currentNum:
                for configs in numbers:
                    if isinstance(configs,int):
                        continue
                    for subconfigs in configs:
                        if isinstance(subconfigs,str):
                            continue

                        body = body + str(currentBeginEnd[0]) + ","
                        for ch in subconfigs[3]:
                            body = body + ch + ","
                        body = body + str(currentBeginEnd[1]) + "\n"
                        if subconfigs[0] != subconfigs[1]:
                            body = body + str(currentBeginEnd[0]) + ","
                            for ch in subconfigs[4]:
                                body = body + ch + ","
                            body = body + str(currentBeginEnd[1]) + "\n"
    if getFullConfigList:
        for numbers in ruleStruct:
            if numbers[0] == currentNum:
                for configs in numbers:
                    if isinstance(configs,int):
                        continue
                    if configs[0] == currentConfig:
                        for subconfigs in configs:
                            if isinstance(subconfigs,str):
                                continue

                            body = body + str(currentBeginEnd[0]) + ","
                            for ch in subconfigs[3]:
                                body = body + ch + ","
                            body = body + str(currentBeginEnd[1]) + "\n"
                            if subconfigs[0] != subconfigs[1]:
                                body = body + str(currentBeginEnd[0]) + ","
                                for ch in subconfigs[4]:
                                    body = body + ch + ","
                                body = body + str(currentBeginEnd[1]) + "\n"

    if c == ")":
        for numbers in ruleStruct:
            if numbers[0] == currentNum:
                for configs in numbers:
                    if isinstance(configs,int):
                        continue
                    if configs[0] == currentConfig:
                        for subconfigs in configs:
                            if isinstance(subconfigs,str):
                                continue
                            if currentSubconfig == subconfigs[0] + subconfigs[1]and currentVariant == subconfigs[2]:
                                body = body + str(currentBeginEnd[0]) + ","
                                for ch in subconfigs[3]:
                                    body = body + ch + ","
                                body = body + str(currentBeginEnd[1]) + "\n"
                            elif currentSubconfig == subconfigs[1] + subconfigs[0]and currentVariant == subconfigs[2]:
                                body = body + str(currentBeginEnd[0]) + ","
                                for ch in subconfigs[4]:
                                    body = body + ch + ","
                                body = body + str(currentBeginEnd[1]) + "\n"
    

    getFullNumList = False
    getFullConfigList = False
    
    currentPos = currentPos + 1

body = body + "a,ab,ac,ad,ae,af,ag,ah,ai,0\n"
numlines = len(rulestring) // 999 + 1
filestring = top + header + body
for x in range(numlines):
    filestring = filestring + "#" + tail[900*x:900*(x+1)] +"\n"

f = open(golly.getdir("rules") + filename + ".rule","w")
f.write(filestring)
f.close()

golly.setrule(filename)
NOTE: This script will not work with the revision to my notation. Use the one in the post below instead!

Just open the script with golly and input your rulestring into the popup and you will have your rulefile!

I also created a rule generator for this notation, which is here.
Last edited by Cyclotrons on August 14th, 2023, 6:31 pm, edited 5 times in total.
I wrote a stdin script that generates random soups of a provided number of a given spaceship. It works for all (non-B0) spaceships in the INT rulespace!
A Multistate INT notation + script.
Cyclotrons
Posts: 132
Joined: January 26th, 2021, 12:19 am

Re: A Notation for 3-State INT Rules (and a script to turn them into rulefiles)

Post by Cyclotrons »

Please don't read this post; it's bad and outdated. Read the post under this one instead. For posterity, I've left this one in quotes.
Due to complaints about the length of the rulestrings in my notation, I am releasing a major revision to it. I will be keeping the original notation up for posterity. If something is not explicitly stated to be different, assume that it is the same between both.


Terminology:

number - the number of live cells in a given neighborhood configuration as described by a number, can refer to cells of the same state if specified
configuration - the arrangement of live cells as described by a hensel character, independent of number, can refer to cells of the same state if specified
number configuration - the arrangement of a given number of live cells as described by a number and a hensel character, can refer to cells of the same state if specified
subconfiguration - the number configuration of two states of cells in a single neighborhood
phrase - a string within the rulestring that is uninterrupted by separating strings


Neighborhood Configurations:

Describing neighborhood configurations is where the bulk of the changes have occurred.

() - The contents of parentheses indicate which subconfigurations will be included as a part of a transition within a domain of neighborhood configurations. The domain changes depending on where in a phrase this is located:

-If it is located before number and configuration is specified, the domain consists of all possible neighborhood configurations. (W)
-If it is located after configuration is specified, but before number is specified, the domain is restricted to the specified configuration, independent of number. (X)
-If it is located after number is specified, but before configuration is specified for that number, the domain is restricted to the specified number. (Y)
-If it is located after number is specified and after configuration is specified for that number, the domain is restricted to that number configuration. (Z)

An example:
(W)c(X)e(X)2(Y)k(Z)a(Z)

There are 4 general forms of specifier that can be used to describe what is included:
No specifier, which is indicated by an empty character (NOT a space), indicates that the entire domain is included.
A number specifier, which is indicated by a number, indicates that number configurations of a single state contained in a subconfiguration are included if they have a matching number.
A configuration specifier, which is indicated by a hensel character, indicates that number configurations of a single state contained in a subconfiguration are included if they have a matching configuration.
A number configuration specifier, which is indicated by a number followed by a hensel character, indicates that number configurations of a single state contained in a subconfiguration are included if they have a matching number configuration.

If these specifiers are placed within a set of parentheses alone, it indicates that a subconfiguration will be included if either of its composing configurations match the specifier.
If two of these specifiers are placed within a set of parentheses separated by a '^', it indicates that a subconfiguration will be included if one composing configuration matches one specifier and the other composing configuration matches the other specifier. The order doesn't matter.
If two of these specifiers are placed within a set of parentheses separated by a ',', it indicates that a subconfiguration will be included if the composing configuration of state a matches the first specifier and the composing configuration of state b matches the second specifier.

If a specifier is placed within a set of curly braces ({}) before being placed within a set of parentheses, it indicates that a subconfiguration will be included if the respective composing configuration (respective being either configuration or a specific one, as indicated above) can contain the specified number configuration, can contain a specified (non-numbered) configuration, or has at least the specified number of cells (really, it is that it can contain a configuration with that number of cells, but that is the same thing), depending on which specifier is used.

If after the first phrase in a transition specifier, a semicolon followed by a dash ';-' is used, it means that everything specified in the following phrase will be excluded from that transition, even if they are included within the previous phrase. If you want a set of neighborhood configurations to be included even if they are excluded after the semicolon, you can place a ' after the appropriate set of parentheses before the semicolon.


Some other noteworthy changes:
A number left on its lonesome is no longer considered valid. To do what it indicated before, include a set of empty parentheses directly after the number.
The same goes for a lonesome hensel character.
A subconfiguration composed of 2 number configurations next to each other (ex. (2k2a)) is no longer considered valid. Use the comma separator (ex. (2k,2a)) to indicate the same thing.


Here's an example rulestring:

Code: Select all

BA/BB({1e},)(,3)/TA/TB(,7)/SA/SB(,2)(,3)
In this rule, state b acts like life (a cell of state b is born with 3 cells of state b in its neighborhood and survives with 2 and 3 cells of state b in its neighborhood), but a cell will transition to state a from state b if it has 7 neighbors of state b. Cells of state a die in 1 generation, but cells of state b will be born if they have a cell of state a on one of their edges.


Script for converting rulestrings in the new notation into rulefiles:

Code: Select all

import string
import os
import golly


def is_in_configuration(config,targetSubconfig):
    ns = "012345678"
    cs = "cekainyqjrtwz"

    if config == "":
        return False

    for numbers in ruleStruct:
        if numbers[0] == int(config[:1]):
            for configs in numbers:
                if isinstance(configs,int):
                    continue
                if configs[0] == config[1:2]:
                    for subconfigs in configs:
                        if isinstance(subconfigs,str):
                            continue
                        if targetSubconfig.find("^") != -1:
                            a = targetSubconfig[:targetSubconfig.find("^")]
                            b = targetSubconfig[targetSubconfig.find("^")+1:]
                            if (subconfigs[0].find(a) != -1 and subconfigs[1].find(b) != -1) or (subconfigs[1].find(a) != -1 and subconfigs[0].find(b) != -1):
                                return True
                        elif len(targetSubconfig) <= 2:
                            if subconfigs[0].find(targetSubconfig) != -1 or subconfigs[1].find(targetSubconfig) != -1:
                                return True
    return False


rulestring = golly.getstring("Input rulestring:")
longfilename = ""
for c in rulestring:
    if c != "/":
        longfilename = longfilename + c
    else:
        longfilename = longfilename + "_"
filename = longfilename[:150]
ruleStruct = [[0,["",["","",None,"00000000","00000000"]]],[1,["c",["1c","0",None,"00000001","00000002"]],["e",["1e","0",None,"00000010","00000020"]]],[2,["c",["2c","0",None,"00000101","00000202"],["1c","1c",None,"00000102","00000201"]],["e",["2e","0",None,"00001010","00002020"],["1e","1e",None,"00001020","00002010"]],["k",["2k","0",None,"00001001","00002002"],["1e","1c",None,"00001002","00002001"]],["a",["2a","0",None,"00000011","00000022"],["1e","1c",None,"00000012","00000021"]],["i",["2i","0",None,"00100010","00200020"],["1e","1e",None,"00100020","00200010"]],["n",["2n","0",None,"00010001","00020002"],["1c","1c",None,"00010002","00020001"]]],[3,["c",["3c","0",None,"00010101","00020202"],["2n","1c",None,"00010201","00020102"],["2c","1c",None,"00010102","00020201"]],["e",["3e","0",None,"00101010","00202020"],["2i","1c",None,"00102010","00201020"],["2e","1e",None,"00101020","00202010"]],["k",["3k","0",None,"00101001","00202002"],["2e","1c",None,"00101002","00202001"],["2k","1e",None,"00102001","00201002"]],["a",["3a","0",None,"00001110","00002220"],["2e","1c",None,"00001210","00002120"],["2a","1e",None,"00001120","00002210"]],["i",["3i","0",None,"00000111","00000222"],["2a","1c",None,"00000112","00000221"],["2c","1e",None,"00000121","00000212"]],["n",["3n","0",None,"00001101","00002202"],["2a","1c",None,"00001102","00002201"],["2k","1c",None,"00001201","00002102"],["2c","1e",None,"00002101","00001202"]],["y",["3y","0",None,"00100101","00200202"],["2k","1c",None,"00100102","00200201"],["2c","1e",None,"00200101","00100202"]],["q",["3q","0",None,"00010011","00020022"],["2a","1c",None,"00020011","00010022"],["2k","1c",None,"00010012","00020021"],["2n","1e",None,"00010021","00020012"]],["j",["3j","0",None,"00001011","00002022"],["2e","1c",None,"00001012","00002021"],["2a","1e",None,"00002011","00001022"],["2k","1e",None,"00001021","00002012"]],["r",["3r","0",None,"00100011","00200022"],["2i","1c",None,"00100012","00200021"],["2a","1e",None,"00200011","00100022"],["2k","1e",None,"00100021","00200012"]]],[4,["c",["4c","0",None,"01010101","02020202"],["3c","1c",None,"01010102","02020201"],["2c","2c",None,"01010202","02020101"],["2n","2n",None,"01020102","02010201"]],["e",["4e","0",None,"10101010","20202020"],["3e","1e",None,"10101020","20202010"],["2e","2e",None,"10102020","20201010"],["2i","2i",None,"10201020","20102010"]],["k",["4k","0",None,"00101101","00202202"],["3j","1c",None,"00101102","00202201"],["3k","1c",None,"00101201","00202102"],["3y","1e",None,"00102101","00201202"],["3n","1e",None,"00201101","00102202"],["2e","2c",None,"00101202","00202101"],["2k","2k$",None,"00102102","00201201"],["2k","2a",None,"00102201","00201102"]],["a",["4a","0",None,"00001111","00002222"],["3j","1c",None,"00001211","00002122"],["3a","1c",None,"00001112","00002221"],["3n","1e",None,"00001121","00002212"],["3i","1e",None,"00002111","00001222"],["2e","2c",None,"00001212","00002121"],["2a","2a$",None,"00001122","00002211"],["2k","2a",None,"00001221","00002112"]],["i",["4i","0",None,"00110110","00220220"],["3r","1c",None,"00110210","00220120"],["3n","1e",None,"00110120","00220210"],["2i","2c",None,"00120210","00210120"],["2k","2k",None,"00120120","00210210"],["2a","2a",None,"00110220","00220110"]],["n",["4n","0",None,"00010111","00020222"],["3q","1c",None,"00010211","00020122"],["3n","1c",None,"00010112","00020221"],["3i","1c",None,"00020111","00010222"],["3c","1e",None,"00010121","00020212"],["2k","2c",None,"00010212","00020121"],["2n","2a",None,"00010221","00020112"],["2c","2a",None,"00010122","00020211"]],["y",["4y","0",None,"00110101","00220202"],["3q","1c",None,"00110201","00220102"],["3y","1c",None,"00120101","00210202"],["3n","1c",None,"00110102","00220201"],["3c","1e",None,"00210101","00120202"],["2a","2c",None,"00110202","00220101"],["2k","2c",None,"00120201","00210102"],["2k","2n",None,"00120102","00210201"]],["q",["4q","0",None,"00111001","00222002"],["3a","1c",None,"00111002","00222001"],["3k","1c",None,"00121001","00212002"],["3q","1e",None,"00112001","00221002"],["2a","2k",None,"00112002","00221001"],["2e","2n",None,"00121002","00212001"]],["j",["4j","0",None,"00101011","00202022"],["3e","1c",None,"00101012","00202021"],["3r","1e",None,"00102011","00201022"],["3j","1e",None,"00201011","00102022"],["3k","1e",None,"00101021","00202012"],["2k","2e",None,"00102021","00201012"],["2i","2k",None,"00102012","00201021"],["2e","2a",None,"00101022","00202011"]],["r",["4r","0",None,"00101110","00202220"],["3e","1c",None,"00101210","00202120"],["3r","1e",None,"00102110","00201220"],["3j","1e",None,"00101120","00202210"],["3a","1e",None,"00201110","00102220"],["2k","2e",None,"00102120","00201210"],["2i","2a",None,"00102210","00201120"],["2e","2a",None,"00101220","00202110"]],["t",["4t","0",None,"00100111","00200222"],["3r","1c",None,"00100112","00200221"],["3y","1e",None,"00100121","00200212"],["3i","1e",None,"00200111","00100222"],["2i","2c",None,"00100212","00200121"],["2k","2a",None,"00100122","00200211"]],["w",["4w","0",None,"00011011","00022022"],["3j","1c",None,"00011012","00022021"],["3q","1e",None,"00011021","00022012"],["2n","2e",None,"00012021","00021012"],["2k","2k",None,"00012012","00021021"],["2a","2a",None,"00011022","00022011"]],["z",["4z","0",None,"00110011","00220022"],["3r","1c",None,"00110012","00220021"],["3q","1e",None,"00110021","00220012"],["2k","2k",None,"00120021","00210012"],["2a","2a",None,"00110022","00220011"],["2i","2n",None,"00120012","00210021"]]],[5,["c",["5c","0",None,"10101011","20202022"],["4e","1c",None,"10101012","20202021"],["4r","1e",None,"10102011","20201022"],["4j","1e",None,"10101021","20202012"],["3j","2e",None,"10102021","20201012"],["3a","2e",None,"10202011","20101022"],["3k","2e",None,"20101021","10202012"],["3e","2k",None,"10102012","20201021"],["3e","2a",None,"10101022","20202011"],["3r","2i",None,"10201021","20102012"]],["e",["5e","0",None,"01010111","02020222"],["4y","1c",None,"01010112","02020221"],["4n","1c",None,"02010111","01020222"],["4c","1e",None,"01010121","02020212"],["3y","2c",None,"01010212","02020121"],["3n","2c",None,"02010112","01020221"],["3i","2c",None,"02020111","01010222"],["3c","2k",None,"02010121","01020212"],["3c","2a",None,"01010122","02020211"],["3q","2n",None,"01020112","02010221"]],["k",["5k","0",None,"01011011","02022022"],["4w","1c",None,"02011011","01022022"],["4k","1c",None,"01011012","02022021"],["4y","1e",None,"01011021","02022012"],["3j","2c",None,"02021011","01012022"],["3c","2e",None,"01012021","02021012"],["3q","2k",None,"02012011","01021022"],["3y","2k",None,"01012012","02021021"],["3n","2a",None,"01011022","02022011"],["3k","2n",None,"01021012","02012021"]],["a",["5a","0",None,"00011111","00022222"],["4w","1c",None,"00011211","00022122"],["4a","1c",None,"00011112","00022221"],["4n","1e",None,"00011121","00022212"],["3j","2c",None,"00011212","00022121"],["3c","2e",None,"00012121","00021212"],["3n","2k",None,"00012112","00021221"],["3q","2a",None,"00011221","00022112"],["3i","2a",None,"00011122","00022211"],["3a","2n",None,"00021112","00012221"]],["i",["5i","0",None,"00111110","00222220"],["4r","1c",None,"00111210","00222120"],["4i","1e",None,"00112110","00221220"],["4a","1e",None,"00111120","00222210"],["3e","2c",None,"00121210","00212120"],["3n","2e",None,"00112120","00221210"],["3j","2k",None,"00121120","00212210"],["3r","2a",None,"00112210","00221120"],["3a","2a",None,"00111220","00222110"],["3i","2i",None,"00211120","00122210"]],["n",["5n","0",None,"00101111","00202222"],["4r","1c",None,"00101112","00202221"],["4j","1c",None,"00101211","00202122"],["4t","1e",None,"00102111","00201222"],["4a","1e",None,"00201111","00102222"],["4k","1e",None,"00101121","00202212"],["3e","2c",None,"00101212","00202121"],["3y","2e",None,"00102121","00201212"],["3i","2e",None,"00202111","00101222"],["3r","2k",None,"00102112","00201221"],["3j","2k",None,"00201211","00102122"],["3a","2k",None,"00201112","00102221"],["3r","2a",None,"00102211","00201122"],["3j","2a",None,"00101122","00202211"],["3k","2a",None,"00101221","00202112"],["3n","2i",None,"00201121","00102212"]],["y",["5y","0",None,"01101011","02202022"],["4j","1c",None,"01101012","02202021"],["4i","1e",None,"01102011","02201022"],["4k","1e",None,"01101021","02202012"],["3e","2c",None,"02101012","01202021"],["3n","2e",None,"01102021","02201012"],["3r","2k",None,"01102012","02201021"],["3k","2k",None,"01201012","02102021"],["3j","2a",None,"01101022","02202011"],["3y","2i",None,"01201021","02102012"]],["q",["5q","0",None,"00111011","00222022"],["4r","1c",None,"00111012","00222021"],["4j","1c",None,"00121011","00212022"],["4z","1e",None,"00112011","00221022"],["4w","1e",None,"00211011","00122022"],["4q","1e",None,"00111021","00222012"],["3q","2e",1,"00112021","00221012"],["3q","2e",2,"00212011","00121022"],["3r","2k",None,"00112012","00221021"],["3j","2k",None,"00211012","00122021"],["3k","2k",None,"00121021","00212012"],["3r","2a",None,"00122011","00211022"],["3j","2a",None,"00221011","00112022"],["3a","2a",None,"00111022","00222011"],["3q","2i",None,"00211021","00122012"],["3e","2n",None,"00121012","00212021"]],["j",["5j","0",None,"00111101","00222202"],["4q","1c",None,"00111201","00222102"],["4a","1c",None,"00111102","00222201"],["4k","1c",None,"00121101","00212202"],["4y","1e",None,"00112101","00221202"],["4n","1e",None,"00211101","00122202"],["3a","2c",None,"00111202","00222101"],["3k","2c",None,"00121201","00212102"],["3c","2e",None,"00212101","00121202"],["3q","2k",None,"00211201","00122102"],["3n","2k",None,"00112102","00221201"],["3i","2k",None,"00211102","00122201"],["3q","2a",None,"00112201","00221102"],["3y","2a",None,"00122101","00211202"],["3n","2a",None,"00221101","00112202"],["3j","2n",None,"00121102","00212201"]],["r",["5r","0",None,"00110111","00220222"],["4z","1c",None,"00110211","00220122"],["4t","1c",None,"00120111","00210222"],["4i","1c",None,"00110112","00220221"],["4y","1e",None,"00110121","00220212"],["4n","1e",None,"00210111","00120222"],["3r","2c",1,"00110212","00220121"],["3r","2c",2,"00120211","00210122"],["3q","2k",None,"00210211","00120122"],["3y","2k",None,"00120121","00210212"],["3n","2k",None,"00210112","00120221"],["3q","2a",None,"00110221","00220112"],["3n","2a",None,"00110122","00220211"],["3i","2a",None,"00220111","00110222"],["3c","2i",None,"00210121","00120212"],["3r","2n",None,"00120112","00210221"]]],[6,["c",["6c","0",None,"10101111","20202222"],["5c","1c",None,"10101112","20202221"],["5y","1e",None,"10101121","20202212"],["5n","1e",None,"10102111","20201222"],["5i","1e",None,"10201111","20102222"],["4e","2c",None,"10101212","20202121"],["4a","2e",None,"20201111","10102222"],["4k","2e",None,"10102121","20201212"],["4r","2k",None,"10201112","20102221"],["4j","2k",None,"10102112","20201221"],["4r","2a",None,"10102211","20201122"],["4j","2a",None,"10101122","20202211"],["4t","2i",None,"20102111","10201222"],["4i","2i",None,"10201121","20102212"],["3j","3a",None,"10102221","20201112"],["3e","3i",None,"10101222","20202111"],["3e","3n",None,"10102212","20201121"],["3e","3y",None,"10201212","20102121"],["3k","3j",None,"10102122","20201211"],["3r","3r$",None,"10201122","20102211"]],["e",["6e","0",None,"01011111","02022222"],["5j","1c",None,"01011112","02022221"],["5a","1c",None,"02011111","01022222"],["5k","1c",None,"01011211","02022122"],["5e","1e",None,"01011121","02022212"],["4a","2c",None,"02021111","01012222"],["4k","2c",None,"01011212","02022121"],["4c","2e",None,"01012121","02021212"],["4y","2k",None,"01012112","02021221"],["4n","2k",None,"02012111","01021222"],["4y","2a",None,"01011221","02022112"],["4n","2a",None,"01011122","02022211"],["4w","2n",None,"02011211","01022122"],["4q","2n",None,"01021112","02012221"],["3k","3c",None,"01021212","02012121"],["3c","3a",None,"01012221","02021112"],["3n","3i",None,"01011222","02022111"],["3y","3n",None,"01012212","02021121"],["3q","3q$",None,"01021122","02012211"],["3c","3j",None,"01012122","02021211"]],["k",["6k","0",None,"01101111","02202222"],["5q","1c",None,"01101112","02202221"],["5y","1c",None,"01101211","02202122"],["5n","1c",None,"02101111","01202222"],["5r","1e",None,"01102111","02201222"],["5j","1e",None,"01201111","02102222"],["5k","1e",None,"01101121","02202212"],["4r","2c",None,"02101112","01202221"],["4j","2c",None,"01101212","02202121"],["4y","2e",None,"01102121","02201212"],["4n","2e",None,"01202111","02101222"],["4z","2k",None,"01102112","02201221"],["4t","2k",None,"02102111","01201222"],["4q","2k",None,"01201112","02102221"],["4k","2k",1,"01201211","02102122"],["4k","2k",2,"02101121","01202212"],["4w","2a",None,"01101122","02202211"],["4i","2a",None,"01102211","02201122"],["4a","2a",None,"02201111","01102222"],["4k","2a",None,"01101221","02202112"],["4y","2i",None,"01201121","02102212"],["4j","2n",None,"02101211","01202122"],["3c","3e",None,"01202121","02101212"],["3q","3k",None,"01202112","02101221"],["3n","3a",None,"01102221","02201112"],["3j","3i",None,"01101222","02202111"],["3r","3n",None,"01102212","02201121"],["3k","3y",None,"01201212","02102121"],["3r","3q",None,"02102211","01201122"],["3q","3j",None,"01102122","02201211"],["3n","3j",None,"01202211","02101122"],["3y","3r",None,"01201221","02102112"]],["a",["6a","0",None,"00111111","00222222"],["5q","1c",None,"00111211","00222122"],["5n","1c",None,"00121111","00212222"],["5i","1c",None,"00111112","00222221"],["5r","1e",None,"00112111","00221222"],["5j","1e",None,"00111121","00222212"],["5a","1e",None,"00211111","00122222"],["4r","2c",None,"00111212","00222121"],["4j","2c",None,"00121211","00212122"],["4y","2e",None,"00112121","00221212"],["4n","2e",None,"00212111","00121222"],["4w","2k",None,"00211211","00122122"],["4i","2k",None,"00112112","00221221"],["4a","2k",None,"00211112","00122221"],["4k","2k",None,"00121121","00212212"],["4z","2a",None,"00112211","00221122"],["4t","2a",None,"00122111","00211222"],["4q","2a",None,"00111221","00222112"],["4a","2a",1,"00111122","00222211"],["4a","2a",2,"00221111","00112222"],["4n","2i",None,"00211121","00122212"],["4r","2n",None,"00121112","00212221"],["3e","3c",None,"00121212","00212121"],["3q","3a",None,"00112221","00221112"],["3r","3i",None,"00122211","00211122"],["3a","3i",None,"00111222","00222111"],["3r","3n",None,"00112212","00221121"],["3k","3n",None,"00121221","00212112"],["3r","3q",None,"00122112","00211221"],["3j","3q",None,"00121122","00212211"],["3y","3j",None,"00122121","00211212"],["3n","3j",None,"00112122","00221211"]],["i",["6i","0",None,"01110111","02220222"],["5r","1c",None,"01110112","02220221"],["5e","1e",None,"01110121","02220212"],["4t","2c",None,"01110212","02220121"],["4i","2c",None,"01120211","02210122"],["4y","2k",None,"01120121","02210212"],["4n","2a",None,"01110122","02220211"],["4c","2i",None,"01210121","02120212"],["4z","2n",None,"01120112","02210221"],["3r","3c",None,"01120212","02210121"],["3i","3i",None,"01110222","02220111"],["3n","3n",None,"01120221","02210112"],["3y","3y",None,"01210212","02120121"],["3q","3q",None,"01120122","02210211"]],["n",["6n","0",None,"10111011","20222022"],["5c","1c",None,"10111012","20222021"],["5q","1e",None,"10111021","20222012"],["4w","2e",None,"10112021","20221012"],["4q","2e",None,"10212011","20121022"],["4j","2k",None,"10112012","20221021"],["4r","2a",None,"10111022","20222011"],["4z","2i",None,"10211021","20122012"],["4e","2n",None,"10121012","20212021"],["3q","3q",None,"10212012","20121021"],["3a","3a",None,"10222011","20111022"],["3e","3q",None,"10121022","20212011"],["3j","3j",None,"10112022","20221011"],["3r","3r",None,"10211022","20122011"]]],[7,["c",["7c","0",None,"10111111","20222222"],["6n","1c",None,"10111211","20222122"],["6c","1c",None,"10111112","20222221"],["6a","1e",None,"10211111","20122222"],["6k","1e",None,"10111121","20222212"],["5c","2c",None,"10111212","20222121"],["5j","2e",None,"10212111","20121222"],["5a","2e",None,"20211111","10122222"],["5k","2e",None,"10112121","20221212"],["5q","2k",None,"10211211","20122122"],["5y","2k",None,"10112112","20221221"],["5n","2k",None,"10211112","20122221"],["5q","2a",None,"10111221","20222112"],["5n","2a",None,"10111122","20222211"],["5i","2a",None,"10221111","20112222"],["5r","2i",None,"10211121","20122212"],["5c","2n",None,"10121112","20212221"],["4e","3c",None,"10121212","20212121"],["4y","3e",None,"10212121","20121212"],["4n","3e",None,"20212111","10121222"],["4w","3k",None,"20211211","10122122"],["4k","3k",None,"10212112","20121221"],["4w","3a",None,"10112221","20221112"],["4a","3a",None,"10222111","20111222"],["4r","3i",None,"10111222","20222111"],["4r","3n",None,"10221211","20112122"],["4j","3n",None,"10112212","20221121"],["4j","3y",None,"10211212","20122121"],["4r","3q",None,"20121112","10212221"],["4j","3q",None,"10121122","20212211"],["4q","3j",None,"10212211","20121122"],["4a","3j",None,"20221111","10112222"],["4k","3j",None,"10112122","20221211"],["4z","3r",None,"10211221","20122112"],["4t","3r",None,"10211122","20122211"],["4i","3r",None,"10221121","20112212"]],["e",["7e","0",None,"01111111","02222222"],["6a","1c",None,"01111112","02222221"],["6k","1c",None,"01111211","02222122"],["6i","1e",None,"01112111","02221222"],["6e","1e",None,"01111121","02222212"],["5y","2c",None,"01121211","02212122"],["5n","2c",None,"01111212","02222121"],["5i","2c",None,"02111112","01222221"],["5e","2e",None,"01112121","02221212"],["5r","2k",None,"01112112","02221221"],["5j","2k",None,"01211112","02122221"],["5k","2k",None,"01121121","02212212"],["5r","2a",None,"01112211","02221122"],["5j","2a",None,"01111221","02222112"],["5a","2a",None,"01111122","02222211"],["5e","2i",None,"01211121","02122212"],["5q","2n",None,"01121112","02212221"],["4r","3c",None,"02121112","01212221"],["4j","3c",None,"01121212","02212121"],["4c","3e",None,"01212121","02121212"],["4y","3k",None,"01212112","02121221"],["4n","3a",None,"01112221","02221112"],["4i","3i",None,"01122211","02211122"],["4a","3i",None,"01111222","02222111"],["4t","3n",None,"01112212","02221121"],["4a","3n",None,"02211112","01122221"],["4k","3n",None,"01121221","02212112"],["4i","3y",None,"02112112","01221221"],["4k","3y",None,"01211212","02122121"],["4z","3q",None,"01122112","02211221"],["4w","3q",None,"01121122","02212211"],["4q","3q",None,"01221112","02112221"],["4y","3j",None,"01122121","02211212"],["4n","3j",None,"01112122","02221211"],["4y","3r",None,"01211221","02122112"],["4n","3r",None,"02211121","01122212"]]],[8,["",["8","0",None,"11111111","22222222"],["7c","1c",None,"11111112","22222221"],["7e","1e",None,"11111121","22222212"],["6c","2c",None,"11111212","22222121"],["6e","2e",None,"11112121","22221212"],["6k","2k",None,"11112112","22221221"],["6a","2a",None,"11111122","22222211"],["6i","2i",None,"11211121","22122212"],["6n","2n",None,"11121112","22212221"],["5c","3c",None,"11121212","22212121"],["5e","3e",None,"11212121","22121212"],["5k","3k",None,"11212112","22121221"],["5a","3a",None,"11112221","22221112"],["5i","3i",None,"11111222","22222111"],["5n","3n",None,"11112212","22221121"],["5y","3y",None,"11211212","22122121"],["5q","3q",None,"11121122","22212211"],["5j","3j",None,"11112122","22221211"],["5r","3r",None,"11211122","22122211"],["4e","4c",None,"12121212","21212121"],["4k","4k",None,"11212212","22121121"],["4a","4a",None,"11112222","22221111"],["4r","4n",None,"11121222","22212111"],["4y","4j",None,"11212122","22121211"],["4i","4t",None,"11211222","22122111"],["4q","4w",None,"11122122","22211211"],["4z","4z",None,"11221122","22112211"]]]]
top = "@RULE " + filename
header = "\n\n@TABLE\nn_states:3\nneighborhood:Moore\nsymmetries:rotate4reflect\n\nvar a={0,1,2}\nvar ab={0,1,2}\nvar ac={0,1,2}\nvar ad={0,1,2}\nvar ae={0,1,2}\nvar af={0,1,2}\nvar ag={0,1,2}\nvar ah={0,1,2}\nvar ai={0,1,2}\n"
body = "\n"
tail = rulestring

currentNum = None
currentConfig = None
currentSubconfig = None
currentVariety = None
currentPos = 0
if rulestring[:2] == "BA":
    currentBeginEnd = [0,1]
if rulestring[:2] == "BB":
    currentBeginEnd = [0,2]
if rulestring[:2] == "TA":
    currentBeginEnd = [1,2]
if rulestring[:2] == "TB":
    currentBeginEnd = [2,1]
if rulestring[:2] == "SA":
    currentBeginEnd = [1,1]
if rulestring[:2] == "SB":
    currentBeginEnd = [2,2]

isInSubconfig = False
isIncluding = True
allNums = True
allConfigs = True
hasPriority = False

includeList = []
excludeList = []
priorityList = []
itemList = []

nums = "012345678"
chars = "cekainyqjrtwz"


for c in rulestring:
    if c == ")" or c == "]":
        isInSubconfig = False
        hasPriority = False
    if isInSubconfig:
        currentPos = currentPos + 1
        continue
    if c == "(" or c == "[":
        isInSubconfig = True

    if nums.find(c) != -1:
        allNums = False
        allConfigs = True
        currentNum = int(c)
    if chars.find(c) != -1:
        allConfigs = False
        currentConfig = c

    if c == ";":
        isIncluding = False
        allNums = True
        allConfigs = True
        hasPriority = False
        currentNum = None
        currentConfig = None
        currentSubconfig = None
        currentVariety = None
        

    if c == "(":
        currentSubconfig = rulestring[currentPos+1:rulestring.find(")",currentPos)]
        if rulestring[rulestring.find(")",currentPos)+1:rulestring.find(")",currentPos)+2] == "\'" and isIncluding:
            hasPriority = True
        if rulestring[rulestring.find(")",currentPos)+1:rulestring.find(")",currentPos)+2] == "[" or rulestring[rulestring.find(")",currentPos)+2:rulestring.find(")",currentPos)+3] == "[":
            currentVariety = int(rulestring[rulestring.find("[",currentPos)+1:rulestring.find("[",currentPos)+2])
        else:
            currentVariety = None

        
        for numbers in ruleStruct:
            if allNums or numbers[0] == currentNum:
                for configs in numbers:
                    if isinstance(configs,int):
                        continue
                    if allConfigs or configs[0] == currentConfig:
                        for subconfigs in configs:
                            if isinstance(subconfigs,str):
                                continue
                            if isIncluding:
                                if currentSubconfig.find(",") != -1:
                                    a = currentSubconfig[:currentSubconfig.find(",")]
                                    b = currentSubconfig[currentSubconfig.find(",")+1:]
                                    getSubA = False
                                    getSubB = False
                                    isAIn0 = False
                                    isAIn1 = False
                                    IsBIn0 = False
                                    IsBIn1 = False
                                    if a.find("{") != -1:
                                        getSubA = True
                                        isAIn0 = is_in_configuration(subconfigs[0],a[a.find("{")+1:a.find("}")])
                                        isAIn1 = is_in_configuration(subconfigs[1],a[a.find("{")+1:a.find("}")])
                                        a = a[a.find("{")+1:a.find("}")]
                                    if b.find("{") != -1:
                                        getSubB = True
                                        isBIn0 = is_in_configuration(subconfigs[0],b[b.find("{")+1:b.find("}")])
                                        isBIn1 = is_in_configuration(subconfigs[1],b[b.find("{")+1:b.find("}")])
                                        b = b[b.find("{")+1:b.find("}")]
                                    
                                    if ((subconfigs[0].find(a) != -1 and subconfigs[1].find(b) != -1) and (currentVariety == subconfigs[2]) and (allNums == False and allConfigs == False)) or ((((getSubA and isAIn0) or subconfigs[0].find(a) != -1) and ((getSubB and isBIn1) or subconfigs[1].find(b) != -1)) and currentVariety == None):
                                        includeList.append(subconfigs[3])
                                        if hasPriority:
                                            priorityList.append(subconfigs[3])
                                    if ((subconfigs[1].find(a) != -1 and subconfigs[0].find(b) != -1) and (currentVariety == subconfigs[2]) and (allNums == False and allConfigs == False)) or ((((getSubA and isAIn1) or subconfigs[1].find(a) != -1) and ((getSubB and isBIn0) or subconfigs[0].find(b) != -1)) and currentVariety == None):
                                        includeList.append(subconfigs[4])
                                        if hasPriority:
                                            priorityList.append(subconfigs[4])
                                elif currentSubconfig.find("^") != -1:
                                    a = currentSubconfig[:currentSubconfig.find("^")]
                                    b = currentSubconfig[currentSubconfig.find("^")+1:]
                                    getSubA = False
                                    getSubB = False
                                    isAIn0 = False
                                    isAIn1 = False
                                    IsBIn0 = False
                                    IsBIn1 = False
                                    if a.find("{") != -1:
                                        getSubA = True
                                        isAIn0 = is_in_configuration(subconfigs[0],a[a.find("{")+1:a.find("}")])
                                        isAIn1 = is_in_configuration(subconfigs[1],a[a.find("{")+1:a.find("}")])
                                        a = a[a.find("{")+1:a.find("}")]
                                    if b.find("{") != -1:
                                        getSubB = True
                                        isBIn0 = is_in_configuration(subconfigs[0],b[b.find("{")+1:b.find("}")])
                                        isBIn1 = is_in_configuration(subconfigs[1],b[b.find("{")+1:b.find("}")])
                                        b = b[b.find("{")+1:b.find("}")]
                                    
                                    if ((subconfigs[0].find(a) != -1 and subconfigs[1].find(b) != -1) and (currentVariety == subconfigs[2]) and (allNums == False and allConfigs == False)) or ((((getSubA and isAIn0) or subconfigs[0].find(a) != -1) and ((getSubB and isBIn1) or subconfigs[1].find(b) != -1)) and currentVariety == None):
                                        includeList.append(subconfigs[3])
                                        includeList.append(subconfigs[4])
                                        if hasPriority:
                                            priorityList.append(subconfigs[3])
                                            priorityList.append(subconfigs[4])
                                    if ((subconfigs[1].find(a) != -1 and subconfigs[0].find(b) != -1) and (currentVariety == subconfigs[2]) and (allNums == False and allConfigs == False)) or ((((getSubA and isAIn1) or subconfigs[1].find(a) != -1) and ((getSubB and isBIn0) or subconfigs[0].find(b) != -1)) and currentVariety == None):
                                        includeList.append(subconfigs[4])
                                        includeList.append(subconfigs[3])
                                        if hasPriority:
                                            priorityList.append(subconfigs[4])
                                            priorityList.append(subconfigs[4])
                                else:
                                    getSub = False
                                    isIn0 = False
                                    isIn1 = False
                                    if currentSubconfig.find("{") != -1:
                                        getSub = True
                                        currentSubconfig = currentSubconfig[currentSubconfig.find("{")+1:currentSubconfig.find("}")]
                                        isIn0 = is_in_configuration(subconfigs[0],currentSubconfig)
                                        isIn1 = is_in_configuration(subconfigs[1],currentSubconfig)
                                    if (subconfigs[0].find(currentSubconfig) != -1 or subconfigs[1].find(currentSubconfig) != -1) or (getSub and (isIn0 or isIn1)):
                                        includeList.append(subconfigs[3])
                                        includeList.append(subconfigs[4])
                                        if hasPriority:
                                            priorityList.append(subconfigs[3])
                                            priorityList.append(subconfigs[4])
                            else:
                                if currentSubconfig.find(",") != -1:
                                    a = currentSubconfig[:currentSubconfig.find(",")]
                                    b = currentSubconfig[currentSubconfig.find(",")+1:]
                                    getSubA = False
                                    getSubB = False
                                    isAIn0 = False
                                    isAIn1 = False
                                    IsBIn0 = False
                                    IsBIn1 = False
                                    if a.find("{") != -1:
                                        getSubA = True
                                        isAIn0 = is_in_configuration(subconfigs[0],a[a.find("{")+1:a.find("}")])
                                        isAIn1 = is_in_configuration(subconfigs[1],a[a.find("{")+1:a.find("}")])
                                        a = a[a.find("{")+1:a.find("}")]
                                    if b.find("{") != -1:
                                        getSubB = True
                                        isBIn0 = is_in_configuration(subconfigs[0],b[b.find("{")+1:b.find("}")])
                                        isBIn1 = is_in_configuration(subconfigs[1],b[b.find("{")+1:b.find("}")])
                                        b = b[b.find("{")+1:b.find("}")]
                                    
                                    if ((subconfigs[0].find(a) != -1 and subconfigs[1].find(b) != -1) and (currentVariety == subconfigs[2]) and (allNums == False and allConfigs == False)) or ((((getSubA and isAIn0) or subconfigs[0].find(a) != -1) and ((getSubB and isBIn1) or subconfigs[1].find(b) != -1)) and currentVariety == None):
                                        excludeList.append(subconfigs[3])
                                    if ((subconfigs[1].find(a) != -1 and subconfigs[0].find(b) != -1) and (currentVariety == subconfigs[2]) and (allNums == False and allConfigs == False)) or ((((getSubA and isAIn1) or subconfigs[1].find(a) != -1) and ((getSubB and isBIn0) or subconfigs[0].find(b) != -1)) and currentVariety == None):
                                        excludeList.append(subconfigs[4])
                                elif currentSubconfig.find("^") != -1:
                                    a = currentSubconfig[:currentSubconfig.find("^")]
                                    b = currentSubconfig[currentSubconfig.find("^")+1:]
                                    getSubA = False
                                    getSubB = False
                                    isAIn0 = False
                                    isAIn1 = False
                                    IsBIn0 = False
                                    IsBIn1 = False
                                    if a.find("{") != -1:
                                        getSubA = True
                                        isAIn0 = is_in_configuration(subconfigs[0],a[a.find("{")+1:a.find("}")])
                                        isAIn1 = is_in_configuration(subconfigs[1],a[a.find("{")+1:a.find("}")])
                                        a = a[a.find("{")+1:a.find("}")]
                                    if b.find("{") != -1:
                                        getSubB = True
                                        isBIn0 = is_in_configuration(subconfigs[0],b[b.find("{")+1:b.find("}")])
                                        isBIn1 = is_in_configuration(subconfigs[1],b[b.find("{")+1:b.find("}")])
                                        b = b[b.find("{")+1:b.find("}")]
                                    
                                    if ((subconfigs[0].find(a) != -1 and subconfigs[1].find(b) != -1) and (currentVariety == subconfigs[2]) and (allNums == False and allConfigs == False)) or ((((getSubA and isAIn0) or subconfigs[0].find(a) != -1) and ((getSubB and isBIn1) or subconfigs[1].find(b) != -1)) and currentVariety == None):
                                        excludeList.append(subconfigs[3])
                                        excludeList.append(subconfigs[4])
                                    if ((subconfigs[1].find(a) != -1 and subconfigs[0].find(b) != -1) and (currentVariety == subconfigs[2]) and (allNums == False and allConfigs == False)) or ((((getSubA and isAIn1) or subconfigs[1].find(a) != -1) and ((getSubB and isBIn0) or subconfigs[0].find(b) != -1)) and currentVariety == None):
                                        excludeList.append(subconfigs[4])
                                        excludeList.append(subconfigs[3])
                                else:
                                    getSub = False
                                    isIn0 = False
                                    isIn1 = False
                                    if currentSubconfig.find("{") != -1:
                                        getSub = True
                                        currentSubconfig = currentSubconfig[currentSubconfig.find("{")+1:currentSubconfig.find("}")]
                                        isIn0 = is_in_configuration(subconfigs[0],currentSubconfig)
                                        isIn1 = is_in_configuration(subconfigs[1],currentSubconfig)
                                    if (subconfigs[0].find(currentSubconfig) != -1 or subconfigs[1].find(currentSubconfig) != -1) or (getSub and (isIn0 or isIn1)):
                                        excludeList.append(subconfigs[3])
                                        excludeList.append(subconfigs[4])
                                
                                


    if c == "/":
        isIncluding = True

        for gstrings in includeList:
            if ((gstrings in excludeList) == False) or (gstrings in priorityList):
                itemList.append(str(currentBeginEnd[0]) + gstrings + str(currentBeginEnd[1]))

        includeList = []
        excludeList = []
        priorityList = []
        
        if rulestring[currentPos:currentPos+3] == "/BB":
            currentBeginEnd = [0,2]
        if rulestring[currentPos:currentPos+3] == "/TA":
            currentBeginEnd = [1,2]
        if rulestring[currentPos:currentPos+3] == "/TB":
            currentBeginEnd = [2,1]
        if rulestring[currentPos:currentPos+3] == "/SA":
            currentBeginEnd = [1,1]
        if rulestring[currentPos:currentPos+3] == "/SB":
            currentBeginEnd = [2,2]


        currentNum = None
        currentConfig = None
        currentSubconfig = None
        currentVariety = None
        isInSubconfig = False
        isIncluding = True
        allNums = True
        allConfigs = True
        hasPriority = False
        
        

    currentPos = currentPos + 1


for gstrings in includeList:
    if ((gstrings in excludeList) == False) or (gstrings in priorityList):
        itemList.append(str(currentBeginEnd[0]) + gstrings + str(currentBeginEnd[1]))

tempList = itemList
itemList = []
for y in tempList:
    if (y != "0000000001" and y != "0000000002") and ((y in itemList) == False):
        itemList.append(y)
for x in itemList:
    tmpStr = ""
    for c in x:
        tmpStr = tmpStr + c + ","
    tmpStr = tmpStr[:19]
    body = body + tmpStr + "\n"

body = body + "a,ab,ac,ad,ae,af,ag,ah,ai,0\n"
numlines = len(rulestring) // 900
filestring = top + header + body
for x in range(numlines):
    filestring = filestring + "#" + tail[900*x:900*(x+1)] +"\n"

f = open(golly.getdir("rules") + filename + ".rule","w")
f.write(filestring)
f.close()

golly.setrule(filename)

I wrote a stdin script that generates random soups of a provided number of a given spaceship. It works for all (non-B0) spaceships in the INT rulespace!
A Multistate INT notation + script.
Cyclotrons
Posts: 132
Joined: January 26th, 2021, 12:19 am

Re: A Notation for 3-State INT Rules (and a script to turn them into rulefiles)

Post by Cyclotrons »

Since it's been so long and I literally can't parse my 2nd attempt at a notation, here is my 3rd and final attempt at a notation.

There are 6 sections that convey state changes: BA is 0->1, BB is 0->2, BTA is 2->1, ATB is 1->2, SA is 1->1, and SB is 2->2. The empty rulestring, which symbolizes all cells going to state 0 immediately, is BA/BB/BTA/ATB/SA/SB.

Individual transitions are represented by a series of constraints. As explained in my first post, transitions can be uniquely* described by the neighborhood configuration of all state 1 cells, the neighborhood configuration of all state 2 cells, and the neighborhood configuration of all live (non-zero, that is; it might have been better to just use all state 0 cells, come to think of it) cells. In this notation, they are displayed as such:

(number of live cells)(hensel letter of live cells);(number of state 1 cells)(hensel letter of state 1 cells);(number of state 2 cells)(hensel letter of state 2 cells)

without the parentheses. An example would be 2a;1c;1e, which means the transition occurs if all live cells have configuration 2a and all state 1 cells have configuration 1c and all state two cells have configuration 1e.

You can also use wildcards, represented with *, in a given position to indicate that that position isn't taken into consideration when constraining neighborhood configurations. For example, **;2*;** means that a transition will occur when there are two state 1 cells in the neighborhood, regardless of the number and hensel letter of live or state 2 cells, or the hensel letter of state 1 cells.

You may have noticed that it would be unambiguous to represent the wildcard with no characters at all, and I noticed too. Indeed, that is the 'correct' way or representing them, I only represented them above with * for demonstration purposes.

Constraints are separated by .. An example sequence:

4;2a;.;2a;1c.;2k;.8;7e;1e

You may have noticed that the above is slightly repetitive. You can shorten things a bit by factoring out as such:

[;2a;](4;;.;;1c.;k;)8;7e;1e

This means that every position in the constraint in the bracket is implicit to its respective position in every constraint in the parentheses. Note that constraints in the brackets aren't applied to the rule itself; this does not read as 'the transition occurs if the neighborhood has state 1 cells in the 2a configuration, regardless of the other states'. Also note that if a position in a parened constraint that isn't empty in the brackets also isn't empty in the constraint, then the position in the constraint takes precedence. Also also note that brackets and parens are displayed where a period otherwise would be, rather than being next to a period.

There is also the - symbol, after which all specified constraints are removed from the neighborhood configurations, rather than added, for the rest of the section (BA, BB, etc.). Example:

;2;-;2a;.;;5a - A transition occurs when there are two state 1 cells, unless the state 1 cells are in 2a configuration or the state 2 cells are in 5a configuration.

*You will note that the first post laid out exceptions to this. Annoyingly enough, these are what prevent this notation from being generalized to higher-state rulespaces. Anyway, the bottom configuration in each image (and their state inverses) can be yielded by adding a ' just before the end of the constraint. Unfortunately, as a consequence of the constraint system, the only way to get the configuration not marked by a ' on its lonesome is to put the one that is marked as such in the negative portion (ex. 5r;3r;2c-5r;3r;2c'). Addendum: the top ones on their lonesome can now be indicated by using two ' next to each other (''). The script has been updated to reflect this.

-

I also made a Golly script for this notation, too. Unlike the last one, I actually bugtested it, so it really works this time.

Make sure to put the script in your rules folder, because Golly throws a tantrum otherwise.

The rule I tested with: BA[;2a;](4;;.;;1c.;k;)5r;3r;2c-5r;3r;2c'/BB/BTA/ATB/SA/SB.

Code: Select all

import golly
import random

mutate = False	#randomly changes a number of transitions from the rule inputted if set to true
onlyadd= False	#if mutate is true, only adds transitions
onlyremove = False	#if mutate is true, only removes transitions; the default is to swap a given transition from what it was before (true->false and visa versa)
mutatechance = 0.01	#the chance for a transition to change
excludeB0 = True	#makes it so that B0 isn't allowed when set to true
copynewrule = False	#copies the rulestring for the new rule to your clipboard when finishing
overwriteprotrection = True	#adds a random number to the end of the filename to prevent a file being overwritten upon name collision

transitionlist = [['00000000', 0, '0', 0, '0', 0, '0', None], ['00000001', 1, 'c', 1, 'c', 0, '0', None], ['00000002', 1, 'c', 0, '0', 1, 'c', None], ['00000010', 1, 'e', 1, 'e', 0, '0', None], ['00000011', 2, 'a', 2, 'a', 0, '0', None], ['00000012', 2, 'a', 1, 'e', 1, 'c', None], ['00000020', 1, 'e', 0, '0', 1, 'e', None], ['00000021', 2, 'a', 1, 'c', 1, 'e', None], ['00000022', 2, 'a', 0, '0', 2, 'a', None], ['00000101', 2, 'c', 2, 'c', 0, '0', None], ['00000102', 2, 'c', 1, 'c', 1, 'c', None], ['00000111', 3, 'i', 3, 'i', 0, '0', None], ['00000112', 3, 'i', 2, 'a', 1, 'c', None], ['00000121', 3, 'i', 2, 'c', 1, 'e', None], ['00000122', 3, 'i', 1, 'c', 2, 'a', None], ['00000202', 2, 'c', 0, '0', 2, 'c', None], ['00000212', 3, 'i', 1, 'e', 2, 'c', None], ['00000222', 3, 'i', 0, '0', 3, 'i', None], ['00001001', 2, 'k', 2, 'k', 0, '0', None], ['00001002', 2, 'k', 1, 'e', 1, 'c', None], ['00001010', 2, 'e', 2, 'e', 0, '0', None], ['00001011', 3, 'j', 3, 'j', 0, '0', None], ['00001012', 3, 'j', 2, 'e', 1, 'c', None], ['00001020', 2, 'e', 1, 'e', 1, 'e', None], ['00001021', 3, 'j', 2, 'k', 1, 'e', None], ['00001022', 3, 'j', 1, 'e', 2, 'a', None], ['00001101', 3, 'n', 3, 'n', 0, '0', None], ['00001102', 3, 'n', 2, 'a', 1, 'c', None], ['00001110', 3, 'a', 3, 'a', 0, '0', None], ['00001111', 4, 'a', 4, 'a', 0, '0', None], ['00001112', 4, 'a', 3, 'a', 1, 'c', None], ['00001120', 3, 'a', 2, 'a', 1, 'e', None], ['00001121', 4, 'a', 3, 'n', 1, 'e', None], ['00001122', 4, 'a', 2, 'a', 2, 'a', False], ['00001201', 3, 'n', 2, 'k', 1, 'c', None], ['00001202', 3, 'n', 1, 'e', 2, 'c', None], ['00001210', 3, 'a', 2, 'e', 1, 'c', None], ['00001211', 4, 'a', 3, 'j', 1, 'c', None], ['00001212', 4, 'a', 2, 'e', 2, 'c', None], ['00001220', 3, 'a', 1, 'e', 2, 'a', None], ['00001221', 4, 'a', 2, 'k', 2, 'a', None], ['00001222', 4, 'a', 1, 'e', 3, 'i', None], ['00002001', 2, 'k', 1, 'c', 1, 'e', None], ['00002002', 2, 'k', 0, '0', 2, 'k', None], ['00002011', 3, 'j', 2, 'a', 1, 'e', None], ['00002012', 3, 'j', 1, 'e', 2, 'k', None], ['00002020', 2, 'e', 0, '0', 2, 'e', None], ['00002021', 3, 'j', 1, 'c', 2, 'e', None], ['00002022', 3, 'j', 0, '0', 3, 'j', None], ['00002101', 3, 'n', 2, 'c', 1, 'e', None], ['00002102', 3, 'n', 1, 'c', 2, 'k', None], ['00002111', 4, 'a', 3, 'i', 1, 'e', None], ['00002112', 4, 'a', 2, 'a', 2, 'k', None], ['00002120', 3, 'a', 1, 'c', 2, 'e', None], ['00002121', 4, 'a', 2, 'c', 2, 'e', None], ['00002122', 4, 'a', 1, 'c', 3, 'j', None], ['00002201', 3, 'n', 1, 'c', 2, 'a', None], ['00002202', 3, 'n', 0, '0', 3, 'n', None], ['00002211', 4, 'a', 2, 'a', 2, 'a', True], ['00002212', 4, 'a', 1, 'e', 3, 'n', None], ['00002220', 3, 'a', 0, '0', 3, 'a', None], ['00002221', 4, 'a', 1, 'c', 3, 'a', None], ['00002222', 4, 'a', 0, '0', 4, 'a', None], ['00010001', 2, 'n', 2, 'n', 0, '0', None], ['00010002', 2, 'n', 1, 'c', 1, 'c', None], ['00010011', 3, 'q', 3, 'q', 0, '0', None], ['00010012', 3, 'q', 2, 'k', 1, 'c', None], ['00010021', 3, 'q', 2, 'n', 1, 'e', None], ['00010022', 3, 'q', 1, 'c', 2, 'a', None], ['00010101', 3, 'c', 3, 'c', 0, '0', None], ['00010102', 3, 'c', 2, 'c', 1, 'c', None], ['00010111', 4, 'n', 4, 'n', 0, '0', None], ['00010112', 4, 'n', 3, 'n', 1, 'c', None], ['00010121', 4, 'n', 3, 'c', 1, 'e', None], ['00010122', 4, 'n', 2, 'c', 2, 'a', None], ['00010201', 3, 'c', 2, 'n', 1, 'c', None], ['00010202', 3, 'c', 1, 'c', 2, 'c', None], ['00010211', 4, 'n', 3, 'q', 1, 'c', None], ['00010212', 4, 'n', 2, 'k', 2, 'c', None], ['00010221', 4, 'n', 2, 'n', 2, 'a', None], ['00010222', 4, 'n', 1, 'c', 3, 'i', None], ['00011002', 3, 'q', 2, 'a', 1, 'c', None], ['00011011', 4, 'w', 4, 'w', 0, '0', None], ['00011012', 4, 'w', 3, 'j', 1, 'c', None], ['00011021', 4, 'w', 3, 'q', 1, 'e', None], ['00011022', 4, 'w', 2, 'a', 2, 'a', None], ['00011102', 4, 'n', 3, 'i', 1, 'c', None], ['00011111', 5, 'a', 5, 'a', 0, '0', None], ['00011112', 5, 'a', 4, 'a', 1, 'c', None], ['00011121', 5, 'a', 4, 'n', 1, 'e', None], ['00011122', 5, 'a', 3, 'i', 2, 'a', None], ['00011202', 4, 'n', 2, 'a', 2, 'c', None], ['00011211', 5, 'a', 4, 'w', 1, 'c', None], ['00011212', 5, 'a', 3, 'j', 2, 'c', None], ['00011221', 5, 'a', 3, 'q', 2, 'a', None], ['00011222', 5, 'a', 2, 'a', 3, 'i', None], ['00012002', 3, 'q', 1, 'c', 2, 'k', None], ['00012012', 4, 'w', 2, 'k', 2, 'k', None], ['00012021', 4, 'w', 2, 'n', 2, 'e', None], ['00012022', 4, 'w', 1, 'c', 3, 'j', None], ['00012102', 4, 'n', 2, 'c', 2, 'k', None], ['00012112', 5, 'a', 3, 'n', 2, 'k', None], ['00012121', 5, 'a', 3, 'c', 2, 'e', None], ['00012122', 5, 'a', 2, 'c', 3, 'j', None], ['00012202', 4, 'n', 1, 'c', 3, 'n', None], ['00012212', 5, 'a', 2, 'k', 3, 'n', None], ['00012221', 5, 'a', 2, 'n', 3, 'a', None], ['00012222', 5, 'a', 1, 'c', 4, 'a', None], ['00020002', 2, 'n', 0, '0', 2, 'n', None], ['00020012', 3, 'q', 1, 'e', 2, 'n', None], ['00020022', 3, 'q', 0, '0', 3, 'q', None], ['00020102', 3, 'c', 1, 'c', 2, 'n', None], ['00020112', 4, 'n', 2, 'a', 2, 'n', None], ['00020122', 4, 'n', 1, 'c', 3, 'q', None], ['00020202', 3, 'c', 0, '0', 3, 'c', None], ['00020212', 4, 'n', 1, 'e', 3, 'c', None], ['00020222', 4, 'n', 0, '0', 4, 'n', None], ['00021012', 4, 'w', 2, 'e', 2, 'n', None], ['00021022', 4, 'w', 1, 'e', 3, 'q', None], ['00021112', 5, 'a', 3, 'a', 2, 'n', None], ['00021122', 5, 'a', 2, 'a', 3, 'q', None], ['00021212', 5, 'a', 2, 'e', 3, 'c', None], ['00021222', 5, 'a', 1, 'e', 4, 'n', None], ['00022022', 4, 'w', 0, '0', 4, 'w', None], ['00022122', 5, 'a', 1, 'c', 4, 'w', None], ['00022222', 5, 'a', 0, '0', 5, 'a', None], ['00100010', 2, 'i', 2, 'i', 0, '0', None], ['00100011', 3, 'r', 3, 'r', 0, '0', None], ['00100012', 3, 'r', 2, 'i', 1, 'c', None], ['00100020', 2, 'i', 1, 'e', 1, 'e', None], ['00100021', 3, 'r', 2, 'k', 1, 'e', None], ['00100022', 3, 'r', 1, 'e', 2, 'a', None], ['00100101', 3, 'y', 3, 'y', 0, '0', None], ['00100102', 3, 'y', 2, 'k', 1, 'c', None], ['00100111', 4, 't', 4, 't', 0, '0', None], ['00100112', 4, 't', 3, 'r', 1, 'c', None], ['00100121', 4, 't', 3, 'y', 1, 'e', None], ['00100122', 4, 't', 2, 'k', 2, 'a', None], ['00100202', 3, 'y', 1, 'e', 2, 'c', None], ['00100212', 4, 't', 2, 'i', 2, 'c', None], ['00100222', 4, 't', 1, 'e', 3, 'i', None], ['00101001', 3, 'k', 3, 'k', 0, '0', None], ['00101002', 3, 'k', 2, 'e', 1, 'c', None], ['00101010', 3, 'e', 3, 'e', 0, '0', None], ['00101011', 4, 'j', 4, 'j', 0, '0', None], ['00101012', 4, 'j', 3, 'e', 1, 'c', None], ['00101020', 3, 'e', 2, 'e', 1, 'e', None], ['00101021', 4, 'j', 3, 'k', 1, 'e', None], ['00101022', 4, 'j', 2, 'e', 2, 'a', None], ['00101101', 4, 'k', 4, 'k', 0, '0', None], ['00101102', 4, 'k', 3, 'j', 1, 'c', None], ['00101110', 4, 'r', 4, 'r', 0, '0', None], ['00101111', 5, 'n', 5, 'n', 0, '0', None], ['00101112', 5, 'n', 4, 'r', 1, 'c', None], ['00101120', 4, 'r', 3, 'j', 1, 'e', None], ['00101121', 5, 'n', 4, 'k', 1, 'e', None], ['00101122', 5, 'n', 3, 'j', 2, 'a', None], ['00101201', 4, 'k', 3, 'k', 1, 'c', None], ['00101202', 4, 'k', 2, 'e', 2, 'c', None], ['00101210', 4, 'r', 3, 'e', 1, 'c', None], ['00101211', 5, 'n', 4, 'j', 1, 'c', None], ['00101212', 5, 'n', 3, 'e', 2, 'c', None], ['00101220', 4, 'r', 2, 'e', 2, 'a', None], ['00101221', 5, 'n', 3, 'k', 2, 'a', None], ['00101222', 5, 'n', 2, 'e', 3, 'i', None], ['00102001', 3, 'k', 2, 'k', 1, 'e', None], ['00102002', 3, 'k', 1, 'e', 2, 'k', None], ['00102010', 3, 'e', 2, 'i', 1, 'e', None], ['00102011', 4, 'j', 3, 'r', 1, 'e', None], ['00102012', 4, 'j', 2, 'i', 2, 'k', None], ['00102020', 3, 'e', 1, 'e', 2, 'e', None], ['00102021', 4, 'j', 2, 'k', 2, 'e', None], ['00102022', 4, 'j', 1, 'e', 3, 'j', None], ['00102101', 4, 'k', 3, 'y', 1, 'e', None], ['00102102', 4, 'k', 2, 'k', 2, 'k', False], ['00102110', 4, 'r', 3, 'r', 1, 'e', None], ['00102111', 5, 'n', 4, 't', 1, 'e', None], ['00102112', 5, 'n', 3, 'r', 2, 'k', None], ['00102120', 4, 'r', 2, 'k', 2, 'e', None], ['00102121', 5, 'n', 3, 'y', 2, 'e', None], ['00102122', 5, 'n', 2, 'k', 3, 'j', None], ['00102201', 4, 'k', 2, 'k', 2, 'a', None], ['00102202', 4, 'k', 1, 'e', 3, 'n', None], ['00102210', 4, 'r', 2, 'i', 2, 'a', None], ['00102211', 5, 'n', 3, 'r', 2, 'a', None], ['00102212', 5, 'n', 2, 'i', 3, 'n', None], ['00102220', 4, 'r', 1, 'e', 3, 'a', None], ['00102221', 5, 'n', 2, 'k', 3, 'a', None], ['00102222', 5, 'n', 1, 'e', 4, 'a', None], ['00110011', 4, 'z', 4, 'z', 0, '0', None], ['00110012', 4, 'z', 3, 'r', 1, 'c', None], ['00110020', 3, 'r', 2, 'a', 1, 'e', None], ['00110021', 4, 'z', 3, 'q', 1, 'e', None], ['00110022', 4, 'z', 2, 'a', 2, 'a', None], ['00110101', 4, 'y', 4, 'y', 0, '0', None], ['00110102', 4, 'y', 3, 'n', 1, 'c', None], ['00110110', 4, 'i', 4, 'i', 0, '0', None], ['00110111', 5, 'r', 5, 'r', 0, '0', None], ['00110112', 5, 'r', 4, 'i', 1, 'c', None], ['00110120', 4, 'i', 3, 'n', 1, 'e', None], ['00110121', 5, 'r', 4, 'y', 1, 'e', None], ['00110122', 5, 'r', 3, 'n', 2, 'a', None], ['00110201', 4, 'y', 3, 'q', 1, 'c', None], ['00110202', 4, 'y', 2, 'a', 2, 'c', None], ['00110210', 4, 'i', 3, 'r', 1, 'c', None], ['00110211', 5, 'r', 4, 'z', 1, 'c', None], ['00110212', 5, 'r', 3, 'r', 2, 'c', False], ['00110220', 4, 'i', 2, 'a', 2, 'a', None], ['00110221', 5, 'r', 3, 'q', 2, 'a', None], ['00110222', 5, 'r', 2, 'a', 3, 'i', None], ['00111001', 4, 'q', 4, 'q', 0, '0', None], ['00111002', 4, 'q', 3, 'a', 1, 'c', None], ['00111011', 5, 'q', 5, 'q', 0, '0', None], ['00111012', 5, 'q', 4, 'r', 1, 'c', None], ['00111020', 4, 'r', 3, 'a', 1, 'e', None], ['00111021', 5, 'q', 4, 'q', 1, 'e', None], ['00111022', 5, 'q', 3, 'a', 2, 'a', None], ['00111101', 5, 'j', 5, 'j', 0, '0', None], ['00111102', 5, 'j', 4, 'a', 1, 'c', None], ['00111110', 5, 'i', 5, 'i', 0, '0', None], ['00111111', 6, 'a', 6, 'a', 0, '0', None], ['00111112', 6, 'a', 5, 'i', 1, 'c', None], ['00111120', 5, 'i', 4, 'a', 1, 'e', None], ['00111121', 6, 'a', 5, 'j', 1, 'e', None], ['00111122', 6, 'a', 4, 'a', 2, 'a', False], ['00111201', 5, 'j', 4, 'q', 1, 'c', None], ['00111202', 5, 'j', 3, 'a', 2, 'c', None], ['00111210', 5, 'i', 4, 'r', 1, 'c', None], ['00111211', 6, 'a', 5, 'q', 1, 'c', None], ['00111212', 6, 'a', 4, 'r', 2, 'c', None], ['00111220', 5, 'i', 3, 'a', 2, 'a', None], ['00111221', 6, 'a', 4, 'q', 2, 'a', None], ['00111222', 6, 'a', 3, 'a', 3, 'i', None], ['00112001', 4, 'q', 3, 'q', 1, 'e', None], ['00112002', 4, 'q', 2, 'a', 2, 'k', None], ['00112011', 5, 'q', 4, 'z', 1, 'e', None], ['00112012', 5, 'q', 3, 'r', 2, 'k', None], ['00112020', 4, 'r', 2, 'a', 2, 'e', None], ['00112021', 5, 'q', 3, 'q', 2, 'e', False], ['00112022', 5, 'q', 2, 'a', 3, 'j', None], ['00112101', 5, 'j', 4, 'y', 1, 'e', None], ['00112102', 5, 'j', 3, 'n', 2, 'k', None], ['00112110', 5, 'i', 4, 'i', 1, 'e', None], ['00112111', 6, 'a', 5, 'r', 1, 'e', None], ['00112112', 6, 'a', 4, 'i', 2, 'k', None], ['00112120', 5, 'i', 3, 'n', 2, 'e', None], ['00112121', 6, 'a', 4, 'y', 2, 'e', None], ['00112122', 6, 'a', 3, 'n', 3, 'j', None], ['00112201', 5, 'j', 3, 'q', 2, 'a', None], ['00112202', 5, 'j', 2, 'a', 3, 'n', None], ['00112210', 5, 'i', 3, 'r', 2, 'a', None], ['00112211', 6, 'a', 4, 'z', 2, 'a', None], ['00112212', 6, 'a', 3, 'r', 3, 'n', None], ['00112220', 5, 'i', 2, 'a', 3, 'a', None], ['00112221', 6, 'a', 3, 'q', 3, 'a', None], ['00112222', 6, 'a', 2, 'a', 4, 'a', True], ['00120012', 4, 'z', 2, 'i', 2, 'n', None], ['00120020', 3, 'r', 1, 'e', 2, 'k', None], ['00120021', 4, 'z', 2, 'k', 2, 'k', None], ['00120022', 4, 'z', 1, 'e', 3, 'q', None], ['00120101', 4, 'y', 3, 'y', 1, 'c', None], ['00120102', 4, 'y', 2, 'k', 2, 'n', None], ['00120111', 5, 'r', 4, 't', 1, 'c', None], ['00120112', 5, 'r', 3, 'r', 2, 'n', None], ['00120120', 4, 'i', 2, 'k', 2, 'k', None], ['00120121', 5, 'r', 3, 'y', 2, 'k', None], ['00120122', 5, 'r', 2, 'k', 3, 'q', None], ['00120201', 4, 'y', 2, 'k', 2, 'c', None], ['00120202', 4, 'y', 1, 'e', 3, 'c', None], ['00120210', 4, 'i', 2, 'i', 2, 'c', None], ['00120211', 5, 'r', 3, 'r', 2, 'c', True], ['00120212', 5, 'r', 2, 'i', 3, 'c', None], ['00120220', 4, 'i', 1, 'e', 3, 'n', None], ['00120221', 5, 'r', 2, 'k', 3, 'n', None], ['00120222', 5, 'r', 1, 'e', 4, 'n', None], ['00121001', 4, 'q', 3, 'k', 1, 'c', None], ['00121002', 4, 'q', 2, 'e', 2, 'n', None], ['00121011', 5, 'q', 4, 'j', 1, 'c', None], ['00121012', 5, 'q', 3, 'e', 2, 'n', None], ['00121020', 4, 'r', 2, 'e', 2, 'k', None], ['00121021', 5, 'q', 3, 'k', 2, 'k', None], ['00121022', 5, 'q', 2, 'e', 3, 'q', True], ['00121101', 5, 'j', 4, 'k', 1, 'c', None], ['00121102', 5, 'j', 3, 'j', 2, 'n', None], ['00121111', 6, 'a', 5, 'n', 1, 'c', None], ['00121112', 6, 'a', 4, 'r', 2, 'n', None], ['00121120', 5, 'i', 3, 'j', 2, 'k', None], ['00121121', 6, 'a', 4, 'k', 2, 'k', None], ['00121122', 6, 'a', 3, 'j', 3, 'q', None], ['00121201', 5, 'j', 3, 'k', 2, 'c', None], ['00121202', 5, 'j', 2, 'e', 3, 'c', None], ['00121210', 5, 'i', 3, 'e', 2, 'c', None], ['00121211', 6, 'a', 4, 'j', 2, 'c', None], ['00121212', 6, 'a', 3, 'e', 3, 'c', None], ['00121220', 5, 'i', 2, 'e', 3, 'n', None], ['00121221', 6, 'a', 3, 'k', 3, 'n', None], ['00121222', 6, 'a', 2, 'e', 4, 'n', None], ['00122001', 4, 'q', 2, 'k', 2, 'a', None], ['00122002', 4, 'q', 1, 'e', 3, 'q', None], ['00122011', 5, 'q', 3, 'r', 2, 'a', None], ['00122012', 5, 'q', 2, 'i', 3, 'q', None], ['00122020', 4, 'r', 1, 'e', 3, 'j', None], ['00122021', 5, 'q', 2, 'k', 3, 'j', None], ['00122022', 5, 'q', 1, 'e', 4, 'w', None], ['00122101', 5, 'j', 3, 'y', 2, 'a', None], ['00122102', 5, 'j', 2, 'k', 3, 'q', None], ['00122111', 6, 'a', 4, 't', 2, 'a', None], ['00122112', 6, 'a', 3, 'r', 3, 'q', None], ['00122120', 5, 'i', 2, 'k', 3, 'j', None], ['00122121', 6, 'a', 3, 'y', 3, 'j', None], ['00122122', 6, 'a', 2, 'k', 4, 'w', None], ['00122201', 5, 'j', 2, 'k', 3, 'i', None], ['00122202', 5, 'j', 1, 'e', 4, 'n', None], ['00122210', 5, 'i', 2, 'i', 3, 'i', None], ['00122211', 6, 'a', 3, 'r', 3, 'i', None], ['00122212', 6, 'a', 2, 'i', 4, 'n', None], ['00122220', 5, 'i', 1, 'e', 4, 'a', None], ['00122221', 6, 'a', 2, 'k', 4, 'a', None], ['00122222', 6, 'a', 1, 'e', 5, 'a', None], ['00200020', 2, 'i', 0, '0', 2, 'i', None], ['00200021', 3, 'r', 1, 'c', 2, 'i', None], ['00200022', 3, 'r', 0, '0', 3, 'r', None], ['00200101', 3, 'y', 2, 'c', 1, 'e', None], ['00200102', 3, 'y', 1, 'c', 2, 'k', None], ['00200111', 4, 't', 3, 'i', 1, 'e', None], ['00200112', 4, 't', 2, 'a', 2, 'k', None], ['00200121', 4, 't', 2, 'c', 2, 'i', None], ['00200122', 4, 't', 1, 'c', 3, 'r', None], ['00200202', 3, 'y', 0, '0', 3, 'y', None], ['00200212', 4, 't', 1, 'e', 3, 'y', None], ['00200222', 4, 't', 0, '0', 4, 't', None], ['00201011', 4, 'j', 3, 'j', 1, 'e', None], ['00201012', 4, 'j', 2, 'e', 2, 'k', None], ['00201020', 3, 'e', 1, 'e', 2, 'i', None], ['00201021', 4, 'j', 2, 'k', 2, 'i', None], ['00201022', 4, 'j', 1, 'e', 3, 'r', None], ['00201101', 4, 'k', 3, 'n', 1, 'e', None], ['00201102', 4, 'k', 2, 'a', 2, 'k', None], ['00201111', 5, 'n', 4, 'a', 1, 'e', None], ['00201112', 5, 'n', 3, 'a', 2, 'k', None], ['00201120', 4, 'r', 2, 'a', 2, 'i', None], ['00201121', 5, 'n', 3, 'n', 2, 'i', None], ['00201122', 5, 'n', 2, 'a', 3, 'r', None], ['00201201', 4, 'k', 2, 'k', 2, 'k', True], ['00201202', 4, 'k', 1, 'e', 3, 'y', None], ['00201211', 5, 'n', 3, 'j', 2, 'k', None], ['00201212', 5, 'n', 2, 'e', 3, 'y', None], ['00201220', 4, 'r', 1, 'e', 3, 'r', None], ['00201221', 5, 'n', 2, 'k', 3, 'r', None], ['00201222', 5, 'n', 1, 'e', 4, 't', None], ['00202001', 3, 'k', 1, 'c', 2, 'e', None], ['00202002', 3, 'k', 0, '0', 3, 'k', None], ['00202011', 4, 'j', 2, 'a', 2, 'e', None], ['00202012', 4, 'j', 1, 'e', 3, 'k', None], ['00202020', 3, 'e', 0, '0', 3, 'e', None], ['00202021', 4, 'j', 1, 'c', 3, 'e', None], ['00202022', 4, 'j', 0, '0', 4, 'j', None], ['00202101', 4, 'k', 2, 'c', 2, 'e', None], ['00202102', 4, 'k', 1, 'c', 3, 'k', None], ['00202111', 5, 'n', 3, 'i', 2, 'e', None], ['00202112', 5, 'n', 2, 'a', 3, 'k', None], ['00202120', 4, 'r', 1, 'c', 3, 'e', None], ['00202121', 5, 'n', 2, 'c', 3, 'e', None], ['00202122', 5, 'n', 1, 'c', 4, 'j', None], ['00202201', 4, 'k', 1, 'c', 3, 'j', None], ['00202202', 4, 'k', 0, '0', 4, 'k', None], ['00202211', 5, 'n', 2, 'a', 3, 'j', None], ['00202212', 5, 'n', 1, 'e', 4, 'k', None], ['00202220', 4, 'r', 0, '0', 4, 'r', None], ['00202221', 5, 'n', 1, 'c', 4, 'r', None], ['00202222', 5, 'n', 0, '0', 5, 'n', None], ['00210021', 4, 'z', 2, 'n', 2, 'i', None], ['00210022', 4, 'z', 1, 'c', 3, 'r', None], ['00210101', 4, 'y', 3, 'c', 1, 'e', None], ['00210102', 4, 'y', 2, 'c', 2, 'k', None], ['00210111', 5, 'r', 4, 'n', 1, 'e', None], ['00210112', 5, 'r', 3, 'n', 2, 'k', None], ['00210120', 4, 'i', 2, 'c', 2, 'i', None], ['00210121', 5, 'r', 3, 'c', 2, 'i', None], ['00210122', 5, 'r', 2, 'c', 3, 'r', True], ['00210201', 4, 'y', 2, 'n', 2, 'k', None], ['00210202', 4, 'y', 1, 'c', 3, 'y', None], ['00210211', 5, 'r', 3, 'q', 2, 'k', None], ['00210212', 5, 'r', 2, 'k', 3, 'y', None], ['00210220', 4, 'i', 1, 'c', 3, 'r', None], ['00210221', 5, 'r', 2, 'n', 3, 'r', None], ['00210222', 5, 'r', 1, 'c', 4, 't', None], ['00211011', 5, 'q', 4, 'w', 1, 'e', None], ['00211012', 5, 'q', 3, 'j', 2, 'k', None], ['00211021', 5, 'q', 3, 'q', 2, 'i', None], ['00211022', 5, 'q', 2, 'a', 3, 'r', None], ['00211101', 5, 'j', 4, 'n', 1, 'e', None], ['00211102', 5, 'j', 3, 'i', 2, 'k', None], ['00211111', 6, 'a', 5, 'a', 1, 'e', None], ['00211112', 6, 'a', 4, 'a', 2, 'k', None], ['00211120', 5, 'i', 3, 'i', 2, 'i', None], ['00211121', 6, 'a', 4, 'n', 2, 'i', None], ['00211122', 6, 'a', 3, 'i', 3, 'r', None], ['00211201', 5, 'j', 3, 'q', 2, 'k', None], ['00211202', 5, 'j', 2, 'a', 3, 'y', None], ['00211211', 6, 'a', 4, 'w', 2, 'k', None], ['00211212', 6, 'a', 3, 'j', 3, 'y', None], ['00211220', 5, 'i', 2, 'a', 3, 'r', None], ['00211221', 6, 'a', 3, 'q', 3, 'r', None], ['00211222', 6, 'a', 2, 'a', 4, 't', None], ['00212001', 4, 'q', 2, 'n', 2, 'e', None], ['00212002', 4, 'q', 1, 'c', 3, 'k', None], ['00212011', 5, 'q', 3, 'q', 2, 'e', True], ['00212012', 5, 'q', 2, 'k', 3, 'k', None], ['00212021', 5, 'q', 2, 'n', 3, 'e', None], ['00212022', 5, 'q', 1, 'c', 4, 'j', None], ['00212101', 5, 'j', 3, 'c', 2, 'e', None], ['00212102', 5, 'j', 2, 'c', 3, 'k', None], ['00212111', 6, 'a', 4, 'n', 2, 'e', None], ['00212112', 6, 'a', 3, 'n', 3, 'k', None], ['00212120', 5, 'i', 2, 'c', 3, 'e', None], ['00212121', 6, 'a', 3, 'c', 3, 'e', None], ['00212122', 6, 'a', 2, 'c', 4, 'j', None], ['00212201', 5, 'j', 2, 'n', 3, 'j', None], ['00212202', 5, 'j', 1, 'c', 4, 'k', None], ['00212211', 6, 'a', 3, 'q', 3, 'j', None], ['00212212', 6, 'a', 2, 'k', 4, 'k', None], ['00212220', 5, 'i', 1, 'c', 4, 'r', None], ['00212221', 6, 'a', 2, 'n', 4, 'r', None], ['00212222', 6, 'a', 1, 'c', 5, 'n', None], ['00220022', 4, 'z', 0, '0', 4, 'z', None], ['00220101', 4, 'y', 2, 'c', 2, 'a', None], ['00220102', 4, 'y', 1, 'c', 3, 'q', None], ['00220111', 5, 'r', 3, 'i', 2, 'a', None], ['00220112', 5, 'r', 2, 'a', 3, 'q', None], ['00220121', 5, 'r', 2, 'c', 3, 'r', False], ['00220122', 5, 'r', 1, 'c', 4, 'z', None], ['00220201', 4, 'y', 1, 'c', 3, 'n', None], ['00220202', 4, 'y', 0, '0', 4, 'y', None], ['00220211', 5, 'r', 2, 'a', 3, 'n', None], ['00220212', 5, 'r', 1, 'e', 4, 'y', None], ['00220220', 4, 'i', 0, '0', 4, 'i', None], ['00220221', 5, 'r', 1, 'c', 4, 'i', None], ['00220222', 5, 'r', 0, '0', 5, 'r', None], ['00221011', 5, 'q', 3, 'j', 2, 'a', None], ['00221012', 5, 'q', 2, 'e', 3, 'q', False], ['00221021', 5, 'q', 2, 'k', 3, 'r', None], ['00221022', 5, 'q', 1, 'e', 4, 'z', None], ['00221101', 5, 'j', 3, 'n', 2, 'a', None], ['00221102', 5, 'j', 2, 'a', 3, 'q', None], ['00221111', 6, 'a', 4, 'a', 2, 'a', True], ['00221112', 6, 'a', 3, 'a', 3, 'q', None], ['00221121', 6, 'a', 3, 'n', 3, 'r', None], ['00221122', 6, 'a', 2, 'a', 4, 'z', None], ['00221201', 5, 'j', 2, 'k', 3, 'n', None], ['00221202', 5, 'j', 1, 'e', 4, 'y', None], ['00221211', 6, 'a', 3, 'j', 3, 'n', None], ['00221212', 6, 'a', 2, 'e', 4, 'y', None], ['00221220', 5, 'i', 1, 'e', 4, 'i', None], ['00221221', 6, 'a', 2, 'k', 4, 'i', None], ['00221222', 6, 'a', 1, 'e', 5, 'r', None], ['00222001', 4, 'q', 1, 'c', 3, 'a', None], ['00222002', 4, 'q', 0, '0', 4, 'q', None], ['00222011', 5, 'q', 2, 'a', 3, 'a', None], ['00222012', 5, 'q', 1, 'e', 4, 'q', None], ['00222021', 5, 'q', 1, 'c', 4, 'r', None], ['00222022', 5, 'q', 0, '0', 5, 'q', None], ['00222101', 5, 'j', 2, 'c', 3, 'a', None], ['00222102', 5, 'j', 1, 'c', 4, 'q', None], ['00222111', 6, 'a', 3, 'i', 3, 'a', None], ['00222112', 6, 'a', 2, 'a', 4, 'q', None], ['00222121', 6, 'a', 2, 'c', 4, 'r', None], ['00222122', 6, 'a', 1, 'c', 5, 'q', None], ['00222201', 5, 'j', 1, 'c', 4, 'a', None], ['00222202', 5, 'j', 0, '0', 5, 'j', None], ['00222211', 6, 'a', 2, 'a', 4, 'a', False], ['00222212', 6, 'a', 1, 'e', 5, 'j', None], ['00222220', 5, 'i', 0, '0', 5, 'i', None], ['00222221', 6, 'a', 1, 'c', 5, 'i', None], ['00222222', 6, 'a', 0, '0', 6, 'a', None], ['01010101', 4, 'c', 4, 'c', 0, '0', None], ['01010102', 4, 'c', 3, 'c', 1, 'c', None], ['01010111', 5, 'e', 5, 'e', 0, '0', None], ['01010112', 5, 'e', 4, 'y', 1, 'c', None], ['01010121', 5, 'e', 4, 'c', 1, 'e', None], ['01010122', 5, 'e', 3, 'c', 2, 'a', None], ['01010202', 4, 'c', 2, 'c', 2, 'c', None], ['01010212', 5, 'e', 3, 'y', 2, 'c', None], ['01010222', 5, 'e', 2, 'c', 3, 'i', None], ['01011011', 5, 'k', 5, 'k', 0, '0', None], ['01011012', 5, 'k', 4, 'k', 1, 'c', None], ['01011021', 5, 'k', 4, 'y', 1, 'e', None], ['01011022', 5, 'k', 3, 'n', 2, 'a', None], ['01011102', 5, 'e', 4, 'n', 1, 'c', None], ['01011111', 6, 'e', 6, 'e', 0, '0', None], ['01011112', 6, 'e', 5, 'j', 1, 'c', None], ['01011121', 6, 'e', 5, 'e', 1, 'e', None], ['01011122', 6, 'e', 4, 'n', 2, 'a', None], ['01011202', 5, 'e', 3, 'n', 2, 'c', None], ['01011211', 6, 'e', 5, 'k', 1, 'c', None], ['01011212', 6, 'e', 4, 'k', 2, 'c', None], ['01011221', 6, 'e', 4, 'y', 2, 'a', None], ['01011222', 6, 'e', 3, 'n', 3, 'i', None], ['01012012', 5, 'k', 3, 'y', 2, 'k', None], ['01012021', 5, 'k', 3, 'c', 2, 'e', None], ['01012022', 5, 'k', 2, 'c', 3, 'j', None], ['01012102', 5, 'e', 3, 'c', 2, 'k', None], ['01012112', 6, 'e', 4, 'y', 2, 'k', None], ['01012121', 6, 'e', 4, 'c', 2, 'e', None], ['01012122', 6, 'e', 3, 'c', 3, 'j', None], ['01012202', 5, 'e', 2, 'c', 3, 'n', None], ['01012212', 6, 'e', 3, 'y', 3, 'n', None], ['01012221', 6, 'e', 3, 'c', 3, 'a', None], ['01012222', 6, 'e', 2, 'c', 4, 'a', None], ['01020102', 4, 'c', 2, 'n', 2, 'n', None], ['01020112', 5, 'e', 3, 'q', 2, 'n', None], ['01020122', 5, 'e', 2, 'n', 3, 'q', None], ['01020202', 4, 'c', 1, 'c', 3, 'c', None], ['01020212', 5, 'e', 2, 'k', 3, 'c', None], ['01020222', 5, 'e', 1, 'c', 4, 'n', None], ['01021012', 5, 'k', 3, 'k', 2, 'n', None], ['01021022', 5, 'k', 2, 'k', 3, 'q', None], ['01021112', 6, 'e', 4, 'q', 2, 'n', None], ['01021122', 6, 'e', 3, 'q', 3, 'q', False], ['01021212', 6, 'e', 3, 'k', 3, 'c', None], ['01021222', 6, 'e', 2, 'k', 4, 'n', None], ['01022022', 5, 'k', 1, 'c', 4, 'w', None], ['01022122', 6, 'e', 2, 'n', 4, 'w', None], ['01022222', 6, 'e', 1, 'c', 5, 'a', None], ['01101011', 5, 'y', 5, 'y', 0, '0', None], ['01101012', 5, 'y', 4, 'j', 1, 'c', None], ['01101021', 5, 'y', 4, 'k', 1, 'e', None], ['01101022', 5, 'y', 3, 'j', 2, 'a', None], ['01101102', 5, 'k', 4, 'w', 1, 'c', None], ['01101111', 6, 'k', 6, 'k', 0, '0', None], ['01101112', 6, 'k', 5, 'q', 1, 'c', None], ['01101121', 6, 'k', 5, 'k', 1, 'e', None], ['01101122', 6, 'k', 4, 'w', 2, 'a', None], ['01101202', 5, 'k', 3, 'j', 2, 'c', None], ['01101211', 6, 'k', 5, 'y', 1, 'c', None], ['01101212', 6, 'k', 4, 'j', 2, 'c', None], ['01101221', 6, 'k', 4, 'k', 2, 'a', None], ['01101222', 6, 'k', 3, 'j', 3, 'i', None], ['01102011', 5, 'y', 4, 'i', 1, 'e', None], ['01102012', 5, 'y', 3, 'r', 2, 'k', None], ['01102021', 5, 'y', 3, 'n', 2, 'e', None], ['01102022', 5, 'y', 2, 'a', 3, 'j', None], ['01102102', 5, 'k', 3, 'q', 2, 'k', None], ['01102111', 6, 'k', 5, 'r', 1, 'e', None], ['01102112', 6, 'k', 4, 'z', 2, 'k', None], ['01102121', 6, 'k', 4, 'y', 2, 'e', None], ['01102122', 6, 'k', 3, 'q', 3, 'j', None], ['01102202', 5, 'k', 2, 'a', 3, 'n', None], ['01102211', 6, 'k', 4, 'i', 2, 'a', None], ['01102212', 6, 'k', 3, 'r', 3, 'n', None], ['01102221', 6, 'k', 3, 'n', 3, 'a', None], ['01102222', 6, 'k', 2, 'a', 4, 'a', None], ['01110111', 6, 'i', 6, 'i', 0, '0', None], ['01110112', 6, 'i', 5, 'r', 1, 'c', None], ['01110121', 6, 'i', 5, 'e', 1, 'e', None], ['01110122', 6, 'i', 4, 'n', 2, 'a', None], ['01110202', 5, 'e', 3, 'i', 2, 'c', None], ['01110212', 6, 'i', 4, 't', 2, 'c', None], ['01110222', 6, 'i', 3, 'i', 3, 'i', None], ['01111012', 6, 'k', 5, 'n', 1, 'c', None], ['01111021', 6, 'k', 5, 'j', 1, 'e', None], ['01111022', 6, 'k', 4, 'a', 2, 'a', None], ['01111102', 6, 'e', 5, 'a', 1, 'c', None], ['01111111', 7, 'e', 7, 'e', 0, '0', None], ['01111112', 7, 'e', 6, 'a', 1, 'c', None], ['01111121', 7, 'e', 6, 'e', 1, 'e', None], ['01111122', 7, 'e', 5, 'a', 2, 'a', None], ['01111202', 6, 'e', 4, 'a', 2, 'c', None], ['01111211', 7, 'e', 6, 'k', 1, 'c', None], ['01111212', 7, 'e', 5, 'n', 2, 'c', None], ['01111221', 7, 'e', 5, 'j', 2, 'a', None], ['01111222', 7, 'e', 4, 'a', 3, 'i', None], ['01112012', 6, 'k', 4, 't', 2, 'k', None], ['01112021', 6, 'k', 4, 'n', 2, 'e', None], ['01112022', 6, 'k', 3, 'i', 3, 'j', None], ['01112102', 6, 'e', 4, 'n', 2, 'k', None], ['01112111', 7, 'e', 6, 'i', 1, 'e', None], ['01112112', 7, 'e', 5, 'r', 2, 'k', None], ['01112121', 7, 'e', 5, 'e', 2, 'e', None], ['01112122', 7, 'e', 4, 'n', 3, 'j', None], ['01112202', 6, 'e', 3, 'i', 3, 'n', None], ['01112211', 7, 'e', 5, 'r', 2, 'a', None], ['01112212', 7, 'e', 4, 't', 3, 'n', None], ['01112221', 7, 'e', 4, 'n', 3, 'a', None], ['01112222', 7, 'e', 3, 'i', 4, 'a', None], ['01120112', 6, 'i', 4, 'z', 2, 'n', None], ['01120121', 6, 'i', 4, 'y', 2, 'k', None], ['01120122', 6, 'i', 3, 'q', 3, 'q', None], ['01120202', 5, 'e', 2, 'a', 3, 'c', None], ['01120211', 6, 'i', 4, 'i', 2, 'c', None], ['01120212', 6, 'i', 3, 'r', 3, 'c', None], ['01120221', 6, 'i', 3, 'n', 3, 'n', None], ['01120222', 6, 'i', 2, 'a', 4, 'n', None], ['01121012', 6, 'k', 4, 'j', 2, 'n', None], ['01121021', 6, 'k', 4, 'k', 2, 'k', False], ['01121022', 6, 'k', 3, 'j', 3, 'q', None], ['01121102', 6, 'e', 4, 'w', 2, 'n', None], ['01121112', 7, 'e', 5, 'q', 2, 'n', None], ['01121121', 7, 'e', 5, 'k', 2, 'k', None], ['01121122', 7, 'e', 4, 'w', 3, 'q', None], ['01121202', 6, 'e', 3, 'j', 3, 'c', None], ['01121211', 7, 'e', 5, 'y', 2, 'c', None], ['01121212', 7, 'e', 4, 'j', 3, 'c', None], ['01121221', 7, 'e', 4, 'k', 3, 'n', None], ['01121222', 7, 'e', 3, 'j', 4, 'n', None], ['01122012', 6, 'k', 3, 'r', 3, 'q', None], ['01122021', 6, 'k', 3, 'n', 3, 'j', None], ['01122022', 6, 'k', 2, 'a', 4, 'w', None], ['01122102', 6, 'e', 3, 'q', 3, 'q', True], ['01122112', 7, 'e', 4, 'z', 3, 'q', None], ['01122121', 7, 'e', 4, 'y', 3, 'j', None], ['01122122', 7, 'e', 3, 'q', 4, 'w', None], ['01122202', 6, 'e', 2, 'a', 4, 'n', None], ['01122211', 7, 'e', 4, 'i', 3, 'i', None], ['01122212', 7, 'e', 3, 'r', 4, 'n', None], ['01122221', 7, 'e', 3, 'n', 4, 'a', None], ['01122222', 7, 'e', 2, 'a', 5, 'a', None], ['01201012', 5, 'y', 3, 'k', 2, 'k', None], ['01201021', 5, 'y', 3, 'y', 2, 'i', None], ['01201022', 5, 'y', 2, 'k', 3, 'r', None], ['01201112', 6, 'k', 4, 'q', 2, 'k', None], ['01201121', 6, 'k', 4, 'y', 2, 'i', None], ['01201122', 6, 'k', 3, 'q', 3, 'r', None], ['01201202', 5, 'k', 2, 'k', 3, 'y', None], ['01201212', 6, 'k', 3, 'k', 3, 'y', None], ['01201221', 6, 'k', 3, 'y', 3, 'r', None], ['01201222', 6, 'k', 2, 'k', 4, 't', None], ['01202012', 5, 'y', 2, 'k', 3, 'k', None], ['01202021', 5, 'y', 2, 'c', 3, 'e', None], ['01202022', 5, 'y', 1, 'c', 4, 'j', None], ['01202102', 5, 'k', 2, 'n', 3, 'k', None], ['01202112', 6, 'k', 3, 'q', 3, 'k', None], ['01202121', 6, 'k', 3, 'c', 3, 'e', None], ['01202122', 6, 'k', 2, 'n', 4, 'j', None], ['01202202', 5, 'k', 1, 'c', 4, 'k', None], ['01202212', 6, 'k', 2, 'k', 4, 'k', True], ['01202221', 6, 'k', 2, 'c', 4, 'r', None], ['01202222', 6, 'k', 1, 'c', 5, 'n', None], ['01210121', 6, 'i', 4, 'c', 2, 'i', None], ['01210122', 6, 'i', 3, 'c', 3, 'r', None], ['01210202', 5, 'e', 2, 'c', 3, 'y', None], ['01210212', 6, 'i', 3, 'y', 3, 'y', None], ['01210222', 6, 'i', 2, 'c', 4, 't', None], ['01211012', 6, 'k', 4, 'k', 2, 'k', True], ['01211022', 6, 'k', 3, 'n', 3, 'r', None], ['01211112', 7, 'e', 5, 'j', 2, 'k', None], ['01211121', 7, 'e', 5, 'e', 2, 'i', None], ['01211122', 7, 'e', 4, 'n', 3, 'r', None], ['01211202', 6, 'e', 3, 'n', 3, 'y', None], ['01211212', 7, 'e', 4, 'k', 3, 'y', None], ['01211221', 7, 'e', 4, 'y', 3, 'r', None], ['01211222', 7, 'e', 3, 'n', 4, 't', None], ['01212012', 6, 'k', 3, 'y', 3, 'k', None], ['01212022', 6, 'k', 2, 'c', 4, 'j', None], ['01212102', 6, 'e', 3, 'c', 3, 'k', None], ['01212112', 7, 'e', 4, 'y', 3, 'k', None], ['01212121', 7, 'e', 4, 'c', 3, 'e', None], ['01212122', 7, 'e', 3, 'c', 4, 'j', None], ['01212202', 6, 'e', 2, 'c', 4, 'k', None], ['01212212', 7, 'e', 3, 'y', 4, 'k', None], ['01212221', 7, 'e', 3, 'c', 4, 'r', None], ['01212222', 7, 'e', 2, 'c', 5, 'n', None], ['01220122', 6, 'i', 2, 'n', 4, 'z', None], ['01220202', 5, 'e', 1, 'c', 4, 'y', None], ['01220212', 6, 'i', 2, 'k', 4, 'y', None], ['01220221', 6, 'i', 2, 'c', 4, 'i', None], ['01220222', 6, 'i', 1, 'c', 5, 'r', None], ['01221012', 6, 'k', 3, 'k', 3, 'q', None], ['01221022', 6, 'k', 2, 'k', 4, 'z', None], ['01221112', 7, 'e', 4, 'q', 3, 'q', None], ['01221122', 7, 'e', 3, 'q', 4, 'z', None], ['01221202', 6, 'e', 2, 'k', 4, 'y', None], ['01221212', 7, 'e', 3, 'k', 4, 'y', None], ['01221221', 7, 'e', 3, 'y', 4, 'i', None], ['01221222', 7, 'e', 2, 'k', 5, 'r', None], ['01222012', 6, 'k', 2, 'k', 4, 'q', None], ['01222022', 6, 'k', 1, 'c', 5, 'q', None], ['01222102', 6, 'e', 2, 'n', 4, 'q', None], ['01222112', 7, 'e', 3, 'q', 4, 'q', None], ['01222122', 7, 'e', 2, 'n', 5, 'q', None], ['01222202', 6, 'e', 1, 'c', 5, 'j', None], ['01222212', 7, 'e', 2, 'k', 5, 'j', None], ['01222221', 7, 'e', 2, 'c', 5, 'i', None], ['01222222', 7, 'e', 1, 'c', 6, 'a', None], ['02020202', 4, 'c', 0, '0', 4, 'c', None], ['02020212', 5, 'e', 1, 'e', 4, 'c', None], ['02020222', 5, 'e', 0, '0', 5, 'e', None], ['02021012', 5, 'k', 2, 'e', 3, 'c', None], ['02021022', 5, 'k', 1, 'e', 4, 'y', None], ['02021112', 6, 'e', 3, 'a', 3, 'c', None], ['02021122', 6, 'e', 2, 'a', 4, 'y', None], ['02021212', 6, 'e', 2, 'e', 4, 'c', None], ['02021222', 6, 'e', 1, 'e', 5, 'e', None], ['02022022', 5, 'k', 0, '0', 5, 'k', None], ['02022122', 6, 'e', 1, 'c', 5, 'k', None], ['02022222', 6, 'e', 0, '0', 6, 'e', None], ['02101012', 5, 'y', 3, 'e', 2, 'c', None], ['02101022', 5, 'y', 2, 'e', 3, 'n', None], ['02101112', 6, 'k', 4, 'r', 2, 'c', None], ['02101122', 6, 'k', 3, 'j', 3, 'n', None], ['02101212', 6, 'k', 3, 'e', 3, 'c', None], ['02101222', 6, 'k', 2, 'e', 4, 'n', None], ['02102012', 5, 'y', 2, 'i', 3, 'y', None], ['02102022', 5, 'y', 1, 'e', 4, 'k', None], ['02102112', 6, 'k', 3, 'r', 3, 'y', None], ['02102122', 6, 'k', 2, 'k', 4, 'k', False], ['02102212', 6, 'k', 2, 'i', 4, 'y', None], ['02102222', 6, 'k', 1, 'e', 5, 'j', None], ['02111022', 6, 'k', 3, 'a', 3, 'n', None], ['02111112', 7, 'e', 5, 'i', 2, 'c', None], ['02111122', 7, 'e', 4, 'a', 3, 'n', None], ['02111212', 7, 'e', 4, 'r', 3, 'c', None], ['02111222', 7, 'e', 3, 'a', 4, 'n', None], ['02112022', 6, 'k', 2, 'a', 4, 'k', None], ['02112112', 7, 'e', 4, 'i', 3, 'y', None], ['02112122', 7, 'e', 3, 'n', 4, 'k', None], ['02112212', 7, 'e', 3, 'r', 4, 'y', None], ['02112222', 7, 'e', 2, 'a', 5, 'j', None], ['02120212', 6, 'i', 2, 'i', 4, 'c', None], ['02120222', 6, 'i', 1, 'e', 5, 'e', None], ['02121022', 6, 'k', 2, 'e', 4, 'y', None], ['02121122', 7, 'e', 3, 'j', 4, 'y', None], ['02121212', 7, 'e', 3, 'e', 4, 'c', None], ['02121222', 7, 'e', 2, 'e', 5, 'e', None], ['02122022', 6, 'k', 1, 'e', 5, 'k', None], ['02122122', 7, 'e', 2, 'k', 5, 'k', None], ['02122212', 7, 'e', 2, 'i', 5, 'e', None], ['02122222', 7, 'e', 1, 'e', 6, 'e', None], ['02201022', 5, 'y', 1, 'e', 4, 'i', None], ['02201122', 6, 'k', 2, 'a', 4, 'i', None], ['02201222', 6, 'k', 1, 'e', 5, 'r', None], ['02202022', 5, 'y', 0, '0', 5, 'y', None], ['02202122', 6, 'k', 1, 'c', 5, 'y', None], ['02202222', 6, 'k', 0, '0', 6, 'k', None], ['02211122', 7, 'e', 3, 'i', 4, 'i', None], ['02211222', 7, 'e', 2, 'a', 5, 'r', None], ['02212122', 7, 'e', 2, 'c', 5, 'y', None], ['02212222', 7, 'e', 1, 'c', 6, 'k', None], ['02220222', 6, 'i', 0, '0', 6, 'i', None], ['02221222', 7, 'e', 1, 'e', 6, 'i', None], ['02222222', 7, 'e', 0, '0', 7, 'e', None], ['10101010', 4, 'e', 4, 'e', 0, '0', None], ['10101011', 5, 'c', 5, 'c', 0, '0', None], ['10101012', 5, 'c', 4, 'e', 1, 'c', None], ['10101020', 4, 'e', 3, 'e', 1, 'e', None], ['10101021', 5, 'c', 4, 'j', 1, 'e', None], ['10101022', 5, 'c', 3, 'e', 2, 'a', None], ['10101111', 6, 'c', 6, 'c', 0, '0', None], ['10101112', 6, 'c', 5, 'c', 1, 'c', None], ['10101121', 6, 'c', 5, 'y', 1, 'e', None], ['10101122', 6, 'c', 4, 'j', 2, 'a', None], ['10101212', 6, 'c', 4, 'e', 2, 'c', None], ['10101222', 6, 'c', 3, 'e', 3, 'i', None], ['10102011', 5, 'c', 4, 'r', 1, 'e', None], ['10102012', 5, 'c', 3, 'e', 2, 'k', None], ['10102020', 4, 'e', 2, 'e', 2, 'e', None], ['10102021', 5, 'c', 3, 'j', 2, 'e', None], ['10102022', 5, 'c', 2, 'e', 3, 'j', None], ['10102111', 6, 'c', 5, 'n', 1, 'e', None], ['10102112', 6, 'c', 4, 'j', 2, 'k', None], ['10102120', 5, 'c', 3, 'k', 2, 'e', None], ['10102121', 6, 'c', 4, 'k', 2, 'e', None], ['10102122', 6, 'c', 3, 'k', 3, 'j', None], ['10102211', 6, 'c', 4, 'r', 2, 'a', None], ['10102212', 6, 'c', 3, 'e', 3, 'n', None], ['10102220', 5, 'c', 2, 'e', 3, 'a', None], ['10102221', 6, 'c', 3, 'j', 3, 'a', None], ['10102222', 6, 'c', 2, 'e', 4, 'a', None], ['10111011', 6, 'n', 6, 'n', 0, '0', None], ['10111012', 6, 'n', 5, 'c', 1, 'c', None], ['10111021', 6, 'n', 5, 'q', 1, 'e', None], ['10111022', 6, 'n', 4, 'r', 2, 'a', None], ['10111111', 7, 'c', 7, 'c', 0, '0', None], ['10111112', 7, 'c', 6, 'c', 1, 'c', None], ['10111121', 7, 'c', 6, 'k', 1, 'e', None], ['10111122', 7, 'c', 5, 'n', 2, 'a', None], ['10111211', 7, 'c', 6, 'n', 1, 'c', None], ['10111212', 7, 'c', 5, 'c', 2, 'c', None], ['10111221', 7, 'c', 5, 'q', 2, 'a', None], ['10111222', 7, 'c', 4, 'r', 3, 'i', None], ['10112012', 6, 'n', 4, 'j', 2, 'k', None], ['10112021', 6, 'n', 4, 'w', 2, 'e', None], ['10112022', 6, 'n', 3, 'j', 3, 'j', None], ['10112112', 7, 'c', 5, 'y', 2, 'k', None], ['10112121', 7, 'c', 5, 'k', 2, 'e', None], ['10112122', 7, 'c', 4, 'k', 3, 'j', None], ['10112212', 7, 'c', 4, 'j', 3, 'n', None], ['10112221', 7, 'c', 4, 'w', 3, 'a', None], ['10112222', 7, 'c', 3, 'j', 4, 'a', None], ['10121012', 6, 'n', 4, 'e', 2, 'n', None], ['10121022', 6, 'n', 3, 'e', 3, 'q', None], ['10121112', 7, 'c', 5, 'c', 2, 'n', None], ['10121122', 7, 'c', 4, 'j', 3, 'q', None], ['10121212', 7, 'c', 4, 'e', 3, 'c', None], ['10121222', 7, 'c', 3, 'e', 4, 'n', None], ['10122022', 6, 'n', 2, 'e', 4, 'w', None], ['10122122', 7, 'c', 3, 'k', 4, 'w', None], ['10122222', 7, 'c', 2, 'e', 5, 'a', None], ['10201020', 4, 'e', 2, 'i', 2, 'i', None], ['10201021', 5, 'c', 3, 'r', 2, 'i', None], ['10201022', 5, 'c', 2, 'i', 3, 'r', None], ['10201111', 6, 'c', 5, 'i', 1, 'e', None], ['10201112', 6, 'c', 4, 'r', 2, 'k', None], ['10201121', 6, 'c', 4, 'i', 2, 'i', None], ['10201122', 6, 'c', 3, 'r', 3, 'r', False], ['10201212', 6, 'c', 3, 'e', 3, 'y', None], ['10201222', 6, 'c', 2, 'i', 4, 't', None], ['10202011', 5, 'c', 3, 'a', 2, 'e', None], ['10202012', 5, 'c', 2, 'e', 3, 'k', None], ['10202020', 4, 'e', 1, 'e', 3, 'e', None], ['10202021', 5, 'c', 2, 'a', 3, 'e', None], ['10202022', 5, 'c', 1, 'e', 4, 'j', None], ['10202111', 6, 'c', 4, 'a', 2, 'e', None], ['10202112', 6, 'c', 3, 'j', 3, 'k', None], ['10202120', 5, 'c', 2, 'k', 3, 'e', None], ['10202121', 6, 'c', 3, 'n', 3, 'e', None], ['10202122', 6, 'c', 2, 'k', 4, 'j', None], ['10202211', 6, 'c', 3, 'a', 3, 'j', None], ['10202212', 6, 'c', 2, 'e', 4, 'k', None], ['10202220', 5, 'c', 1, 'e', 4, 'r', None], ['10202221', 6, 'c', 2, 'a', 4, 'r', None], ['10202222', 6, 'c', 1, 'e', 5, 'n', None], ['10211021', 6, 'n', 4, 'z', 2, 'i', None], ['10211022', 6, 'n', 3, 'r', 3, 'r', None], ['10211111', 7, 'c', 6, 'a', 1, 'e', None], ['10211112', 7, 'c', 5, 'n', 2, 'k', None], ['10211120', 6, 'c', 4, 't', 2, 'i', None], ['10211121', 7, 'c', 5, 'r', 2, 'i', None], ['10211122', 7, 'c', 4, 't', 3, 'r', None], ['10211211', 7, 'c', 5, 'q', 2, 'k', None], ['10211212', 7, 'c', 4, 'j', 3, 'y', None], ['10211220', 6, 'c', 3, 'r', 3, 'r', True], ['10211221', 7, 'c', 4, 'z', 3, 'r', None], ['10211222', 7, 'c', 3, 'r', 4, 't', None], ['10212011', 6, 'n', 4, 'q', 2, 'e', None], ['10212012', 6, 'n', 3, 'k', 3, 'k', None], ['10212021', 6, 'n', 3, 'q', 3, 'e', None], ['10212022', 6, 'n', 2, 'k', 4, 'j', None], ['10212111', 7, 'c', 5, 'j', 2, 'e', None], ['10212112', 7, 'c', 4, 'k', 3, 'k', None], ['10212120', 6, 'c', 3, 'y', 3, 'e', None], ['10212121', 7, 'c', 4, 'y', 3, 'e', None], ['10212122', 7, 'c', 3, 'y', 4, 'j', None], ['10212211', 7, 'c', 4, 'q', 3, 'j', None], ['10212212', 7, 'c', 3, 'k', 4, 'k', None], ['10212220', 6, 'c', 2, 'k', 4, 'r', None], ['10212221', 7, 'c', 3, 'q', 4, 'r', None], ['10212222', 7, 'c', 2, 'k', 5, 'n', None], ['10221022', 6, 'n', 2, 'i', 4, 'z', None], ['10221111', 7, 'c', 5, 'i', 2, 'a', None], ['10221112', 7, 'c', 4, 'r', 3, 'q', None], ['10221121', 7, 'c', 4, 'i', 3, 'r', None], ['10221122', 7, 'c', 3, 'r', 4, 'z', None], ['10221211', 7, 'c', 4, 'r', 3, 'n', None], ['10221212', 7, 'c', 3, 'e', 4, 'y', None], ['10221220', 6, 'c', 2, 'i', 4, 'i', None], ['10221221', 7, 'c', 3, 'r', 4, 'i', None], ['10221222', 7, 'c', 2, 'i', 5, 'r', None], ['10222011', 6, 'n', 3, 'a', 3, 'a', None], ['10222012', 6, 'n', 2, 'e', 4, 'q', None], ['10222021', 6, 'n', 2, 'a', 4, 'r', None], ['10222022', 6, 'n', 1, 'e', 5, 'q', None], ['10222111', 7, 'c', 4, 'a', 3, 'a', None], ['10222112', 7, 'c', 3, 'j', 4, 'q', None], ['10222121', 7, 'c', 3, 'n', 4, 'r', None], ['10222122', 7, 'c', 2, 'k', 5, 'q', None], ['10222211', 7, 'c', 3, 'a', 4, 'a', None], ['10222212', 7, 'c', 2, 'e', 5, 'j', None], ['10222220', 6, 'c', 1, 'e', 5, 'i', None], ['10222221', 7, 'c', 2, 'a', 5, 'i', None], ['10222222', 7, 'c', 1, 'e', 6, 'a', None], ['11111111', 8, '8', 8, '8', 0, '0', None], ['11111112', 8, '8', 7, 'c', 1, 'c', None], ['11111121', 8, '8', 7, 'e', 1, 'e', None], ['11111122', 8, '8', 6, 'a', 2, 'a', None], ['11111212', 8, '8', 6, 'c', 2, 'c', None], ['11111222', 8, '8', 5, 'i', 3, 'i', None], ['11112021', 7, 'c', 5, 'a', 2, 'e', None], ['11112022', 7, 'c', 4, 'a', 3, 'j', None], ['11112112', 8, '8', 6, 'k', 2, 'k', None], ['11112121', 8, '8', 6, 'e', 2, 'e', None], ['11112122', 8, '8', 5, 'j', 3, 'j', None], ['11112212', 8, '8', 5, 'n', 3, 'n', None], ['11112221', 8, '8', 5, 'a', 3, 'a', None], ['11112222', 8, '8', 4, 'a', 4, 'a', None], ['11121112', 8, '8', 6, 'n', 2, 'n', None], ['11121122', 8, '8', 5, 'q', 3, 'q', None], ['11121212', 8, '8', 5, 'c', 3, 'c', None], ['11121222', 8, '8', 4, 'r', 4, 'n', None], ['11122022', 7, 'c', 3, 'a', 4, 'w', None], ['11122122', 8, '8', 4, 'q', 4, 'w', None], ['11122222', 8, '8', 3, 'a', 5, 'a', None], ['11202021', 6, 'c', 3, 'i', 3, 'e', None], ['11202022', 6, 'c', 2, 'a', 4, 'j', None], ['11202112', 7, 'c', 4, 'w', 3, 'k', None], ['11202121', 7, 'c', 4, 'n', 3, 'e', None], ['11202122', 7, 'c', 3, 'q', 4, 'j', None], ['11202212', 7, 'c', 3, 'j', 4, 'k', None], ['11202221', 7, 'c', 3, 'i', 4, 'r', None], ['11202222', 7, 'c', 2, 'a', 5, 'n', None], ['11211121', 8, '8', 6, 'i', 2, 'i', None], ['11211122', 8, '8', 5, 'r', 3, 'r', None], ['11211212', 8, '8', 5, 'y', 3, 'y', None], ['11211222', 8, '8', 4, 'i', 4, 't', None], ['11212022', 7, 'c', 3, 'n', 4, 'j', None], ['11212112', 8, '8', 5, 'k', 3, 'k', None], ['11212121', 8, '8', 5, 'e', 3, 'e', None], ['11212122', 8, '8', 4, 'y', 4, 'j', None], ['11212212', 8, '8', 4, 'k', 4, 'k', None], ['11212221', 8, '8', 4, 'n', 4, 'r', None], ['11212222', 8, '8', 3, 'n', 5, 'n', None], ['11221122', 8, '8', 4, 'z', 4, 'z', None], ['11221212', 8, '8', 4, 'j', 4, 'y', None], ['11221221', 8, '8', 4, 't', 4, 'i', None], ['11221222', 8, '8', 3, 'r', 5, 'r', None], ['11222022', 7, 'c', 2, 'a', 5, 'q', None], ['11222112', 8, '8', 4, 'w', 4, 'q', None], ['11222122', 8, '8', 3, 'q', 5, 'q', None], ['11222212', 8, '8', 3, 'j', 5, 'j', None], ['11222221', 8, '8', 3, 'i', 5, 'i', None], ['11222222', 8, '8', 2, 'a', 6, 'a', None], ['12121212', 8, '8', 4, 'e', 4, 'c', None], ['12121222', 8, '8', 3, 'e', 5, 'e', None], ['12122022', 7, 'c', 2, 'e', 5, 'k', None], ['12122122', 8, '8', 3, 'k', 5, 'k', None], ['12122222', 8, '8', 2, 'e', 6, 'e', None], ['12202022', 6, 'c', 1, 'e', 5, 'y', None], ['12202122', 7, 'c', 2, 'k', 5, 'y', None], ['12202222', 7, 'c', 1, 'e', 6, 'k', None], ['12212122', 8, '8', 3, 'y', 5, 'y', None], ['12212222', 8, '8', 2, 'k', 6, 'k', None], ['12221222', 8, '8', 2, 'i', 6, 'i', None], ['12222222', 8, '8', 1, 'e', 7, 'e', None], ['20202020', 4, 'e', 0, '0', 4, 'e', None], ['20202021', 5, 'c', 1, 'c', 4, 'e', None], ['20202022', 5, 'c', 0, '0', 5, 'c', None], ['20202121', 6, 'c', 2, 'c', 4, 'e', None], ['20202122', 6, 'c', 1, 'c', 5, 'c', None], ['20202222', 6, 'c', 0, '0', 6, 'c', None], ['20212021', 6, 'n', 2, 'n', 4, 'e', None], ['20212022', 6, 'n', 1, 'c', 5, 'c', None], ['20212121', 7, 'c', 3, 'c', 4, 'e', None], ['20212122', 7, 'c', 2, 'c', 5, 'c', None], ['20212221', 7, 'c', 2, 'n', 5, 'c', None], ['20212222', 7, 'c', 1, 'c', 6, 'c', None], ['20222022', 6, 'n', 0, '0', 6, 'n', None], ['20222122', 7, 'c', 1, 'c', 6, 'n', None], ['20222222', 7, 'c', 0, '0', 7, 'c', None], ['21212121', 8, '8', 4, 'c', 4, 'e', None], ['21212122', 8, '8', 3, 'c', 5, 'c', None], ['21212222', 8, '8', 2, 'c', 6, 'c', None], ['21222122', 8, '8', 2, 'n', 6, 'n', None], ['21222222', 8, '8', 1, 'c', 7, 'c', None], ['22222222', 8, '8', 0, '0', 8, '8', None]]
rulestring = golly.getstring("Enter rulestring:","BA/BB/BTA/ATB/SA/SB") + "."

y = [False,False,False,False,False,False]   #BA,BB,BTA,ATB,SA,SB
for i in range(len(transitionlist)):
    transitionlist[i].append(y[:])

def counterpart_included(c,counterpartspecial,section):
    for t in transitionlist:
        if c[0] == t[1] and c[1] == t[2] and c[2] == t[3] and c[3] == t[4] and c[4] == t[5] and c[5] == t[6] and t[7] == counterpartspecial:
            return t[8][section]
    golly.warn(str(c))
    error = 1 / 0
def transitions_to_rulestring():
    sections = ["BA","/BB","/BTA","/ATB","/SA","/SB"]
    sectionnegatives = ["-","-","-","-","-","-"]
    specflag = False

    for t in transitionlist:
        for s in range(len(t[8])):
            if t[8][s]:
                if t[7] != None:
                    if t[7]:
                        if counterpart_included(t[1:7],False,s):
                            continue
                        else:
                            specflag = True
                    else:
                        if not counterpart_included(t[1:7],True,s):
                            sectionnegatives[s] = sectionnegatives[s] + str(t[1]) + t[2] + ";" + str(t[3]) + t[4] + ";" + str(t[5]) + t[6] + "'."
                sections[s] = sections[s] + str(t[1]) + t[2] + ";" + str(t[3]) + t[4] + ";" + str(t[5]) + t[6]
                if specflag:
                    sections[s] = sections[s] + "'"
                    specflag = False
                sections[s] = sections[s] + "."
    newrs = sections[0] + sectionnegatives[0] + sections[1] + sectionnegatives[1] + sections[2] + sectionnegatives[2] + sections[3] + sectionnegatives[3] + sections[4] + sectionnegatives[4] + sections[5] + sectionnegatives[5] + "/"
    newrs = newrs.replace("00","0")
    newrs = newrs.replace("88","8")
    newrs = newrs.replace(".-","-")
    newrs = newrs.replace("-/","/")
    newrs = newrs.replace("./","/")
    if excludeB0:
        newrs = newrs.replace("BA0;0;0.","BA")
        newrs = newrs.replace("BA0;0;0","BA")
        newrs = newrs.replace("BB0;0;0.","BB")
        newrs = newrs.replace("BB0;0;0","BB")
    return newrs



trtarget = None
changingtarget = True
targettext = ""

constraints = [None,None,None,None,None,None]
constraintnum = 0
special = False
doublespecial = False

association = False
associationconstraints = [None,None,None,None,None,None]

constraintadd = True

newconstraint = False

for c in rulestring:
    if c == '*':
        continue
    if changingtarget:
        if c in "ABTS":
            targettext = targettext + c
        else:
            if targettext == "BA":
                trtarget = 0
            elif targettext == "BB":
                trtarget = 1
            elif targettext == "BTA":
                trtarget = 2
            elif targettext == "ATB":
                trtarget = 3
            elif targettext == "SA":
                trtarget = 4
            elif targettext == "SB":
                trtarget = 5
            else:
                golly.warn("Invalid state transition specifier!" + targettext)
                error = 1/0
            changingtarget = False
    
    if c in "012345678cekainyqjrtwz;":
        newconstraint = True
    if newconstraint:
        if c == ';':
            if constraints[2*constraintnum] == None:
                constraints[2*constraintnum] = associationconstraints[2*constraintnum]
            if constraints[2*constraintnum+1] == None:
                constraints[2*constraintnum+1] = associationconstraints[2*constraintnum+1]
            constraintnum = constraintnum + 1
        if association:
            if c in "012345678":
                associationconstraints[2*constraintnum] = int(c)
            elif c in "cekainyqjrtwz":
                associationconstraints[2*constraintnum+1] = c
        else:
            if c in "012345678":
                constraints[2*constraintnum] = associationconstraints[2*constraintnum]
                constraints[2*constraintnum] = int(c)
            elif c in "cekainyqjrtwz":
                constraints[2*constraintnum+1] = associationconstraints[2*constraintnum+1]
                constraints[2*constraintnum+1] = c
            elif c == "'":
                if special:
                    doublespecial = True
                    special = False
                else:
                    special = True
    

    if c == ')' and not newconstraint:
        golly.warn("Empty parens not allowed!")
        error = 1 / 0
    if c in ".[])-/" and newconstraint:
        if constraints[2*constraintnum] == None:
            constraints[2*constraintnum] = associationconstraints[2*constraintnum]
        if constraints[2*constraintnum+1] == None:
            constraints[2*constraintnum+1] = associationconstraints[2*constraintnum+1]
        if not association:
            for x in range(len(transitionlist)):
                if constraints[0] != None and constraints[0] != transitionlist[x][1]:
                    continue
                if constraints[1] != None and constraints[1] != transitionlist[x][2]:
                    continue
                if constraints[2] != None and constraints[2] != transitionlist[x][3]:
                    continue
                if constraints[3] != None and constraints[3] != transitionlist[x][4]:
                    continue
                if constraints[4] != None and constraints[4] != transitionlist[x][5]:
                    continue
                if constraints[5] != None and constraints[5] != transitionlist[x][6]:
                    continue
                if special and transitionlist[x][7] != True:
                    continue
                if doublespecial and transitionlist[x][7] != False:
                    #golly.warn(str(constraints) + "\n" + str(transitionlist[x]) + str(doublespecial))
                    continue
                #golly.warn(str(constraints) + "\n" + str(transitionlist[x]) + str(doublespecial))
                transitionlist[x][8][trtarget] = constraintadd
        elif c != ']':
            golly.warn("Brackets have to enclose a single constraint!")
            error = 1 / 0
        if c == '[':
            association = True
        if c == ']':
            association = False
        constraints = [None,None,None,None,None,None]
        constraintnum = 0
        special = False
        doublespecial = False
        if c == ')':
            associationconstraints = [None,None,None,None,None,None]
        newconstraint = False
    if c == '[':
        association = True
        if associationconstraints != [None,None,None,None,None,None]:
            golly.warn("Unclosed parens not allowed!")
            error = 1 / 0
    
    
    if c == '-':
        constraintadd = False
        if associationconstraints != [None,None,None,None,None,None]:
            golly.warn("Unclosed parens not allowed!")
            error = 1 / 0


    if c =='/':
        targettext = ""
        changingtarget = True
        constraintadd = True
        if associationconstraints != [None,None,None,None,None,None]:
            golly.warn("Unclosed parens not allowed!")
            error = 1 / 0


if mutate:
    for x in range(len(transitionlist)):
        for y in range(len(transitionlist[x][8])):
            if random.random() < mutatechance:
                if onlyadd:
                    transitionlist[x][8][y] = True
                elif onlyremove:
                    transitionlist[x][8][y] = False
                else:
                    transitionlist[x][8][y] = not transitionlist[x][8][y]


rulestring = rulestring[:-1]
randnum = ""
if overwriteprotrection:
    randnum = str(random.randint(0,999999999999999999999))
if mutate:
    rulestring = transitions_to_rulestring()[:-1]
    if copynewrule:
        golly.setclipstr(rulestring)
ruleheader = "@RULE " + rulestring.replace('/','')[:100] + randnum + "\n\n@TABLE\nn_states:3\nneighborhood:Moore\nsymmetries:rotate4reflect\n\nvar a={0,1,2}\nvar ab={0,1,2}\nvar ac={0,1,2}\nvar ad={0,1,2}\nvar ae={0,1,2}\nvar af={0,1,2}\nvar ag={0,1,2}\nvar ah={0,1,2}\nvar ai={0,1,2}\n\n"
endtrans = "a,ab,ac,ad,ae,af,ag,ah,ai,0\n\n"

transstr = ""
if excludeB0:
    transstr = transstr + "0,0,0,0,0,0,0,0,0,0\n"

beginstate = ""
endstate = ""
tbody = ""
for t in transitionlist:
    for c in t[0]:
        tbody = tbody + c + ","
    for i in range(len(t[8])):
        if i == 0:
            beginstate = "0,"
            endstate = "1\n"
        elif i == 1:
            beginstate = "0,"
            endstate = "2\n"
        elif i == 2:
            beginstate = "2,"
            endstate = "1\n"
        elif i == 3:
            beginstate = "1,"
            endstate = "2\n"
        elif i == 4:
            beginstate = "1,"
            endstate = "1\n"
        elif i == 5:
            beginstate = "2,"
            endstate = "2\n"
        if t[8][i]:
            transstr = transstr + beginstate + tbody + endstate
    tbody = ""

f = open(rulestring.replace('/','')[:100] + randnum + ".rule", "w")
f.write(ruleheader + transstr + endtrans + "@COLORS\n0 0 0 0\n1 200 100 0\n2 0 100 200\n\n" + "#" + rulestring)
f.close()
golly.setrule(rulestring.replace('/','')[:100] + randnum)
Aside from the addendum, the script has been updated with the ability to do other things. See the variables at the top of the script for details.

-

If anything here is confusing, please feel free to ask any clarifying questions.

Edit: 1st clarifying question! From discord:
Siversmith wrote: Which neighborhoods does the example transition "4;2a;" from the forum post represent?
-2a?
-4aiwz?
-something else?
Cyclotrons wrote: all transitions (and only the transitions) that have all of: 4 total live cells, 2 total state 1 cells, state 1 cells in a configuration with an 'a' in it (2a, 3a, etc.)
I wrote a stdin script that generates random soups of a provided number of a given spaceship. It works for all (non-B0) spaceships in the INT rulespace!
A Multistate INT notation + script.
User avatar
confocaloid
Posts: 6697
Joined: February 8th, 2022, 3:15 pm
Location: learn to protect yourself against stray gliders and sparks and self-destruct mechanisms

Re: A Notation for 3-State INT Rules (and a script to turn them into rulefiles)

Post by confocaloid »

(1) Is there a script for converting in the other direction (from an existing 3-state ruletable into a rulestring)?
(2) I tried to encode some rules -- here's what I got. (I changed the state colours and the rulename before posting.)

BA3;;/BB/BTA/ATB2;;.3;;/SA/SB2;;.3;;
"Life with new and old cells".
Same as B3/S23, but with visible distinction between new cells (state 1) and old cells (state 2).

Code: Select all

#C R-pentomino, with visible distinction between new and old cells
#C [[ ZOOM 4 ]]
x = 3, y = 3, rule = test388499761366004931723
.2A$2A$.A!

@RULE test388499761366004931723

@TABLE
n_states:3
neighborhood:Moore
symmetries:rotate4reflect

var a={0,1,2}
var ab={0,1,2}
var ac={0,1,2}
var ad={0,1,2}
var ae={0,1,2}
var af={0,1,2}
var ag={0,1,2}
var ah={0,1,2}
var ai={0,1,2}

0,0,0,0,0,0,0,0,0,0
1,0,0,0,0,0,0,1,1,2
2,0,0,0,0,0,0,1,1,2
1,0,0,0,0,0,0,1,2,2
2,0,0,0,0,0,0,1,2,2
1,0,0,0,0,0,0,2,1,2
2,0,0,0,0,0,0,2,1,2
1,0,0,0,0,0,0,2,2,2
2,0,0,0,0,0,0,2,2,2
1,0,0,0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,0,1,2,0,0,2,0,2
2,0,0,1,2,0,0,2,0,2
1,0,0,2,0,0,0,2,0,2
2,0,0,2,0,0,0,2,0,2
0,0,0,2,0,0,0,2,1,1
1,0,0,2,0,0,0,2,1,2
2,0,0,2,0,0,0,2,1,2
0,0,0,2,0,0,0,2,2,1
1,0,0,2,0,0,0,2,2,2
2,0,0,2,0,0,0,2,2,2
0,0,0,2,0,0,1,0,1,1
1,0,0,2,0,0,1,0,1,2
2,0,0,2,0,0,1,0,1,2
0,0,0,2,0,0,1,0,2,1
1,0,0,2,0,0,1,0,2,2
2,0,0,2,0,0,1,0,2,2
0,0,0,2,0,0,2,0,2,1
1,0,0,2,0,0,2,0,2,2
2,0,0,2,0,0,2,0,2,2
0,0,0,2,0,1,0,2,0,1
1,0,0,2,0,1,0,2,0,2
2,0,0,2,0,1,0,2,0,2
0,0,0,2,0,2,0,0,1,1
1,0,0,2,0,2,0,0,1,2
2,0,0,2,0,2,0,0,1,2
0,0,0,2,0,2,0,0,2,1
1,0,0,2,0,2,0,0,2,2
2,0,0,2,0,2,0,0,2,2
0,0,0,2,0,2,0,2,0,1
1,0,0,2,0,2,0,2,0,2
2,0,0,2,0,2,0,2,0,2
a,ab,ac,ad,ae,af,ag,ah,ai,0

@COLORS
0 0 0 0
1 255 0 0
2 255 255 0

#BA3;;/BB/BTA/ATB2;;.3;;/SA/SB2;;.3;;
BA3;;/BB/BTA/ATB2;;.3;;/SA/SB2;;.3;;-2a;1c;1e
viewtopic.php?p=149597#p149597
"Life with new and old cells", except that S2a does not happen for an "old" cell with an "old" orthogonal neighbour and a "new" diagonal neighbour.
Example pattern:

Code: Select all

#C Almost B3/S23, except that S2a does not happen for an "old" cell
#C with an "old" orthogonal neighbour and a "new" diagonal neighbour.
#C https://conwaylife.com/forums/viewtopic.php?p=149597#p149597
x = 101, y = 51, rule = test147455511384736772888
47.A.B22.2B$35.B10.B2.B21.B2.B$.B7.B8.B4.B6.B2.AB7.B2.AB25.B.B$AB6.AB
.A5.AB2.AB6.AB2.A.A5.AB27.2A.B7.A$.B7.B8.B2.A.A6.B11.B27.A2B7.B.BA$
70.BA12.B$80.A2.B.B$42.A.A37.B2.B$22.A10.2A7.2B3.2B34.2B$2.A7.A2.A6.A
3.A6.A4.A5.A.A.B4.B25.A$.2B6.A9.A10.A16.A4B23.A.A$AB7.B3.B5.B4.B5.B5.
B30.2B6.2BA$.B7.A2BA6.A2B2A6.A2B3A11.A4B14.B2.B$2.2B38.A.A.B4.B14.B.B
.A$42.2B3.2B18.B2.B$42.A.A26.A8.2AB16.2A$68.A.B7.B.ABA16.A$77.B.B.B
15.A.A$14.A62.B2.B16.2A$4.A9.2BA.B59.2B$.B.B.BA7.A3.2B$AB3.A$.B.B.BA
7.A3.2B$4.A9.2BA.B$14.A3$2.A18.B$.2B18.A8.A2B$AB4.2B8.A.BA.A6.2B$.B3.
B2.B7.B.B11.A2B$2.2B.B2.B6.B13.A38.A$6.2B8.B.B10.A38.2BA$16.A.BA.A8.A
2B34.2A.2B$21.A6.2B39.A2.B$21.B8.A2B38.BA$70.A4.A2B9.2B$75.AB.B7.B2.B
$78.B4.BA2.2B$80.A4.A7.A$64.B21.A6.2B$64.B.BA12.B11.A.B$65.2BA4.A9.BA
3.BA3.ABA$70.AB12.AB.2B.2B.BA$70.B2.A10.ABA3.AB3.AB$.A13.A2B13.A39.2B
.2A8.B.A11.B$B14.B2.B11.B.B39.A2B9.2B6.A$A2B15.B11.A.BA40.A10.A7.A4.A
$17.BA11.AB.A56.2B2.AB$89.B2.B$90.2B!

@RULE test147455511384736772888

@TABLE
n_states:3
neighborhood:Moore
symmetries:rotate4reflect

var a={0,1,2}
var ab={0,1,2}
var ac={0,1,2}
var ad={0,1,2}
var ae={0,1,2}
var af={0,1,2}
var ag={0,1,2}
var ah={0,1,2}
var ai={0,1,2}

0,0,0,0,0,0,0,0,0,0
1,0,0,0,0,0,0,1,1,2
2,0,0,0,0,0,0,1,1,2
1,0,0,0,0,0,0,1,2,2
2,0,0,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0,0,1,1,0,0,2,0,1
1,0,0,1,1,0,0,2,0,2
2,0,0,1,1,0,0,2,0,2
0,0,0,1,2,0,0,2,0,1
1,0,0,1,2,0,0,2,0,2
2,0,0,1,2,0,0,2,0,2
1,0,0,2,0,0,0,2,0,2
2,0,0,2,0,0,0,2,0,2
0,0,0,2,0,0,0,2,1,1
1,0,0,2,0,0,0,2,1,2
2,0,0,2,0,0,0,2,1,2
0,0,0,2,0,0,0,2,2,1
1,0,0,2,0,0,0,2,2,2
2,0,0,2,0,0,0,2,2,2
0,0,0,2,0,0,1,0,1,1
1,0,0,2,0,0,1,0,1,2
2,0,0,2,0,0,1,0,1,2
0,0,0,2,0,0,1,0,2,1
1,0,0,2,0,0,1,0,2,2
2,0,0,2,0,0,1,0,2,2
0,0,0,2,0,0,2,0,2,1
1,0,0,2,0,0,2,0,2,2
2,0,0,2,0,0,2,0,2,2
0,0,0,2,0,1,0,2,0,1
1,0,0,2,0,1,0,2,0,2
2,0,0,2,0,1,0,2,0,2
0,0,0,2,0,2,0,0,1,1
1,0,0,2,0,2,0,0,1,2
2,0,0,2,0,2,0,0,1,2
0,0,0,2,0,2,0,0,2,1
1,0,0,2,0,2,0,0,2,2
2,0,0,2,0,2,0,0,2,2
0,0,0,2,0,2,0,2,0,1
1,0,0,2,0,2,0,2,0,2
2,0,0,2,0,2,0,2,0,2
a,ab,ac,ad,ae,af,ag,ah,ai,0

@COLORS
0 0 0 0
1 255 0 0
2 255 255 0

#BA3;;/BB/BTA/ATB2;;.3;;/SA/SB2;;.3;;-2a;1c;1e
BA3;;-;;3i/BB/BTA/ATB2;;.3;;/SA/SB2;;.3;;
"Life with new and old cells", except that B3i does not happen when all three alive neighbours are "old".
Example pattern:

Code: Select all

#C Almost B3/S23, except that B3i does not happen
#C when all three alive neighbours are "old".
#C https://conwaylife.com/forums/viewtopic.php?p=149324#p149324
#C https://conwaylife.com/forums/viewtopic.php?p=149326#p149326
#C https://conwaylife.com/forums/viewtopic.php?p=149331#p149331
x = 145, y = 87, rule = test646713274044037138597
5.A$6.A$4.3A6$71.2B$12.2B56.B2.B$11.B2.B56.2B$11.B2.B78.A2B2A$12.2B
79.B4.B$93.A$94.A3.A$96.A2$7.2B$7.2B$44.2B$44.B.B$68.2B$45.B21.B2.B
16.B$45.A.B20.2B17.3B$90.B$89.BA2$92.A$54.A$36.ABA15.B20.A$54.A19.3B$
73.AB.A10$130.2B$58.B38.2B31.2B$56.3B38.2B$55.B$55.2B7$37.2B$38.B92.B
$38.B.B56.B32.AB11.2B$39.2B43.2B11.BA32.BA10.2B$52.A31.2B10.AB$52.3B$
53.A2$65.2B$65.B.B$67.B$67.2B4$5.A124.2B$4.2B91.2B31.2B$3.AB92.2B$4.B
44.2B$5.B44.B64.B$47.3B51.2B11.AB11.2B$B46.B53.2B12.BA10.2B$.B$.BA$2B
$A8$114.2B$114.2B!

@RULE test646713274044037138597

@TABLE
n_states:3
neighborhood:Moore
symmetries:rotate4reflect

var a={0,1,2}
var ab={0,1,2}
var ac={0,1,2}
var ad={0,1,2}
var ae={0,1,2}
var af={0,1,2}
var ag={0,1,2}
var ah={0,1,2}
var ai={0,1,2}

0,0,0,0,0,0,0,0,0,0
1,0,0,0,0,0,0,1,1,2
2,0,0,0,0,0,0,1,1,2
1,0,0,0,0,0,0,1,2,2
2,0,0,0,0,0,0,1,2,2
1,0,0,0,0,0,0,2,1,2
2,0,0,0,0,0,0,2,1,2
1,0,0,0,0,0,0,2,2,2
2,0,0,0,0,0,0,2,2,2
1,0,0,0,0,0,1,0,1,2
2,0,0,0,0,0,1,0,1,2
1,0,0,0,0,0,1,0,2,2
2,0,0,0,0,0,1,0,2,2
0,0,0,0,0,0,1,1,1,1
1,0,0,0,0,0,1,1,1,2
2,0,0,0,0,0,1,1,1,2
0,0,0,0,0,0,1,1,2,1
1,0,0,0,0,0,1,1,2,2
2,0,0,0,0,0,1,1,2,2
0,0,0,0,0,0,1,2,1,1
1,0,0,0,0,0,1,2,1,2
2,0,0,0,0,0,1,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0,1,0,2,1
1,0,0,2,0,0,1,0,2,2
2,0,0,2,0,0,1,0,2,2
0,0,0,2,0,0,2,0,2,1
1,0,0,2,0,0,2,0,2,2
2,0,0,2,0,0,2,0,2,2
0,0,0,2,0,1,0,2,0,1
1,0,0,2,0,1,0,2,0,2
2,0,0,2,0,1,0,2,0,2
0,0,0,2,0,2,0,0,1,1
1,0,0,2,0,2,0,0,1,2
2,0,0,2,0,2,0,0,1,2
0,0,0,2,0,2,0,0,2,1
1,0,0,2,0,2,0,0,2,2
2,0,0,2,0,2,0,0,2,2
0,0,0,2,0,2,0,2,0,1
1,0,0,2,0,2,0,2,0,2
2,0,0,2,0,2,0,2,0,2
a,ab,ac,ad,ae,af,ag,ah,ai,0

@COLORS
0 0 0 0
1 255 0 0
2 255 255 0

#BA3;;-;;3i/BB/BTA/ATB2;;.3;;/SA/SB2;;.3;;
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
User avatar
EvinZL
Posts: 1040
Joined: November 8th, 2018, 4:15 pm
Location: A tungsten pool travelling towards the sun
Contact:

Re: A Notation for 3-State INT Rules (and a script to turn them into rulefiles)

Post by EvinZL »

confocaloid wrote: August 14th, 2023, 12:23 pm BA3;;-;;3i/BB/BTA/ATB2;;.3;;/SA/SB2;;.3;;
"Life with new and old cells", except that B3i does not happen when all three alive neighbours are "old".
Example pattern:

Code: Select all

#C Almost B3/S23, except that B3i does not happen
#C when all three alive neighbours are "old".
#C https://conwaylife.com/forums/viewtopic.php?p=149324#p149324
#C https://conwaylife.com/forums/viewtopic.php?p=149326#p149326
#C https://conwaylife.com/forums/viewtopic.php?p=149331#p149331
x = 145, y = 87, rule = test646713274044037138597
5.A$6.A$4.3A6$71.2B$12.2B56.B2.B$11.B2.B56.2B$11.B2.B78.A2B2A$12.2B
79.B4.B$93.A$94.A3.A$96.A2$7.2B$7.2B$44.2B$44.B.B$68.2B$45.B21.B2.B
16.B$45.A.B20.2B17.3B$90.B$89.BA2$92.A$54.A$36.ABA15.B20.A$54.A19.3B$
73.AB.A10$130.2B$58.B38.2B31.2B$56.3B38.2B$55.B$55.2B7$37.2B$38.B92.B
$38.B.B56.B32.AB11.2B$39.2B43.2B11.BA32.BA10.2B$52.A31.2B10.AB$52.3B$
53.A2$65.2B$65.B.B$67.B$67.2B4$5.A124.2B$4.2B91.2B31.2B$3.AB92.2B$4.B
44.2B$5.B44.B64.B$47.3B51.2B11.AB11.2B$B46.B53.2B12.BA10.2B$.B$.BA$2B
$A8$114.2B$114.2B!

@RULE test646713274044037138597

@TABLE
n_states:3
neighborhood:Moore
symmetries:rotate4reflect

var a={0,1,2}
var ab={0,1,2}
var ac={0,1,2}
var ad={0,1,2}
var ae={0,1,2}
var af={0,1,2}
var ag={0,1,2}
var ah={0,1,2}
var ai={0,1,2}

0,0,0,0,0,0,0,0,0,0
1,0,0,0,0,0,0,1,1,2
2,0,0,0,0,0,0,1,1,2
1,0,0,0,0,0,0,1,2,2
2,0,0,0,0,0,0,1,2,2
1,0,0,0,0,0,0,2,1,2
2,0,0,0,0,0,0,2,1,2
1,0,0,0,0,0,0,2,2,2
2,0,0,0,0,0,0,2,2,2
1,0,0,0,0,0,1,0,1,2
2,0,0,0,0,0,1,0,1,2
1,0,0,0,0,0,1,0,2,2
2,0,0,0,0,0,1,0,2,2
0,0,0,0,0,0,1,1,1,1
1,0,0,0,0,0,1,1,1,2
2,0,0,0,0,0,1,1,1,2
0,0,0,0,0,0,1,1,2,1
1,0,0,0,0,0,1,1,2,2
2,0,0,0,0,0,1,1,2,2
0,0,0,0,0,0,1,2,1,1
1,0,0,0,0,0,1,2,1,2
2,0,0,0,0,0,1,2,1,2
0,0,0,0,0,0,1,2,2,1
1,0,0,0,0,0,1,2,2,2
2,0,0,0,0,0,1,2,2,2
1,0,0,0,0,0,2,0,2,2
2,0,0,0,0,0,2,0,2,2
0,0,0,0,0,0,2,1,2,1
1,0,0,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0,0,2,0,1,0,2,0,2
2,0,0,2,0,1,0,2,0,2
0,0,0,2,0,2,0,0,1,1
1,0,0,2,0,2,0,0,1,2
2,0,0,2,0,2,0,0,1,2
0,0,0,2,0,2,0,0,2,1
1,0,0,2,0,2,0,0,2,2
2,0,0,2,0,2,0,0,2,2
0,0,0,2,0,2,0,2,0,1
1,0,0,2,0,2,0,2,0,2
2,0,0,2,0,2,0,2,0,2
a,ab,ac,ad,ae,af,ag,ah,ai,0

@COLORS
0 0 0 0
1 255 0 0
2 255 255 0

#BA3;;-;;3i/BB/BTA/ATB2;;.3;;/SA/SB2;;.3;;
simpler gun:

Code: Select all

x = 29, y = 38, rule = test646713274044037138597
13.2B$13.2B8$27.2B$27.B$25.B.B$13.A11.2B$2B11.3B$2B12.A11$7.2B$7.2B$2.
2B$3.B$3.B.B$4.2B$8.2B$7.B.B$7.2B$15.2B$15.B$16.3B$18.B!
Cyclotrons
Posts: 132
Joined: January 26th, 2021, 12:19 am

Re: A Notation for 3-State INT Rules (and a script to turn them into rulefiles)

Post by Cyclotrons »

confocaloid wrote: August 14th, 2023, 12:23 pm (1) Is there a script for converting in the other direction (from an existing 3-state ruletable into a rulestring)?
No. If there was a script that expanded out rulefiles so that they had no variables I could throw one together fairly easily, but as of now it's hard enough to not be worth the effort.

---

Anyways, the 3-State INT rulespace has some pretty interesting properties.

The 2-State INT rulespace has 2 states^(51 configurations * 2 possible center cell states) = 2^102 or roughly 5.1*10^30 rules. The 2 2-State INT alternating rules rulespace has 2^204 (2.6*10^61) rules. This rulespace has 3 states^(954 configurations * 3 possible center cell states) = 3^2862 (3.3*10^1365) rules.

The more interesting question, however, is to consider how many rules in the 3-State INT rulespace emulate the prior two. A rule can be considered emulated if any pattern progresses as it would in its native rule so long as transitions that are impossible in its rulespace aren't present. Thus, trivially, each rulespace can be represented with however many transitions are in the rulespace (102 and 204, respectively). If we prevent those transitions from being varied, we get 3^2760 and 3^2658 permutations of the remaining transitions. Multiply those by 2 times the number of rules in each rulespace (to account for state inverses) and you get ~7.3*10^1347 2SINT emulators and ~7.9*10^1329 2-alternating 2SINT emulators (did I do some of my logic wrong here? these seem weirdly high).

-

Not only are c diagonal spaceships possible, it is possible to have them in nonexplosive rules. An example:

Code: Select all

BA;1;0.;8;/BB;2a;0.3e;1e;2i.2a;1;.2i;1;.3i;1c;/BTA/ATB;0;2e/SA;4i;0.;4e;0/SB
BA;1;0.;8;/BB;2a;0.3e;1e;2i.2a;1;.2i;1;.3i;1c;/BTA/ATB;2e;0/SA;4i;0.;4e;0/SB 	#a variant with p1 c diags

Code: Select all

#i've never described anything as 'aggressively nonexplosive' before now
x = 100, y = 100, rule = BA;1;0.;8;BB;2a;0.3e;1e;2i.2a;1;.2i;1;.3i;1c;BTAATB;0;2eSA;4i;0.;4e;0SB
2A7.B.2A.BA2.A.A5.B3.B2A4.A2.2B2A.2B.BA2.BA.2B.BA2B.B.A.B7.B2.B3.B2.B
A.2A4.A3.BA$.2B2.B2A.A.A2.A2.BA4.2BA.2A2B2.A3.A2.AB.B2.B.A2BA2.BAB2.A
B2.2A3.B6.A2.A2.2B.B2.2BA.2A.ABA.B$.BAB2.B.2B3.B.A.A.3B.B.ABA.2B.A.3B
4ABA.A.A.A2B3.BA2B.A2B3.B2A.A3.A2.2B2A2B4.B.B.BA.B2.A2B$2.B.A2.B2.B3.
A.3B7.A.B4.2B2.AB.B.2A.BAB.2B4.BAB3.AB6.B4.2A.A.B.AB.A.AB.2A3.A.B2AB$
2ABA.2A2.B.AB2A2.B.AB2.B2.BAB3.2B2.B.3A.B.B.B3.2A.B.A.B.A2B.A3.2A.A3.
A2.BA.BA2B6.B2.A.AB.B$AB.2A.BA2.B2.AB.A2B3.AB.A.B2AB3A2B.A3.B.3A.B2.B
2.2A.B.AB2A2.B.B.2BA5.B.B5.ABA.A2.B.A.A2.B$2.B2.A2.B.A2.A.B2.BA2B4.3B
2.B2AB2.2B.A2.2A.A.2B4.A2.2A.A4.BABAB5.A3.A.A.3A2B9.A$5.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0,0,1,0,1
0,0,0,0,0,0,0,1,1,2
0,0,0,0,0,0,0,1,2,2
0,0,0,0,0,0,0,2,1,2
0,0,0,0,0,0,1,2,2,2
1,0,0,0,0,2,0,2,0,2
0,0,0,1,0,0,0,2,0,2
1,0,0,1,1,0,1,1,0,1
0,0,0,2,0,1,0,2,0,2
1,1,0,1,0,1,0,1,0,1
0,1,1,1,1,1,1,1,1,1
a,ab,ac,ad,ae,af,ag,ah,ai,0

@COLORS
0 0 0 0
1 200 100 0
2 0 100 200

#BA;1;0.;8;/BB;2a;0.3e;1e;2i.2a;1;.2i;1;.3i;1c;/BTA/ATB;0;2e/SA;4i;0.;4e;0/SB
I think this means that any (n,m)c/n can exist in this rulespace.
I wrote a stdin script that generates random soups of a provided number of a given spaceship. It works for all (non-B0) spaceships in the INT rulespace!
A Multistate INT notation + script.
User avatar
confocaloid
Posts: 6697
Joined: February 8th, 2022, 3:15 pm
Location: learn to protect yourself against stray gliders and sparks and self-destruct mechanisms

Re: A Notation for 3-State INT Rules (and a script to turn them into rulefiles)

Post by confocaloid »

hotdogPi wrote: May 19th, 2022, 9:30 am Really close to a p19 — we just need something to replace the snakes, since they interact one generation too early.

Code: Select all

x = 33, y = 33, rule = B3/S23
12b2o5b2o$13bo5bo$12bo7bo$12b2o5b2o2$14bo3bo$12b2obobob2o$12bo2bobo2bo
$14bo3bo$10bob2o5b2obo$9bo2bo7bo2bo2$ob2o2b2ob2o11b2ob2o2b2obo$2obo2bo
2bo13bo2bo2bob2o$5bo2bo15bo2bo$6b2o17b2o2$6b2o17b2o$5bo2bo15bo2bo$2obo
2bo2bo13bo2bo2bob2o$ob2o2b2ob2o11b2ob2o2b2obo2$9bo2bo7bo2bo$10bob2o5b
2obo$14bo3bo$12bo2bobo2bo$12b2obobob2o$14bo3bo2$12b2o5b2o$12bo7bo$13bo
5bo$12b2o5b2o!
This works as shown as a p19 oscillator, if B3q is prevented when the two mutually adjacent alive neighbours are cells surviving from the previous generation and the third alive neighbour is a new cell:

Code: Select all

x = 33, y = 33, rule = p19p145768
12.2B5.2B$13.B5.B$12.B7.B$12.2B5.2B2$14.B3.B$12.AB.B.B.BA$12.B2.B.B2.
B$14.B3.B$10.B.BA5.AB.B$9.B2.A7.A2.B2$B.2B2.AB.BA11.AB.BA2.2B.B$2B.B
2.B2.A13.A2.B2.B.2B$5.B2.B15.B2.B$6.2B17.2B2$6.2B17.2B$5.B2.B15.B2.B$
2B.B2.B2.A13.A2.B2.B.2B$B.2B2.AB.BA11.AB.BA2.2B.B2$9.B2.A7.A2.B$10.B.
BA5.AB.B$14.B3.B$12.B2.B.B2.B$12.AB.B.B.BA$14.B3.B2$12.2B5.2B$12.B7.B
$13.B5.B$12.2B5.2B!

@RULE p19p145768

"Life with new and old cells", except B3q does not happen
when the two mutually adjacent alive neighbours are old
and the third alive neighbour is new.

BA3;;-3q;1c;2a/BB/BTA/ATB2;;.3;;/SA/SB2;;.3;;
(notation explained here: https://conwaylife.com/forums/viewtopic.php?p=164994#p164994)

@TABLE
n_states:3
neighborhood:Moore
symmetries:rotate4reflect

var a={0,1,2}
var ab={0,1,2}
var ac={0,1,2}
var ad={0,1,2}
var ae={0,1,2}
var af={0,1,2}
var ag={0,1,2}
var ah={0,1,2}
var ai={0,1,2}

0,0,0,0,0,0,0,0,0,0
1,0,0,0,0,0,0,1,1,2
2,0,0,0,0,0,0,1,1,2
1,0,0,0,0,0,0,1,2,2
2,0,0,0,0,0,0,1,2,2
1,0,0,0,0,0,0,2,1,2
2,0,0,0,0,0,0,2,1,2
1,0,0,0,0,0,0,2,2,2
2,0,0,0,0,0,0,2,2,2
1,0,0,0,0,0,1,0,1,2
2,0,0,0,0,0,1,0,1,2
1,0,0,0,0,0,1,0,2,2
2,0,0,0,0,0,1,0,2,2
0,0,0,0,0,0,1,1,1,1
1,0,0,0,0,0,1,1,1,2
2,0,0,0,0,0,1,1,1,2
0,0,0,0,0,0,1,1,2,1
1,0,0,0,0,0,1,1,2,2
2,0,0,0,0,0,1,1,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1,0,1,1
1,0,0,2,0,0,1,0,1,2
2,0,0,2,0,0,1,0,1,2
0,0,0,2,0,0,1,0,2,1
1,0,0,2,0,0,1,0,2,2
2,0,0,2,0,0,1,0,2,2
0,0,0,2,0,0,2,0,2,1
1,0,0,2,0,0,2,0,2,2
2,0,0,2,0,0,2,0,2,2
0,0,0,2,0,1,0,2,0,1
1,0,0,2,0,1,0,2,0,2
2,0,0,2,0,1,0,2,0,2
0,0,0,2,0,2,0,0,1,1
1,0,0,2,0,2,0,0,1,2
2,0,0,2,0,2,0,0,1,2
0,0,0,2,0,2,0,0,2,1
1,0,0,2,0,2,0,0,2,2
2,0,0,2,0,2,0,0,2,2
0,0,0,2,0,2,0,2,0,1
1,0,0,2,0,2,0,2,0,2
2,0,0,2,0,2,0,2,0,2
a,ab,ac,ad,ae,af,ag,ah,ai,0

@COLORS
0 0 0 0
1 255 0 0
2 255 255 0

#BA3;;-3q;1c;2a/BB/BTA/ATB2;;.3;;/SA/SB2;;.3;;
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
Cyclotrons
Posts: 132
Joined: January 26th, 2021, 12:19 am

Re: A Notation for 3-State INT Rules (and a script to turn them into rulefiles)

Post by Cyclotrons »

Here is an alteration to the most recent notation that generalizes to higher numbers of states:

First change: 'Factoring out' transitions is being cut. It's a complication that doesn't need to be there.

Second change: State changes will be notated with numbers instead of letters, allowing the notation to generalize above 26 states if need be. 0Tn and nTn will be allowed (but not required) in place of Bn and Sn, respectively. It is now formal that, in the case of two conflicting state changes (ex. BA;1; and BB;1; in the previous notation), the one that occurs first in the rulestring takes precedence. As such, there is no 'canonical' ordering (though it will be encouraged to order by increasing end state, then beginning state). Finally, to prevent ambiguity, state change markers will be terminated with '.'.
A three-state rulestring following these conventions would look like such: B1./B2./S1./1T2./S2./2T1.

Third change: Constraints will be allowed to refer explicitly to which states the constraint applies to by adding the states to the start. The states would be separated by a '+' and would be separated from the constraint by a ':'. The canonical ordering will be limits to state 0, state 1, state 2, etc, and state specifiers won't be needed until it is deviated from. For example, the constraint 'X;X;X;X;8:X;1+2+5+13:X' would apply restriction X to the shape of states 0, 1, 2, 3, 8, and the combination of 1, 2, 5, and 13 treated as one state to the configuration.

Fourth change: A way of notating subconfigurations has been added. At the end of a full constraint, just before the '.' delimiting them, other constraints between parentheses would define the configurations that must occur within the current configuration to be accepted. As a concrete example ';4a;2a;1+2:6a(;2a;2a;1+2:4i) is saying that all state 1 cells must be in the 4a config, all state 2 cells must be in the 2a config, all state 1 and 2 cells must be in the 6a config, but also there must be some combination of cells such within where state 1 and 2 cells form a 4i configuration, and within that 4i the must be state 1 cells in the 2a config and state 2 cells in the 2a config. These allow total specificity for configurations to be possible.
Also allowed will be a list of cells, in the same order as the ruletable format, with 'x' indicating that you don't care about the state of cells in that position. This will allow for brevity, especially in rules with a large number of states.

-

No script this time, but I am at work writing a rule parsing + transition function program that, if all goes well, will be implemented into golly at some point (though I certainly wouldn't mind being beaten to the punch :wink: ).
I wrote a stdin script that generates random soups of a provided number of a given spaceship. It works for all (non-B0) spaceships in the INT rulespace!
A Multistate INT notation + script.
Cyclotrons
Posts: 132
Joined: January 26th, 2021, 12:19 am

Re: A Notation for 3-State INT Rules (and a script to turn them into rulefiles)

Post by Cyclotrons »

A standalone 3-State INT rulestring generator python script:

Code: Select all

import random

terminationchances = [0.1,0.1,0.1,0.1,0.1,0.1]
wildcardchances = [0.5,0.5,0.5,0.5,0.5,0.5]

negtermchances = [1,1,1,1,1,1]
#[0.3,0.3,0.3,0.3,0.3,0.3]
negwildcardchances = [0.1,0.1,0.1,0.1,0.1,0.1]

secstrs = ["BA","/BB","/BTA","/ATB","/SA","/SB"]
negsecstrs = ["-","-","-","-","-","-"]

excludeB0 = True

transitionlist = [['00000000', 0, '0', 0, '0', 0, '0', None], ['00000001', 1, 'c', 1, 'c', 0, '0', None], ['00000002', 1, 'c', 0, '0', 1, 'c', None], ['00000010', 1, 'e', 1, 'e', 0, '0', None], ['00000011', 2, 'a', 2, 'a', 0, '0', None], ['00000012', 2, 'a', 1, 'e', 1, 'c', None], ['00000020', 1, 'e', 0, '0', 1, 'e', None], ['00000021', 2, 'a', 1, 'c', 1, 'e', None], ['00000022', 2, 'a', 0, '0', 2, 'a', None], ['00000101', 2, 'c', 2, 'c', 0, '0', None], ['00000102', 2, 'c', 1, 'c', 1, 'c', None], ['00000111', 3, 'i', 3, 'i', 0, '0', None], ['00000112', 3, 'i', 2, 'a', 1, 'c', None], ['00000121', 3, 'i', 2, 'c', 1, 'e', None], ['00000122', 3, 'i', 1, 'c', 2, 'a', None], ['00000202', 2, 'c', 0, '0', 2, 'c', None], ['00000212', 3, 'i', 1, 'e', 2, 'c', None], ['00000222', 3, 'i', 0, '0', 3, 'i', None], ['00001001', 2, 'k', 2, 'k', 0, '0', None], ['00001002', 2, 'k', 1, 'e', 1, 'c', None], ['00001010', 2, 'e', 2, 'e', 0, '0', None], ['00001011', 3, 'j', 3, 'j', 0, '0', None], ['00001012', 3, 'j', 2, 'e', 1, 'c', None], ['00001020', 2, 'e', 1, 'e', 1, 'e', None], ['00001021', 3, 'j', 2, 'k', 1, 'e', None], ['00001022', 3, 'j', 1, 'e', 2, 'a', None], ['00001101', 3, 'n', 3, 'n', 0, '0', None], ['00001102', 3, 'n', 2, 'a', 1, 'c', None], ['00001110', 3, 'a', 3, 'a', 0, '0', None], ['00001111', 4, 'a', 4, 'a', 0, '0', None], ['00001112', 4, 'a', 3, 'a', 1, 'c', None], ['00001120', 3, 'a', 2, 'a', 1, 'e', None], ['00001121', 4, 'a', 3, 'n', 1, 'e', None], ['00001122', 4, 'a', 2, 'a', 2, 'a', False], ['00001201', 3, 'n', 2, 'k', 1, 'c', None], ['00001202', 3, 'n', 1, 'e', 2, 'c', None], ['00001210', 3, 'a', 2, 'e', 1, 'c', None], ['00001211', 4, 'a', 3, 'j', 1, 'c', None], ['00001212', 4, 'a', 2, 'e', 2, 'c', None], ['00001220', 3, 'a', 1, 'e', 2, 'a', None], ['00001221', 4, 'a', 2, 'k', 2, 'a', None], ['00001222', 4, 'a', 1, 'e', 3, 'i', None], ['00002001', 2, 'k', 1, 'c', 1, 'e', None], ['00002002', 2, 'k', 0, '0', 2, 'k', None], ['00002011', 3, 'j', 2, 'a', 1, 'e', None], ['00002012', 3, 'j', 1, 'e', 2, 'k', None], ['00002020', 2, 'e', 0, '0', 2, 'e', None], ['00002021', 3, 'j', 1, 'c', 2, 'e', None], ['00002022', 3, 'j', 0, '0', 3, 'j', None], ['00002101', 3, 'n', 2, 'c', 1, 'e', None], ['00002102', 3, 'n', 1, 'c', 2, 'k', None], ['00002111', 4, 'a', 3, 'i', 1, 'e', None], ['00002112', 4, 'a', 2, 'a', 2, 'k', None], ['00002120', 3, 'a', 1, 'c', 2, 'e', None], ['00002121', 4, 'a', 2, 'c', 2, 'e', None], ['00002122', 4, 'a', 1, 'c', 3, 'j', None], ['00002201', 3, 'n', 1, 'c', 2, 'a', None], ['00002202', 3, 'n', 0, '0', 3, 'n', None], ['00002211', 4, 'a', 2, 'a', 2, 'a', True], ['00002212', 4, 'a', 1, 'e', 3, 'n', None], ['00002220', 3, 'a', 0, '0', 3, 'a', None], ['00002221', 4, 'a', 1, 'c', 3, 'a', None], ['00002222', 4, 'a', 0, '0', 4, 'a', None], ['00010001', 2, 'n', 2, 'n', 0, '0', None], ['00010002', 2, 'n', 1, 'c', 1, 'c', None], ['00010011', 3, 'q', 3, 'q', 0, '0', None], ['00010012', 3, 'q', 2, 'k', 1, 'c', None], ['00010021', 3, 'q', 2, 'n', 1, 'e', None], ['00010022', 3, 'q', 1, 'c', 2, 'a', None], ['00010101', 3, 'c', 3, 'c', 0, '0', None], ['00010102', 3, 'c', 2, 'c', 1, 'c', None], ['00010111', 4, 'n', 4, 'n', 0, '0', None], ['00010112', 4, 'n', 3, 'n', 1, 'c', None], ['00010121', 4, 'n', 3, 'c', 1, 'e', None], ['00010122', 4, 'n', 2, 'c', 2, 'a', None], ['00010201', 3, 'c', 2, 'n', 1, 'c', None], ['00010202', 3, 'c', 1, 'c', 2, 'c', None], ['00010211', 4, 'n', 3, 'q', 1, 'c', None], ['00010212', 4, 'n', 2, 'k', 2, 'c', None], ['00010221', 4, 'n', 2, 'n', 2, 'a', None], ['00010222', 4, 'n', 1, 'c', 3, 'i', None], ['00011002', 3, 'q', 2, 'a', 1, 'c', None], ['00011011', 4, 'w', 4, 'w', 0, '0', None], ['00011012', 4, 'w', 3, 'j', 1, 'c', None], ['00011021', 4, 'w', 3, 'q', 1, 'e', None], ['00011022', 4, 'w', 2, 'a', 2, 'a', None], ['00011102', 4, 'n', 3, 'i', 1, 'c', None], ['00011111', 5, 'a', 5, 'a', 0, '0', None], ['00011112', 5, 'a', 4, 'a', 1, 'c', None], ['00011121', 5, 'a', 4, 'n', 1, 'e', None], ['00011122', 5, 'a', 3, 'i', 2, 'a', None], ['00011202', 4, 'n', 2, 'a', 2, 'c', None], ['00011211', 5, 'a', 4, 'w', 1, 'c', None], ['00011212', 5, 'a', 3, 'j', 2, 'c', None], ['00011221', 5, 'a', 3, 'q', 2, 'a', None], ['00011222', 5, 'a', 2, 'a', 3, 'i', None], ['00012002', 3, 'q', 1, 'c', 2, 'k', None], ['00012012', 4, 'w', 2, 'k', 2, 'k', None], ['00012021', 4, 'w', 2, 'n', 2, 'e', None], ['00012022', 4, 'w', 1, 'c', 3, 'j', None], ['00012102', 4, 'n', 2, 'c', 2, 'k', None], ['00012112', 5, 'a', 3, 'n', 2, 'k', None], ['00012121', 5, 'a', 3, 'c', 2, 'e', None], ['00012122', 5, 'a', 2, 'c', 3, 'j', None], ['00012202', 4, 'n', 1, 'c', 3, 'n', None], ['00012212', 5, 'a', 2, 'k', 3, 'n', None], ['00012221', 5, 'a', 2, 'n', 3, 'a', None], ['00012222', 5, 'a', 1, 'c', 4, 'a', None], ['00020002', 2, 'n', 0, '0', 2, 'n', None], ['00020012', 3, 'q', 1, 'e', 2, 'n', None], ['00020022', 3, 'q', 0, '0', 3, 'q', None], ['00020102', 3, 'c', 1, 'c', 2, 'n', None], ['00020112', 4, 'n', 2, 'a', 2, 'n', None], ['00020122', 4, 'n', 1, 'c', 3, 'q', None], ['00020202', 3, 'c', 0, '0', 3, 'c', None], ['00020212', 4, 'n', 1, 'e', 3, 'c', None], ['00020222', 4, 'n', 0, '0', 4, 'n', None], ['00021012', 4, 'w', 2, 'e', 2, 'n', None], ['00021022', 4, 'w', 1, 'e', 3, 'q', None], ['00021112', 5, 'a', 3, 'a', 2, 'n', None], ['00021122', 5, 'a', 2, 'a', 3, 'q', None], ['00021212', 5, 'a', 2, 'e', 3, 'c', None], ['00021222', 5, 'a', 1, 'e', 4, 'n', None], ['00022022', 4, 'w', 0, '0', 4, 'w', None], ['00022122', 5, 'a', 1, 'c', 4, 'w', None], ['00022222', 5, 'a', 0, '0', 5, 'a', None], ['00100010', 2, 'i', 2, 'i', 0, '0', None], ['00100011', 3, 'r', 3, 'r', 0, '0', None], ['00100012', 3, 'r', 2, 'i', 1, 'c', None], ['00100020', 2, 'i', 1, 'e', 1, 'e', None], ['00100021', 3, 'r', 2, 'k', 1, 'e', None], ['00100022', 3, 'r', 1, 'e', 2, 'a', None], ['00100101', 3, 'y', 3, 'y', 0, '0', None], ['00100102', 3, 'y', 2, 'k', 1, 'c', None], ['00100111', 4, 't', 4, 't', 0, '0', None], ['00100112', 4, 't', 3, 'r', 1, 'c', None], ['00100121', 4, 't', 3, 'y', 1, 'e', None], ['00100122', 4, 't', 2, 'k', 2, 'a', None], ['00100202', 3, 'y', 1, 'e', 2, 'c', None], ['00100212', 4, 't', 2, 'i', 2, 'c', None], ['00100222', 4, 't', 1, 'e', 3, 'i', None], ['00101001', 3, 'k', 3, 'k', 0, '0', None], ['00101002', 3, 'k', 2, 'e', 1, 'c', None], ['00101010', 3, 'e', 3, 'e', 0, '0', None], ['00101011', 4, 'j', 4, 'j', 0, '0', None], ['00101012', 4, 'j', 3, 'e', 1, 'c', None], ['00101020', 3, 'e', 2, 'e', 1, 'e', None], ['00101021', 4, 'j', 3, 'k', 1, 'e', None], ['00101022', 4, 'j', 2, 'e', 2, 'a', None], ['00101101', 4, 'k', 4, 'k', 0, '0', None], ['00101102', 4, 'k', 3, 'j', 1, 'c', None], ['00101110', 4, 'r', 4, 'r', 0, '0', None], ['00101111', 5, 'n', 5, 'n', 0, '0', None], ['00101112', 5, 'n', 4, 'r', 1, 'c', None], ['00101120', 4, 'r', 3, 'j', 1, 'e', None], ['00101121', 5, 'n', 4, 'k', 1, 'e', None], ['00101122', 5, 'n', 3, 'j', 2, 'a', None], ['00101201', 4, 'k', 3, 'k', 1, 'c', None], ['00101202', 4, 'k', 2, 'e', 2, 'c', None], ['00101210', 4, 'r', 3, 'e', 1, 'c', None], ['00101211', 5, 'n', 4, 'j', 1, 'c', None], ['00101212', 5, 'n', 3, 'e', 2, 'c', None], ['00101220', 4, 'r', 2, 'e', 2, 'a', None], ['00101221', 5, 'n', 3, 'k', 2, 'a', None], ['00101222', 5, 'n', 2, 'e', 3, 'i', None], ['00102001', 3, 'k', 2, 'k', 1, 'e', None], ['00102002', 3, 'k', 1, 'e', 2, 'k', None], ['00102010', 3, 'e', 2, 'i', 1, 'e', None], ['00102011', 4, 'j', 3, 'r', 1, 'e', None], ['00102012', 4, 'j', 2, 'i', 2, 'k', None], ['00102020', 3, 'e', 1, 'e', 2, 'e', None], ['00102021', 4, 'j', 2, 'k', 2, 'e', None], ['00102022', 4, 'j', 1, 'e', 3, 'j', None], ['00102101', 4, 'k', 3, 'y', 1, 'e', None], ['00102102', 4, 'k', 2, 'k', 2, 'k', False], ['00102110', 4, 'r', 3, 'r', 1, 'e', None], ['00102111', 5, 'n', 4, 't', 1, 'e', None], ['00102112', 5, 'n', 3, 'r', 2, 'k', None], ['00102120', 4, 'r', 2, 'k', 2, 'e', None], ['00102121', 5, 'n', 3, 'y', 2, 'e', None], ['00102122', 5, 'n', 2, 'k', 3, 'j', None], ['00102201', 4, 'k', 2, 'k', 2, 'a', None], ['00102202', 4, 'k', 1, 'e', 3, 'n', None], ['00102210', 4, 'r', 2, 'i', 2, 'a', None], ['00102211', 5, 'n', 3, 'r', 2, 'a', None], ['00102212', 5, 'n', 2, 'i', 3, 'n', None], ['00102220', 4, 'r', 1, 'e', 3, 'a', None], ['00102221', 5, 'n', 2, 'k', 3, 'a', None], ['00102222', 5, 'n', 1, 'e', 4, 'a', None], ['00110011', 4, 'z', 4, 'z', 0, '0', None], ['00110012', 4, 'z', 3, 'r', 1, 'c', None], ['00110020', 3, 'r', 2, 'a', 1, 'e', None], ['00110021', 4, 'z', 3, 'q', 1, 'e', None], ['00110022', 4, 'z', 2, 'a', 2, 'a', None], ['00110101', 4, 'y', 4, 'y', 0, '0', None], ['00110102', 4, 'y', 3, 'n', 1, 'c', None], ['00110110', 4, 'i', 4, 'i', 0, '0', None], ['00110111', 5, 'r', 5, 'r', 0, '0', None], ['00110112', 5, 'r', 4, 'i', 1, 'c', None], ['00110120', 4, 'i', 3, 'n', 1, 'e', None], ['00110121', 5, 'r', 4, 'y', 1, 'e', None], ['00110122', 5, 'r', 3, 'n', 2, 'a', None], ['00110201', 4, 'y', 3, 'q', 1, 'c', None], ['00110202', 4, 'y', 2, 'a', 2, 'c', None], ['00110210', 4, 'i', 3, 'r', 1, 'c', None], ['00110211', 5, 'r', 4, 'z', 1, 'c', None], ['00110212', 5, 'r', 3, 'r', 2, 'c', False], ['00110220', 4, 'i', 2, 'a', 2, 'a', None], ['00110221', 5, 'r', 3, 'q', 2, 'a', None], ['00110222', 5, 'r', 2, 'a', 3, 'i', None], ['00111001', 4, 'q', 4, 'q', 0, '0', None], ['00111002', 4, 'q', 3, 'a', 1, 'c', None], ['00111011', 5, 'q', 5, 'q', 0, '0', None], ['00111012', 5, 'q', 4, 'r', 1, 'c', None], ['00111020', 4, 'r', 3, 'a', 1, 'e', None], ['00111021', 5, 'q', 4, 'q', 1, 'e', None], ['00111022', 5, 'q', 3, 'a', 2, 'a', None], ['00111101', 5, 'j', 5, 'j', 0, '0', None], ['00111102', 5, 'j', 4, 'a', 1, 'c', None], ['00111110', 5, 'i', 5, 'i', 0, '0', None], ['00111111', 6, 'a', 6, 'a', 0, '0', None], ['00111112', 6, 'a', 5, 'i', 1, 'c', None], ['00111120', 5, 'i', 4, 'a', 1, 'e', None], ['00111121', 6, 'a', 5, 'j', 1, 'e', None], ['00111122', 6, 'a', 4, 'a', 2, 'a', False], ['00111201', 5, 'j', 4, 'q', 1, 'c', None], ['00111202', 5, 'j', 3, 'a', 2, 'c', None], ['00111210', 5, 'i', 4, 'r', 1, 'c', None], ['00111211', 6, 'a', 5, 'q', 1, 'c', None], ['00111212', 6, 'a', 4, 'r', 2, 'c', None], ['00111220', 5, 'i', 3, 'a', 2, 'a', None], ['00111221', 6, 'a', 4, 'q', 2, 'a', None], ['00111222', 6, 'a', 3, 'a', 3, 'i', None], ['00112001', 4, 'q', 3, 'q', 1, 'e', None], ['00112002', 4, 'q', 2, 'a', 2, 'k', None], ['00112011', 5, 'q', 4, 'z', 1, 'e', None], ['00112012', 5, 'q', 3, 'r', 2, 'k', None], ['00112020', 4, 'r', 2, 'a', 2, 'e', None], ['00112021', 5, 'q', 3, 'q', 2, 'e', False], ['00112022', 5, 'q', 2, 'a', 3, 'j', None], ['00112101', 5, 'j', 4, 'y', 1, 'e', None], ['00112102', 5, 'j', 3, 'n', 2, 'k', None], ['00112110', 5, 'i', 4, 'i', 1, 'e', None], ['00112111', 6, 'a', 5, 'r', 1, 'e', None], ['00112112', 6, 'a', 4, 'i', 2, 'k', None], ['00112120', 5, 'i', 3, 'n', 2, 'e', None], ['00112121', 6, 'a', 4, 'y', 2, 'e', None], ['00112122', 6, 'a', 3, 'n', 3, 'j', None], ['00112201', 5, 'j', 3, 'q', 2, 'a', None], ['00112202', 5, 'j', 2, 'a', 3, 'n', None], ['00112210', 5, 'i', 3, 'r', 2, 'a', None], ['00112211', 6, 'a', 4, 'z', 2, 'a', None], ['00112212', 6, 'a', 3, 'r', 3, 'n', None], ['00112220', 5, 'i', 2, 'a', 3, 'a', None], ['00112221', 6, 'a', 3, 'q', 3, 'a', None], ['00112222', 6, 'a', 2, 'a', 4, 'a', True], ['00120012', 4, 'z', 2, 'i', 2, 'n', None], ['00120020', 3, 'r', 1, 'e', 2, 'k', None], ['00120021', 4, 'z', 2, 'k', 2, 'k', None], ['00120022', 4, 'z', 1, 'e', 3, 'q', None], ['00120101', 4, 'y', 3, 'y', 1, 'c', None], ['00120102', 4, 'y', 2, 'k', 2, 'n', None], ['00120111', 5, 'r', 4, 't', 1, 'c', None], ['00120112', 5, 'r', 3, 'r', 2, 'n', None], ['00120120', 4, 'i', 2, 'k', 2, 'k', None], ['00120121', 5, 'r', 3, 'y', 2, 'k', None], ['00120122', 5, 'r', 2, 'k', 3, 'q', None], ['00120201', 4, 'y', 2, 'k', 2, 'c', None], ['00120202', 4, 'y', 1, 'e', 3, 'c', None], ['00120210', 4, 'i', 2, 'i', 2, 'c', None], ['00120211', 5, 'r', 3, 'r', 2, 'c', True], ['00120212', 5, 'r', 2, 'i', 3, 'c', None], ['00120220', 4, 'i', 1, 'e', 3, 'n', None], ['00120221', 5, 'r', 2, 'k', 3, 'n', None], ['00120222', 5, 'r', 1, 'e', 4, 'n', None], ['00121001', 4, 'q', 3, 'k', 1, 'c', None], ['00121002', 4, 'q', 2, 'e', 2, 'n', None], ['00121011', 5, 'q', 4, 'j', 1, 'c', None], ['00121012', 5, 'q', 3, 'e', 2, 'n', None], ['00121020', 4, 'r', 2, 'e', 2, 'k', None], ['00121021', 5, 'q', 3, 'k', 2, 'k', None], ['00121022', 5, 'q', 2, 'e', 3, 'q', True], ['00121101', 5, 'j', 4, 'k', 1, 'c', None], ['00121102', 5, 'j', 3, 'j', 2, 'n', None], ['00121111', 6, 'a', 5, 'n', 1, 'c', None], ['00121112', 6, 'a', 4, 'r', 2, 'n', None], ['00121120', 5, 'i', 3, 'j', 2, 'k', None], ['00121121', 6, 'a', 4, 'k', 2, 'k', None], ['00121122', 6, 'a', 3, 'j', 3, 'q', None], ['00121201', 5, 'j', 3, 'k', 2, 'c', None], ['00121202', 5, 'j', 2, 'e', 3, 'c', None], ['00121210', 5, 'i', 3, 'e', 2, 'c', None], ['00121211', 6, 'a', 4, 'j', 2, 'c', None], ['00121212', 6, 'a', 3, 'e', 3, 'c', None], ['00121220', 5, 'i', 2, 'e', 3, 'n', None], ['00121221', 6, 'a', 3, 'k', 3, 'n', None], ['00121222', 6, 'a', 2, 'e', 4, 'n', None], ['00122001', 4, 'q', 2, 'k', 2, 'a', None], ['00122002', 4, 'q', 1, 'e', 3, 'q', None], ['00122011', 5, 'q', 3, 'r', 2, 'a', None], ['00122012', 5, 'q', 2, 'i', 3, 'q', None], ['00122020', 4, 'r', 1, 'e', 3, 'j', None], ['00122021', 5, 'q', 2, 'k', 3, 'j', None], ['00122022', 5, 'q', 1, 'e', 4, 'w', None], ['00122101', 5, 'j', 3, 'y', 2, 'a', None], ['00122102', 5, 'j', 2, 'k', 3, 'q', None], ['00122111', 6, 'a', 4, 't', 2, 'a', None], ['00122112', 6, 'a', 3, 'r', 3, 'q', None], ['00122120', 5, 'i', 2, 'k', 3, 'j', None], ['00122121', 6, 'a', 3, 'y', 3, 'j', None], ['00122122', 6, 'a', 2, 'k', 4, 'w', None], ['00122201', 5, 'j', 2, 'k', 3, 'i', None], ['00122202', 5, 'j', 1, 'e', 4, 'n', None], ['00122210', 5, 'i', 2, 'i', 3, 'i', None], ['00122211', 6, 'a', 3, 'r', 3, 'i', None], ['00122212', 6, 'a', 2, 'i', 4, 'n', None], ['00122220', 5, 'i', 1, 'e', 4, 'a', None], ['00122221', 6, 'a', 2, 'k', 4, 'a', None], ['00122222', 6, 'a', 1, 'e', 5, 'a', None], ['00200020', 2, 'i', 0, '0', 2, 'i', None], ['00200021', 3, 'r', 1, 'c', 2, 'i', None], ['00200022', 3, 'r', 0, '0', 3, 'r', None], ['00200101', 3, 'y', 2, 'c', 1, 'e', None], ['00200102', 3, 'y', 1, 'c', 2, 'k', None], ['00200111', 4, 't', 3, 'i', 1, 'e', None], ['00200112', 4, 't', 2, 'a', 2, 'k', None], ['00200121', 4, 't', 2, 'c', 2, 'i', None], ['00200122', 4, 't', 1, 'c', 3, 'r', None], ['00200202', 3, 'y', 0, '0', 3, 'y', None], ['00200212', 4, 't', 1, 'e', 3, 'y', None], ['00200222', 4, 't', 0, '0', 4, 't', None], ['00201011', 4, 'j', 3, 'j', 1, 'e', None], ['00201012', 4, 'j', 2, 'e', 2, 'k', None], ['00201020', 3, 'e', 1, 'e', 2, 'i', None], ['00201021', 4, 'j', 2, 'k', 2, 'i', None], ['00201022', 4, 'j', 1, 'e', 3, 'r', None], ['00201101', 4, 'k', 3, 'n', 1, 'e', None], ['00201102', 4, 'k', 2, 'a', 2, 'k', None], ['00201111', 5, 'n', 4, 'a', 1, 'e', None], ['00201112', 5, 'n', 3, 'a', 2, 'k', None], ['00201120', 4, 'r', 2, 'a', 2, 'i', None], ['00201121', 5, 'n', 3, 'n', 2, 'i', None], ['00201122', 5, 'n', 2, 'a', 3, 'r', None], ['00201201', 4, 'k', 2, 'k', 2, 'k', True], ['00201202', 4, 'k', 1, 'e', 3, 'y', None], ['00201211', 5, 'n', 3, 'j', 2, 'k', None], ['00201212', 5, 'n', 2, 'e', 3, 'y', None], ['00201220', 4, 'r', 1, 'e', 3, 'r', None], ['00201221', 5, 'n', 2, 'k', 3, 'r', None], ['00201222', 5, 'n', 1, 'e', 4, 't', None], ['00202001', 3, 'k', 1, 'c', 2, 'e', None], ['00202002', 3, 'k', 0, '0', 3, 'k', None], ['00202011', 4, 'j', 2, 'a', 2, 'e', None], ['00202012', 4, 'j', 1, 'e', 3, 'k', None], ['00202020', 3, 'e', 0, '0', 3, 'e', None], ['00202021', 4, 'j', 1, 'c', 3, 'e', None], ['00202022', 4, 'j', 0, '0', 4, 'j', None], ['00202101', 4, 'k', 2, 'c', 2, 'e', None], ['00202102', 4, 'k', 1, 'c', 3, 'k', None], ['00202111', 5, 'n', 3, 'i', 2, 'e', None], ['00202112', 5, 'n', 2, 'a', 3, 'k', None], ['00202120', 4, 'r', 1, 'c', 3, 'e', None], ['00202121', 5, 'n', 2, 'c', 3, 'e', None], ['00202122', 5, 'n', 1, 'c', 4, 'j', None], ['00202201', 4, 'k', 1, 'c', 3, 'j', None], ['00202202', 4, 'k', 0, '0', 4, 'k', None], ['00202211', 5, 'n', 2, 'a', 3, 'j', None], ['00202212', 5, 'n', 1, 'e', 4, 'k', None], ['00202220', 4, 'r', 0, '0', 4, 'r', None], ['00202221', 5, 'n', 1, 'c', 4, 'r', None], ['00202222', 5, 'n', 0, '0', 5, 'n', None], ['00210021', 4, 'z', 2, 'n', 2, 'i', None], ['00210022', 4, 'z', 1, 'c', 3, 'r', None], ['00210101', 4, 'y', 3, 'c', 1, 'e', None], ['00210102', 4, 'y', 2, 'c', 2, 'k', None], ['00210111', 5, 'r', 4, 'n', 1, 'e', None], ['00210112', 5, 'r', 3, 'n', 2, 'k', None], ['00210120', 4, 'i', 2, 'c', 2, 'i', None], ['00210121', 5, 'r', 3, 'c', 2, 'i', None], ['00210122', 5, 'r', 2, 'c', 3, 'r', True], ['00210201', 4, 'y', 2, 'n', 2, 'k', None], ['00210202', 4, 'y', 1, 'c', 3, 'y', None], ['00210211', 5, 'r', 3, 'q', 2, 'k', None], ['00210212', 5, 'r', 2, 'k', 3, 'y', None], ['00210220', 4, 'i', 1, 'c', 3, 'r', None], ['00210221', 5, 'r', 2, 'n', 3, 'r', None], ['00210222', 5, 'r', 1, 'c', 4, 't', None], ['00211011', 5, 'q', 4, 'w', 1, 'e', None], ['00211012', 5, 'q', 3, 'j', 2, 'k', None], ['00211021', 5, 'q', 3, 'q', 2, 'i', None], ['00211022', 5, 'q', 2, 'a', 3, 'r', None], ['00211101', 5, 'j', 4, 'n', 1, 'e', None], ['00211102', 5, 'j', 3, 'i', 2, 'k', None], ['00211111', 6, 'a', 5, 'a', 1, 'e', None], ['00211112', 6, 'a', 4, 'a', 2, 'k', None], ['00211120', 5, 'i', 3, 'i', 2, 'i', None], ['00211121', 6, 'a', 4, 'n', 2, 'i', None], ['00211122', 6, 'a', 3, 'i', 3, 'r', None], ['00211201', 5, 'j', 3, 'q', 2, 'k', None], ['00211202', 5, 'j', 2, 'a', 3, 'y', None], ['00211211', 6, 'a', 4, 'w', 2, 'k', None], ['00211212', 6, 'a', 3, 'j', 3, 'y', None], ['00211220', 5, 'i', 2, 'a', 3, 'r', None], ['00211221', 6, 'a', 3, 'q', 3, 'r', None], ['00211222', 6, 'a', 2, 'a', 4, 't', None], ['00212001', 4, 'q', 2, 'n', 2, 'e', None], ['00212002', 4, 'q', 1, 'c', 3, 'k', None], ['00212011', 5, 'q', 3, 'q', 2, 'e', True], ['00212012', 5, 'q', 2, 'k', 3, 'k', None], ['00212021', 5, 'q', 2, 'n', 3, 'e', None], ['00212022', 5, 'q', 1, 'c', 4, 'j', None], ['00212101', 5, 'j', 3, 'c', 2, 'e', None], ['00212102', 5, 'j', 2, 'c', 3, 'k', None], ['00212111', 6, 'a', 4, 'n', 2, 'e', None], ['00212112', 6, 'a', 3, 'n', 3, 'k', None], ['00212120', 5, 'i', 2, 'c', 3, 'e', None], ['00212121', 6, 'a', 3, 'c', 3, 'e', None], ['00212122', 6, 'a', 2, 'c', 4, 'j', None], ['00212201', 5, 'j', 2, 'n', 3, 'j', None], ['00212202', 5, 'j', 1, 'c', 4, 'k', None], ['00212211', 6, 'a', 3, 'q', 3, 'j', None], ['00212212', 6, 'a', 2, 'k', 4, 'k', None], ['00212220', 5, 'i', 1, 'c', 4, 'r', None], ['00212221', 6, 'a', 2, 'n', 4, 'r', None], ['00212222', 6, 'a', 1, 'c', 5, 'n', None], ['00220022', 4, 'z', 0, '0', 4, 'z', None], ['00220101', 4, 'y', 2, 'c', 2, 'a', None], ['00220102', 4, 'y', 1, 'c', 3, 'q', None], ['00220111', 5, 'r', 3, 'i', 2, 'a', None], ['00220112', 5, 'r', 2, 'a', 3, 'q', None], ['00220121', 5, 'r', 2, 'c', 3, 'r', False], ['00220122', 5, 'r', 1, 'c', 4, 'z', None], ['00220201', 4, 'y', 1, 'c', 3, 'n', None], ['00220202', 4, 'y', 0, '0', 4, 'y', None], ['00220211', 5, 'r', 2, 'a', 3, 'n', None], ['00220212', 5, 'r', 1, 'e', 4, 'y', None], ['00220220', 4, 'i', 0, '0', 4, 'i', None], ['00220221', 5, 'r', 1, 'c', 4, 'i', None], ['00220222', 5, 'r', 0, '0', 5, 'r', None], ['00221011', 5, 'q', 3, 'j', 2, 'a', None], ['00221012', 5, 'q', 2, 'e', 3, 'q', False], ['00221021', 5, 'q', 2, 'k', 3, 'r', None], ['00221022', 5, 'q', 1, 'e', 4, 'z', None], ['00221101', 5, 'j', 3, 'n', 2, 'a', None], ['00221102', 5, 'j', 2, 'a', 3, 'q', None], ['00221111', 6, 'a', 4, 'a', 2, 'a', True], ['00221112', 6, 'a', 3, 'a', 3, 'q', None], ['00221121', 6, 'a', 3, 'n', 3, 'r', None], ['00221122', 6, 'a', 2, 'a', 4, 'z', None], ['00221201', 5, 'j', 2, 'k', 3, 'n', None], ['00221202', 5, 'j', 1, 'e', 4, 'y', None], ['00221211', 6, 'a', 3, 'j', 3, 'n', None], ['00221212', 6, 'a', 2, 'e', 4, 'y', None], ['00221220', 5, 'i', 1, 'e', 4, 'i', None], ['00221221', 6, 'a', 2, 'k', 4, 'i', None], ['00221222', 6, 'a', 1, 'e', 5, 'r', None], ['00222001', 4, 'q', 1, 'c', 3, 'a', None], ['00222002', 4, 'q', 0, '0', 4, 'q', None], ['00222011', 5, 'q', 2, 'a', 3, 'a', None], ['00222012', 5, 'q', 1, 'e', 4, 'q', None], ['00222021', 5, 'q', 1, 'c', 4, 'r', None], ['00222022', 5, 'q', 0, '0', 5, 'q', None], ['00222101', 5, 'j', 2, 'c', 3, 'a', None], ['00222102', 5, 'j', 1, 'c', 4, 'q', None], ['00222111', 6, 'a', 3, 'i', 3, 'a', None], ['00222112', 6, 'a', 2, 'a', 4, 'q', None], ['00222121', 6, 'a', 2, 'c', 4, 'r', None], ['00222122', 6, 'a', 1, 'c', 5, 'q', None], ['00222201', 5, 'j', 1, 'c', 4, 'a', None], ['00222202', 5, 'j', 0, '0', 5, 'j', None], ['00222211', 6, 'a', 2, 'a', 4, 'a', False], ['00222212', 6, 'a', 1, 'e', 5, 'j', None], ['00222220', 5, 'i', 0, '0', 5, 'i', None], ['00222221', 6, 'a', 1, 'c', 5, 'i', None], ['00222222', 6, 'a', 0, '0', 6, 'a', None], ['01010101', 4, 'c', 4, 'c', 0, '0', None], ['01010102', 4, 'c', 3, 'c', 1, 'c', None], ['01010111', 5, 'e', 5, 'e', 0, '0', None], ['01010112', 5, 'e', 4, 'y', 1, 'c', None], ['01010121', 5, 'e', 4, 'c', 1, 'e', None], ['01010122', 5, 'e', 3, 'c', 2, 'a', None], ['01010202', 4, 'c', 2, 'c', 2, 'c', None], ['01010212', 5, 'e', 3, 'y', 2, 'c', None], ['01010222', 5, 'e', 2, 'c', 3, 'i', None], ['01011011', 5, 'k', 5, 'k', 0, '0', None], ['01011012', 5, 'k', 4, 'k', 1, 'c', None], ['01011021', 5, 'k', 4, 'y', 1, 'e', None], ['01011022', 5, 'k', 3, 'n', 2, 'a', None], ['01011102', 5, 'e', 4, 'n', 1, 'c', None], ['01011111', 6, 'e', 6, 'e', 0, '0', None], ['01011112', 6, 'e', 5, 'j', 1, 'c', None], ['01011121', 6, 'e', 5, 'e', 1, 'e', None], ['01011122', 6, 'e', 4, 'n', 2, 'a', None], ['01011202', 5, 'e', 3, 'n', 2, 'c', None], ['01011211', 6, 'e', 5, 'k', 1, 'c', None], ['01011212', 6, 'e', 4, 'k', 2, 'c', None], ['01011221', 6, 'e', 4, 'y', 2, 'a', None], ['01011222', 6, 'e', 3, 'n', 3, 'i', None], ['01012012', 5, 'k', 3, 'y', 2, 'k', None], ['01012021', 5, 'k', 3, 'c', 2, 'e', None], ['01012022', 5, 'k', 2, 'c', 3, 'j', None], ['01012102', 5, 'e', 3, 'c', 2, 'k', None], ['01012112', 6, 'e', 4, 'y', 2, 'k', None], ['01012121', 6, 'e', 4, 'c', 2, 'e', None], ['01012122', 6, 'e', 3, 'c', 3, 'j', None], ['01012202', 5, 'e', 2, 'c', 3, 'n', None], ['01012212', 6, 'e', 3, 'y', 3, 'n', None], ['01012221', 6, 'e', 3, 'c', 3, 'a', None], ['01012222', 6, 'e', 2, 'c', 4, 'a', None], ['01020102', 4, 'c', 2, 'n', 2, 'n', None], ['01020112', 5, 'e', 3, 'q', 2, 'n', None], ['01020122', 5, 'e', 2, 'n', 3, 'q', None], ['01020202', 4, 'c', 1, 'c', 3, 'c', None], ['01020212', 5, 'e', 2, 'k', 3, 'c', None], ['01020222', 5, 'e', 1, 'c', 4, 'n', None], ['01021012', 5, 'k', 3, 'k', 2, 'n', None], ['01021022', 5, 'k', 2, 'k', 3, 'q', None], ['01021112', 6, 'e', 4, 'q', 2, 'n', None], ['01021122', 6, 'e', 3, 'q', 3, 'q', False], ['01021212', 6, 'e', 3, 'k', 3, 'c', None], ['01021222', 6, 'e', 2, 'k', 4, 'n', None], ['01022022', 5, 'k', 1, 'c', 4, 'w', None], ['01022122', 6, 'e', 2, 'n', 4, 'w', None], ['01022222', 6, 'e', 1, 'c', 5, 'a', None], ['01101011', 5, 'y', 5, 'y', 0, '0', None], ['01101012', 5, 'y', 4, 'j', 1, 'c', None], ['01101021', 5, 'y', 4, 'k', 1, 'e', None], ['01101022', 5, 'y', 3, 'j', 2, 'a', None], ['01101102', 5, 'k', 4, 'w', 1, 'c', None], ['01101111', 6, 'k', 6, 'k', 0, '0', None], ['01101112', 6, 'k', 5, 'q', 1, 'c', None], ['01101121', 6, 'k', 5, 'k', 1, 'e', None], ['01101122', 6, 'k', 4, 'w', 2, 'a', None], ['01101202', 5, 'k', 3, 'j', 2, 'c', None], ['01101211', 6, 'k', 5, 'y', 1, 'c', None], ['01101212', 6, 'k', 4, 'j', 2, 'c', None], ['01101221', 6, 'k', 4, 'k', 2, 'a', None], ['01101222', 6, 'k', 3, 'j', 3, 'i', None], ['01102011', 5, 'y', 4, 'i', 1, 'e', None], ['01102012', 5, 'y', 3, 'r', 2, 'k', None], ['01102021', 5, 'y', 3, 'n', 2, 'e', None], ['01102022', 5, 'y', 2, 'a', 3, 'j', None], ['01102102', 5, 'k', 3, 'q', 2, 'k', None], ['01102111', 6, 'k', 5, 'r', 1, 'e', None], ['01102112', 6, 'k', 4, 'z', 2, 'k', None], ['01102121', 6, 'k', 4, 'y', 2, 'e', None], ['01102122', 6, 'k', 3, 'q', 3, 'j', None], ['01102202', 5, 'k', 2, 'a', 3, 'n', None], ['01102211', 6, 'k', 4, 'i', 2, 'a', None], ['01102212', 6, 'k', 3, 'r', 3, 'n', None], ['01102221', 6, 'k', 3, 'n', 3, 'a', None], ['01102222', 6, 'k', 2, 'a', 4, 'a', None], ['01110111', 6, 'i', 6, 'i', 0, '0', None], ['01110112', 6, 'i', 5, 'r', 1, 'c', None], ['01110121', 6, 'i', 5, 'e', 1, 'e', None], ['01110122', 6, 'i', 4, 'n', 2, 'a', None], ['01110202', 5, 'e', 3, 'i', 2, 'c', None], ['01110212', 6, 'i', 4, 't', 2, 'c', None], ['01110222', 6, 'i', 3, 'i', 3, 'i', None], ['01111012', 6, 'k', 5, 'n', 1, 'c', None], ['01111021', 6, 'k', 5, 'j', 1, 'e', None], ['01111022', 6, 'k', 4, 'a', 2, 'a', None], ['01111102', 6, 'e', 5, 'a', 1, 'c', None], ['01111111', 7, 'e', 7, 'e', 0, '0', None], ['01111112', 7, 'e', 6, 'a', 1, 'c', None], ['01111121', 7, 'e', 6, 'e', 1, 'e', None], ['01111122', 7, 'e', 5, 'a', 2, 'a', None], ['01111202', 6, 'e', 4, 'a', 2, 'c', None], ['01111211', 7, 'e', 6, 'k', 1, 'c', None], ['01111212', 7, 'e', 5, 'n', 2, 'c', None], ['01111221', 7, 'e', 5, 'j', 2, 'a', None], ['01111222', 7, 'e', 4, 'a', 3, 'i', None], ['01112012', 6, 'k', 4, 't', 2, 'k', None], ['01112021', 6, 'k', 4, 'n', 2, 'e', None], ['01112022', 6, 'k', 3, 'i', 3, 'j', None], ['01112102', 6, 'e', 4, 'n', 2, 'k', None], ['01112111', 7, 'e', 6, 'i', 1, 'e', None], ['01112112', 7, 'e', 5, 'r', 2, 'k', None], ['01112121', 7, 'e', 5, 'e', 2, 'e', None], ['01112122', 7, 'e', 4, 'n', 3, 'j', None], ['01112202', 6, 'e', 3, 'i', 3, 'n', None], ['01112211', 7, 'e', 5, 'r', 2, 'a', None], ['01112212', 7, 'e', 4, 't', 3, 'n', None], ['01112221', 7, 'e', 4, 'n', 3, 'a', None], ['01112222', 7, 'e', 3, 'i', 4, 'a', None], ['01120112', 6, 'i', 4, 'z', 2, 'n', None], ['01120121', 6, 'i', 4, 'y', 2, 'k', None], ['01120122', 6, 'i', 3, 'q', 3, 'q', None], ['01120202', 5, 'e', 2, 'a', 3, 'c', None], ['01120211', 6, 'i', 4, 'i', 2, 'c', None], ['01120212', 6, 'i', 3, 'r', 3, 'c', None], ['01120221', 6, 'i', 3, 'n', 3, 'n', None], ['01120222', 6, 'i', 2, 'a', 4, 'n', None], ['01121012', 6, 'k', 4, 'j', 2, 'n', None], ['01121021', 6, 'k', 4, 'k', 2, 'k', False], ['01121022', 6, 'k', 3, 'j', 3, 'q', None], ['01121102', 6, 'e', 4, 'w', 2, 'n', None], ['01121112', 7, 'e', 5, 'q', 2, 'n', None], ['01121121', 7, 'e', 5, 'k', 2, 'k', None], ['01121122', 7, 'e', 4, 'w', 3, 'q', None], ['01121202', 6, 'e', 3, 'j', 3, 'c', None], ['01121211', 7, 'e', 5, 'y', 2, 'c', None], ['01121212', 7, 'e', 4, 'j', 3, 'c', None], ['01121221', 7, 'e', 4, 'k', 3, 'n', None], ['01121222', 7, 'e', 3, 'j', 4, 'n', None], ['01122012', 6, 'k', 3, 'r', 3, 'q', None], ['01122021', 6, 'k', 3, 'n', 3, 'j', None], ['01122022', 6, 'k', 2, 'a', 4, 'w', None], ['01122102', 6, 'e', 3, 'q', 3, 'q', True], ['01122112', 7, 'e', 4, 'z', 3, 'q', None], ['01122121', 7, 'e', 4, 'y', 3, 'j', None], ['01122122', 7, 'e', 3, 'q', 4, 'w', None], ['01122202', 6, 'e', 2, 'a', 4, 'n', None], ['01122211', 7, 'e', 4, 'i', 3, 'i', None], ['01122212', 7, 'e', 3, 'r', 4, 'n', None], ['01122221', 7, 'e', 3, 'n', 4, 'a', None], ['01122222', 7, 'e', 2, 'a', 5, 'a', None], ['01201012', 5, 'y', 3, 'k', 2, 'k', None], ['01201021', 5, 'y', 3, 'y', 2, 'i', None], ['01201022', 5, 'y', 2, 'k', 3, 'r', None], ['01201112', 6, 'k', 4, 'q', 2, 'k', None], ['01201121', 6, 'k', 4, 'y', 2, 'i', None], ['01201122', 6, 'k', 3, 'q', 3, 'r', None], ['01201202', 5, 'k', 2, 'k', 3, 'y', None], ['01201212', 6, 'k', 3, 'k', 3, 'y', None], ['01201221', 6, 'k', 3, 'y', 3, 'r', None], ['01201222', 6, 'k', 2, 'k', 4, 't', None], ['01202012', 5, 'y', 2, 'k', 3, 'k', None], ['01202021', 5, 'y', 2, 'c', 3, 'e', None], ['01202022', 5, 'y', 1, 'c', 4, 'j', None], ['01202102', 5, 'k', 2, 'n', 3, 'k', None], ['01202112', 6, 'k', 3, 'q', 3, 'k', None], ['01202121', 6, 'k', 3, 'c', 3, 'e', None], ['01202122', 6, 'k', 2, 'n', 4, 'j', None], ['01202202', 5, 'k', 1, 'c', 4, 'k', None], ['01202212', 6, 'k', 2, 'k', 4, 'k', True], ['01202221', 6, 'k', 2, 'c', 4, 'r', None], ['01202222', 6, 'k', 1, 'c', 5, 'n', None], ['01210121', 6, 'i', 4, 'c', 2, 'i', None], ['01210122', 6, 'i', 3, 'c', 3, 'r', None], ['01210202', 5, 'e', 2, 'c', 3, 'y', None], ['01210212', 6, 'i', 3, 'y', 3, 'y', None], ['01210222', 6, 'i', 2, 'c', 4, 't', None], ['01211012', 6, 'k', 4, 'k', 2, 'k', True], ['01211022', 6, 'k', 3, 'n', 3, 'r', None], ['01211112', 7, 'e', 5, 'j', 2, 'k', None], ['01211121', 7, 'e', 5, 'e', 2, 'i', None], ['01211122', 7, 'e', 4, 'n', 3, 'r', None], ['01211202', 6, 'e', 3, 'n', 3, 'y', None], ['01211212', 7, 'e', 4, 'k', 3, 'y', None], ['01211221', 7, 'e', 4, 'y', 3, 'r', None], ['01211222', 7, 'e', 3, 'n', 4, 't', None], ['01212012', 6, 'k', 3, 'y', 3, 'k', None], ['01212022', 6, 'k', 2, 'c', 4, 'j', None], ['01212102', 6, 'e', 3, 'c', 3, 'k', None], ['01212112', 7, 'e', 4, 'y', 3, 'k', None], ['01212121', 7, 'e', 4, 'c', 3, 'e', None], ['01212122', 7, 'e', 3, 'c', 4, 'j', None], ['01212202', 6, 'e', 2, 'c', 4, 'k', None], ['01212212', 7, 'e', 3, 'y', 4, 'k', None], ['01212221', 7, 'e', 3, 'c', 4, 'r', None], ['01212222', 7, 'e', 2, 'c', 5, 'n', None], ['01220122', 6, 'i', 2, 'n', 4, 'z', None], ['01220202', 5, 'e', 1, 'c', 4, 'y', None], ['01220212', 6, 'i', 2, 'k', 4, 'y', None], ['01220221', 6, 'i', 2, 'c', 4, 'i', None], ['01220222', 6, 'i', 1, 'c', 5, 'r', None], ['01221012', 6, 'k', 3, 'k', 3, 'q', None], ['01221022', 6, 'k', 2, 'k', 4, 'z', None], ['01221112', 7, 'e', 4, 'q', 3, 'q', None], ['01221122', 7, 'e', 3, 'q', 4, 'z', None], ['01221202', 6, 'e', 2, 'k', 4, 'y', None], ['01221212', 7, 'e', 3, 'k', 4, 'y', None], ['01221221', 7, 'e', 3, 'y', 4, 'i', None], ['01221222', 7, 'e', 2, 'k', 5, 'r', None], ['01222012', 6, 'k', 2, 'k', 4, 'q', None], ['01222022', 6, 'k', 1, 'c', 5, 'q', None], ['01222102', 6, 'e', 2, 'n', 4, 'q', None], ['01222112', 7, 'e', 3, 'q', 4, 'q', None], ['01222122', 7, 'e', 2, 'n', 5, 'q', None], ['01222202', 6, 'e', 1, 'c', 5, 'j', None], ['01222212', 7, 'e', 2, 'k', 5, 'j', None], ['01222221', 7, 'e', 2, 'c', 5, 'i', None], ['01222222', 7, 'e', 1, 'c', 6, 'a', None], ['02020202', 4, 'c', 0, '0', 4, 'c', None], ['02020212', 5, 'e', 1, 'e', 4, 'c', None], ['02020222', 5, 'e', 0, '0', 5, 'e', None], ['02021012', 5, 'k', 2, 'e', 3, 'c', None], ['02021022', 5, 'k', 1, 'e', 4, 'y', None], ['02021112', 6, 'e', 3, 'a', 3, 'c', None], ['02021122', 6, 'e', 2, 'a', 4, 'y', None], ['02021212', 6, 'e', 2, 'e', 4, 'c', None], ['02021222', 6, 'e', 1, 'e', 5, 'e', None], ['02022022', 5, 'k', 0, '0', 5, 'k', None], ['02022122', 6, 'e', 1, 'c', 5, 'k', None], ['02022222', 6, 'e', 0, '0', 6, 'e', None], ['02101012', 5, 'y', 3, 'e', 2, 'c', None], ['02101022', 5, 'y', 2, 'e', 3, 'n', None], ['02101112', 6, 'k', 4, 'r', 2, 'c', None], ['02101122', 6, 'k', 3, 'j', 3, 'n', None], ['02101212', 6, 'k', 3, 'e', 3, 'c', None], ['02101222', 6, 'k', 2, 'e', 4, 'n', None], ['02102012', 5, 'y', 2, 'i', 3, 'y', None], ['02102022', 5, 'y', 1, 'e', 4, 'k', None], ['02102112', 6, 'k', 3, 'r', 3, 'y', None], ['02102122', 6, 'k', 2, 'k', 4, 'k', False], ['02102212', 6, 'k', 2, 'i', 4, 'y', None], ['02102222', 6, 'k', 1, 'e', 5, 'j', None], ['02111022', 6, 'k', 3, 'a', 3, 'n', None], ['02111112', 7, 'e', 5, 'i', 2, 'c', None], ['02111122', 7, 'e', 4, 'a', 3, 'n', None], ['02111212', 7, 'e', 4, 'r', 3, 'c', None], ['02111222', 7, 'e', 3, 'a', 4, 'n', None], ['02112022', 6, 'k', 2, 'a', 4, 'k', None], ['02112112', 7, 'e', 4, 'i', 3, 'y', None], ['02112122', 7, 'e', 3, 'n', 4, 'k', None], ['02112212', 7, 'e', 3, 'r', 4, 'y', None], ['02112222', 7, 'e', 2, 'a', 5, 'j', None], ['02120212', 6, 'i', 2, 'i', 4, 'c', None], ['02120222', 6, 'i', 1, 'e', 5, 'e', None], ['02121022', 6, 'k', 2, 'e', 4, 'y', None], ['02121122', 7, 'e', 3, 'j', 4, 'y', None], ['02121212', 7, 'e', 3, 'e', 4, 'c', None], ['02121222', 7, 'e', 2, 'e', 5, 'e', None], ['02122022', 6, 'k', 1, 'e', 5, 'k', None], ['02122122', 7, 'e', 2, 'k', 5, 'k', None], ['02122212', 7, 'e', 2, 'i', 5, 'e', None], ['02122222', 7, 'e', 1, 'e', 6, 'e', None], ['02201022', 5, 'y', 1, 'e', 4, 'i', None], ['02201122', 6, 'k', 2, 'a', 4, 'i', None], ['02201222', 6, 'k', 1, 'e', 5, 'r', None], ['02202022', 5, 'y', 0, '0', 5, 'y', None], ['02202122', 6, 'k', 1, 'c', 5, 'y', None], ['02202222', 6, 'k', 0, '0', 6, 'k', None], ['02211122', 7, 'e', 3, 'i', 4, 'i', None], ['02211222', 7, 'e', 2, 'a', 5, 'r', None], ['02212122', 7, 'e', 2, 'c', 5, 'y', None], ['02212222', 7, 'e', 1, 'c', 6, 'k', None], ['02220222', 6, 'i', 0, '0', 6, 'i', None], ['02221222', 7, 'e', 1, 'e', 6, 'i', None], ['02222222', 7, 'e', 0, '0', 7, 'e', None], ['10101010', 4, 'e', 4, 'e', 0, '0', None], ['10101011', 5, 'c', 5, 'c', 0, '0', None], ['10101012', 5, 'c', 4, 'e', 1, 'c', None], ['10101020', 4, 'e', 3, 'e', 1, 'e', None], ['10101021', 5, 'c', 4, 'j', 1, 'e', None], ['10101022', 5, 'c', 3, 'e', 2, 'a', None], ['10101111', 6, 'c', 6, 'c', 0, '0', None], ['10101112', 6, 'c', 5, 'c', 1, 'c', None], ['10101121', 6, 'c', 5, 'y', 1, 'e', None], ['10101122', 6, 'c', 4, 'j', 2, 'a', None], ['10101212', 6, 'c', 4, 'e', 2, 'c', None], ['10101222', 6, 'c', 3, 'e', 3, 'i', None], ['10102011', 5, 'c', 4, 'r', 1, 'e', None], ['10102012', 5, 'c', 3, 'e', 2, 'k', None], ['10102020', 4, 'e', 2, 'e', 2, 'e', None], ['10102021', 5, 'c', 3, 'j', 2, 'e', None], ['10102022', 5, 'c', 2, 'e', 3, 'j', None], ['10102111', 6, 'c', 5, 'n', 1, 'e', None], ['10102112', 6, 'c', 4, 'j', 2, 'k', None], ['10102120', 5, 'c', 3, 'k', 2, 'e', None], ['10102121', 6, 'c', 4, 'k', 2, 'e', None], ['10102122', 6, 'c', 3, 'k', 3, 'j', None], ['10102211', 6, 'c', 4, 'r', 2, 'a', None], ['10102212', 6, 'c', 3, 'e', 3, 'n', None], ['10102220', 5, 'c', 2, 'e', 3, 'a', None], ['10102221', 6, 'c', 3, 'j', 3, 'a', None], ['10102222', 6, 'c', 2, 'e', 4, 'a', None], ['10111011', 6, 'n', 6, 'n', 0, '0', None], ['10111012', 6, 'n', 5, 'c', 1, 'c', None], ['10111021', 6, 'n', 5, 'q', 1, 'e', None], ['10111022', 6, 'n', 4, 'r', 2, 'a', None], ['10111111', 7, 'c', 7, 'c', 0, '0', None], ['10111112', 7, 'c', 6, 'c', 1, 'c', None], ['10111121', 7, 'c', 6, 'k', 1, 'e', None], ['10111122', 7, 'c', 5, 'n', 2, 'a', None], ['10111211', 7, 'c', 6, 'n', 1, 'c', None], ['10111212', 7, 'c', 5, 'c', 2, 'c', None], ['10111221', 7, 'c', 5, 'q', 2, 'a', None], ['10111222', 7, 'c', 4, 'r', 3, 'i', None], ['10112012', 6, 'n', 4, 'j', 2, 'k', None], ['10112021', 6, 'n', 4, 'w', 2, 'e', None], ['10112022', 6, 'n', 3, 'j', 3, 'j', None], ['10112112', 7, 'c', 5, 'y', 2, 'k', None], ['10112121', 7, 'c', 5, 'k', 2, 'e', None], ['10112122', 7, 'c', 4, 'k', 3, 'j', None], ['10112212', 7, 'c', 4, 'j', 3, 'n', None], ['10112221', 7, 'c', 4, 'w', 3, 'a', None], ['10112222', 7, 'c', 3, 'j', 4, 'a', None], ['10121012', 6, 'n', 4, 'e', 2, 'n', None], ['10121022', 6, 'n', 3, 'e', 3, 'q', None], ['10121112', 7, 'c', 5, 'c', 2, 'n', None], ['10121122', 7, 'c', 4, 'j', 3, 'q', None], ['10121212', 7, 'c', 4, 'e', 3, 'c', None], ['10121222', 7, 'c', 3, 'e', 4, 'n', None], ['10122022', 6, 'n', 2, 'e', 4, 'w', None], ['10122122', 7, 'c', 3, 'k', 4, 'w', None], ['10122222', 7, 'c', 2, 'e', 5, 'a', None], ['10201020', 4, 'e', 2, 'i', 2, 'i', None], ['10201021', 5, 'c', 3, 'r', 2, 'i', None], ['10201022', 5, 'c', 2, 'i', 3, 'r', None], ['10201111', 6, 'c', 5, 'i', 1, 'e', None], ['10201112', 6, 'c', 4, 'r', 2, 'k', None], ['10201121', 6, 'c', 4, 'i', 2, 'i', None], ['10201122', 6, 'c', 3, 'r', 3, 'r', False], ['10201212', 6, 'c', 3, 'e', 3, 'y', None], ['10201222', 6, 'c', 2, 'i', 4, 't', None], ['10202011', 5, 'c', 3, 'a', 2, 'e', None], ['10202012', 5, 'c', 2, 'e', 3, 'k', None], ['10202020', 4, 'e', 1, 'e', 3, 'e', None], ['10202021', 5, 'c', 2, 'a', 3, 'e', None], ['10202022', 5, 'c', 1, 'e', 4, 'j', None], ['10202111', 6, 'c', 4, 'a', 2, 'e', None], ['10202112', 6, 'c', 3, 'j', 3, 'k', None], ['10202120', 5, 'c', 2, 'k', 3, 'e', None], ['10202121', 6, 'c', 3, 'n', 3, 'e', None], ['10202122', 6, 'c', 2, 'k', 4, 'j', None], ['10202211', 6, 'c', 3, 'a', 3, 'j', None], ['10202212', 6, 'c', 2, 'e', 4, 'k', None], ['10202220', 5, 'c', 1, 'e', 4, 'r', None], ['10202221', 6, 'c', 2, 'a', 4, 'r', None], ['10202222', 6, 'c', 1, 'e', 5, 'n', None], ['10211021', 6, 'n', 4, 'z', 2, 'i', None], ['10211022', 6, 'n', 3, 'r', 3, 'r', None], ['10211111', 7, 'c', 6, 'a', 1, 'e', None], ['10211112', 7, 'c', 5, 'n', 2, 'k', None], ['10211120', 6, 'c', 4, 't', 2, 'i', None], ['10211121', 7, 'c', 5, 'r', 2, 'i', None], ['10211122', 7, 'c', 4, 't', 3, 'r', None], ['10211211', 7, 'c', 5, 'q', 2, 'k', None], ['10211212', 7, 'c', 4, 'j', 3, 'y', None], ['10211220', 6, 'c', 3, 'r', 3, 'r', True], ['10211221', 7, 'c', 4, 'z', 3, 'r', None], ['10211222', 7, 'c', 3, 'r', 4, 't', None], ['10212011', 6, 'n', 4, 'q', 2, 'e', None], ['10212012', 6, 'n', 3, 'k', 3, 'k', None], ['10212021', 6, 'n', 3, 'q', 3, 'e', None], ['10212022', 6, 'n', 2, 'k', 4, 'j', None], ['10212111', 7, 'c', 5, 'j', 2, 'e', None], ['10212112', 7, 'c', 4, 'k', 3, 'k', None], ['10212120', 6, 'c', 3, 'y', 3, 'e', None], ['10212121', 7, 'c', 4, 'y', 3, 'e', None], ['10212122', 7, 'c', 3, 'y', 4, 'j', None], ['10212211', 7, 'c', 4, 'q', 3, 'j', None], ['10212212', 7, 'c', 3, 'k', 4, 'k', None], ['10212220', 6, 'c', 2, 'k', 4, 'r', None], ['10212221', 7, 'c', 3, 'q', 4, 'r', None], ['10212222', 7, 'c', 2, 'k', 5, 'n', None], ['10221022', 6, 'n', 2, 'i', 4, 'z', None], ['10221111', 7, 'c', 5, 'i', 2, 'a', None], ['10221112', 7, 'c', 4, 'r', 3, 'q', None], ['10221121', 7, 'c', 4, 'i', 3, 'r', None], ['10221122', 7, 'c', 3, 'r', 4, 'z', None], ['10221211', 7, 'c', 4, 'r', 3, 'n', None], ['10221212', 7, 'c', 3, 'e', 4, 'y', None], ['10221220', 6, 'c', 2, 'i', 4, 'i', None], ['10221221', 7, 'c', 3, 'r', 4, 'i', None], ['10221222', 7, 'c', 2, 'i', 5, 'r', None], ['10222011', 6, 'n', 3, 'a', 3, 'a', None], ['10222012', 6, 'n', 2, 'e', 4, 'q', None], ['10222021', 6, 'n', 2, 'a', 4, 'r', None], ['10222022', 6, 'n', 1, 'e', 5, 'q', None], ['10222111', 7, 'c', 4, 'a', 3, 'a', None], ['10222112', 7, 'c', 3, 'j', 4, 'q', None], ['10222121', 7, 'c', 3, 'n', 4, 'r', None], ['10222122', 7, 'c', 2, 'k', 5, 'q', None], ['10222211', 7, 'c', 3, 'a', 4, 'a', None], ['10222212', 7, 'c', 2, 'e', 5, 'j', None], ['10222220', 6, 'c', 1, 'e', 5, 'i', None], ['10222221', 7, 'c', 2, 'a', 5, 'i', None], ['10222222', 7, 'c', 1, 'e', 6, 'a', None], ['11111111', 8, '8', 8, '8', 0, '0', None], ['11111112', 8, '8', 7, 'c', 1, 'c', None], ['11111121', 8, '8', 7, 'e', 1, 'e', None], ['11111122', 8, '8', 6, 'a', 2, 'a', None], ['11111212', 8, '8', 6, 'c', 2, 'c', None], ['11111222', 8, '8', 5, 'i', 3, 'i', None], ['11112021', 7, 'c', 5, 'a', 2, 'e', None], ['11112022', 7, 'c', 4, 'a', 3, 'j', None], ['11112112', 8, '8', 6, 'k', 2, 'k', None], ['11112121', 8, '8', 6, 'e', 2, 'e', None], ['11112122', 8, '8', 5, 'j', 3, 'j', None], ['11112212', 8, '8', 5, 'n', 3, 'n', None], ['11112221', 8, '8', 5, 'a', 3, 'a', None], ['11112222', 8, '8', 4, 'a', 4, 'a', None], ['11121112', 8, '8', 6, 'n', 2, 'n', None], ['11121122', 8, '8', 5, 'q', 3, 'q', None], ['11121212', 8, '8', 5, 'c', 3, 'c', None], ['11121222', 8, '8', 4, 'r', 4, 'n', None], ['11122022', 7, 'c', 3, 'a', 4, 'w', None], ['11122122', 8, '8', 4, 'q', 4, 'w', None], ['11122222', 8, '8', 3, 'a', 5, 'a', None], ['11202021', 6, 'c', 3, 'i', 3, 'e', None], ['11202022', 6, 'c', 2, 'a', 4, 'j', None], ['11202112', 7, 'c', 4, 'w', 3, 'k', None], ['11202121', 7, 'c', 4, 'n', 3, 'e', None], ['11202122', 7, 'c', 3, 'q', 4, 'j', None], ['11202212', 7, 'c', 3, 'j', 4, 'k', None], ['11202221', 7, 'c', 3, 'i', 4, 'r', None], ['11202222', 7, 'c', 2, 'a', 5, 'n', None], ['11211121', 8, '8', 6, 'i', 2, 'i', None], ['11211122', 8, '8', 5, 'r', 3, 'r', None], ['11211212', 8, '8', 5, 'y', 3, 'y', None], ['11211222', 8, '8', 4, 'i', 4, 't', None], ['11212022', 7, 'c', 3, 'n', 4, 'j', None], ['11212112', 8, '8', 5, 'k', 3, 'k', None], ['11212121', 8, '8', 5, 'e', 3, 'e', None], ['11212122', 8, '8', 4, 'y', 4, 'j', None], ['11212212', 8, '8', 4, 'k', 4, 'k', None], ['11212221', 8, '8', 4, 'n', 4, 'r', None], ['11212222', 8, '8', 3, 'n', 5, 'n', None], ['11221122', 8, '8', 4, 'z', 4, 'z', None], ['11221212', 8, '8', 4, 'j', 4, 'y', None], ['11221221', 8, '8', 4, 't', 4, 'i', None], ['11221222', 8, '8', 3, 'r', 5, 'r', None], ['11222022', 7, 'c', 2, 'a', 5, 'q', None], ['11222112', 8, '8', 4, 'w', 4, 'q', None], ['11222122', 8, '8', 3, 'q', 5, 'q', None], ['11222212', 8, '8', 3, 'j', 5, 'j', None], ['11222221', 8, '8', 3, 'i', 5, 'i', None], ['11222222', 8, '8', 2, 'a', 6, 'a', None], ['12121212', 8, '8', 4, 'e', 4, 'c', None], ['12121222', 8, '8', 3, 'e', 5, 'e', None], ['12122022', 7, 'c', 2, 'e', 5, 'k', None], ['12122122', 8, '8', 3, 'k', 5, 'k', None], ['12122222', 8, '8', 2, 'e', 6, 'e', None], ['12202022', 6, 'c', 1, 'e', 5, 'y', None], ['12202122', 7, 'c', 2, 'k', 5, 'y', None], ['12202222', 7, 'c', 1, 'e', 6, 'k', None], ['12212122', 8, '8', 3, 'y', 5, 'y', None], ['12212222', 8, '8', 2, 'k', 6, 'k', None], ['12221222', 8, '8', 2, 'i', 6, 'i', None], ['12222222', 8, '8', 1, 'e', 7, 'e', None], ['20202020', 4, 'e', 0, '0', 4, 'e', None], ['20202021', 5, 'c', 1, 'c', 4, 'e', None], ['20202022', 5, 'c', 0, '0', 5, 'c', None], ['20202121', 6, 'c', 2, 'c', 4, 'e', None], ['20202122', 6, 'c', 1, 'c', 5, 'c', None], ['20202222', 6, 'c', 0, '0', 6, 'c', None], ['20212021', 6, 'n', 2, 'n', 4, 'e', None], ['20212022', 6, 'n', 1, 'c', 5, 'c', None], ['20212121', 7, 'c', 3, 'c', 4, 'e', None], ['20212122', 7, 'c', 2, 'c', 5, 'c', None], ['20212221', 7, 'c', 2, 'n', 5, 'c', None], ['20212222', 7, 'c', 1, 'c', 6, 'c', None], ['20222022', 6, 'n', 0, '0', 6, 'n', None], ['20222122', 7, 'c', 1, 'c', 6, 'n', None], ['20222222', 7, 'c', 0, '0', 7, 'c', None], ['21212121', 8, '8', 4, 'c', 4, 'e', None], ['21212122', 8, '8', 3, 'c', 5, 'c', None], ['21212222', 8, '8', 2, 'c', 6, 'c', None], ['21222122', 8, '8', 2, 'n', 6, 'n', None], ['21222222', 8, '8', 1, 'c', 7, 'c', None], ['22222222', 8, '8', 0, '0', 8, '8', None]]

test = ""
for t in transitionlist:
    if len(t) != 8:
        print("kill me")




for i in range(len(secstrs)):
    while True: 
        if random.random() < terminationchances[i]:
            break
        if excludeB0 and (i == 0 or i == 1):
            tr = random.randint(1, len(transitionlist)-1)
        else:
            tr = random.randint(0, len(transitionlist)-1)
        tr = transitionlist[tr][1:7]
        tr[0] = str(tr[0])
        tr[2] = str(tr[2])
        tr[4] = str(tr[4])
        for t in range(len(tr)):
            if random.random() < wildcardchances[i]:
                tr[t] = ""
        if tr[0] == "" and tr[1] == "" and tr[2] == "" and tr[3] == "" and  tr[4] == "" and  tr[5] == "":
            continue
        secstrs[i] = secstrs[i] + tr[0] + tr[1] + ";" + tr[2] + tr[3] + ";" + tr[4] + tr[5] + "."

for i in range(len(secstrs)):
    while True: 
        if random.random() < negtermchances[i]:
            break
        tr = random.randint(0, len(transitionlist)-1)
        tr = transitionlist[tr][1:7]
        tr[0] = str(tr[0])
        tr[2] = str(tr[2])
        tr[4] = str(tr[4])
        for t in range(len(tr)):
            if random.random() < negwildcardchances[i]:
                tr[t] = ""
        if tr[0] == "" and tr[1] == "" and tr[2] == "" and tr[3] == "" and  tr[4] == "" and  tr[5] == "":
            continue
        negsecstrs[i] = negsecstrs[i] + tr[0] + tr[1] + ";" + tr[2] + tr[3] + ";" + tr[4] + tr[5] + "."

rulestring = secstrs[0] + negsecstrs[0] + secstrs[1] + negsecstrs[1] + secstrs[2] + negsecstrs[2] + secstrs[3] + negsecstrs[3] + secstrs[4] + negsecstrs[4] + secstrs[5] + negsecstrs[5] + "/"



rulestring = rulestring.replace("00","0")
rulestring = rulestring.replace("88","8")
rulestring = rulestring.replace(".-","-")
rulestring = rulestring.replace("-/","/")
rulestring = rulestring.replace("./","/")

rulestring = rulestring[:-1]

print(rulestring)
I wrote a stdin script that generates random soups of a provided number of a given spaceship. It works for all (non-B0) spaceships in the INT rulespace!
A Multistate INT notation + script.
Cyclotrons
Posts: 132
Joined: January 26th, 2021, 12:19 am

Re: A Notation for 3-State INT Rules (and a script to turn them into rulefiles)

Post by Cyclotrons »

Cyclotrons wrote: August 16th, 2023, 11:12 pm Here is an alteration to the most recent notation that generalizes to higher numbers of states:

First change: 'Factoring out' transitions is being cut. It's a complication that doesn't need to be there.

Second change: State changes will be notated with numbers instead of letters, allowing the notation to generalize above 26 states if need be. 0Tn and nTn will be allowed (but not required) in place of Bn and Sn, respectively. It is now formal that, in the case of two conflicting state changes (ex. BA;1; and BB;1; in the previous notation), the one that occurs first in the rulestring takes precedence. As such, there is no 'canonical' ordering (though it will be encouraged to order by increasing end state, then beginning state). Finally, to prevent ambiguity, state change markers will be terminated with '.'.
A three-state rulestring following these conventions would look like such: B1./B2./S1./1T2./S2./2T1.

Third change: Constraints will be allowed to refer explicitly to which states the constraint applies to by adding the states to the start. The states would be separated by a '+' and would be separated from the constraint by a ':'. The canonical ordering will be limits to state 0, state 1, state 2, etc, and state specifiers won't be needed until it is deviated from. For example, the constraint 'X;X;X;X;8:X;1+2+5+13:X' would apply restriction X to the shape of states 0, 1, 2, 3, 8, and the combination of 1, 2, 5, and 13 treated as one state to the configuration.

Fourth change: A way of notating subconfigurations has been added. At the end of a full constraint, just before the '.' delimiting them, other constraints between parentheses would define the configurations that must occur within the current configuration to be accepted. As a concrete example ';4a;2a;1+2:6a(;2a;2a;1+2:4i) is saying that all state 1 cells must be in the 4a config, all state 2 cells must be in the 2a config, all state 1 and 2 cells must be in the 6a config, but also there must be some combination of cells such within where state 1 and 2 cells form a 4i configuration, and within that 4i the must be state 1 cells in the 2a config and state 2 cells in the 2a config. These allow total specificity for configurations to be possible.
Also allowed will be a list of cells, in the same order as the ruletable format, with 'x' indicating that you don't care about the state of cells in that position. This will allow for brevity, especially in rules with a large number of states.

-

No script this time, but I am at work writing a rule parsing + transition function program that, if all goes well, will be implemented into golly at some point (though I certainly wouldn't mind being beaten to the punch :wink: ).
Update on this: I have done most (hopefully all) of the work needed for this and posted the transition function here.
I wrote a stdin script that generates random soups of a provided number of a given spaceship. It works for all (non-B0) spaceships in the INT rulespace!
A Multistate INT notation + script.
Post Reply