SpectreLife

For discussion of other cellular automata.
Post Reply
User avatar
Andrew
Moderator
Posts: 1064
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

SpectreLife

Post by Andrew »

I know I said it was unlikely I'd write a SpectreLife script, but given how well LLMs can write code I thought I'd ask Claude to look at the code in HatLife.lua and use it to create SpectreLife.lua. Frankly, I was amazed at the result. It took about 20 minutes to write something that would have taken me at least a week or two.

Like HatLife, SpectreLife runs within Glu, so if you want to try it out you'll need to download Glu:

https://sourceforge.net/projects/glu1/files/

After starting up Glu, select "Download Script..." from the File menu and click the link for SpectreLife. A button called SpectreLife should appear in the DOWNLOADS column. Hit that button and select View > Help (or type H) for details on how to use the script.

Here's a screenshot showing a NOR gate in the WireWorld rule:

https://glu1.sourceforge.io/screenshots/spectrelife.png

If you have an iPad you can also install the (free) Glui app, then use its Download button to get SpectreLife.
Use Glu or Glui to explore CA rules on non-periodic tilings: DominoLife and HatLife and SpectreLife
User avatar
Andrew
Moderator
Posts: 1064
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: SpectreLife

Post by Andrew »

When SpectreLife starts up it reads a file called tiling.txt to create the spectre tiling. This file was created by a separate script (also written by Claude) that extracted a large rectangular region of 38,194 spectres. Each spectre has one of 12 possible orientations: a rotation by an integer multiple of 30 degrees. The spectres that are an odd multiple of 30 degrees are called "odd spectres" and play a similar role to the reflected hats in HatLife.

The following diagram shows 6 odd spectres (colored red, each in a different orientation) and their neighboring spectres. Note that every odd spectre always has 6 even neighbors, 2 of which (colored orange) are connected only via a single vertex. Even spectres have either 6 or 7 neighbors. Dead odd spectres are (optionally) colored a darker gray. About 11% of spectres are odd.

odd-spectres.png
odd-spectres.png (138.45 KiB) Viewed 248 times
Use Glu or Glui to explore CA rules on non-periodic tilings: DominoLife and HatLife and SpectreLife
User avatar
Andrew
Moderator
Posts: 1064
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: SpectreLife

Post by Andrew »

SpectreLife supports the same rules as in HatLife:
  • Bbbb...Ssss...Nn[E]
These rules behave like those used in Golly's Generations algorithm. The b values (1 to 7) specify the state 1 neighbor counts necessary for an empty spectre to be born (as state 1) in the next generation. The s values (0 to 7) specify the state 1 neighbor counts necessary for a state 1 spectre to survive to the next generation. The number n specifies the maximum number of states (2 to 9). If n is greater than 2 then spectres don't die immediately but "decay" to the next higher state, or 0 if at the maximum state (n-1). A spectre's neighbors normally includes all other spectres that share an edge or a vertex, but if the rule ends with E then only neighboring spectres that share an edge are counted.
  • RrBbmin-bmaxSsmin-smaxNn
This format is based on the Larger than Life rules. The r value (1 to 5) specifies the number of rings of neighboring spectres surrounding the central spectre. Note that the total number of spectres in this neighborhood varies from spectre to spectre (a reasonably accurate upper limit is 4r(r+1)). To see the neighborhood, enter a rule like R5B1-1S1-1N2, set a spectre to state 1 and advance one generation. The bmin and bmax values specify the range of state 1 neighbor counts necessary for an empty spectre to be born (as state 1) in the next generation. The smin and smax values specify the range of state 1 neighbor counts necessary for a state 1 spectre to survive. The minimum value in both ranges must be less than or equal to the maximum value, and bmin must be greater than 0. The number n specifes the maximum number of states and spectres decay just like in the above BSN rules.
  • WireWorld
A simple implementation of Brian Silverman's Wireworld CA. Given the existence of a NOR gate (see link in top post) this rule is also Turing-complete on the spectre tiling. Here is the pattern data for the NOR gate (copy it and then select Open Clipboard in SpectreLife's File menu):

Code: Select all

SpectreLife version=1
# Two p18 clocks sending electrons into a p6 NOR gate.
view=9 -243 845
rule=WireWorld
14520=3 14548=3 14551=3 14553=3 14554=3 14555=3 14571=3 14570=3 14575=3 14544=3
14543=3 4940=3 4953=2 4957=3 4949=3 4974=3 4968=3 4969=1 4872=2 4871=3
13629=3 13630=3 13606=3 13638=3 4960=3 4961=3 4962=3 4963=3 14559=3 14558=1
14529=3 14140=3 14143=3 14145=3 14123=3 14136=3 14135=3 13661=2 13633=1 13657=3
13656=3 14540=3 13653=3 13654=3 4941=3 4942=3 14636=3 14637=3 14638=3 14640=3
14642=3 14643=3 14644=3 14452=3 14464=2 14465=1 14472=3 14473=3 14450=3 14442=3
14655=3 14656=3 14587=3 17025=3 14620=3 14633=3 14577=3 14578=3 14632=3 14517=3
14515=3 17194=3 17026=3 13713=2 13663=3 13664=3 13603=3 13714=1 13716=3
  • Worms
This rule was designed to support spaceships ("worms") that travel within the wide gaps between two parallel lines of reflected hats in HatLife. Unfortunately this doesn't work in SpectreLife because the gaps between odd spectres aren't consistently wide enough, so all worms eventually die out.

SpectreLife also supports a couple of rules found by James Edmond (see later posts for more info):
  • EdmondGlider
A rule that supports a small glider. I've modified Edmond's rule slightly so that it also supports eaters, oscillators and glider guns.
  • EdmondLooper
This rule creates small patterns that can travel randomly across the tiling before eventually getting stuck in loops of varying periods.

A new rule can be entered via Control > Change Rule, or created randomly via items in the File menu.
Use Glu or Glui to explore CA rules on non-periodic tilings: DominoLife and HatLife and SpectreLife
User avatar
Andrew
Moderator
Posts: 1064
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: SpectreLife

Post by Andrew »

BREAKING NEWS: I've uploaded a new version of SpectreLife which adds support for a couple of rules recently found by James Edmond, as reported in this paper: https://arxiv.org/pdf/2609.22579

One of the rules supports a small glider that can travel in 12 different directions:
egliders.png
egliders.png (390.83 KiB) Viewed 154 times
Here's the pattern data (copy it and use File > Open Clipboard):

Code: Select all

SpectreLife version=1
# Gliders moving outwards in 12 different directions.
view=2 15 -21
rule=EdmondGlider
9297=3 9394=3 9396=1 9411=3 9412=3 9445=3 9446=3 9451=1 9453=3 9473=3
9556=3 9557=3 9569=3 9570=3 9575=1 9577=3 9583=3 9598=3 9600=1 9619=3
9627=3 9628=3 9640=3 9641=3 9646=1 9648=3 9654=3 9669=3 9671=1 9690=3
9695=3 9697=1 13952=3 13953=3 13958=1 13960=3 13966=3 13981=3 13983=1 25680=3
25681=3 27082=3 27083=3 27135=3 27137=1 27148=3 27163=3 27174=3 27175=3 27181=3
27311=3 27312=3 27317=1 27319=3 27320=3 9312=3 9313=3 9318=1 9320=3 9326=3
Use Glu or Glui to explore CA rules on non-periodic tilings: DominoLife and HatLife and SpectreLife
User avatar
Andrew
Moderator
Posts: 1064
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: SpectreLife

Post by Andrew »

Edmond's original rule has a state 2 that doesn't actually do anything and simply dies, so I've modified his rule slightly so that state 2 spectres are stable. The modified rule now supports eaters, oscillators and glider guns:
egun.png
egun.png (420.9 KiB) Viewed 153 times

Code: Select all

SpectreLife version=1
# A period-12 glider gun, along with a simple eater that kills the gliders.
view=5 1028 253
rule=EdmondGlider
10909=3 10910=2 10920=1 10925=1 10931=3 10932=3 10934=3 10935=3 11796=3 11814=3
11815=3 11816=3 11821=3 11823=3 11825=1 11829=3 11831=1 11837=2 11845=3 11846=3
11848=3 11849=3 11851=3 11852=3 7265=2
Use Glu or Glui to explore CA rules on non-periodic tilings: DominoLife and HatLife and SpectreLife
User avatar
Andrew
Moderator
Posts: 1064
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: SpectreLife

Post by Andrew »

Edmond found another rule with small patterns that can travel randomly across the tiling before eventually getting stuck in loops of varying periods. Here's a period-550 looper:
elooper550.png
elooper550.png (333.33 KiB) Viewed 153 times

Code: Select all

SpectreLife version=1
# A period-550 looper.
view=2 -256 -94
rule=EdmondLooper
26406=2 26413=2 26415=1 26416=2 26420=2 26470=1 26300=3 26301=1 26302=1
Use Glu or Glui to explore CA rules on non-periodic tilings: DominoLife and HatLife and SpectreLife
User avatar
Andrew
Moderator
Posts: 1064
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: SpectreLife

Post by Andrew »

I've uploaded a new version of SpectreLife with some important changes:

* Added support for two tilings: the (existing) small tiling and a new, much larger tiling with over a million spectres. Two new items at the end of the Edit menu allow you to switch tilings.

* Added a new pattern format (version=2) that allows copying a pattern from one tiling, switching to the other tiling, then doing a paste. Note that the old version=1 format is still supported. If you open or paste a pattern using that format, SpectreLife will automatically switch to the small tiling.

* Faster pattern generation and display, especially at scale 1:1.

* Added sub-pixel zooming (the minimum scale is now 0.125 which is enough to fit all of the large tiling inside the smallest viewport).

Somewhat fortuitously, the small tiling appears once in the large tiling:

small-in-large.png
small-in-large.png (42.93 KiB) Viewed 59 times
Use Glu or Glui to explore CA rules on non-periodic tilings: DominoLife and HatLife and SpectreLife
User avatar
Andrew
Moderator
Posts: 1064
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: SpectreLife

Post by Andrew »

The large tiling allows you to track the fate of those weird loopers. Here's a period-1072 looper and its starting pattern:

elooper-p1072.png
elooper-p1072.png (48.34 KiB) Viewed 47 times

Code: Select all

SpectreLife version=2
view=1 -246.45 -450.22
tiling=tiling8.txt
rule=EdmondLooper
-324,-310,393,233,8=2
-321,-307,389,230,3=1
-322,-308,388,230,6=2
-322,-308,389,232,4=1
-317,-305,388,232,4=1
-320,-306,387,229,2=3
-320,-307,391,233,0=1
-321,-306,390,231,0=1
-319,-305,388,230,10=1
I've tracked dozens of these loopers and they always seem to end up oscillating with one of these periods: 60, 162, 550, 1072. Is that it?
Use Glu or Glui to explore CA rules on non-periodic tilings: DominoLife and HatLife and SpectreLife
User avatar
R2INT
Posts: 884
Joined: July 2nd, 2024, 7:42 pm

Re: SpectreLife

Post by R2INT »

Is it possible to include a method to generate arbitrarily large Spectre tilings in SpectreLife?
Range-2 INT
R2INT's Rule Collection

3-state rules are the final frontier.
Post Reply