The "List of rules investigated on Catagolue"

For scripts to aid with computation or simulation in cellular automata.
Post Reply
User avatar
Apple Bottom
Posts: 1034
Joined: July 27th, 2015, 2:06 pm
Contact:

The "List of rules investigated on Catagolue"

Post by Apple Bottom » July 11th, 2016, 5:58 am

Since there's an (incomplete) "List of rules investigated on Catagolue" article on the wiki now, EricABQ asked me over there to share the datafiles and script used to generate its main part.

So here they are. There's two data files I've been maintaining, rules.list and rules.names; the former simply lists all rules I know to have been looked at on Catagolue, the latter lists rule names. The script reads both of these and outputs a table body (in Mediawiki syntax), suitable for copying and pasting into the article.

The rules.list file:

Code: Select all

# NOTE: rulestrings marked as "haulless" have been investigated, but have no
# submitted hauls on Catagolue.
# NOTE 2: these should be lowercase.

# b345678s # haulless
# b345678s568 # haulless
# b345s045678 # haulless
# b3678s0235678 # haulless
# b3678s235678 # haulless
# b368s125 # haulless
# b36ce7s23-a4r6ce2 # haulless
# b3s235 # haulless
# b45s12345 # haulless
# b478s1234 # haulless
# b5s35 # haulless
# b7s1234 # haulless
# bs012345678 # haulless
# bs1234 # haulless
b2-a3aeijs23-a5c
b2-a3-ij4es04e
b2-a3-is23aij
b2-a3s2-a
b2-a4s23
b2-a5s135678
b2-ace34cs023-a
b2-ace3s023-a
b2-ack3s13
b2-ack3s23-a
b2-ae3ces2-i3-j
b2-ae3s45
b2-aei4s3
b2-aek3ci4ces
b2-aek3s23-a
b2-aen3aei7s02-a
b2-aik3ce4ces2c3c4c
b2-ain3is12-akn
b2-ain3-jqys3
b2-ak3-ces3
b2-akn3ci4jnr5ikns12-ck4einqy5er6-ckn8
b2-an3aei4es02e3ei
b2-an3aeis02
b2-as12
b2-as13iy5
b2c3s13
b2c3s2-ck3
b2ce3ais23
b2ce3eis1-e2-i3a
b2ci3s12i3
b2ci3s13
b2ci3s2-ck3
b2cn3c4cs2c3c4c
b2e3-a678s34678
b2e3-as23
b2e3s134-ajr
b2e3s23-a
b2e3s23-j
b2ei3-a4ce5y6is234i7-c
b2i34cs2-i3
b2i34e6i7-es2-i36n
b2i34es023-a4ce
b2i34s23a
b2i34t6s123i4e
b2i35rs023-a4i
b2i3678s34678
b2i3-e678s34678
b2i3s12
b2i3s12-ae3
b2i3s2-i3
b2i3s2-in3
b2i3s2-n3
b2i4is2-i34-i
b2i4is2-i4-i
b2ik34e8s2-c3
b2ik367s127
b2in34cs12i35-r
b2in36ks23-i4ceq
b2in36s135
b2in3aei4is12
b2in3s02-in3-n
b2in3s02-k3-ay4ar
b2in3s123a
b2iv3s123a # will be renamed to b2in3s123a
b2k36s12n3
b2k3-as2-aei34-i
b2k3s12ik35i
b2k3s23i4
b2k3s2-k3
b2k3s2-k34c
b2kn3s12n3
b2kn3s23-a6ce
b2n3-cq5as234e
b2n3s1-c245i
b2n3s23-y
b2n3s2-i3
b2n3s2-i34q
b2n3s2-in3
b2n3s2-n3
b34578s2
b34578s28
b34578s567
b3457s5
b3458s38
b345-as2-an3
b345s16
b345s2
b345s27
b345s3
b345s5
b345s678
b34678s3678
b34678s45
b3468s378
b3468s46
b346s26
b346s268
b346s38
b346s45
b3478s01678
b3478s0278
b3478s0378
b3478s1478
b3478s1567
b3478s167
b3478s2678
b3478s4578
b3478s5678
b347s268
b347s36
b348s028
b348s0378
b348s046
b348s27
b348s28
b348s4
b34ajs2-a35n
b34ajs2-a35v # might be renamed/merged into b34ajs2-a35n ?
b34akt68s348
b34-ars2-i3
b34-ars2-k3
b34-ars2-n34-akr
b34c678s34678
b34cs02-a35
b34cs23
b34cs234c5e
b34ek5aks2-c34cz
b34ek5aks2-c34z
b34-i5-a6-as2-an34-akrw
b34-i5s23a
b34qs2-i36c
b34rs23-a4ar
b34s0
b34s01
b34s026
b34s0268
b34s0278
b34s1
b34s14
b34s2
b34s26
b34s267
b34s278
b34s2-acn3
b34s2-an34-akrw
b34s3
b34s35-j
b34s36
b34s3-a4
b34s4
b34s5
b34s5678
b34s678
b34ts023-j
b34ts23
b34zs23
b35678s
b35678s01567
b35678s0178
b35678s024
b35678s0258
b35678s1278
b35678s13
b35678s2478
b35678s248
b35678s256
b35678s2678
b35678s28
b35678s356 # C1 is haulless
b35678s357
b35678s367
b35678s3678
b35678s37
b35678s456 # C1 is haulless
b35678s4678
b35678s567
b35678s5678
b3567s024
b3567s14
b3567s145
b3567s4
b3567s45
b3568s02568
b3568s14678
b3568s2567
b356s0145
b356s014678
b356s045
b356s13
b356s1567
b356s267
b356s3478
b356s356
b356s3578
b3578s013
b3578s0138
b3578s0347
b3578s03567
b3578s1267
b3578s12678
b3578s2467
b3578s24678
b3578s2468
b3578s3567
b3578s3578
b3578s4568
b357s0145
b357s014578
b357s024
b357s1267
b357s135
b357s1358
b357s1368
b357s23
b357s238
b357s2467
b357s24678
b358s03478
b358s0358
b358s23
b358s238
b358s3567
b358s357
b358s358
b358s367
b358s4
b35-aens23
b35-ans23
b35es23
b35i6cs2-i34q
b35-i7s3567
b35is23
b35js2-i3
b35-n7s238
b35-ns23
b35s
b35s013
b35s0137
b35s0145
b35s014578
b35s024
b35s034
b35s036
b35s05
b35s12
b35s12-ae3
b35s13
b35s135
b35s1358
b35s136
b35s1367
b35s137
b35s138
b35s145
b35s148
b35s23
b35s238
b35s246
b35s2467
b35s24678
b35s27
b35s3
b35s347
b35s3478
b35s358
b35s378
b35s457
b35s46
b35-v6cs2-i34q
b35y6ce7-es23
b35ys236c
b35ys2-i34qv
b3678s01367
b3678s01456
b3678s014568
b3678s015678
b3678s024
b3678s024678
b3678s03467
b3678s03567
b3678s0456
b3678s04567
b3678s12678
b3678s128
b3678s135
b3678s13567
b3678s245
b3678s24578
b3678s24678
b3678s25678
b3678s2i34678
b3678s2n34678
b3678s346
b3678s3467
b3678s34678
b3678s3468
b3678s34-k678
b3678s3567
b3678s35678
b3678s3678
b3678s4567
b3678s5678
b367s0245
b367s02n34678
b367s03467
b367s034678
b367s03567
b367s035678
b367s125
b367s13567
b367s245
b367s2457
b367s25678
b367s2-ae3567
b367s34
b367s346
b367s3467
b367s34678
b367s3567
b367s35678
b367s357
b367s3678
b368s0245
b368s024578
b368s02458
b368s03
b368s0358
b368s1258
b368s13567
b368s13568
b368s23
b368s238
b368s23cy45-j6n
b368s24
b368s245
b368s24578
b368s248
b368s34678
b368s3468
b368s3478
b36ce7-es23-y
b36is2-i3eiq4ay
b36-k78s34-k6-k78
b36ns23
b36s0
b36s013678
b36s0245
b36s02458
b36s034
b36s035678
b36s078
b36s12
b36s125
b36s1258
b36s1267
b36s135 # C1 haulless
b36s13567
b36s1378
b36s15
b36s178
b36s2
b36s23
b36s238
b36s24
b36s245
b36s2458
b36s246
b36s25
b36s26
b36s2-i3
b36s2-i34q
b36s2-i35i
b36s34
b36s346
b36s34678
b36s35
b36s356
b36s35678
b36s357
b36s358
b378s035
b378s135678
b378s13578
b378s14567
b378s2456
b378s24568
b378s24678
b378s256
b378s25678
b378s2-a3567
b378s2-a35678
b378s34
b378s3478
b378s34a567
b378s3567
b378s35678
b37s0145
b37s0245 # C1 haulless
b37s034
b37s035
b37s03567
b37s12578
b37s1356
b37s13567
b37s135678
b37s23-c
b37s2456
b37s24568
b37s2567
b37s278
b37s2-i34q
b37s34
b37s35
b37s3567
b37s35678
b37s45
b37s457
b37s4578
b38s0135678
b38s0137
b38s014567
b38s02456
b38s024578
b38s078
b38s1256
b38s13
b38s13578
b38s2
b38s23
b38s238
b38s2478
b38s2-i34q
b38s34
b3-a45678s01-c2ai345678
b3acei4e678s23678
b3ai8s23ij4i8
b3aijns2ae3jnr
b3aijns2-in3-ceiky4q
b3aijs2-ein3ajq4q
b3-ce4-cejnry5es2-cn3-ce4cny5e
b3-cs234q
b3-e678s2i34678
b3-i45678s01-c345678
b3-is2-i3
b3is2i5i8
b3-j678s034678
b3-j678s134678
b3-j678s34678
b3-js023
b3-kq4js23
b3-kq4k6ns2-in3-c5q
b3-rs23
b3s0
b3s01
b3s013
b3s0135
b3s01356
b3s013567
b3s0135678
b3s01357
b3s01367
b3s013678
b3s0137
b3s014
b3s014567
b3s014568
b3s018
b3s02
b3s02456
b3s02468
b3s025
b3s034
b3s03478
b3s0357
b3s0358
b3s0378
b3s06
b3s1
b3s12
b3s123a
b3s123eik4ce
b3s125
b3s126
b3s12-ae3
b3s12i35
b3s13
b3s135
b3s135678
b3s14
b3s1456
b3s14567
b3s1457
b3s15
b3s18
b3s1-e2-a3
b3s2
b3s23
b3s234c
b3s234ce
b3s234e
b3s234iw
b3s234w
b3s234z
b3s235e
b3s235k
b3s238
b3s23-a
b3s23-a4-ak
b3s23-a4i5i
b3s23-ac
b3s23-ae
b3s23-ai
b3s23-aj
b3s23-ak
b3s23-an
b3s23-aq
b3s23-ar
b3s23-ay
b3s23-c
b3s23-ce
b3s23-ci
b3s23-ci4cei
b3s23-e
b3s23-e4e
b3s23-i
b3s23-j
b3s23-k
b3s23-n
b3s23-q
b3s23-q6k
b3s23-r
b3s23-y
b3s23-y4t
b3s24
b3s245
b3s2456
b3s24568
b3s2457
b3s24578
b3s2458
b3s246
b3s2467
b3s24678
b3s2468
b3s247
b3s2478
b3s248
b3s25
b3s256
b3s2567
b3s25678
b3s2568
b3s257
b3s2578
b3s258
b3s26
b3s267
b3s2678
b3s268
b3s27
b3s278
b3s28
b3s2-a34irz
b3s2-a36n
b3s2-ack34
b3s2-c3
b3s2-c34i
b3s2-e3
b3s2-i3
b3s2-i34n
b3s2-i34q # aka tlife
b3s2-i34qw
b3s2-i34v
b3s2-i35i
b3s2-i35i6i
b3s2-in34-akr
b3s2-in34iw
b3s2-in35qr
b3s3
b3s34
b3s34ar5
b3s35
b3s356
b3s3567
b3s35678
b3s3568
b3s357
b3s3578
b3s378
b3s4
b3s45
b3s456
b3s4567
b3s468
b3s5
b3s567
b3s5678
b3s568
b45678s0
b45678s2
b4568s01346
b456s0146
b456s1234
b457s0123578
b457s012378
b457s047
b457s13
b45s035678
b45s12
b45s1234
b45s135
b45s1357
b45s23
b45s234
b45s245
b4678s35678
b467s0267
b467s1238
b468s01238
b468s12578
b478s234678
b47s012357
b47s35678
b48s01
b4s01
b4s02347
b4s1
b4s123
b4s2
b4s23
b4s34
b4s35678
b5678s1234
b5678s12348
b5678s145678
b5678s14568
b5678s3578
b5678s45678
b5678s4568
b568s125
b568s14568
b568s2
b568s4568
b56s02378
b56s14568
b56s456
b56s4568
b578s0568
b578s148
b57s134
b57s1478
b5s1
b5s125
b5s2
b5s23
b5s238
b5s3
b678s034678
b678s13478
b678s358
b67s01
b68s134
b68s178
b6s02467
b6s13457
b6s236
b78s345678
b7s013468
b7s23
b8s1356
b8s2
b8s23
b8s236
bs012
bs01-c3a5i8
bs0358
bs13
bs2
bs23
bs34
bs348
bs358
klife
tlife
rules.names:

Code: Select all

b012345678s34678 InverseLife
b0123478s01234678 AntiLife
b1357s02468 Fredkin
b1357s1357 Replicator
b1s012345678 H-trees
b1s1 Gnarl
b234s Serviettes
b25678s5678 Iceballs
b2ae4is1e2in cb2
b2i34cs2-i3 Salad
b2in3s123a Goat Flock
b2s Seeds
b2s0 Live Free or Die
b345s2 Blinkers
b345s4567 Assimilation
b345s5 Long Life
b34ek5aks2-c34z GlideLife
b34s34 34 Life
b34s456 Bacteria
b35678s4678 Holstein
b35678s5678 Diamoeba
b3567s15678 Bugs
b357s1358 Amoeba
b357s238 Pseudo Life
b35s234578 Land Rush
b3678s235678 Stains
b3678s34678 Day & Night
b367s125678 Slow Blob
b368s238 LowDeath
b368s245 Move
b36s125 2x2
b36s23 HighLife
b36s2-i34q tHighLife
b378s012345678 Plow World
b378s235678 Coagulations
b37s1234 Mazectric with Mice
b37s12345 Maze with Mice
b37s23 DryLife
b37s2-i34q tDryLife
b38s23 Pedestrian Life
b38s238 HoneyLife
b3-ns23 DLife
b3s012345678 Life without death
b3s023 DotLife
b3s12 Flock
b3s1234 Mazectric
b3s12345 Maze
b3s1237 SnowLife
b3s124 Corrosion of Conformity
b3s13 LowLife
b3s23 Conway's Life
b3s234w alife
b3s238 EightLife
b3s2-i34q tlife
b3s45678 Coral
b45678s2345 Walled cities
b45s12345 Electrified Maze
b4678s35678 Vote 4/5
b5678s45678 Vote
The script itself:

Code: Select all

#!/usr/bin/perl

use Modern::Perl '2014';

# core modules
use FindBin;

### CONFIGURATION ###

# Catagolue URL base. Change this to http:// instead of https:// if
# LWP::Protocol::https is not installed.
our $urlbase      = "http://catagolue.appspot.com";

# name of the rules.list file.
our $ruleslist    = "$FindBin::Bin/rules.list";

# name of the rules.names file.
our $rulesnames   = "$FindBin::Bin/rules.names";

### NO NEED TO CHANGE ANYTHING BELOW THIS LINE ###

# call MAIN routine and exit
exit MAIN();

sub MAIN {

    # read rulestrings
    my @rulestrings = map { lc } read_rulestrings($ruleslist);

    # read rulenames
    my %rulenames   = read_rulenames($rulesnames);

    foreach my $rulestring (@rulestrings) {

        # formatted rulename, e.g. "B3/S23"
        (my $formatted_rule = $rulestring) =~ s#s(?=\d|$)#/S#;
        $formatted_rule =~ s/^b/B/;

        my $rule_name = "";
        if(exists $rulenames{$rulestring}) {
            $rule_name = "[[$rulenames{$rulestring}]]";
        }

        # totalistic rule?
        my $is_totalistic =
            ($rulestring =~ m/^b\d*s\d*$/)
                ? "Yes"
                : "No";

        # census link for this rule
        my $rule_link = "$urlbase/census/$rulestring/";

        say "|-";
        say "| $formatted_rule || $rule_name || $is_totalistic || [$rule_link $formatted_rule]";
    }

    # success
    return 0;

}

sub read_rulestrings {
    my ($filename) = @_;

    # open rules list
    open my $RULESLIST, "<", $filename
        or die "Cannot open rules list: $!\n";

    # array of rulestrings
    my @rulestrings = ();

    # read file
    while(<$RULESLIST>) {
        chomp;

        # trim comments
        s/\s*#.*$//;

        # trim whitespace
        s/^\s*//;
        s/\s*$//;

        # skip empty lines
        next unless $_;

        push @rulestrings, $_;
    }

    # clean up, just to be nice
    close $RULESLIST
        or warn "Cannot close rules list: $!\n";


    return @rulestrings;
}

sub read_rulenames {
    my ($filename) = @_;

    # open rules list
    open my $RULESNAMES, "<", $filename
        or die "Cannot open rule names file: $!\n";

    # array of rulestrings
    my @rulenames = ();

    # read file
    while(<$RULESNAMES>) {
        chomp;

        # trim comments
        s/\s*#.*$//;

        # trim whitespace
        s/^\s*//;
        s/\s*$//;

        # skip empty lines
        next unless $_;

        my ($rule, $name) = split /\s/, $_, 2;

        push @rulenames, $rule;
        push @rulenames, $name;
    }

    # clean up, just to be nice
    close $RULESNAMES
        or warn "Cannot close rule names file: $!\n";

    return @rulenames;
}
Oh, and if you know of rules that have been investigated but aren't listed above, or if any rules (investigated or not!) have names that aren't listed, please let me know so I can add these.
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!

Post Reply