Life tag testing

For scripts to aid with computation or simulation in cellular automata.
Locked
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 238 - "#PO6UL" is now available on the lazyslug server

Enhancements in this build:
  • added [[ SUPPRESS ]] which suppresses overwrite error message for duplicate definitions once - test
  • help information now marks current POI with a *
  • [[ WIDTH ]] and [[ HEIGHT ]] are now checked for duplicate definitions
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Nathaniel please will you release build 238 to the forum and the Wiki. It contains several fixes and enhancements that forum and wiki members reported. Also I've noticed the last release was 6 months ago.
User avatar
Nathaniel
Site Admin
Posts: 907
Joined: December 10th, 2008, 3:48 pm
Location: New Brunswick, Canada
Contact:

Re: Life tag testing

Post by Nathaniel »

238 is now up!
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Excellent - thanks!
User avatar
dvgrn
Moderator
Posts: 12051
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

rowett wrote:Excellent - thanks!
Hmm, it looks like my regression testing was substandard again.

Build 238 has developed a strange one-cell shift in the initial location of state-2 cells in LifeHistory patterns. See for example the LifeHistory patterns in the Toffoli gate thread.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Oops. I have a sneaking suspicion I know how I broke it. I’ll take a look this evening when I’m back home.

Another distraction just when I was about to finally finish LTL... :wink:
User avatar
dvgrn
Moderator
Posts: 12051
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

rowett wrote:Oops. I have a sneaking suspicion I know how I broke it. I’ll take a look this evening when I’m back home.

Another distraction just when I was about to finally finish LTL... :wink:
Ah, well, you can roll out a fix to this along with the LTL update -- that will help motivate you to finish LTL faster (ahem). It's not like very many people except for me use LifeHistory anyway, and it's only the initial view, and the state-2 cells, that are little off -- once a pattern is running it's almost back to normal, except for the blue shadow one cell too far south.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 239 - "max!sum8^3" is now available on the lazyslug server

Fixes in this build:
  • fixed LifeHistory states 2 and 6 that were broken in the previous release - test
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

dvgrn wrote:It's not like very many people except for me use LifeHistory anyway, and it's only the initial view, and the state-2 cells, that are little off -- once a pattern is running it's almost back to normal, except for the blue shadow one cell too far south.
Both state 2 and state 6 cells were off one cell south-east. State 2 was cosmetic but state 6 broke patterns.

Next on the list (in no particular order) are:
  • LTL
  • PLAYFROM and LOOPTO script commands (with precache/memoize)
  • Clip patterns to bounded grids
User avatar
Nathaniel
Site Admin
Posts: 907
Joined: December 10th, 2008, 3:48 pm
Location: New Brunswick, Canada
Contact:

Re: Life tag testing

Post by Nathaniel »

239 is up!
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Brilliant!

Many thanks.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 240 - "min20/" is now available on the lazyslug server

Fixes in this build:
  • fixed badly behaving mouse (regression)
User avatar
dvgrn
Moderator
Posts: 12051
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

Hm, that's interesting. Took a real member of the old guard posting patterns on the forums, before I noticed that LifeViewer doesn't have a default rule:

Code: Select all

x=7, y=3, h=-4, v=0
2o2b3o$b2obo$o4bo!
On the old Life List newsgroup, B3/S23 was assumed if no rule was given. So there are piles of patterns from the '90s and earlier that leave off the "rule =" part of the header.

Also, just FYI: the following is definitely not a feature request, but the "h" and "v" are mutations of RLE format specific to Heinrich Koenig, equivalent to Golly's #CXRLE Pos=. Currently they're used on pentadecathlon.com and pretty much nowhere else.

In point of fact that annotation format was a serious previous attempt to add extra commands to RLE, and so is prior art for LifeViewer -- though it was definitely focused on annotation, not simulation. Very oddly, I didn't remember until I went back and looked up the documentation that HK called his annotation software "LifeViewer"...!

The LifeNews server still generates annotated images on demand from the annotated RLE, whenever it finds that there isn't already a cached image available -- and that's what you see in pentadecathlon.com/lifenews articles. Apparently that server is something of a walking dinosaur, and as soon as it dies there won't be any code anywhere that knows how to interpret that annotation format:
In a private email, hkoenig wrote:That server is an old PowerPC MacMini that’s been running since 2006. It’s served its purpose, and I figure as long as it still works, I’ll keep it up. I don’t think I’ve made any modifications to the various parts that generate the pages in the last 5 years, and the OS hasn’t been updated in even longer, so not surprising that it mostly still works. I was going to take it down a few years ago, but then a book on Life was published that referenced it, so I decided to not kill the links there so soon.

The problem is that the custom CGI PowerPC binaries won’t run on any recent system. And I don’t think I even have some of the tools I’d need to convert/modernize them. I definitely know I’ve forgotten all the little tricks in getting such addons to work with Apache.
Anyway, here's a fairly complete description of the format:
* * * * * * *
LifeViewer.acgi format specs (incomplete)

each layer has rle header of the form

x=nnn, y=nnn [,h=nnn, v=nnn, color=(rrr,ggg,bbb), gen=nnn, rule=Sn/Bn]
commas and whitespace are optional, but recommended. Either can be a delimiter.
h,v = the offset for a particular pattern from the first pattern, positive right, down.
Can be used in first layer to specify to Life editor programs absolute position
of pattern.
color = the color to be used with this layer. Default is 2nd layer green (0,255, 0)
and 3rd layer blue (0, 0, 255). Layers after that are undefined. Values
are decimal.
gen = Used by Life editor programs, ignored in lifeviewer.
rule = Used by Life editor programs , ignored in lifeviewer.


Following the last layer are formatting commands, one per line.

GP {NW | SW | NE | SE | N | S | E | W} X="nnn", Y="nnn", LEN="nnn", COLOR=(rrr,ggg,bbb)
Glider path
Startng at specified cell, draw a 1 pixel wide line in the direction
and length in cells specified. (Not yet implemented for spaceships (NSEW).)
COLOR -- optional. Default is (255, 255, 0), yellow.

G {NW | SW | NE | SE | N | S | E | W} X="nnn", Y="nnn", COLOR=(rrr,ggg,bbb)
Glider -- Draw a small (4x4 pixels) arrow in the specified direction at the
specified cell.
COLOR -- optional. Default is (255, 0, 0), red. (Actually, not implemented)

VL vvv, [{*|ttt}, {*|bbb}, COLOR=(rrr,ggg,bbb)
Vertical line -- Draw cell wide vertical line.
ttt and bbb parameters specify top and bottom, with "*" meaning
image edge. if not specified, equivalent to "*".
COLOR -- optional. Default is (200, 200, 200)

HL hhh, [{*|rrr}, {*|lll}, COLOR=(rrr,ggg,bbb)
Horizontal line -- See Vertical line


CB lll, ttt, rrr, bbb, KEY="xxx"
Cell Border -- expand image size by the number of cells specified. Affects any "*"
params in other format commands.
KEY -- Optional, Only display title value matches CGI "&drawkey=" parameter, for us
with "lifetable.acgi".

PB
Pixel Border (unimplemented)

A {NW | SW | NE | SE | N | S | E | W} X=nnn, Y=nnn
Arrow -- draw a gray 13x13 pixel arrow image centered on the cell specified.
(Arrow image should be transparent someday. but currently has a white
border. Also, a URL might be nice.)

L cc X=nnn, Y=nnn, TEXT="xxx", SIZE=nn, COLOR=(rrr,ggg,bbb)
Label
cc -- two character code specifying how the label is to be drawn from the
specified cell center. Either order, but must be at least one of each of
the following triplets--
L Left
R Right
C Center

T Top
B Bottom
M Middle
SIZE -- Optional Font size, default = 9
COLOR -- Optional. Default is (0,0,0) Black.

FR [F] LIST=(xxx,yyy),(xxx,yyy)... , COLOR=(rrr,ggg,bbb)
Frame -- Draw a one pixel wide frame from the given list of cells. List must closed
manually.
F -- Fill with the given color
COLOR -- Optional. Default is (0,96,192).


T {T|B} TEXT="xxx" SIZE=nn COLOR=(rrr,ggg,bbb) KEY="xxx"
Title -- draw a centered title
T | B -- Position title at top or bottom, required
SIZE -- Optional Font size, default = 9
COLOR -- Optional. Default is (0,0,0) Black.
KEY -- Optional. Only display title value matches CGI "&drawkey=" parameter.

R {*|lll}, {*|ttt}, {*|rrr}, {*|bbb}, COLOR=(rrr,ggg,bbb)
Rectangle -- Fill the selected set of cells with the color selected.
* -- use value that would extend rectangle to edge.
COLOR -- optional. Default is (200, 200, 200)
Here's a sample use, from this LifeNews page. Notice the multiple layers! All but the first layer are silently ignored by Golly and every other CA viewer/editor in existence, as far as I know.

Code: Select all

#C 11 gliders -> 17P2.198
#C D.Hickerson
x=62, y=84, color=(64,0,0)
59bobo$59b2o$60bo20$24bo$23bo$23b3o32$bo$2bo$3o2$7bo$8bo3bo6bobo$6b3ob2o7b
2o$11b2o7bo2$20b2o$20bobo$4bo15bo$2bobo$3b2o2$4bo$4b2o$3bobo7$4b2o$5b2ob3o$4b
o3bo$9bo!
x=8, y=6, h=4, v=74, gen=328 ,color=(0,224,0), alpha=196
2b2o$3bo2bo$2obobobo$3bobobo$bobo2bo$2b2o!
x=73, y=84, h=-11, v=0, color=(0,0,0), alpha=48
71bo$69bo2bo$68b3o$67b4o$66b4o$65b4o$64b4o$63b4o$62b4o$61b4o$60b4o$59b4o$58b
4o$57b4o$56b4o$55b4o$54b4o$53b4o$52b4o$51b4o$50b4o$49b4o$48b4o$35b2o10b4o$33b
o12b4o$32b4o9b4o$31b4o9b4o$30b4o9b4o$29b4o9b4o$28b4o9b4o$27b4o9b4o$26b4o9b
4o$25b4o9b4o$24b4o9b4o$23b4o9b4o$22b4o9b4o$21b4o9b4o$20b4o9b4o$19b4o9b4o$18b
4o9b4o$17b4o9b4o$16b4o9b4o$15b4o9b4o$14b4o9b4o$13b4o9b4o$12b4o9b4o$11b4o9b
4o$10b4o9b4o$9b4o9b4o$8b4o9b4o$7b4o9b4o$5b5o4b9o$4b8o2b8o$3b20o$3b21o$4b22ob
o$2b10ob19o$b12ob18o$2b9o3b19o$4b29o$4b14ob14o$5b14ob3ob6obo$4b13o3bo2b7o2b
2o$3b19o2b7ob2o$3b31o$b30o2bo$31obo$b14ob14o2bo$b12obob14o$3b11o2b14o$3b26o$5b
10ob12o$8b7o2b11o$9b5obob11o$10b7o2b9o$11b7ob2ob6o$11b4o2bobobob4o$12b6ob
obob3o$12b4obob2o$12b5o$13b2o2b2obo$13b3o2bo$14bobobo2bo$14b2o!
GP F SW x=70,y=-9,len=11,color=(255,0,0)
GP F SW x=54,y=-6,len=31,color=(255,0,0)
GP F SE x=-19,y=37,len=21,color=(255,0,0)
GP F SE x=-23,y=31,len=31,color=(255,0,0)
GP F SE x=-26,y=38,len=31,color=(255,0,0)
GP F NW x=50,y=96,len=31,color=(255,0,0)
GP F NW x=19,y=92,len=11,color=(255,0,0)
GP F SW x=70,y=12,len=51,color=(255,0,0)
GP F SW x=72,y=2,len=61,color=(255,0,0)
GP F NE x=-16,y=92,len=21,color=(255,0,0)
GP F NE x=-6,y=91,len=11,color=(255,0,0)
CB 2,2,2,2
L CM x=22 y=-1 text="11gliders->17P2.198" color=(0,0,255)
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

dvgrn wrote:Hm, that's interesting. Took a real member of the old guard posting patterns on the forums, before I noticed that LifeViewer doesn't have a default rule:

Code: Select all

x=7, y=3, h=-4, v=0
2o2b3o$b2obo$o4bo!
It does now! Build 241 will be your friend.
dvgrn wrote: Also, just FYI: the following is definitely not a feature request, but the "h" and "v" are mutations of RLE format specific to Heinrich Koenig, equivalent to Golly's #CXRLE Pos=. Currently they're used on pentadecathlon.com and pretty much nowhere else.
I tried to have a look but I'm getting ERR_CONNECTION_REFUSED from pentadecathlon.com.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 241 - "nth-prime" is now available on the lazyslug server

Enhancements in this build:
  • you can now click on UI controls on Viewers that are partially scrolled off the window
  • maximum [[ WIDTH ]] and [[ HEIGHT ]] increased to 2048
Fixes in this build:
  • RLE patterns without 'rule =' now default to Conway's Life
User avatar
dvgrn
Moderator
Posts: 12051
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

rowett wrote:
dvgrn wrote:Also, just FYI: the following is definitely not a feature request, but the "h" and "v" are mutations of RLE format specific to Heinrich Koenig, equivalent to Golly's #CXRLE Pos=. Currently they're used on pentadecathlon.com and pretty much nowhere else.
I tried to have a look but I'm getting ERR_CONNECTION_REFUSED from pentadecathlon.com.
Yes, it's definitely a fair-weather server -- pay it too much attention and it goes and hides under a rock for a while, then pops up again when you least expect it.

The content hasn't changed for quite a while, so the Wayback Machine can satisfy your curiosity, should you be so unwise as to have any curiosity on this topic.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

dvgrn wrote:...should you be so unwise as to have any curiosity on this topic.
I'm sure there was something I was meant to be doing. Three letters. Letter T in the middle flanked by Ls if memory serves me...

Rather than LifeViewer I'm thinking that layered pattern view would be a nice Lua project for someone on Golly.
User avatar
dvgrn
Moderator
Posts: 12051
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

I like that Build 241 -- it seems to successfully avoid throwing away the first click, when the viewer is partially offscreen and is moved to be all on-screen.

The browser still moves the view to put LifeViewer all on-screen, or as much so as possible for very short windows. The ideal behavior might be to leave the scrolling entirely up to the user, but I think this is partly browser behavior and not anything LifeViewer is doing deliberately?

I tried various browser heights, including unreasonable ones, and Build 241 stubbornly kept behaving reasonably under the circumstances.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

dvgrn wrote:The ideal behavior might be to leave the scrolling entirely up to the user, but I think this is partly browser behavior and not anything LifeViewer is doing deliberately?
It's browser behaviour - when an element on the page gets focus (so it can be the target for input) the browser kindly makes it fully visible.
User avatar
dvgrn
Moderator
Posts: 12051
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

It occurs to me that if it should happen to become possible before the end of the March to transition instantly between waypoints in LifeViewer, including backwards-in-time jumps ...

... then I could pretty easily produce a glider synthesis of the new knightship in time for April 1.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

dvgrn wrote:It occurs to me that if it should happen to become possible before the end of the March to transition instantly between waypoints in LifeViewer, including backwards-in-time jumps ...

... then I could pretty easily produce a glider synthesis of the new knightship in time for April 1.
I've started the work on the snapshot manager so it can hold multiple reset points (which initially will be used for the POIT targets but could extend into the Waypoint system). There will be a delay on loading the pattern as it computes enough generations to precache all target generations but for most patterns this will be quick since it's unlikely anyone would pick a generation too far into the future.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 242 is now available on the lazyslug server

Enhancements in this build:
  • added [[ POPUPWIDTH ]] and [[ POPUPHEIGHT]] script commands - test
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Dave please will you test build 243 when you get a moment. If it's regression-free I'd like to get it rolled out since it also fixes an annoying UI glitch that I fixed in 240.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 243 is now available on the lazyslug server

Enhancements in this build:
  • added [[ AUTOSTART OFF ]] and [[ GRID OFF ]] script commands
User avatar
dvgrn
Moderator
Posts: 12051
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

rowett wrote:Build 243 is now available on the lazyslug server

Enhancements in this build:
  • added [[ AUTOSTART OFF ]] and [[ GRID OFF ]] script commands
Darn it, I just upgraded the LifeViewer on the b3s23life weblog from 188 (!) to 242, and did some testing. It seemed to be working fine. Now I'll have to do that all over again (sometime)...

I'll do a few more sanity checks, and then see if I can get Nathaniel's attention. Thanks!
Locked