[Rule]Investigator support in Golly

For general discussion about Conway's Game of Life.
User avatar
rowett
Moderator
Posts: 3823
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: [Rule]Investigator support in Golly

Post by rowett » March 14th, 2024, 3:59 pm

dvgrn wrote:
March 3rd, 2024, 6:53 pm
Last but not least, do we maybe need to add a "toInvestigator.lua" conversion script to go along with toStandard, toHistory, and toSuper? Shortcut key Alt+I, maybe?

So probably an update will be needed at least to the toStandard.lua script.
Dave are you planning these updates for the upcoming 4.3 Golly release?

Also it would be worth reviewing the [R]Investigator patterns to see which should be added and which should be linked from the Golly distro.

Finally, did you settle on a benign 256 state rule for the safeopenclip.lua script? I've added the required code to Golly to default the Alt-O shortcut. None of this is checked in yet though.

User avatar
dvgrn
Moderator
Posts: 10694
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: [Rule]Investigator support in Golly

Post by dvgrn » March 14th, 2024, 4:48 pm

rowett wrote:
March 14th, 2024, 3:59 pm
Dave are you planning these updates for the upcoming 4.3 Golly release?
I will certainly get around to working on those changes eventually. This week just hasn't been good at all for free time -- contractors working on my father-in-law's house while I'm in it, up to eight or ten at a time. Next week is looking much more hopeful...!
rowett wrote:
March 14th, 2024, 3:59 pm
Finally, did you settle on a benign 256 state rule for the safeopenclip.lua script? I've added the required code to Golly to default the Alt-O shortcut. None of this is checked in yet though.
I did check in a "Display256" rule that matches Golly's default non-gradient color scheme. I think one of your Lua-script updates adopted that as the rule name to switch to.

User avatar
rowett
Moderator
Posts: 3823
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: [Rule]Investigator support in Golly

Post by rowett » March 14th, 2024, 5:32 pm

dvgrn wrote:
March 14th, 2024, 4:48 pm
I did check in a "Display256" rule that matches Golly's default non-gradient color scheme. I think one of your Lua-script updates adopted that as the rule name to switch to.
Ah I missed that - many thanks. I've checked in the Alt-O default key binding. Good luck with the contractors!

User avatar
confocaloid
Posts: 3059
Joined: February 8th, 2022, 3:15 pm

Re: [Rule]Investigator support in Golly

Post by confocaloid » March 17th, 2024, 12:04 pm

How about bundling Rule:StateInvestigator as a file in the "Rules" folder, so that the many existing patterns can be simply opened directly (either with File/Open, Ctrl+O or Alt+O) without changing the rulename? Then "rule = StateInvestigator" would use the stored ruletable to be supplied with Golly, while "rule = B3/S23Investigator" would use the built-in algorithm.

Code: Select all

#C This pattern settles into a p12 constellation after 6805911 ticks
#C Tested in Golly 4.3b1
#C https://conwaylife.com/forums/viewtopic.php?p=179831#p179831
x = 4, y = 4, rule = B25/S34HInvestigator
O2$3.I$.H!
rowett wrote:
March 14th, 2024, 3:59 pm
Also it would be worth reviewing the [R]Investigator patterns to see which should be added and which should be linked from the Golly distro.
I tried pasting patterns from the linked collection into Golly 4.3b1 using the script safeopenclip.lua. The script does not seem to convert them from StateInvestigator to B3/S23Investigator, but instead converts them to Display256. I think this may be related to OS-specific newlines.
For example I used the script to paste 37p4h1v0-heisenburp.rle from the linked collection. The pattern got converted to Display256. Then I manually changed the rule to B3/S23Investigator in the Control/Set Rule dialog, copied and pasted the RLE from Golly to a text editor, edited the rulestring back to "StateInvestigator" and saved as 37p4h1v0-heisenburp-modified.rle. Checking differences between the two files shows that they differ in the presence of trailing CR. Pasting the contents of 37p4h1v0-heisenburp-modified.rle with the script safeopenclip.lua works as expected, with StateInvestigator converted to B3/S23Investigator.
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.

User avatar
rowett
Moderator
Posts: 3823
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: [Rule]Investigator support in Golly

Post by rowett » March 17th, 2024, 12:49 pm

confocaloid wrote:
March 17th, 2024, 12:04 pm
How about bundling Rule:StateInvestigator as a file in the "Rules" folder, so that the many existing patterns can be simply opened directly (either with File/Open, Ctrl+O or Alt+O) without changing the rulename?

I tried pasting patterns from the linked collection into Golly 4.3b1 using the script safeopenclip.lua. The script does not seem to convert them from StateInvestigator to B3/S23Investigator, but instead converts them to Display256. I think this may be related to OS-specific newlines.
I've fixed safeopenclip.lua so it handles OS-specific newlines. Thanks for the report!

I'd rather not bundle the ruletable version since it will encourage its use. Now the newline issue is fixed Alt+O will convert it.

User avatar
confocaloid
Posts: 3059
Joined: February 8th, 2022, 3:15 pm

Re: [Rule]Investigator support in Golly

Post by confocaloid » March 17th, 2024, 1:21 pm

safeopenclip.lua does not seem to handle pattern comments. Example pattern (should work as a p289 oscillator):
confocaloid wrote:
December 31st, 2023, 7:52 am
A p289 oscillator found by FWKnightship, from C1_with_state_2_stdin:

Code: Select all

#C https://catagolue.hatsya.com/object/xp289_0g_8wdzw3/x5xstateinvestigator
x = 4, y = 7, rule = StateInvestigator
3.B2$3.B$B2.B$.A$2.B$2.B!
[...]
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.

User avatar
rowett
Moderator
Posts: 3823
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: [Rule]Investigator support in Golly

Post by rowett » March 17th, 2024, 1:50 pm

confocaloid wrote:
March 17th, 2024, 1:21 pm
safeopenclip.lua does not seem to handle pattern comments.
This should be fixed now. Thanks for reporting!

User avatar
confocaloid
Posts: 3059
Joined: February 8th, 2022, 3:15 pm

Re: [Rule]Investigator support in Golly

Post by confocaloid » March 17th, 2024, 2:22 pm

It seems like specifications of different topologies cause conversion to Display256 instead. Example pattern (more test examples can be found in the quoted post):
confocaloid wrote:
October 4th, 2022, 6:34 am
[...]

Code: Select all

#C becomes period-64341
x = 6, y = 2, rule = StateInvestigator:T23,19
5.I$H!
[...]
rowett wrote:
March 17th, 2024, 12:49 pm
I'd rather not bundle the ruletable version since it will encourage its use.
One issue here is that Golly 4.3b1 displays the most explored [R]Investigator rule under the name "LifeInvestigator" (including the rulestring shown in the Set Rule dialog). I wonder what others think about this.

I understand that the automatic conversion happens for the same reason B3/S23History gets converted to LifeHistory. However, in this case using prefix "Life" may become a misnomer. I think there are few places where that rulename was used in posted/shared patterns so far. I believe the most common rulename is "StateInvestigator", followed by "B3/S23Investigator" (which is significantly less common).
So I think it might be preferable to include a rule file for StateInvestigator, to avoid encouraging use of a previously almost-completely-unused third alias "LifeInvestigator". And/or modify Golly to prevent use of "Life" instead of "B3/S23" in this case.
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.

User avatar
rowett
Moderator
Posts: 3823
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: [Rule]Investigator support in Golly

Post by rowett » March 17th, 2024, 2:58 pm

confocaloid wrote:
March 17th, 2024, 2:22 pm
It seems like specifications of different topologies cause conversion to Display256 instead.
This should be fixed now. Thanks for reporting!
confocaloid wrote:
March 17th, 2024, 2:22 pm
One issue here is that Golly 4.3b1 displays the most explored [R]Investigator rule under the name "LifeInvestigator" (including the rulestring shown in the Set Rule dialog). I wonder what others think about this.
I don't have an issue with LifeInvestigator since a) it's consistent with [R]History and [R]Super rule families and b) it's fully supported by both Golly and LifeViewer.

User avatar
rowett
Moderator
Posts: 3823
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: [Rule]Investigator support in Golly

Post by rowett » March 18th, 2024, 10:55 am

I've updated the patterns in the attached zip file so they use the canonical rule name "LifeInvestigator" rather than "StateInvestigator".
Attachments
StateInvestigator.zip
(314.94 KiB) Downloaded 7 times

User avatar
confocaloid
Posts: 3059
Joined: February 8th, 2022, 3:15 pm

Re: [Rule]Investigator support in Golly

Post by confocaloid » March 18th, 2024, 11:37 am

In Golly's help (Help/Algorithms/Super), I believe names of cellstates #8 and #9 should be exchanged.

Code: Select all

#C Settles into a p4 oscillator
x = 16, y = 17, rule = B3/S023Investigator:T41,19
A6.4A2.3A$A.A2.3A.A2.4A$3A3.5A3.A$4.A.2A.2A.A.A$.A2.A.2A2.3A.2A$6.A$
5.A.5A.A$A.3A2.2A4.3A$.A2.A.A3.A.2A$A4.3A.A2.3A$2A.3A3.A4.2A$2A.2A.2A
2.5A$2A.2A2.A3.A.A.A$A6.A.A2.2A$.A.4A2.7A$.6A2.2A2.A$13.3H!

Code: Select all

#C A long-lived pattern. Eventual period unknown.
#C Ran oscar.lua for ~15M ticks without detecting periodicity
x = 16, y = 17, rule = B3/S023Investigator:T41,19
A6.4A2.3A$A.A2.3A.A2.4A$3A3.5A3.A$4.A.2A.2A.A.A$.A2.A.2A2.3A.2A$6.A$
5.A.5A.A$A.3A2.2A4.3A$.A2.A.A3.A.2A$A4.3A.A2.3A$2A.3A3.A4.2A$2A.2A.2A
2.5A$2A.2A2.A3.A.A.A$A6.A.A2.2A$.A.4A2.7A$.6A2.2A2.A$13.3I!
Added 2024-03-20: I think second pattern above evolves into a phase of an oscillator at T = 75156054. Here is the preceding generation:

Code: Select all

#C T = 75156053; not yet a phase of an oscillator
x = 41, y = 19, rule = B3/S023Investigator:T41,19
8.2A15.2A.2A$A6.A2.A23.2A4.A$A7.2A21.A2.2A4.A2$37.A$7.A9.2A$17.2A$10.
2A24.2A$10.2A8.2A11.A2.2A$15.2A3.2A$15.2A$32.A$15.2A$4.A3.A6.2A2$24.A
.A$24.A.3A$23.A.3I$24.3A!
Last edited by confocaloid on March 20th, 2024, 2:23 pm, edited 2 times in total.

User avatar
rowett
Moderator
Posts: 3823
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: [Rule]Investigator support in Golly

Post by rowett » March 18th, 2024, 11:46 am

confocaloid wrote:
March 18th, 2024, 11:37 am
In Golly's help (Help/Algorithms/Super), I believe names of cellstates #8 and #9 should be exchanged.
This is fixed now. Thanks for reporting!

User avatar
confocaloid
Posts: 3059
Joined: February 8th, 2022, 3:15 pm

Re: [Rule]Investigator support in Golly

Post by confocaloid » March 18th, 2024, 12:54 pm

This test pattern contains three state-9 cells. Using one of 21 cellstates for those three cells gives 21 different initial patterns, which eventially settle into 21 different final patterns. With the exception of "state-6 vs. state-7" pair, all final patterns are pairwise distinguishable by the combination of the period and the population (counting all nonzero cells).

Tested in Golly twice: first ran all 21 possibilities using a ruletable version generated by a script; then ran all 21 possibilities using the built-in algorithm.

Code: Select all

#C A pseudorandom 16-by-16 soup, with three additional state-9 cells,
#C in a 19-by-19 toroidal universe.
#C The pattern settles into a p7 oscillator after ~1.2M ticks.
#C Without the three state-9 cells, the pattern settles into a single dot.
#C With state-1 cells instead of state-9 cells, the final pattern a 6-bit p1.
#C With state-2 cells instead, the final pattern is a 19-bit p2.
#C With state-3 cells instead, the final pattern is a 15-bit p1.
#C With state-4 cells instead, the final pattern is a 14-bit p1.
#C With state-5 cells instead, the final pattern is a 19-bit p1.
#C With state-6 cells instead, the final pattern is a 12-bit p2 with one block.
#C With state-7 cells instead, the final pattern is a 12-bit p2 with two blocks.
#C With state-8 cells instead, the final pattern is a 23-bit p4.
#C With state-10 cells instead, the final pattern is a 16-bit p6.
#C With state-11 cells instead, the final pattern is a 13-bit p6.
#C With state-12 cells instead, the final pattern is a 19-bit p20.
#C With state-13 cells instead, the final pattern is a 17-bit p6.
#C With state-14 cells instead, the final pattern is a 19-bit p12.
#C With state-15 cells instead, the final pattern is a 25-bit p2.
#C With state-16 cells instead, the final pattern is a 20-bit p2.
#C With state-17 cells instead, the final pattern is a 18-bit p4.
#C With state-18 cells instead, the final pattern is a 16-bit p2.
#C With state-19 cells instead, the final pattern is a 9-bit p16.
#C With state-20 cells instead, the final pattern is a 6-bit p16.
x = 16, y = 17, rule = B3/S023Investigator:T19,19
A6.4A2.3A$A.A2.3A.A2.4A$3A3.5A3.A$4.A.2A.2A.A.A$.A2.A.2A2.3A.2A$6.A$
5.A.5A.A$A.3A2.2A4.3A$.A2.A.A3.A.2A$A4.3A.A2.3A$2A.3A3.A4.2A$2A.2A.2A
2.5A$2A.2A2.A3.A.A.A$A6.A.A2.2A$.A.4A2.7A$.6A2.2A2.A$13.3I!
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.

User avatar
rowett
Moderator
Posts: 3823
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: [Rule]Investigator support in Golly

Post by rowett » March 18th, 2024, 4:16 pm

confocaloid wrote:
March 18th, 2024, 11:37 am

Code: Select all

#C A long-lived pattern. Eventual period unknown.
#C Ran oscar.lua for ~15M ticks without detecting periodicity
x = 16, y = 17, rule = B3/S023Investigator:T41,19
A6.4A2.3A$A.A2.3A.A2.4A$3A3.5A3.A$4.A.2A.2A.A.A$.A2.A.2A2.3A.2A$6.A$
5.A.5A.A$A.3A2.2A4.3A$.A2.A.A3.A.2A$A4.3A.A2.3A$2A.3A3.A4.2A$2A.2A.2A
2.5A$2A.2A2.A3.A.A.A$A6.A.A2.2A$.A.4A2.7A$.6A2.2A2.A$13.3I!
This pattern eventually becomes a P4 at generation 75,156,059.

Code: Select all

#CXRLE Gen=75156059
x = 41, y = 19, rule = B3/S023Investigator:T41,19
8.2A16.A.A$A6.A2.A23.2A4.A$A7.2A21.A2.2A4.A2$37.A$7.A9.2A$17.2A$10.2A
24.2A$10.2A8.2A11.A2.2A$15.2A3.2A$15.2A$32.A$15.2A$4.A3.A6.2A2$24.A.
2A$23.A2.3A$25.3IA$24.3A.A!

User avatar
confocaloid
Posts: 3059
Joined: February 8th, 2022, 3:15 pm

Re: [Rule]Investigator support in Golly

Post by confocaloid » March 20th, 2024, 3:58 am

Putting a state-8 cell and a state-9 cell near each other is a way to create high-period oscillators in otherwise inactive rules:

Code: Select all

#C p232, p1998, p2303, p6821
x = 65, y = 4, rule = B3/S347Investigator
44.I$3.I20.I$64.I$H19.H19.H19.H!

Code: Select all

#C p1168, p3347, p3791, p3867, p5140
x = 86, y = 4, rule = B3/S13Investigator
64.I$24.I60.I$4.I40.I$H19.H19.H19.H19.H!

Code: Select all

#C p44, p310, p638
x = 45, y = 4, rule = B3/S34Investigator
4.I$24.I$44.I$H19.H19.H!
(currently, the Identify function in LifeViewer doesn't know enough about cellular automata to be able to separate non-interacting oscillators in these patterns, so one needs to manually remove all but one of oscillators from a pattern to be able to complete Identify)
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.

User avatar
confocaloid
Posts: 3059
Joined: February 8th, 2022, 3:15 pm

Re: [Rule]Investigator support in Golly

Post by confocaloid » March 22nd, 2024, 3:52 pm

safeopenclip.lua
Suggestion: when the rule is changed from what was specified in the RLE, add the old rulename/rulestring in an additional autogenerated pattern comment line. This way, after doing Alt+O and getting "Could not load clipboard (probably due to unknown rule)." message and seeing the converted pattern, the user would be able to do View -> Pattern Info and see what was the original rule.

Test pattern:

Code: Select all

#C https://catagolue.hatsya.com/hashsoup/C1/k_Sa488sDJcxS61011/b2os24mh
x = 16, y = 16, rule = B2o/S24mHInvestigator
bboooooboooobbbo$
bboooobobooobbob$
bbbobbboobobooob$
obobboboobooboob$
bbooboobbobbbboo$
bobooobobbobbboo$
boobbbbbbbobbboo$
oooboobbbobooboo$
bbbobbbobooobbbb$
oobboobooobobobo$
oobooooboooboobb$
oobobobbobbobooo$
obobbbbbboobboob$
obobooboooooobbo$
obobbobbobooooob$
oobboooobooboooo!
After opening it via safeopenclip.lua, "Pattern Info" would show something along these lines (probably there's a better wording):

Code: Select all

#C https://catagolue.hatsya.com/hashsoup/C1/k_Sa488sDJcxS61011/b2os24mh
#C [autogenerated] The rule was "B2o/S24mHInvestigator"
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.

User avatar
rowett
Moderator
Posts: 3823
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: [Rule]Investigator support in Golly

Post by rowett » March 22nd, 2024, 5:34 pm

confocaloid wrote:
March 22nd, 2024, 3:52 pm
Suggestion: when the rule is changed from what was specified in the RLE, add the old rulename/rulestring in an additional autogenerated pattern comment line.
Done. Thanks for the suggestion!

EDIT by dvgrn: Moved a series of follow-up posts to a new discussion thread.

User avatar
dvgrn
Moderator
Posts: 10694
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: [Rule]Investigator support in Golly

Post by dvgrn » March 22nd, 2024, 9:56 pm

Question for StateInvestigator / LifeInvestigator users: what is the most useful conversion behavior for a [Rule]Investigator pattern?

We currently have Alt/Option G, H, J mapped to scripts that convert to [R]Super, [R]History, and [R]Standard, respectively -- plus Alt/Option K going to the rule-agnostic toChangeState.lua that allows all instances of an existing state, optionally in a selection, to be changed to some other chosen state.

It looks like a good idea to add Alt/Option I-for-Investigator mapped to a toInvestigator.lua -- at least for the case where we're starting from an [R]Standard rule and want to start adding Investigator states to it. That's an easy conversion.

Here are the questions that I can't easily answer, because I don't do much with ExtendedLife or StateInvestigator:
  • Should Alt/Option I work directly on [R]Super and [R]History patterns?
  • Or should the toInvestigator.lua script decline to make History-to-Investigator or Super-to-Investigator conversions, and instead simply direct the user to use Alt/Option J to switch any such patterns to Standard first?
  • Similarly, should Alt/Option G and H work directly on [R]Investigator patterns?
  • Or should the toSuper.lua and toHistory.lua scripts simply direct the user to use Alt/Option J to switch [R]Investigator patterns to Standard first?

    Last but not least
    ...
  • What happens when toStandard.lua gets run on an [R]Investigator pattern?
My theory would be to use the following table -- but again, I don't do much with Investigator patterns, so I don't necessarily have any idea what the most useful behavior would be.

Code: Select all

0 Investigator (OFF)              = 0 Standard
1 Investigator (ON)               = 1 Standard
2 Investigator (killer ON)        = 1 Standard
3 Investigator (killer OFF)       = 0 Standard
4 Investigator (eternal ON)       = 1 Standard
5 Investigator (eternal OFF)      = 0 Standard
6 Investigator (P2 killer ON)     = 1 Standard
7 Investigator (P2 killer OFF)    = 0 Standard
8 Investigator (egg ON)           = 1 Standard
9 Investigator (egg OFF)          = 0 Standard
10 Investigator (P2 ON)           = 1 Standard
11 Investigator (P2 OFF)          = 0 Standard
12 Investigator (P2 egg ON)       = 1 Standard
13 Investigator (P2 egg OFF)      = 0 Standard
14 Investigator (inverter)        = 0 Standard *
15 Investigator (catalyst)        = 1 Standard
16 Investigator (catalyst killer) = 1 Standard
17 Investigator (ON births)       = 1 Standard *
18 Investigator (OFF births)      = 0 Standard *
19 Investigator (ON P2 births)    = 1 Standard *
20 Investigator (OFF P2 births)   = 0 Standard *
If it seems like the above table has too many cell states getting converted to state 1 -- like, maybe it would be more useful to reduce everything above state 5 to OFF, or even everything above state 1 to OFF (?) -- then this might be a good time and place to discuss that.

User avatar
confocaloid
Posts: 3059
Joined: February 8th, 2022, 3:15 pm

Re: [Rule]Investigator support in Golly

Post by confocaloid » March 22nd, 2024, 10:07 pm

Tangential: is there a way to tell which not-yet-assigned keyboard shortcuts are most likely / least likely to be used at some point in some future release? (For example I have Alt+P assigned for oscar.lua, but others might have different shortcuts/no shortcut, and developers might decide to use Alt+P for some unrelated purpose in a future version of Golly.)

User avatar
dvgrn
Moderator
Posts: 10694
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: [Rule]Investigator support in Golly

Post by dvgrn » March 22nd, 2024, 10:28 pm

confocaloid wrote:
March 22nd, 2024, 10:07 pm
Tangential: is there a way to tell which not-yet-assigned keyboard shortcuts are most likely / least likely to be used at some point in some future release? (For example I have Alt+P assigned for oscar.lua, but others might have different shortcuts/no shortcut, and developers might decide to use Alt+P for some unrelated purpose in a future version of Golly.)
Heh, I've got my own custom scripts set up for Alt+I and Alt+O, which are part of my standard state-changing workflow. It was painful to give them up, but they did seem like the obvious choices for the Investigator conversion and for "safe open".

The Golly Gang has generally been very reluctant to do much in the way of new keyboard mapping for a long time now, since the original menu items were mapped. I'd say that after 4.3, there aren't any plans on the horizon to map any more keyboard shortcuts at all -- so the odds are quite low that any particular unmapped shortcut will be claimed by any future release of Golly.

Note that "claimed" is kind of a strong word in any case: you're always free to re-map any key combination that you don't like.

In fact, if you keep the same GollyPrefs as your previous version of Golly, rather than deleting it and letting Golly 4.3 generate a new GollyPrefs when it opens... you'll keep all of your current key mappings, and you won't see the new Alt+I or Alt+O functionality at all.

Or rather, the Lua scripts will be there, of course, but you'll have to map the shortcuts to them manually if you want those shortcuts.

User avatar
confocaloid
Posts: 3059
Joined: February 8th, 2022, 3:15 pm

Re: [Rule]Investigator support in Golly

Post by confocaloid » March 22nd, 2024, 11:55 pm

dvgrn wrote:
March 22nd, 2024, 9:56 pm
[...]
What happens when toStandard.lua gets run on an [R]Investigator pattern?
[...]
If it seems like the above table has too many cell states getting converted to state 1 -- like, maybe it would be more useful to reduce everything above state 5 to OFF, or even everything above state 1 to OFF (?) -- then this might be a good time and place to discuss that.
I'm not sure whether there exists a single "most useful" mapping from the set of all StateInvestigator cellstates to the subset { 0, 1 }. Here is an example question:

what would be a (in some way/sense useful) way of collapsing the following StateInvestigator pattern to B3/S23 Conway's Life with just two cellstates? How do you convert this pattern?
Entity Valkyrie 2 wrote:
September 8th, 2022, 5:34 am
Here is a 128x128 p2070 CGoL unit cell in StateInvestigator. It may be small, but unfortunately the on and off states differ only differ from each other by the presence of a single boat.

Code: Select all

x = 138, y = 138, rule = StateInvestigator
9.A$9.2A$8.A119.E$8.A119.2A$4.2O22.A99.RD2.2O$4.2O21.A.A75.DA25.2O$
29.A14.EDE58.RAE$29.E13.CD$3.AD10.E4.B8.EDE5.CEDE.ED3.E86.2A$2.EAR9.C
4.EB7.CD4.C2.ED97.2A$14.D5.E3.E.CED3.ECD2.D4.CD5.DE85.A$13.D2.E4.E4.D
E7.DE6.CD2.CD2.DE50.E$13.E3.2E6.D2.D5.E.ED6.EDE9.E2.E12.E30.D3.E$14.D
10.C2.ED7.CD10.E52.E3.E18.ED$14.E9.E3.CEDE6.EDE6.E2.E12.R4.R32.ED2.E
15.E.ED2.DC$30.2E16.E2.E46.CEDE.D25.E$14.E29.E50.C2.ED2.EC6.E6.E8.E$
93.2ED2.D3.E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2.C7.DC7.DE
2.C10.D$47.EDE4.EDE4.EDE3.EDE3.EDE3.EDE3.EDEC2.EDE6.DE.E5.D2.D6.2E3.E
$41.E7.DC5.DC5.DC4.DC4.DC4.DC4.DC4.DC.E4.ED7.ED4.E4.E2.D$.A40.E.C5.DC
E4.DCE4.DCE3.DCE3.DCE3.DCE3.DCE3.DC4.D2.DCE3.DEC.E3.E5.D$2A41.E55.DE
2.C4.DC7.BE4.C9.RAE$2.2A46.DCE4.DCE4.DCE3.DCE3.DCE3.DCE3.DCE3.DC.EDEC
5.EDE8.B4.E10.DA$40.ED2.DC3.DC5.DC5.DC4.DC4.DC4.DC4.DC4.DC13.E$30.EAR
9.ED3.EDE4.EDE4.EDE3.EDE3.EDE3.EDE3.EDE3.EDE14.A$4.2O25.AD75.A.A21.2O
$4.2O2.DR99.A22.2O$8.2A119.A$9.E119.A$127.2A$128.A!
For some other example patterns, see a capped p2023 glider gun and a p451 gun derived from a gun in Conway's Life. I don't know which way of collapsing them to plain Life would be most useful. (E.g. the two-cell glider reflectors either will get converted directly to empty space, or else will get converted to some dot sparks. The small p289 oscillator and the spark-to-LWSS will not work after conversion.)

One other interesting (but not necessarily useful; see above) possibility is to convert instead from StateInvestigator to LifeHistory. Convert 0 to 0 and 1 to 1. Convert every "is treated as ON" cellstate >= 2 into "marked ON". Convert every "is treated as OFF" cellstate >= 2 into "marked OFF". For everything else, convert to LifeHistory state 6.
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.

User avatar
dvgrn
Moderator
Posts: 10694
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: [Rule]Investigator support in Golly

Post by dvgrn » March 23rd, 2024, 2:31 am

confocaloid wrote:
March 22nd, 2024, 11:55 pm
One other interesting (but not necessarily useful; see above) possibility is to convert instead from StateInvestigator to LifeHistory. Convert 0 to 0 and 1 to 1. Convert every "is treated as ON" cellstate >= 2 into "marked ON". Convert every "is treated as OFF" cellstate >= 2 into "marked OFF". For everything else, convert to LifeHistory state 6.
Hm, yes, that could be an argument for allowing a direct [Rule]Investigator -> [Rule]History conversion.

I'm thinking that the most common use case here is a situation where someone has experimentally gotten an oscillator or gun or what have you, working in [Rule]Investigator, by adding just a few cells -- and the goal becomes to find support for the same mechanism in plain [Rule]. Usually it won't be much help to convert higher Investigator states to either ON or OFF -- both would be misleading, because no matter whether cells are "treated as ON" or "treated as OFF" in the Investigator version of the rule, things just aren't going to work the same way in plain [Rule].

Another option might be to simply convert any Investigator state above 1 to state 4 (OFF, red) [Rule]History. That will show where the problem points are going to be in the [Rule]Standard pattern, without attempting an arbitrary conversion that's pretty definitely impossible to do "right" anyway.

To do a conversion to a rule that acts like plain [Rule] but still preserves information about what the Investigator states were, a direct conversion to [Rule]Super would work pretty well. There are enough ON and OFF states that a mapping to Super states could be done, with a few states left over.

Again, I'm not sure that the end result of this would be anything useful, so I'm hoping that someone who does more with Investigator cell states can advise about what might be useful.

The default behavior for attempting a conversion to Super, History, or Standard is what happens now: the various scripts refuse to do anything with Investigator patterns at all. If that's what we want, then we don't need to do anything. If some other behavior would be better, then we can adjust the scripts accordingly.

It looks like toStandard.lua doesn't error out on an Investigator pattern, at least, but it converts all odd states to ON states and all even states to OFF states -- which pretty definitely is not what we're going to want.

The other two, toHistory.lua and toSuper.lua, currently throw a complicated and inaccurate error message and then don't actually do anything, it seems:

"Conversion failed. This 'LifeInvestigator' rule is not supported by the Super algo.
To revert to the original rule, please click OK, then press Z to undo the rule change."

(...but then the rule name doesn't actually change, so hitting Z actually undoes the most recent edit to the pattern. Probably will have to do better than that also.)

EDIT Moved a side discussion about usability improvements to safeopenclip.lua to a separate thread.

User avatar
dvgrn
Moderator
Posts: 10694
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: [Rule]Investigator support in Golly

Post by dvgrn » March 25th, 2024, 2:00 pm

I'm still looking for feedback about what exactly the toStandard.lua, toSuper.lua, and toHistory.lua conversion scripts should do with [Rule]Investigator rules =-- and what toInvestigator.lua should do with Super and History patterns.

I think I have a workable plan to start with, anyway:

First I'll check in a toInvestigator.lua that only works for standard rules, not for History or Super rules; if you try to convert other types, an alert pop-up will explain that you have to use toStandard.lua / Alt/Option+J first to reduce History or Super patterns to standard two-state. Similarly, I'll adjust the error messages in toSuper.lua and toHistory.lua so that they don't say wrong things about the Super algo's support for Investigator rules -- and pop up a warning that Investigator patterns have to be reduced to standard two-state before they can be converted to a Super or History version.

That will be an incremental improvement, at least. Then if anyone is hiding in the woodwork who thinks that that would be highly irritating behavior because there's an obvious direct conversion from [Rule]Investigator to [Rule]Super or [Rule]History, or vice versa, maybe that will encourage them to pop up here and explain the details of how those conversions should work.

User avatar
unname4798
Posts: 466
Joined: July 15th, 2023, 10:27 am

Re: [Rule]Investigator support in Golly

Post by unname4798 » April 8th, 2024, 9:21 am

confocaloid wrote:
March 3rd, 2024, 3:26 pm
...
  • (a) allow the user to configure the rulestring/name of the "benign" rule. For example it might be set to "//256" by default, but could be changed via preferences to an existing ruletable name. Then that rule is used whenever the pattern could not be opened normally.
  • (b) add a built-in 256-state rule "nothing changes, nothing evolves, can be used for drawing pictures", with predefined state colours. Then that built-in rule can be used by default, instead of a Generations rule.
    (Maybe the state colours can be chosen so that first N colours are visually distinct from each other, for all sufficiently small N?)..
...
• (B) ...and these state colors must be RGB332.

Post Reply