Skip to content

Instantly share code, notes, and snippets.

@apaap
apaap / agar_bubble_c2-RE.txt
Created February 10, 2021 04:06
LLS search files for agar bubbles in B3/S23
a1 -a1 a1 -a1 a1 -a1 a1 -a1 a1 -a1 a1 -a1 a1 -a1 a1 -a1 a1 -a1 a1 -a1 a1 -a1 a1 -a1
a2 -a2 a2 -a2 a2 -a2 a2 -a2 a2 -a2 a2 -a2 a2 -a2 a2 -a2 a2 -a2 a2 -a2 a2 -a2 a2 -a2
a3 -a3 a3 b3 c3 d3 e3 f3 g3 h3 i3 j3 k3 l3 m3 n3 o3 p3 q3 r3 s3 t3 a3 -a3
a4 -a4 a4 b4 c4 d4 e4 f4 g4 h4 i4 j4 k4 l4 m4 n4 o4 p4 q4 r4 s4 t4 a4 -a4
a5 -a5 a5 b5 c5 d5 e5 f5 g5 h5 i5 j5 k5 l5 m5 n5 o5 p5 q5 r5 s5 t5 a5 -a5
a6 -a6 a6 b6 c6 d6 e6 f6 g6 h6 i6 j6 k6 l6 m6 n6 o6 p6 q6 r6 s6 t6 a6 -a6
a7 -a7 a7 b7 c7 d7 e7 f7 g7 h7 i7 j7 k7 l7 m7 n7 o7 p7 q7 r7 s7 t7 a7 -a7
-a7 a7 -a7 b8 c8
#importRLE.py import multiple rle encoded patterns from a string on the clipboard
import golly as g
import os
from math import ceil, floor, sqrt
txt = g.getclipstr()
constructPatt = False
rleList = []
/*
** gfind 4.9 -- search for gliders in semitotalistic cellular automata
** David Eppstein, UC Irvine, 7 Mar 1998
**
** This program performs very fast searches for low-period gliders. For example,
** in Conway's Life, it can find a 10x12 c/3 spaceship instantaneously: try
** gfind b3/s23/o3v/l36
** (This set of arguments means rule B3/S23 (Life); c/3 orthogonal,
** even bilateral symmetry, level of difficulty = 36. Run gfind without
** arguments and type return to the prompt for a full list of options.)
This gist contains a collection of search pattern files for use with LLS.
They are mostly used to find adjustable ships with "relativistic" speeds in INT CA rules.
There are also a few search patterns for similar searches which don't give relativistic speeds.
Given runtimes are for solver (cadical) only. Preprocessing for most of these files takes
about a minute, up to two minutes.
# Summary of search patterns
# Adjustable period 2c/3 spaceships
1) 2,1c3k_2c3o_adjP_min.txt
@apaap
apaap / adjustable_relativistic_ship2.txt
Last active June 18, 2020 01:21
LLS search file for a relativistic adjustable spaceship. Based on c/2 push/pull via photon reflection reactions - longer reaction times
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
a1 b1 c1 d1 0 0 0 2 3 4 5 0 0 42 43 44 45 0 0 0 0
e1 f1 g1 h1 0 0 0 6 7 8 9 0 0 46 47 48 49 0 0 0 0
i1 j1 k1 l1 0 0 0 10 11 12 13 0 0 50 51 52 53 0 0 0 0
m1 n1 o1 p1 0 0 0 14 15 16 17 0 0 54 55 56 57 0 0 0 0
q1 r1 s1 t1 0 0 0 18 19 20 21 0 0 58 59 60 61 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
@apaap
apaap / adjustable_relativistic_ship.txt
Last active June 18, 2020 01:22
LLS search file for a relativistic adjustable spaceship. Based on c/2 push/pull via photon reflection reactions
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
a1 b1 c1 d1 0 0 0 2 3 4 5 0 0 42 43 44 45 0 0
e1 f1 g1 h1 0 0 0 6 7 8 9 0 0 46 47 48 49 0 0
i1 j1 k1 l1 0 0 0 10 11 12 13 0 0 50 51 52 53 0 0
m1 n1 o1 p1 0 0 0 14 15 16 17 0 0 54 55 56 57 0 0
q1 r1 s1 t1 0 0 0 18 19 20 21 0 0 58 59 60 61 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
@apaap
apaap / dump.lua
Created December 12, 2019 07:41
Progress on determining the fate of the Dean Hickerson's R50 Roomba bug
-- prtr-dump.lua
-- Module to serialize lua values and tables and dump to file
-- By Jérôme Vuarand
-- http://piratery.net/dump/
-- LICENSE
-- Copyright (c) Jérôme Vuarand
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
@apaap
apaap / 3DCA_iso_neighbourhoods.py
Last active January 11, 2023 02:30
Enumerate the isotropic neighbourhoods for 3D CA with Moore neighbourhood and 2D range-2 Moore neighbourhood
# Enumerate the isotropic neighbourhoods for 3D CA with Moore neighbourhood
# Determine equivalent neighbourhood configurations using permutations instead
# of matrix multiplication
from itertools import combinations, product
import numpy as np
from timeit import default_timer as timer
# Matrix representation of octahedral group (from Wikiversity)
# https://en.wikiversity.org/wiki/Full_octahedral_group#Code
@apaap
apaap / fetch_xs19.sh
Created November 19, 2019 14:38
Update unsynthesized xs19 soup counts
curl -o xs19.txt https://catagolue.appspot.com/textcensus/b3s23/C1/xs19
curl -o xs19-synth.txt https://catagolue.appspot.com/textcensus/b3s23/synthesis-costs/xs19
@apaap
apaap / filter_p392_pairs.py
Last active November 19, 2019 03:02
Find the smallest ship at each period in the Omosso p392_pairs census
# Before using this code the textcensus needs to be fetched from Catagolue.
# $curl -o stdin_c98_pairs.txt https://catagolue.appspot.com/textcensus/b2k3acijr4ijqy6i7cs2aek3ijnqr4it5n/stdin_c98_pairs
# Format: "{apgcode}", {count}
import lifelib
import sys
omosso = "b2k3acijr4ijqy6i7cs2aek3ijnqr4it5n"
lt = lifelib.load_rules(omosso).lifetree(memory=4000)