2Layer Viewer

For scripts to aid with computation or simulation in cellular automata.
Post Reply
User avatar
pifricted
Posts: 1116
Joined: May 25th, 2024, 10:26 am
Location: Click here to set your location

2Layer Viewer

Post by pifricted »

Here it is!
2Layer Viewer.zip
(4.59 KiB) Downloaded 42 times

Features:
2 interactable 2-state CA universes
2-layer draws
Custom colors
Hot keys

Rule support:
2-Layer 2-state CAs
R1 INT

How to make rule?
The rules can describe in 4 rulestrings, or 8 birth/survival conditions:

Code: Select all

B1n2   -  Birth conditions for Layer 1 while Layer 2 is off
B1o2   -  Birth conditions for Layer 1 while Layer 2 is on
S1n2   -  Survival conditions for Layer 1 while Layer 2 is off
S1o2   -  Survival conditions for Layer 1 while Layer 2 is on
B2n1   -  Birth conditions for Layer 2 while Layer 1 is off
B2o1  -  Birth conditions for Layer 2 while Layer 1 is on
S2n1  -  Survival conditions for Layer 2 while Layer 1 is off
S2o1  -  Survival conditions for Layer 2 while Layer 1 is on
e.g. Rule:DoubleLiveButDouble (DoubleB3/S23, but state 3 always die) is:

Code: Select all

B1n2: 3
B1o2: 3
S1n2: 23
S1o2: None
B2n1: 3
B2o1: 3
S2n1: 23
S2o1: None
Hot keys:

Code: Select all

space     Next gen
Enter     Play
0        Draw on Layer 0
1        Draw on Layer 1
D         Draw
M         Move
R         Reset
[         Zoom in
]         Zoom out
Alt + o   Open pattern
Alt + s   Save pattern
Alt + n   Clean cells
Alt + r   Read rule
Alt + c   Set custom color
Planned features:
Select mode
Copy & Paste
Last edited by pifricted on August 22nd, 2025, 4:21 am, edited 10 times in total.
...is enjoying his teenage time.
User avatar
Resu
Posts: 805
Joined: May 23rd, 2025, 10:47 am
Location: UTC+14:00
Contact:

Re: 2Layer Viewer

Post by Resu »

pifricted wrote: August 21st, 2025, 1:56 am Here it is!
2Layer Viewer.zip

Edit1: Fix bug.
Is it like the deep cell?

Code: Select all

x = 31, y = 13, rule = C
8.2X2.3X.3X.X.X$8.X.X.X3.X3.X.X$8.X.X.3X.3X.X.X$8.2X2.X5.X.X.X$8.X.X.
3X.3X.3X$M2.M$4.M$M3.M$.4M$27.2M$27.M.M$29.M$29.2M! [[ AUTOSTART GPS 10 ]]
User avatar
pifricted
Posts: 1116
Joined: May 25th, 2024, 10:26 am
Location: Click here to set your location

Re: 2Layer Viewer

Post by pifricted »

Resu wrote: August 21st, 2025, 2:11 am Is it like the deep cell?
Not really. The viewer runs 2 interactable CA universes.
...is enjoying his teenage time.
Sokwe
Moderator
Posts: 3376
Joined: July 9th, 2009, 2:44 pm

Re: 2Layer Viewer

Post by Sokwe »

It would be nice if you could give a description of what this is, and perhaps a brief tutorial showing how it can be used.
-Matthias Merzenich
User avatar
dvgrn
Moderator
Posts: 12023
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: 2Layer Viewer

Post by dvgrn »

pifricted wrote: August 21st, 2025, 1:56 am B1n2 - Birth conditions for Layer 1 while Layer 2 is off
B1o2 - Birth conditions for Layer 1 while Layer 2 is off...
Please give a sample of the "8 birth/survival conditions" format.

I think there's a copy/paste error in the list. Did you mean to change the second "Layer 2 is off" in each pair, to "Layer 2 is on"?

It might also be worth adjusting "costom" to "custom" everywhere.

Am I thinking about this right, that it should be possible to write a script to generate a four-state Golly rule table that would emulate any of these pairs of interacting universes?
User avatar
pifricted
Posts: 1116
Joined: May 25th, 2024, 10:26 am
Location: Click here to set your location

Re: 2Layer Viewer

Post by pifricted »

dvgrn wrote: August 21st, 2025, 7:38 am
pifricted wrote: August 21st, 2025, 1:56 am B1n2 - Birth conditions for Layer 1 while Layer 2 is off
B1o2 - Birth conditions for Layer 1 while Layer 2 is off...
Please give a sample of the "8 birth/survival conditions" format.

I think there's a copy/paste error in the list. Did you mean to change the second "Layer 2 is off" in each pair, to "Layer 2 is on"?

It might also be worth adjusting "costom" to "custom" everywhere.

Am I thinking about this right, that it should be possible to write a script to generate a four-state Golly rule table that would emulate any of these pairs of interacting universes?
Done.

Here is a really bad script by me. I should rewrite it.
...is enjoying his teenage time.
User avatar
dvgrn
Moderator
Posts: 12023
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: 2Layer Viewer

Post by dvgrn »

pifricted wrote: August 21st, 2025, 1:56 am B1n2 - Birth conditions for Layer 1 while Layer 2 is off
B1o2 - Birth conditions for Layer 1 while Layer 2 is off
S1n2 - Survival conditions for Layer 1 while Layer 2 is on
S1o2 - Survival conditions for Layer 1 while Layer 2 is on...
I don't think you've edited the "on"s and "off"s quite correctly yet. Each pair of definitions still has identical text.

Asking a previous question again: am I thinking about this right, that it should be possible to write a script to generate a four-state Golly rule table that would emulate any of these pairs of interacting universes?
Post Reply