Life tag testing

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

Re: Life tag testing

Post by dvgrn »

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

Enhancements in this build:
  • added many new rule aliases
  • secret function prototype available on hotkey F1 - test
Ooh, the secret function prototype seems to work just like Golly -- for a single ON color, anyway. When multiple states come along, and selections, and copy/rotate/paste with different modes, there will be ever so much more to test... (involuntary shudder).

Not that I'm suggesting that you have any of these things on your backlog, of course.

But if you do, then... maybe just to be contrary you could consider implementing MCell's old editing functionality instead of Golly's. In MCell, selecting an area would immediately make it float above the active universe (which might go on running just fine underneath) -- and then the selection could be rotated, moved, or whatever and eventually dropped back in.

The big difference between MCell and Golly was that the selected subpattern always had a location, so if you didn't want to move it, then [Enter] would drop it back in the same place where it came from without an annoying extra line-it-up-all-over-again mouse operation. That was useful for a lot of things, such as rephasing oscillators using LifeHistory patterns.

(Golly's line-it-up-all-over-again functionality is one of the things I waste the most time fighting when I'm editing big patterns; last-moment mouse twitches as I'm clicking to paste will very often misalign a dropped pattern at the last possible moment, and I have to undo and try again, sometimes several times.)
rowett wrote:Fixes is this build:
You've been copy-and-pasting that string for a while now. Maybe it's time for me to give you this to copy instead:

Code: Select all

Fixes in this build:
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:When multiple states come along, and selections, and copy/rotate/paste with different modes, there will be ever so much more to test... (involuntary shudder).
Yes that's partly why it's a secret. If I announce it in the forums I'll suddenly get a wave of very helpful suggestions.

There are two main drivers for having an editor:
  1. it's been on the backlog forever and I'd recently got rid of the second longest item (no prizes for guess what it was)
  2. it makes the experience much more interactive
What I haven't decided yet is whether to implement it just for casual users (in which case it's almost done) or whether it is for serious pattern creators. I'm not sure about the latter because I don't see why people wouldn't just use Golly for that.
dvgrn wrote:maybe just to be contrary you could consider implementing MCell's old editing functionality
I'm almost embarrassed to say I've never used MCell.
dvgrn wrote:The big difference between MCell and Golly was that the selected subpattern always had a location, so if you didn't want to move it, then [Enter] would drop it back in the same place where it came from without an annoying extra line-it-up-all-over-again mouse operation. That was useful for a lot of things, such as rephasing oscillators using LifeHistory patterns.
Not being a pattern creator myself it would be super helpful for some editor requirements. I'd be guessing what's helpful.
dvgrn wrote:Maybe it's time for me to give you this to copy instead:

Code: Select all

Fixes in this build:
How ironic. A bug in the bug fix list. Thanks for the copy I'm not sure what I've have done without it :)
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

rowett wrote:What I haven't decided yet is whether to implement it just for casual users (in which case it's almost done) or whether it is for serious pattern creators. I'm not sure about the latter because I don't see why people wouldn't just use Golly for that.
There might be some call for being able to do simple edits and make a selection from inside LifeViewer, maybe for convenience on a mobile device. (?)

One use case I thought of was copying out a small piece of a larger pattern, to paste into something like Mark Niemiec's database search function. At the moment if you're looking at something in LifeViewer, you have to copy it out, open Golly, paste into Golly, then select the piece you want and copy it right back out again to paste into lifesrch.htm.

There are also some kinds of simple experimentation that would be fun to be able to do in LifeViewer, like copying a glider's initial position and pasting back in again later, to find out the repeat time of a conduit for example. Or to find the repeat time of an entire glider synthesis for a spaceship, if the entire starting recipe is copied and can be reliably pasted in the same spot.

These are situations where MCell's editing system is an improvement on Golly's. In Golly the position of the pasted pattern is always mouse-dependent, so you keep having to re-align it (and that can be difficult if you have just copied a glider and don't have any nearby landmarks). MCell was set up so that a pasted selection always went back to where it was copied from, by default -- but it hovered above the actual universe in a temporary layer, visible but translucent and not affecting anything.

You could rotate the selection, click and drag it around with the mouse, cancel the paste, or hit a key to drop it into the actual universe. You could run the main pattern step by step or even have the universe running while a selection was hovering, so if you had cut a glider out of the universe, you could wait for another glider to pass by safely, then drop the hovering glider back in. All very handy for making signal-circuitry adjustments. It took me several years to switch over to Golly for my editing work, in spite of MCell's painful limitations in universe size and a really annoying copy/paste bug. But eventually the unlimited-undo functionality won me over...!
rowett wrote:I'm almost embarrassed to say I've never used MCell.
No need to be embarrassed. MCell is so archaic now that it no longer runs that well in modern editions of Windows -- I think you might have to put Windows in some ancient emulation mode to get it to work well, or at all.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Quite a lot of changes in Build 284 so will need some reasonable testing. I'm going to finish the HISTORYSTATES implementation in the next build which will probably be a Release Candidate since there are a bunch of needed fixes in 284.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 284 is now available on the lazyslug server

Enhancements in this build:
  • new Esc button to close error display in bottom right menu
  • new Info button in bottom right menu to toggle InfoBar display
  • new script command [[ HISTORYSTATES <0..> ]] to define the number of history states to use
    • default and maximum is 63 for 2 state patterns and 1 for multi-state patterns
    • set to 0 to disable cell history drawing
    • implementation not complete!!
  • pattern editor now respects bounded grid
  • pattern editor automatically switches temporarily to pan mode while ZOOM < 1
  • added aggregate memory usage information to Help information
  • ToolTips can now be two lines long and will try to split at a space, comma or slash
  • when PopUp windows resize the right edge position will stay fixed
  • default grid size reduced to 512x512 to save memory for pages with multiple Viewers
    • MAXGRIDSIZE argument is now from 9 (2^9 = 512) to 14 (2^14 = 16384)
  • memory for population graph is not allocated if NOGRAPH is specified or if THUMBLAUNCH is specified without GRAPH
  • only allocate memory for Stars on first use
Fixes in this build:
  • bounded grids >=8192 and <=16384 were causing a crash
  • PopUp viewer was not having grid size reset after MAXGRIDSIZE specified
  • pattern died generation was not working in the PopUp Viewer for the second pattern onwards if not reset
  • when specifying a Klein bounded grid without defining the twist edge the default is now vertical (to match Golly)
  • bounded grid types that do not support twists were not being reported as errors when twists were specified
  • canonical HROT patterns were defaulting S8 to on
  • canonical HROT patterns were not validating counts against von Neumann or Circular neighborhoods
User avatar
Andrew
Moderator
Posts: 1073
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: Life tag testing

Post by Andrew »

dvgrn wrote:The big difference between MCell and Golly was that the selected subpattern always had a location, so if you didn't want to move it, then [Enter] would drop it back in the same place where it came from without an annoying extra line-it-up-all-over-again mouse operation.
If you copied the selection then just hit Escape to cancel the paste. If you cut the selection, hit Escape then Z (to undo the cut). No need to line stuff up again.
Use Glu or Glui to explore CA rules on non-periodic tilings: DominoLife, HatLife, SpectreLife
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

Andrew wrote:
dvgrn wrote:The big difference between MCell and Golly was that the selected subpattern always had a location, so if you didn't want to move it, then [Enter] would drop it back in the same place where it came from without an annoying extra line-it-up-all-over-again mouse operation.
If you copied the selection then just hit Escape to cancel the paste. If you cut the selection, hit Escape then Z (to undo the cut). No need to line stuff up again.
The reason that doesn't work is the time dimension. It's an extraordinarily common task in signal-circuitry editing, say when optimizing something in Chris Cain's gun collection that has bumper or bouncer reflectors in it, to have to adjust the phase of a selected region by some number of ticks.

Golly
The fastest method in Golly without using a helper script is either

Select, Ctrl+C, run N ticks, Ctrl+V, move the mouse until things are lined up, click to drop selection

-- or more often (because it leaves the base pattern at T=0, which is generally a good plan),

Select, run N ticks, Ctrl+C, Z or R to undo, Ctrl+V, move the mouse until things are lined up, click to drop selection.

This operation is pretty much always done in LifeHistory, because the state-2 cells automatically make sure there are no leftover ON cells from the previous phase of the oscillators.

I'm often editing things that are big enough that I can't see the whole selection at once without zooming out pretty far, so I have to do the lining up fairly carefully. Very often I have to undo and try the paste once or twice, because the click operation sometimes seems to move my drop point very slightly, putting it annoyingly one cell off from where I want it.

Also, I'm often editing roughly diamond-shaped things (because they use glider signals) -- so none of Golly's paste locations is really ideal. I can't zoom way in on a corner and avoid the wobbly drop point that way, because there are no landmarks in the corners.

-- Unless I thought to put one there beforehand, of course. I'm getting better at workarounds like that. Another workaround is to drop the replacement phase a safe distance away, then measure the distance to where I want it and Shift+S to move it into place precisely. But both of those require extra fiddling around.

MCell
MCell's editing system avoided all this because selections worked differently. Dragging a selection rectangle with the mouse immediately put the contents of the box into "hover mode" (and changed the color as usual so you could see it was a selection.) You could then grab the hovering box at any point, not limited to corners or center, and drag it to wherever it was wanted. You could also run the rest of the pattern, and the selected cells would not participate for as long as they were selected. A glider or spaceship could pass right underneath the hovering selection without affecting it at all.

So my bumper/bouncer rephasing problem in MCell would have been just Select, run N ticks, Drop Selection -- the clipboard didn't even have to get involved, let alone the mouse.

On the other hand, there was never a Golly-style selection in MCell -- no lasting highlighted region in the actual universe, just these rectangles hovering over it. Golly-style selections can be very useful for lots of things, too, just not so much for this particular task.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 285 is now available on the lazyslug server

Enhancements in this build:
  • new Stars button to toggle starfield display in bottom right menu
  • new Help topics UI in Help menu
    • Help Topics list auto-updates as Help scrolls
  • FPS button in bottom right menu is now called Timing
  • new Details button in bottom right menu to toggle timing details
  • completed HISTORYSTATES implementation - test
  • faster LTL/HROT performance for von Neumann and Circular neighborhoods
Fixes in this build:
  • pattern editor now updates population
  • fixed HROT canonical S8 bug again
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 285 is no longer a Release Candidate since I've found a critical defect that needs attention.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 286 is now available on the lazyslug server

Enhancements in this build:
  • population data is now dynamically allocated to reduce memory footprint
  • Themes can not be changed for patterns with illegal rules or states
  • population graph disabled for patterns with illegal rules or states
  • new HistFit button in bottom right menu to toggle AutoFit History mode
  • new Major button in bottom right menu to toggle major grid lines
  • AutoFit works better at high zoom levels and/or step sizes > 1
  • large range 2-state LtL/HROT von Neumann patterns now run much faster
Fixes in this build:
  • PopUp viewer window right alignment now happens in a single step
  • pattern area display was not working in Help information
  • don't lock ANGLE when AUTOFIT on
  • update display after every step back
  • AUTOFIT and HISTORYFIT fit now work with HROT/LtL patterns - test
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 287 is now available on the lazyslug server

Enhancements in this build:
  • new Draw and Pan buttons
  • improved LtL multi-state von Neumann performance for large range patterns
  • reduced memory consumption for 2-state startup
  • long rule aliases now wrap across two lines in Help information
  • added some more rule aliases
Fixes in this build:
  • Generations population statistics were wrong
  • memory details in Help information could be negative
  • rule aliases were not appearing for HROT/LtL rules
  • fixed an issue with HROT rule validation
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Dave, build 287 should be ready for prime time. Please will you take a look and see if it passes scrutiny?
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

rowett wrote:Dave, build 287 should be ready for prime time. Please will you take a look and see if it passes scrutiny?
Sure, I'll take a look sometime in the next few hours, then send a request on to Nathaniel. Looks good so far -- but there are getting to be a lot of details to keep an eye on!
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

dvgrn wrote:
rowett wrote:Dave, build 287 should be ready for prime time. Please will you take a look and see if it passes scrutiny?
Sure, I'll take a look sometime in the next few hours, then send a request on to Nathaniel. Looks good so far -- but there are getting to be a lot of details to keep an eye on!
Putting Build 287 through its paces in my very limited test suite of random discussion-thread pages lifted from the forums, I ran into a problem with this post. The pattern reliably gets permanently stuck at exactly T=36 in Build 287 in my (Chrome) browser, but continues with no problem in the current Build 282.

Code: Select all

x = 24, y = 24, rule = R9,C0,M1,S30..180,B24..45,NN:T400,400
2b4ob2o3b2obo$3b2o5bobo3bob3ob2o$b7o3bob2ob3ob4o$5b4obob2obobo2bo2bo$
2bob2o2bo2b3o2bobobo2bo$3b2obo3b2o2bob4ob3o$3o3b4ob2ob2o4b4o$b3o4b4o2b
ob2obo2b2o$bo4bo2b2o2bobobob3o$bo4b2ob2o3bo5bobo$obobo2b2o3bo2b3ob5o$b
5o2bobob2o4b2obobo$5b2obo3b3o2bo2b2obo$ob2o2b3ob2o2bo4b2obo$3o2b2ob3ob
2o4b4obo$5bobobo2bo2b3ob2o$b4o5bo2b3o3bobo$bob2o3bo2bob5obo3bo$bobob2o
3b2o2b4obobo$3b5ob4ob4obo3bo$3b2ob6o2bobo3bobo$bobo2bob2o2bo2bob2obo2b
o$b2o3bob4o2bob3obo2bo$2o2b2ob3o2bobobobo3bo!
Side effect of reducing memory use, maybe? In Build 282, the pattern simulation does slow down quite a bit at T something above 40, but it always keeps going until it fills the frame.
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:I ran into a problem with this post. The pattern reliably gets permanently stuck at exactly T=36 in Build 287 in my (Chrome) browser, but continues with no problem in the current Build 282.
I've fixed it in Build 288 and the test case is here.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 288 is now available on the lazyslug server

Enhancements in this build:
  • colour Themes now have names
    • the [[ THEME ]] script command can take a theme number or name
    • the Help Information has a new "Themes" topic that lists the theme definitions
    • grid lines definition is also included in the Theme
  • added a few new aliases
  • improved Help information text wrapping
Fixes in this build:
  • fixed an issue with HROT/LtL von Neumann patterns not allocating a large enough border to cause grid to grow correctly
  • hex coordinates were wrong
  • COLOR DEAD is now the cell colour when it first dies and COLOR DEADRAMP is the colour it becomes after staying dead
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 289 is now available on the lazyslug server

Enhancements in this build:
  • improved handling of custom Theme definitions
    • for all Themes:
      • if ALIVE not specified then set it to the inverse of DEAD or the inverse of BACKGROUND or white
      • if both BACKGROUND and DEAD not specified then set BACKGROUND to the inverse of ALIVE or black
      • if DEAD not specified then set it to BACKGROUND
      • if DEADRAMP not specified then set it to DEAD
    • for 2-state Themes:
      • if ALIVERAMP not specified then set it to ALIVE
    • for multi-state Themes:
      • if DYING not specified then set DYING to step 2 of ALIVE to DYINGRAMP
      • if DYINGRAMP not specified then set it to DYING
  • added some more aliases
  • aliases with the same rule are marked with '*' in the Help information Aliases topic
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

This build should actually be a Release Candidate :D
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 290 is now available on the lazyslug server

Enhancements in this build:
  • added a Labels button to the bottom right menu to toggle label display
  • allow empty patterns
  • each Help topic is now in a separate page
  • Help topics page now has individual buttons for each topic
Fixes in this build:
  • added missing Help information for hotkey "K" and Shift "K"
  • copy view to clipboard (hotkey Shift and "K") now uses Theme names and handles custom Themes
  • remove "Life ended at" message when grid was empty when play started
This build is a Release Candidate.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

I think my recent spate of changes is done for now and it's probably time to release into the wild. I'll leave it in your capable hands Dave!
User avatar
dvgrn
Moderator
Posts: 12053
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Life tag testing

Post by dvgrn »

rowett wrote:I think my recent spate of changes is done for now and it's probably time to release into the wild. I'll leave it in your capable hands Dave!
I already forwarded the Release 290 announcement to Nathaniel. He seems like he must be mighty busy lately, since he didn't get around to the previous Release 286 link I sent -- but I suspect that he'll surface for air again sometime before the end of the weekend, and Release 290 will suddenly go public.

-- Looks like all of the Spate of Changes still has the same build number, since I'm seeing that it says "Release 290" in the subdivided Help system. Good idea; you might run out of numbers if you don't start conserving them... three-digit numbers, at least!
User avatar
Andrew
Moderator
Posts: 1073
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: Life tag testing

Post by Andrew »

dvgrn wrote:MCell's editing system avoided all this because selections worked differently. Dragging a selection rectangle with the mouse immediately put the contents of the box into "hover mode" (and changed the color as usual so you could see it was a selection.) You could then grab the hovering box at any point, not limited to corners or center, and drag it to wherever it was wanted. You could also run the rest of the pattern, and the selected cells would not participate for as long as they were selected.
I've written a Lua script (attached below) that attempts to emulate MCell-like selections. Give it a try and see if it might be useful. I'm happy to fix any problems or make improvements. Probably not practical for patterns with millions of cells but might come in handy (possibly as a prototype for an optional C++ editing mode in Golly).
Attachments
mcell-selection.lua.zip
Emulates MCell-like selections.
(6.49 KiB) Downloaded 10 times
Use Glu or Glui to explore CA rules on non-periodic tilings: DominoLife, HatLife, SpectreLife
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:Looks like all of the Spate of Changes still has the same build number, since I'm seeing that it says "Release 290" in the subdivided Help system.
I tend to only change the build number when I release it for testing. So if there are one or more fixes added to a previous build they will all go in the next build until I'm ready to release it.
User avatar
rowett
Moderator
Posts: 4597
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: Life tag testing

Post by rowett »

Build 291 is now available on the lazyslug server

Enhancements in this build:
  • Ltl/HROT patterns now use DELETERANGE when patterns reach the grid boundary
  • Zoom and Opacity sliders are wider when the Viewer is wider
This build is a Release Candidate.
User avatar
Andrew
Moderator
Posts: 1073
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: Life tag testing

Post by Andrew »

Me wrote:I've written a Lua script that attempts to emulate MCell-like selections.
I've just realized my script doesn't handle Cut/Copy/Paste the way that MCell does. Dave, let me know if you'd like me to make the necessary changes or if you'd like to have a go at doing them yourself.
Use Glu or Glui to explore CA rules on non-periodic tilings: DominoLife, HatLife, SpectreLife
Locked