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.
SpectreLife
- Andrew
- Moderator
- Posts: 1064
- Joined: June 2nd, 2009, 2:08 am
- Location: Melbourne, Australia
- Contact:
Re: SpectreLife
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.
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.
- Andrew
- Moderator
- Posts: 1064
- Joined: June 2nd, 2009, 2:08 am
- Location: Melbourne, Australia
- Contact:
Re: SpectreLife
SpectreLife supports the same rules as in HatLife:
SpectreLife also supports a couple of rules found by James Edmond (see later posts for more info):
A new rule can be entered via Control > Change Rule, or created randomly via items in the File menu.
- Bbbb...Ssss...Nn[E]
- RrBbmin-bmaxSsmin-smaxNn
- WireWorld
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
SpectreLife also supports a couple of rules found by James Edmond (see later posts for more info):
- EdmondGlider
- EdmondLooper
A new rule can be entered via Control > Change Rule, or created randomly via items in the File menu.
- Andrew
- Moderator
- Posts: 1064
- Joined: June 2nd, 2009, 2:08 am
- Location: Melbourne, Australia
- Contact:
Re: SpectreLife
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: Here's the pattern data (copy it and use File > Open Clipboard):
One of the rules supports a small glider that can travel in 12 different directions: 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
- Andrew
- Moderator
- Posts: 1064
- Joined: June 2nd, 2009, 2:08 am
- Location: Melbourne, Australia
- Contact:
Re: SpectreLife
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:
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
- Andrew
- Moderator
- Posts: 1064
- Joined: June 2nd, 2009, 2:08 am
- Location: Melbourne, Australia
- Contact:
Re: SpectreLife
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:
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
- Andrew
- Moderator
- Posts: 1064
- Joined: June 2nd, 2009, 2:08 am
- Location: Melbourne, Australia
- Contact:
Re: SpectreLife
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:
* 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:
- Andrew
- Moderator
- Posts: 1064
- Joined: June 2nd, 2009, 2:08 am
- Location: Melbourne, Australia
- Contact:
Re: SpectreLife
The large tiling allows you to track the fate of those weird loopers. Here's a period-1072 looper and its starting pattern:
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?
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
Re: SpectreLife
Is it possible to include a method to generate arbitrarily large Spectre tilings in SpectreLife?