User:LuveelVoom/A Primer On OCA: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
mNo edit summary
Line 136: Line 136:
What does it mean? Well, just like in OTL, each of these can be toggled on and off for both birth and survival. However, instead of just summing the number of cells in a live state, the configuration of the cells also matters. However, note that there are only 51 configurations here. Why? Because even though the configuration matters, the rule is still symmetric. There are only 102 unique 3x3 binary grids, and the center cell represents birth or survival, so there are 51 transitions.
What does it mean? Well, just like in OTL, each of these can be toggled on and off for both birth and survival. However, instead of just summing the number of cells in a live state, the configuration of the cells also matters. However, note that there are only 51 configurations here. Why? Because even though the configuration matters, the rule is still symmetric. There are only 102 unique 3x3 binary grids, and the center cell represents birth or survival, so there are 51 transitions.
Let's have an example:
Let's have an example:
Here is B2/S12. Due to having B2, this rule is explosive:
{{LV:Viewer|x = 7, y = 3, rule = B2/S12
o3b3o$3o2bo$bo!
[[ GPS 20 STEP 1 WIDTH 600 HEIGHT 360 GRID SHADER BASIC THEME 6 THUMBSIZE 2 ZOOM 16.0 THUMBNAIL ]]}}
{{Compact TOC}}
However, if we remove B2a (by negating it in the rulestring like this: B2-a/S12) we get a stable rule, [[Just Friends]]:
{{LV:Viewer|x = 7, y = 3, rule = B2-a/S12
o3b3o$3o2bo$bo!
[[ GPS 20 STEP 1 WIDTH 600 HEIGHT 360 GRID SHADER BASIC THEME 6 THUMBSIZE 2 ZOOM 16.0 THUMBNAIL ]]}}
{{Compact TOC}}
Hensel rulestrings (the way INT rules are typically represented) are slightly counterintuitive. They work like this:
*Choose which transitions will be in the rule.
*Place the letters next to each of the cell sum numbers corresponding to those transitions in birth and survival.
*Now comes the confusing part: to reduce the length of the rulestring (not that anyone can remember things like B2n3aijqr4ejqwz5cei6aen/S2aei3cejk4ceijkrw5cknry6-ae78 (just a random rule from the discord) anyway), if you have more than half the transitions in a cell sum number, negate the transitions after the cell sum numbers. For example, if you have B2aeinc, the missing transition is B2k, so it would become B2-k. Lifeviewer does this automatically and I believe Golly does this too nowadays.


==== How do you navigate a 102-dimensional hypercube? ====
==== How do you navigate a 102-dimensional hypercube? ====

Revision as of 15:29, 9 May 2025

Introduction

!!! CURRENTLY A WIP !!!

So you've messed around with Conway's Game of Life, but are struggling to find anything new? You want to make real discoveries? OCA (Other Cellular Automata) may be of interest for you. This guide aims to give you an introduction to OCA. It will include LifeViewer inserts, but you probably want either a Golly or LifeViewer window in the background to follow along. Exercises will be included at the end of some subchapters.

1: Other Cellular Automata

This chapter will cover the basics: what OCA are and how to recognize objects.

What's OCA?

An OCA is a cellular automata that does not follow the standard behavior of Life. Recall that in Life, a cell is born with 3 living neighbors and remains alive if it has 2 or 3 living neighbors:

x=7, y = 3, rule = B3/S23 o3b3o$3o2bo$bo! [[ GPS 20 STEP 1 WIDTH 600 HEIGHT 360 GRID SHADER BASIC THEME 6 THUMBSIZE 2 ZOOM 16.0 THUMBNAIL ]]

In a different cellular automata, however, the rules are changed. Try, for example, running the same pattern, but this time in HighLife, where a cell is born with 3 or 6 living neighbors and lives with 2 or 3:

x=7, y = 3, rule = B36/S23 o3b3o$3o2bo$bo! [[ GPS 20 STEP 1 WIDTH 600 HEIGHT 360 GRID SHADER BASIC THEME 6 THUMBSIZE 2 ZOOM 16.0 THUMBNAIL ]]

Note that the two patterns very quickly diverge from each other. In OCA, you can't just take patterns from Life for granted, especially in rules with very different behavior to Life. You'll have to find new patterns to achieve wanted behavior. Sometimes, patterns exist in rules that have no comparable counterpart in Life:

x=5, y = 5, rule = B36/S23 2b3o$bo2bo$o3bo$o2bo$3o! [[ GPS 20 STEP 1 WIDTH 600 HEIGHT 360 GRID SHADER BASIC THEME 6 THUMBSIZE 2 ZOOM 16.0 THUMBNAIL ]]

Even stranger, some rules lack entire object types that Life doesn't have. In Seeds, for example, a cell is born with 2 living neighbors and always dies in the next generation, making still lives impossible.

Object Recognition

If objects from standard Life don't work in OCA, how will you know what they do? Thankfully, there are a couple of tools to identify what an object is doing. The most powerful of these tools is your own brain. When you notice an object, you should be able to quickly recognize what it is. Here are common objects in a convenient table. You probably already know most of these, but a refresher is nice:

Object type Behavior Example from Life
Still life Does not change after a generation Block
Oscillator Returns to initial state after some number of generations Blinker
Spaceship Returns to initial state, plus displacement, after some number of generations Glider
Active region Common chaotic pattern, which can be used in catalyses Herschel
Replicator Creates a copy of itself, leading to infinite growth No elementary examples in Life, but one is shown above
Puffer Like a spaceship, but leaves objects behind it. (Called a rake if it leaves only spaceships, and a breeder if it leaves puffers) Block-laying switch engine

Once you spot an object, how do you figure out more specific details about it? Say, for example, you are confronted with this:

x=14, y = 19, rule = B36/S23 3bo2b2o$3bo4bo$3bo4bo$5o$3bobo$4b5o$o4bo$o4bo5b3o$b2o2bo4$9bo$7bo3bo2$ 6bo5bo2$7bo3bo$9bo! [[ GPS 20 STEP 1 WIDTH 600 HEIGHT 360 GRID SHADER BASIC THEME 6 THUMBSIZE 2 ZOOM 10.0 ]]

It would be tedious and time consuming to count each phase of this object until it returns to its original position, and even more tedious to record the population of each phase and find the lowest one. Thankfully, we have computers:

x=14, y = 19, rule = B36/S23 3bo2b2o$3bo4bo$3bo4bo$5o$3bobo$4b5o$o4bo$o4bo5b3o$b2o2bo4$9bo$7bo3bo2$ 6bo5bo2$7bo3bo$9bo! [[ GPS 20 STEP 1 WIDTH 900 HEIGHT 540 GRID SHADER BASIC THEME 6 THUMBSIZE 2 ZOOM 10.0 AUTOIDENTIFY ]]

oscar: Your new best friend

This section is not entirely about oscar.lua (and oscar.py, although I won't be covering that because python is broken on my golly. They do pretty much the same thing), as LifeViewer deserves love too!! LifeViewer's Identify feature is more convenient to use, albeit slower. To use it, simply ensure that the target pattern is the only pattern on the grid (doing Shift+Delete will clear cells outside a selection) and it should give you details about the pattern! It also tells you information that oscar does not, like the period map. However, LifeViewer's Identify struggles with patterns with period in the tens of thousands or more. When these objects arise, you can use oscar.lua, a lua script helpfully bundled with Golly. To run oscar.lua, ensure that the target pattern is once again the only pattern in the grid, click "File -> Run Script", navigate to oscar.lua, and click it. It might take a while to run for high period patterns.

Sidebar: What the information under Identify means

WILL BE FINISHED LATER

Limitations of oscar: recognizing replicators, puffers, and other strange growth

It is worth noting that oscar.lua and Identify both suffer from crucial flaws: they cannot identify puffers, replicators, or other complex patterns. One workaround to this is to use the catagolue object page ([1]), which can determine the period of puffers (however, it cannot currently identify their displacement; this has to be done manually). To identify using the object page, paste the RLE (obtainable in the lower right of LifeViewer after copying or directly from a Golly copy) into the text box and press identify. This will send you to a page which should contain the text "ylXX" at the top, where XX is the period of your puffer. The catagolue page can also identify other objects, indicating still lifes by xs(population), oscillators by xp(period), spaceships by xq(period), puffers and other linear growth with yl(period), and other objects with zz or rarely other descriptions. Catagolue will be useful later, so keep this in the back of your mind!

Exercises

Use oscar or Identify to identify each of the following: (F6 key will identify)


x=21, y = 43, rule = B367/S245 30$9b4o$6b2o6b2o$6b2ob4ob2o$6bobo4bobo2$9b4o$8b6o$10b2o! [[ GPS 20 STEP 1 WIDTH 600 HEIGHT 360 GRID SHADER BASIC THEME 6 THUMBSIZE 2 ZOOM 16.0 THUMBNAIL ]]
x=27, y = 8, rule = B3/S23 9bo7bo9b$3b2obobob2o3b2obobob2o3b$3obob3o9b3obob3o$o3bobo5bobo5bobo3bo $4b2o6bobo6b2o4b$b2o9bobo9b2ob$b2ob2o15b2ob2ob$5bo15bo! [[ GPS 20 STEP 1 WIDTH 600 HEIGHT 360 GRID SHADER BASIC THEME 6 THUMBSIZE 2 ZOOM 16.0 THUMBNAIL ]]
x=243, y = 101, rule = B36/S245 38$62b2o36bob4o67b4obo36b2o$62b2obo33bob7o63b7obo33bob2o$60bo3bob2o30b 3o2b2o3b2o59b2o3b2o2b3o30b2obo3bo$58b3o2bo2b2o29b5o3b2o2bo59bo2b2o3b5o 29b2o2bo2b3o$56b2obo2bobobob2o27b5o3b2o2bo59bo2b2o3b5o27b2obobobo2bob 2o$56bob2o3bobobobo28b3o2b2o3b2o59b2o3b2o2b3o28bobobobo3b2obo$56bob2o 3bobobobo29bob7o63b7obo29bobobobo3b2obo$56b2obo2bobobob2o30bob4o67b4o bo30b2obobobo2bob2o$58b3o2bo2b2o143b2o2bo2b3o$60bo3bob2o143b2obo3bo$62b 2obo147bob2o$62b2o151b2o$116b4o39b4o$116bo2bo39bo2bo$115bo4bo37bo4bo$ 48b4o63bob2obo37bob2obo63b4o$48bo2bo62b2ob2ob2o35b2ob2ob2o62bo2bo$47b ob2obo61b3o2b3o35b3o2b3o61bob2obo$47b6o29b2o30b3o2b3o35b3o2b3o30b2o29b 6o$46b2o4b2o27b4o29b2o4b2o35b2o4b2o29b4o27b2o4b2o$80b6o29bob2obo37bob 2obo29b6o$44b2o2bo2bo2b2o23bob4obo27bob4obo35bob4obo27bob4obo23b2o2bo 2bo2b2o$44b2obob2obob2o24bob2obo29b6o37b6o29bob2obo24b2obob2obob2o$46b obo2bobo25b2o4b2o29b4o39b4o29b2o4b2o25bobo2bobo$45bo3b2o3bo24b3o2b3o30b 2o41b2o30b3o2b3o24bo3b2o3bo$46b3o2b3o25b3o2b3o105b3o2b3o25b3o2b3o$46b 2ob2ob2o25b2ob2ob2o105b2ob2ob2o25b2ob2ob2o$48bo2bo28bob2obo107bob2obo 28bo2bo$48b4o28bo4bo107bo4bo28b4o$81bo2bo109bo2bo$81b4o109b4o5$95b4ob o77bob4o$93b7obo75bob7o$70b2o19b2o3b2o2b3o73b3o2b2o3b2o19b2o$68bob2o19b o2b2o3b5o71b5o3b2o2bo19b2obo$66b2obo3bo17bo2b2o3b5o71b5o3b2o2bo17bo3b ob2o$66b2o2bo2b3o15b2o3b2o2b3o73b3o2b2o3b2o15b3o2bo2b2o$64b2obobobo2b ob2o15b7obo75bob7o15b2obo2bobobob2o$64bobobobo3b2obo17b4obo77bob4o17b ob2o3bobobobo$64bobobobo3b2obo123bob2o3bobobobo$64b2obobobo2bob2o123b 2obo2bobobob2o$66b2o2bo2b3o127b3o2bo2b2o$66b2obo3bo131bo3bob2o$68bob2o 135b2obo$70b2o135b2o! [[ GPS 20 STEP 1 WIDTH 600 HEIGHT 360 GRID SHADER BASIC THEME 6 THUMBSIZE 2 ZOOM 2.0 THUMBNAIL ]]
x=5, y = 5, rule = B36/S125 $bo$2o2bo$b3o$2bo! [[ GPS 20 STEP 1 WIDTH 600 HEIGHT 360 GRID SHADER BASIC THEME 6 THUMBSIZE 2 ZOOM 16.0 THUMBNAIL ]]

What's interesting?

So you've found an object. How do you tell if it's worth posting? It's usually fine to post it to the #naturalistic channel of the discord. However, when posting to the forums, here are some things to consider:

  • Is your object high period or very large but common? For example, a period-250 object is more interesting than a period-5 object.
  • Does your object interact with other objects in unique ways? For example, if your rule has a common ship that, when hitting a block, is cleanly reflected 90 degrees and leaves the block intact, that's pretty interesting.
  • Does the rule itself have interesting dynamics and common objects with varied uses? Many of the most successful rules are ones with several different interesting object. If your rule has one object and it's not endemic, consider checking out rules nearby.
  • Most importantly, use your judgement.

Outer Totalistic

Now you're ready to start exploring OCA. First, press Settings > Pattern > Change Rule in LifeViewer or Control > Set Rule in Golly. Then you can type in a rulestring. "What's a rulestring?" you're probably asking (or not). A rulestring is a string that determines the rules by which things change. For most of this guide, we'll be using rulestrings that fall under the B/S format. The B stands for birth. More concretely, a birth is when the center cell is empty and changes to a live cell in the next generation. All of these are births in Life:

x=13, y = 5, rule = LifeHistory 13F$FA2BFBABFA2BF$FA2BF3BFA2BF$FBABFABAFA2BF$13F! [[ GPS 1 STEP 1 WIDTH 600 HEIGHT 360 GRID SHADER BASIC THEME 6 THUMBSIZE 2 ZOOM 12.0 ]]

The S stands for survival, which occurs when the center cell is alive and stays alive in the next generation. These are some survivals in Life:

x=13, y = 5, rule = LifeHistory 13F$FA2BFBABFA2BF$FACBFBCBFACBF$FBABFA2BFA2BF$13F! [[ GPS 1 STEP 1 WIDTH 600 HEIGHT 360 GRID SHADER BASIC THEME 6 THUMBSIZE 2 ZOOM 12.0 ]]

Why are these groups of cells survivals and births and other groups not? It has to do with Life's rulestring, B3/S23. Note that the rulestring, when viewed with the explanation above in mind, corresponds to the basic rules of Life. This is how you can manipulate the rules of the universe. Changing the rulestring, to, for example, B36/S23, will give you HighLife. Some things to keep in mind:

  • Adding B0 causes weird stuff to happen. Don't do it for now. It will be explained later in the guide. (Exercise for the reader: What's special about B0?)
  • Adding B1 or B2 will invariably cause your rule to expand rapidly. The terminology for this is "exploding". We'll talk about this more under "Classifying OCA".
  • Adding 6, 7, or 8 to either birth or survival usually doesn't have a huge impact.

Mess around for a bit and see what happens!

A mostly dry rulespace

You probably noticed something if you explored for a few minutes. Most rules, outside of Life and rules close to Life where only a few of the higher-numbered rules were changed, are really boring. As it turns out, the OTL rulespace just... happens to not have much stuff in it. There are a few interesting rules, like Life and a couple we'll touch on below, but other than those you won't find much, not to mention that since there are only a few ten thousands of rules (sidenote!!! There are 32,768 rules that can be interesting, not counting B0. This is because any rule with B1 or B2 is unstoppably explosive, and any rule without B3 cannot escape the region it starts in (sidenote sidenote!!! This region is called the bounding box, being the smallest box that contains all cells of the pattern. Rules with B4 actually can escape this, but can't make it past the bounding diamond, which is the diamond where the midpoints of the edges are the corners of the bounding box. end sidenote) end sidenote). What's a "rulespace", though? A rulespace is a sort of cross-section of rules from all possible rules. For example, "Rules that resemble Life in dynamics and patterns" is the space between B3/S23 and B368/S238- you have Life in here, of course, but you can also add any of B68 and S8 and it will still resemble Life.

Islands of interesting behavior

(hi readers!!! can you provide me with pattern collections for Life (may be too large), sqrtreprule, Move, Day and Night, and Seeds? My computer has a weird problem with pasting and refuses to allow pasting between Lifeviewer or Golly and anywhere else. Your help is hugely appreciated!!)

life !!!!!!!!!!!!!!!!!!!

Life: the quintessential CA. Why is it so appealing? In short- it has stability and activity. There are stable structures and the rule doesn't grow infinitely, but small objects rapidly move and expand. In addition, it has the first known spaceship, the glider. The glider being so common is a major point in the rule's favor; it means that mechanisms based around manipulation of signals are made easier by having an easily-createable carrier of information that travels through the vacuum as fast as possible (in Life, "no spaceship can move at speed (m,n)c/x where (m+n)/x > 1/2", and (1,1)c/4 is = 1/2 due to a theorem which will be explained later.) In addition, Life features a couple of high period oscillators (pentadecathelon for example) and has objects that move but are unstable (pi heptomino.) All of these combine to make a rule with depth in most areas of CA exploration.

Isotropic Non-totalistic

Of course, given the above, you're probably wondering why one would explore other CA rules... at all. Well, thankfully, OTL is NOT the only type of rule there is. Introducing Isotropic Non-Totalistic (INT) rules. Basically, INT does away with just summing the number of live neighbors and instead makes the configuration of live neighbors matter, up to rotation and reflection. Take a look at this picture:

0 1 2 3 4 5 6 7 8
—
(no letter)
c
(corner)
e
(edge)
k
(knight)
a
(adjacent)
i
n
y
q
j
r
t
w
z

What does it mean? Well, just like in OTL, each of these can be toggled on and off for both birth and survival. However, instead of just summing the number of cells in a live state, the configuration of the cells also matters. However, note that there are only 51 configurations here. Why? Because even though the configuration matters, the rule is still symmetric. There are only 102 unique 3x3 binary grids, and the center cell represents birth or survival, so there are 51 transitions. Let's have an example:

Here is B2/S12. Due to having B2, this rule is explosive:

x=7, y = 3, rule = B2/S12 o3b3o$3o2bo$bo! [[ GPS 20 STEP 1 WIDTH 600 HEIGHT 360 GRID SHADER BASIC THEME 6 THUMBSIZE 2 ZOOM 16.0 THUMBNAIL ]]

Template:Compact TOC However, if we remove B2a (by negating it in the rulestring like this: B2-a/S12) we get a stable rule, Just Friends:

x=7, y = 3, rule = B2-a/S12 o3b3o$3o2bo$bo! [[ GPS 20 STEP 1 WIDTH 600 HEIGHT 360 GRID SHADER BASIC THEME 6 THUMBSIZE 2 ZOOM 16.0 THUMBNAIL ]]

Template:Compact TOC

Hensel rulestrings (the way INT rules are typically represented) are slightly counterintuitive. They work like this:

  • Choose which transitions will be in the rule.
  • Place the letters next to each of the cell sum numbers corresponding to those transitions in birth and survival.
  • Now comes the confusing part: to reduce the length of the rulestring (not that anyone can remember things like B2n3aijqr4ejqwz5cei6aen/S2aei3cejk4ceijkrw5cknry6-ae78 (just a random rule from the discord) anyway), if you have more than half the transitions in a cell sum number, negate the transitions after the cell sum numbers. For example, if you have B2aeinc, the missing transition is B2k, so it would become B2-k. Lifeviewer does this automatically and I believe Golly does this too nowadays.

How do you navigate a 102-dimensional hypercube?

INT is unimaginably vast

What to look for in an interesting rule

Islands of really interesting behavior

2: Exploring OCA

Classifying OCA

Rulegolfing

When to rulegolf

When NOT to rulegolf

Object-XORing

Rulegolfing with COMPUTERS

3: Techniques for OCA

Corderization

Corderizing Basics

The puffer is oblique!!!

The puffer is dirty!!!!!!

When to give up

Gun construction

Leverage your oscillators

Overunity reactions

Now is a good time to talk about reflectors

Circuitry

Catalysis

Oscillators: certainly underused

Now is a better time to talk about reflectors

Other useful components

Turing-completeness

W110

Universal construction

=== Omniperiodicity and beyond

=== (maybe more advanced stuff here?)

4: Beyond Moore and the Binary

Larger than life

Rules with more than two states

Ruletables: your new archnemesis

Exotic cellular automata

Appendixes

I: Uncommon Nomenclature

II: Useful Programs

III: Useful Threads

IV: INT restriction sets

Index

luveel's lifeviewer configuration:

x=7, y = 3, rule = B3/S23 o3b3o$3o2bo$bo! [[ GPS 20 STEP 1 WIDTH 600 HEIGHT 360 GRID SHADER BASIC THEME 6 THUMBSIZE 2 ZOOM 16.0 THUMBNAIL ]]

Template:Compact TOC