Thread for your script-related questions

For scripts to aid with computation or simulation in cellular automata.
Post Reply
User avatar
dvgrn
Moderator
Posts: 10612
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Thread for your script-related questions

Post by dvgrn » March 29th, 2021, 8:09 am

PkmnQ wrote:
March 29th, 2021, 7:37 am
I know of a script that turns patterns to apgcodes, but is there a script that turns apgcodes to patterns?
This script by Ilmari Karonen seems to fit the bill. I haven't tested it, but the comments show a good level of awareness of the different apgcode variants.

Tangential note: I knew the name "Ilmari Karonen" was familiar, but I had no idea why. Turns out one of my first blog posts was about a question he asked on the comp.theory.cell-automata newsgroup, which was more or less the public predecessor of the conwaylife.com forums.

I didn't even remember that I had started that blog that early (first post in late 2004). Memories of that time are very hazy -- had electricity even been invented back then, let alone the Internet? It's clear from the pattern format that this was before LifeViewer's time, at least.

User avatar
PkmnQ
Posts: 1137
Joined: September 24th, 2018, 6:35 am
Location: Server antipode

Re: Thread for your script-related questions

Post by PkmnQ » March 29th, 2021, 8:22 am

dvgrn wrote:
March 29th, 2021, 8:09 am
PkmnQ wrote:
March 29th, 2021, 7:37 am
I know of a script that turns patterns to apgcodes, but is there a script that turns apgcodes to patterns?
This script by Ilmari Karonen seems to fit the bill. I haven't tested it, but the comments show a good level of awareness of the different apgcode variants.

Tangential note: I knew the name "Ilmari Karonen" was familiar, but I had no idea why. Turns out one of my first blog posts was about a question he asked on the comp.theory.cell-automata newsgroup, which was more or less the public predecessor of the conwaylife.com forums.

I didn't even remember that I had started that blog that early (first post in late 2004). Memories of that time are very hazy -- had electricity even been invented back then, let alone the Internet? It's clear from the pattern format that this was before LifeViewer's time, at least.
I can't even load in a loafer.

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

Re: Thread for your script-related questions

Post by dvgrn » March 29th, 2021, 8:30 am

PkmnQ wrote:
March 29th, 2021, 8:22 am
I can't even load in a loafer.
Why not, exactly? Please try being more specific in bug reports -- it seems silly to have to go through several cycles of posts to painfully extract the relevant information from people.

I saved the script to Golly's Scripts/Python directory, entered "xq7_3nw17862z6952", and ended up with a downward-traveling loafer, as expected.

User avatar
PkmnQ
Posts: 1137
Joined: September 24th, 2018, 6:35 am
Location: Server antipode

Re: Thread for your script-related questions

Post by PkmnQ » March 29th, 2021, 8:32 am

dvgrn wrote:
March 29th, 2021, 8:30 am
PkmnQ wrote:
March 29th, 2021, 8:22 am
I can't even load in a loafer.
Why not, exactly? Please try being more specific in bug reports -- it seems silly to have to go through several cycles of posts to painfully extract the relevant information from people.

I saved the script to Golly's Scripts/Python directory, entered "xq7_3nw17862z6952", and ended up with a downward-traveling loafer, as expected.
Wait, sorry. I accidentally pasted it into a filename which might've removed some important characters.
Edit: I pasted it in properly this time and it works. Sorry for the confusion.

GUYTU6J
Posts: 2200
Joined: August 5th, 2016, 10:27 am
Location: 拆哪!I repeat, CHINA! (a.k.a. 种花家)
Contact:

Re: Thread for your script-related questions

Post by GUYTU6J » April 1st, 2021, 5:29 am

Is lifelib capable of analyzing methuselahs, i.e. given a pattern RLE, can any function output its lifespan, bounding box, MCPS, final population, etc?

User avatar
cgoler2
Posts: 224
Joined: March 10th, 2021, 2:32 pm
Location: Living in a half-bakery

Re: Thread for your script-related questions

Post by cgoler2 » April 7th, 2021, 4:27 pm

Where is searchRule-matchPatt2.lua?

GUYTU6J
Posts: 2200
Joined: August 5th, 2016, 10:27 am
Location: 拆哪!I repeat, CHINA! (a.k.a. 种花家)
Contact:

A Java question not related to CA (sorry)

Post by GUYTU6J » April 10th, 2021, 1:56 am

How do I compile and run the Java QuasiTiler from https://sourceforge.net/projects/quasitiler/? I have installed Java —

Code: Select all

java version "1.8.0_281"
Java(TM) SE Runtime Environment (build 1.8.0_281-b09)
Java HotSpot(TM) Client VM (build 25.281-b09, mixed mode, sharing)
— but my command prompt doesn't recognize "javac".

User avatar
yujh
Posts: 3066
Joined: February 27th, 2020, 11:23 pm
Location: I'm not sure where I am, so please tell me if you know
Contact:

Re: Thread for your script-related questions

Post by yujh » April 19th, 2021, 8:10 am

How to make viewers on other websites (html5?)
Rule modifier

B34kz5e7c8/S23-a4ityz5k
b2n3-q5y6cn7s23-k4c8
B3-kq6cn8/S2-i3-a4ciyz8
B3-kq4z5e7c8/S2-ci3-a4ciq5ek6eik7

Bored of Conway's Game of Life? Try Pedestrian Life -- not pedestrian at all!

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

Re: Thread for your script-related questions

Post by dvgrn » April 19th, 2021, 8:37 am

yujh wrote:
April 19th, 2021, 8:10 am
How to make viewers on other websites (html5?)
Meaning, you want to set up LifeViewer to work outside of the context of the forums or LifeWiki?

Here are some sample HTML files that do basically that. You can run those pages offline, at the expense of probably using an older version of LifeViewer. (I haven't bothered to update the checked-in version of lv-plugin.js past Build 521, whereas the current version is something like 597.)

Instead of the line '<script src="lv-plugin.js"></script>', you could point the browser to some other location, like

Code: Select all

<script src="https://www.conwaylife.com/forums/styles/prosilver/template/lv-plugin.js"></script>
If you do that, then you'll always be working with the latest version of LifeViewer -- as long as conwaylife.com isn't down and you have a working Internet connection.

Otherwise, you just need to follow the exact HTML structure given in the samples, and LifeViewer will see it and use it:

Code: Select all

<div class="viewer">
	<a href="" onclick="updateViewer(this); return false;">View Standalone</a><br>
	<textarea rows=4 cols=75>
#C put RLE here
#C [[ "with LifeViewer waypoint script commands" ]] if you want them
x = 3, y = 3, rule = B3/S23
3o$o$bo!
	</textarea>
	<br>
	<canvas width="1024" height="512"></canvas>
</div>
Canvas size, textarea height, link text, etc., can be adjusted as needed. LifeViewer is mainly looking for the div with a class of "viewer", and inside that, a textarea containing the RLE, and a canvas.

There's probably something subtle I've forgotten about the "View Standalone" link at the top, but maybe someone else can explain that.

User avatar
bibunsekibun
Posts: 345
Joined: April 17th, 2021, 7:58 pm
Location: Japan

Re: Thread for your script-related questions

Post by bibunsekibun » April 20th, 2021, 4:19 am

Is there an Isotropic Non-totalistic Spaceship search script that can be run without C++?
sorry I can only speak Japanese, English is made by machine translation
I'm a fan of methuselahs

Schiaparelliorbust
Posts: 3686
Joined: July 22nd, 2020, 9:50 am
Location: Acidalia Planitia

Re: Thread for your script-related questions

Post by Schiaparelliorbust » April 20th, 2021, 4:34 am

bibunsekibun wrote:
April 20th, 2021, 4:19 am
Is there an Isotropic Non-totalistic Spaceship search script that can be run without C++?
Yes, try rlifesrc.
Hunting's language (though he doesn't want me to call it that)
Board And Card Games
Colorised CA
Alien Biosphere

User avatar
bibunsekibun
Posts: 345
Joined: April 17th, 2021, 7:58 pm
Location: Japan

Re: Thread for your script-related questions

Post by bibunsekibun » April 20th, 2021, 5:31 am

Schiaparelliorbust wrote:
April 20th, 2021, 4:34 am
bibunsekibun wrote:
April 20th, 2021, 4:19 am
Is there an Isotropic Non-totalistic Spaceship search script that can be run without C++?
Yes, try rlifesrc.
Wow, Thank you so much!
sorry I can only speak Japanese, English is made by machine translation
I'm a fan of methuselahs

User avatar
yujh
Posts: 3066
Joined: February 27th, 2020, 11:23 pm
Location: I'm not sure where I am, so please tell me if you know
Contact:

Re: Thread for your script-related questions

Post by yujh » April 20th, 2021, 5:42 am

What about a rule generator for alternating rules? Like viewtopic.php?f=11&t=719&start=75#p72993 but generate the rule table but not only running a pattern.
Rule modifier

B34kz5e7c8/S23-a4ityz5k
b2n3-q5y6cn7s23-k4c8
B3-kq6cn8/S2-i3-a4ciyz8
B3-kq4z5e7c8/S2-ci3-a4ciq5ek6eik7

Bored of Conway's Game of Life? Try Pedestrian Life -- not pedestrian at all!

User avatar
LaundryPizza03
Posts: 2298
Joined: December 15th, 2017, 12:05 am
Location: Unidentified location "https://en.wikipedia.org/wiki/Texas"

Re: Thread for your script-related questions

Post by LaundryPizza03 » April 26th, 2021, 12:21 pm

Why do the parameters B34/S1567/o3n1v/l108 in gfind mysteriously get stuck so quickly?

Code: Select all

x = 4, y = 3, rule = B3-q4z5y/S234k5j
2b2o$b2o$2o!
LaundryPizza03 at Wikipedia

Sokwe
Moderator
Posts: 2645
Joined: July 9th, 2009, 2:44 pm

Re: Thread for your script-related questions

Post by Sokwe » April 26th, 2021, 11:28 pm

LaundryPizza03 wrote:
April 26th, 2021, 12:21 pm
Why do the parameters B34/S1567/o3n1v/l108 in gfind mysteriously get stuck so quickly?
It does seem to be getting stuck at depth 73 and can't complete the depth-first step. I also tried giving it a large queue size and it still appears to get stuck in the breadth-first step.

Interestingly, I ran it with Paul Tooke's modified gfind (compiled with PATCH04 commented out to allow for searches above logical width 14) and it finds a ship at depth 73:

Code: Select all

x = 36, y = 22, rule = B34/S1567
6bobo18bobo$6bobo2bo12bo2bobo$4b2o7b2o6b2o7b2o$5bobo2bob2obo4bob2obo2b
obo$4bo3bobo3bo6bo3bobo3bo$4b2o5bo2bo6bo2bo5b2o$7b4o6b2o6b4o$3bo2bo4b
2o10b2o4bo2bo$3bob2o5b2o3b2o3b2o5b2obo$2bobo4b3o3b6o3b3o4bobo$b5o2bo3b
3o6b3o3bo2b5o$5bobo2bo4b6o4bo2bobo$b4ob3ob2obo8bob2ob3ob4o$5bo4b4obo4b
ob4o4bo$5bo3b3obobo4bobob3o3bo$2o3b3o2bobo2b6o2bobo2b3o3b2o$3bob2o2bob
obo3b2o3bobobo2b2obo$2bo3b4o2b5o2b5o2b4o3bo$4bo2b9o4b9o2bo$11b3obo4bob
3o$13bobob2obobo$15bo4bo!
It then completes the depth-first step normally. Without actually looking at any code, I would guess the problem is in success(), which should print a complete spaceship detected by terminal() (one could check if it gets stuck after terminal() returns true). Perhaps an older version of gfind will work (such as v4.6, on which Paul's modification is based). Then one could look at the changes between versions to get an idea of what's causing the problem.
-Matthias Merzenich

User avatar
LaundryPizza03
Posts: 2298
Joined: December 15th, 2017, 12:05 am
Location: Unidentified location "https://en.wikipedia.org/wiki/Texas"

Re: Thread for your script-related questions

Post by LaundryPizza03 » April 28th, 2021, 10:57 am

Sokwe wrote:
April 26th, 2021, 11:28 pm
LaundryPizza03 wrote:
April 26th, 2021, 12:21 pm
Why do the parameters B34/S1567/o3n1v/l108 in gfind mysteriously get stuck so quickly?
It does seem to be getting stuck at depth 73 and can't complete the depth-first step. I also tried giving it a large queue size and it still appears to get stuck in the breadth-first step.

Interestingly, I ran it with Paul Tooke's modified gfind (compiled with PATCH04 commented out to allow for searches above logical width 14) and it finds a ship at depth 73:

Code: Select all

x = 36, y = 22, rule = B34/S1567
6bobo18bobo$6bobo2bo12bo2bobo$4b2o7b2o6b2o7b2o$5bobo2bob2obo4bob2obo2b
obo$4bo3bobo3bo6bo3bobo3bo$4b2o5bo2bo6bo2bo5b2o$7b4o6b2o6b4o$3bo2bo4b
2o10b2o4bo2bo$3bob2o5b2o3b2o3b2o5b2obo$2bobo4b3o3b6o3b3o4bobo$b5o2bo3b
3o6b3o3bo2b5o$5bobo2bo4b6o4bo2bobo$b4ob3ob2obo8bob2ob3ob4o$5bo4b4obo4b
ob4o4bo$5bo3b3obobo4bobob3o3bo$2o3b3o2bobo2b6o2bobo2b3o3b2o$3bob2o2bob
obo3b2o3bobobo2b2obo$2bo3b4o2b5o2b5o2b4o3bo$4bo2b9o4b9o2bo$11b3obo4bob
3o$13bobob2obobo$15bo4bo!
It then completes the depth-first step normally. Without actually looking at any code, I would guess the problem is in success(), which should print a complete spaceship detected by terminal() (one could check if it gets stuck after terminal() returns true). Perhaps an older version of gfind will work (such as v4.6, on which Paul's modification is based). Then one could look at the changes between versions to get an idea of what's causing the problem.
I can't compile those now, so you try: B35/S16/o3n1u/l108.

EDIT: Found using ikpx2. The search in this rule is very memory-intensive for some reason.

Code: Select all

x = 33, y = 36, rule = B35/S16
9bo3b3ob3o3bo$7bo2bob2o5b2obo2bo$7bobobo4bo4bobobo$5bo4b3o7b3o4bo$8bo2bo3bobo
3bo2bo$2bob2o3bob2o3bo3b2obo3b2obo$bo4b2o17b2o4bo$ob4ob3o4bo3bo4b3ob4obo$4bo
5bobo7bobo5bo$b2o2bo2bo4bob3obo4bo2bo2b2o$14bo3bo$4bobo5bo7bo5bobo$b2obobo3bo
11bo3bobob2o$3bo4bobo4bobo4bobo4bo$bo9b2o2bobo2b2o9bo$2o8bob2o2bo2b2obo8b2o$b
o3b3obo13bob3o3bo$o2bobo4bo4bobo4bo4bobo2bo$6bobo7bo7bobo$b3obob3ob2o7b2ob3ob
ob3o$7bob4o7b4obo$9bob2o7b2obo2$7bobo2b2o5b2o2bobo$12bo7bo$11b2ob2ob2ob2o$10b
2o9b2o$9b3o2bo3bo2b3o$8b3o3bo3bo3b3o$8b3o2bo5bo2b3o$8bobo3bo3bo3bobo$6b3ob2o
2bobobo2b2ob3o$9bo2bo2bobo2bo2bo2$11bo2b2ob2o2bo$12bo7bo!

Code: Select all

x = 4, y = 3, rule = B3-q4z5y/S234k5j
2b2o$b2o$2o!
LaundryPizza03 at Wikipedia

User avatar
cgoler2
Posts: 224
Joined: March 10th, 2021, 2:32 pm
Location: Living in a half-bakery

Re: Thread for your script-related questions

Post by cgoler2 » May 7th, 2021, 9:36 pm

Is there a Lua script that converts

Code: Select all

x =3, y =3, rule =B3/S23
bo$2bo$3o!
into

Code: Select all

x =3, y =3, rule =B3/S23
bob$
bbo$
ooo$
?

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

Re: Thread for your script-related questions

Post by dvgrn » May 7th, 2021, 10:28 pm

cgoler2 wrote:
May 7th, 2021, 9:36 pm
Is there a Lua script that converts

Code: Select all

x =3, y =3, rule =B3/S23
bo$2bo$3o!
into

Code: Select all

x =3, y =3, rule =B3/S23
bob$
bbo$
ooo$
?
I don't know of one. But I discovered recently that I had forgotten all the Golly-related Lua that I used to know, so apparently I need some practice.

I checked in this script for you -- pat-to-ascii.lua:

Code: Select all

-- pat-to-ascii.lua
-- select a pattern in Golly, run this script,
--   and a plaintext ASCII format version of
--   the pattern will be copied to the clipboard
--
-- For a variant producing Life Lexicon format, see also
--   http://conwaylife.com/forums/viewtopic.php?p=64427#p64427

local g = golly()
r = g.getselrect()
s=""
for y = 0, r[4] do
  for x = 0, r[3] do
    if g.getcell(x+r[1], y + r[2]) == 1 then
      s = s.."*"
    else
      s = s.."."
    end
  end
  s = s.."\n"
end

g.setclipstr(s)
Changes to the above to make it produce the RLE format that you're asking for, are absolutely completely trivial, to the point where anyone can do it even if they don't know anything about programming. It currently works on a selection in Golly and writes the output to the clipboard -- so it would take just a little bit more fiddling to start with a standard RLE pattern in the clipboard and end with a Catagolue-style RLE pattern in the clipboard.

If you can't see how, just ask more script-related questions here until you can see how.

User avatar
wwei47
Posts: 1651
Joined: February 18th, 2021, 11:18 am

Re: Thread for your script-related questions

Post by wwei47 » May 24th, 2021, 11:20 pm

Is there a way to get RLS to generate a list of search results, like JLS's save results to file option?
Help me find high-period c/2 technology!
My guide: https://bit.ly/3uJtzu9
My c/2 tech collection: https://bit.ly/3qUJg0u
Overview of periods: https://bit.ly/3LwE0I5
Most wanted periods: 76,116

User avatar
yujh
Posts: 3066
Joined: February 27th, 2020, 11:23 pm
Location: I'm not sure where I am, so please tell me if you know
Contact:

Re: Thread for your script-related questions

Post by yujh » May 25th, 2021, 9:32 am

wwei47 wrote:
May 24th, 2021, 11:20 pm
Is there a way to get RLS to generate a list of search results, like JLS's save results to file option?
Yes and obvious. There's a choice in the searching page
Rule modifier

B34kz5e7c8/S23-a4ityz5k
b2n3-q5y6cn7s23-k4c8
B3-kq6cn8/S2-i3-a4ciyz8
B3-kq4z5e7c8/S2-ci3-a4ciq5ek6eik7

Bored of Conway's Game of Life? Try Pedestrian Life -- not pedestrian at all!

User avatar
wwei47
Posts: 1651
Joined: February 18th, 2021, 11:18 am

Re: Thread for your script-related questions

Post by wwei47 » May 26th, 2021, 12:21 pm

Why does ntzfind core dump when I try to use it to search B01e2c3i4e/S1e3y4et?
Help me find high-period c/2 technology!
My guide: https://bit.ly/3uJtzu9
My c/2 tech collection: https://bit.ly/3qUJg0u
Overview of periods: https://bit.ly/3LwE0I5
Most wanted periods: 76,116

GUYTU6J
Posts: 2200
Joined: August 5th, 2016, 10:27 am
Location: 拆哪!I repeat, CHINA! (a.k.a. 种花家)
Contact:

Re: A Java question not related to CA (sorry)

Post by GUYTU6J » May 28th, 2021, 9:52 am

Continued from this post:
GUYTU6J wrote:
April 10th, 2021, 1:56 am
How do I compile and run the Java QuasiTiler from https://sourceforge.net/projects/quasitiler/? I have installed Java —

Code: Select all

java version "1.8.0_281"
Java(TM) SE Runtime Environment (build 1.8.0_281-b09)
Java HotSpot(TM) Client VM (build 25.281-b09, mixed mode, sharing)
— but my command prompt doesn't recognize "javac".
I realized that a completely different thing called Java(TM) SE Development Toolkit 16 (64-bit) is required to use command "javac". However, the existence of jdk prevents me from running other .jar files like SeedsOfDestruction.v0-5.jar by simply clicking on it. Why is there such a conflict?

User avatar
wwei47
Posts: 1651
Joined: February 18th, 2021, 11:18 am

Re: Thread for your script-related questions

Post by wwei47 » May 31st, 2021, 8:47 pm

How can I contact Jason Summers? I keep getting Server Error 500 from their Oscillizer.
Help me find high-period c/2 technology!
My guide: https://bit.ly/3uJtzu9
My c/2 tech collection: https://bit.ly/3qUJg0u
Overview of periods: https://bit.ly/3LwE0I5
Most wanted periods: 76,116

User avatar
ihatecorderships
Posts: 309
Joined: April 11th, 2021, 12:54 pm
Location: Falls Church, VA

Re: Thread for your script-related questions

Post by ihatecorderships » May 31st, 2021, 9:25 pm

wwei47 wrote:
May 31st, 2021, 8:47 pm
How can I contact Jason Summers? I keep getting Server Error 500 from their Oscillizer.
It says on their site that their email is jason1@pobox.com, so try that.
-- Kalan Warusa
Don't drink and drive, think and derive.

User avatar
pzq_alex
Posts: 792
Joined: May 1st, 2021, 9:00 pm
Location: tell me if you know

Re: Thread for your script-related questions

Post by pzq_alex » June 5th, 2021, 2:11 pm

How can I get ikpx2.2 to extend a specified partial?
\sum_{n=1}^\infty H_n/n^2 = \zeta(3)

How much of current CA technology can I redevelop "on a desert island"?

Post Reply