amling search program principles discussion / brain dump

For scripts to aid with computation or simulation in cellular automata.
User avatar
confocaloid
Posts: 6697
Joined: February 8th, 2022, 3:15 pm
Location: learn to protect yourself against stray gliders and sparks and self-destruct mechanisms

Re: amling search program principles discussion / brain dump

Post by confocaloid » November 20th, 2024, 12:11 am

amling wrote:
November 19th, 2024, 10:08 pm
[...] Also that hex rules are way, way undertested [...]
Hex rules are underexplored and deserve more exploration. Most local activity is limited to square tiling, range 1 isotropic, and that might be a "historical accident" due to early support of the notation.
amling wrote:
November 19th, 2024, 9:02 pm
[...]
Sokwe wrote:
November 19th, 2024, 7:31 pm
[M]y ultimate goal here is writing a basic LLSSS tutorial for some of the simpler functions (e.g., running a search from zeros, extending a partial result, running a B0 search, etc.)
That's pretty scary given how rough it all is, how many crazy knobs and levers there are, and how often it all changes. It might be advisable to pin the tutorial to a specific version of the code.
[...]
I agree that it would be better to assume a specific version (and leave a way to get that version in future).

It would help to shift focus away from implementation details (which can change) and to the underlying concepts and ideas (which are more stable). Roughly speaking, ability to tell differences between UWI, NFA, INT and GCD is more important than details of specific command-line invocations.

(This comes from my earlier experiences of repeatedly trying to guess how to use some (unrelated) software tool, without a particularly good picture/understanding of what exactly I'm doing.
I don't like unnecessary obscurity. I would be perfectly happy with "only" a deep coherent intuitive understanding of all the big ideas and the existing possibilities, even without necessarily knowing details of how one would use the program to actually explore those possibilities.)
Sokwe wrote:
September 25th, 2021, 3:25 pm
[...]
Freywa wrote:
September 25th, 2021, 8:30 am
Specifically there needs to be a mention of all the tools that made all the patterns featured in this book possible.
I don't mean to speak for the authors, but it seems to me they've avoided talking much about particular Life software in favor of discussing the concepts on which the software would be based. For example, the ideas behind Jason Summers' and David Raucci's spark-assisted oscillator searches are essentially covered by section 3.4. A comprehensive account of how each pattern was found or how each result was achieved would likely expand the length of the book more than they're comfortable with, and would probably be a little too advanced for people new to Conway's Game of Life.
[...]
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.

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

Re: amling search program principles discussion / brain dump

Post by Sokwe » November 20th, 2024, 2:49 am

amling wrote:
November 19th, 2024, 1:07 pm
Trim the bad front and back which represent both disagreement between XY and UW rectangles ("!") and also disagreement between the doubled generations we ran due to ship decaying ("x" and "o").
When setting up, for example, a 2c4-s2s search there are columns with "!" cells, rather than rows. I assume that I should remove the exact same number of left-side columns in each block, whether they are "!" or " " columns. Likewise for right-side columns. For example, if I have this:

Code: Select all

| !!......................!!  | !!......................!!  |  !!......................!! |  !!......................!! |
| !!......................!!  | !!......................!!  |  !!......................!! |  !!......................!! |
| !!......................!!  | !!......................!!  |  !!......................!! |  !!............*.........!! |
| !!......................!!  | !!......................!!  |  !!...........***........!! |  !!..........*...*.......!! |
| !!...........**.........!!  | !!..........*****.......!!  |  !!..........*****.......!! |  !!.........*............!! |
| !!..........**.***......!!  | !!..........*....*......!!  |  !!.........**.***.......!! |  !!.........*....*.......!! |
| !!...........*****......!!  | !!..........*...........!!  |  !!..........**..........!! |  !!.........*****........!! |
| !!............***.......!!  | !!...........*...*......!!  |  !!......................!! |  !!......................!! |
| !!......................!!  | !!..............*.......!!  |  !!.............*........!! |  !!......................!! |
| !!..............*.......!!  | !!.............***......!!  |  !!............*..*......!! |  !!............*.........!! |
| !!............**.**.....!!  | !!............**..*.....!!  |  !!............**.*......!! |  !!...........*.*........!! |
| !!............*..**.....!!  | !!...........*..........!!  |  !!...........*.*........!! |  !!..........**.**.......!! |
| !!............****......!!  | !!............*...*.....!!  |  !!..........**..........!! |  !!...........**.........!! |
| !!.........*...**.......!!  | !!.........**....*......!!  |  !!........***...........!! |  !!.......**.............!! |
| !!........*.****........!!  | !!.......**.**..........!!  |  !!.......**..*..........!! |  !!......*....*..........!! |
| !!.......**...**........!!  | !!.......*..*...........!!  |  !!......**.**.*.........!! |  !!......*..**.*.........!! |
| !!........**...*.*......!!  | !!.......*...*.*.**.....!!  |  !!.......*...**.........!! |  !!......**..............!! |
| !!.........***...**.....!!  | !!........***.*.........!!  |  !!........******........!! |  !!........***..**.......!! |
| !!.............*.**.....!!  | !!..............***.....!!  |  !!..............**......!! |  !!..............*.......!! |
| !!.........****.........!!  | !!........*******.......!!  |  !!........*****.........!! |  !!........****..........!! |
| !!........**...*........!!  | !!.......*.....*........!!  |  !!.......*..............!! |  !!......**..............!! |
| !!.......**..**.........!!  | !!.......*..****........!!  |  !!......**.**...*.......!! |  !!......*..**...........!! |
| !!........*.*.*.........!!  | !!.......**.*.**........!!  |  !!.......**.*..*........!! |  !!......*...*...........!! |
| !!.........*.*..*.......!!  | !!.........*............!!  |  !!........**............!! |  !!.......**..**.........!! |
| !!...........**.*.......!!  | !!..........****........!!  |  !!..........**.*........!! |  !!..........***.........!! |
| !!......................!!  | !!............**........!!  |  !!..........*..*........!! |  !!..........*...........!! |
| !!..........*.*.........!!  | !!...........*..........!!  |  !!...........*..........!! |  !!.........**...........!! |
| !!.........*..*.........!!  | !!.........***..........!!  |  !!........**............!! |  !!........**............!! |
I would remove 3 columns on either side of each block to get this:

Code: Select all

| ..................... | ..................... | ..................... | ..................... |
| ..................... | ..................... | ..................... | ..................... |
| ..................... | ..................... | ..................... | ............*........ |
| ..................... | ..................... | ...........***....... | ..........*...*...... |
| ..........**......... | .........*****....... | ..........*****...... | .........*........... |
| .........**.***...... | .........*....*...... | .........**.***...... | .........*....*...... |
| ..........*****...... | .........*........... | ..........**......... | .........*****....... |
| ...........***....... | ..........*...*...... | ..................... | ..................... |
| ..................... | .............*....... | .............*....... | ..................... |
| .............*....... | ............***...... | ............*..*..... | ............*........ |
| ...........**.**..... | ...........**..*..... | ............**.*..... | ...........*.*....... |
| ...........*..**..... | ..........*.......... | ...........*.*....... | ..........**.**...... |
| ...........****...... | ...........*...*..... | ..........**......... | ...........**........ |
| ........*...**....... | ........**....*...... | ........***.......... | .......**............ |
| .......*.****........ | ......**.**.......... | .......**..*......... | ......*....*......... |
| ......**...**........ | ......*..*........... | ......**.**.*........ | ......*..**.*........ |
| .......**...*.*...... | ......*...*.*.**..... | .......*...**........ | ......**............. |
| ........***...**..... | .......***.*......... | ........******....... | ........***..**...... |
| ............*.**..... | .............***..... | ..............**..... | ..............*...... |
| ........****......... | .......*******....... | ........*****........ | ........****......... |
| .......**...*........ | ......*.....*........ | .......*............. | ......**............. |
| ......**..**......... | ......*..****........ | ......**.**...*...... | ......*..**.......... |
| .......*.*.*......... | ......**.*.**........ | .......**.*..*....... | ......*...*.......... |
| ........*.*..*....... | ........*............ | ........**........... | .......**..**........ |
| ..........**.*....... | .........****........ | ..........**.*....... | ..........***........ |
| ..................... | ...........**........ | ..........*..*....... | ..........*.......... |
| .........*.*......... | ..........*.......... | ...........*......... | .........**.......... |
| ........*..*......... | ........***.......... | ........**........... | ........**........... |
Is that correct?

Then, if I want to run an ordinary LLSSS search, would I place the '?' cells in the exact same relative location in each block before running "rlife grid-tool from-uwi 2c4-s2s"?

I tried all this as I described and it seemed to work, but I want to make sure I'm doing the right things for the right reasons and not just getting lucky.
amling wrote:
November 19th, 2024, 9:02 pm
Sokwe wrote:
November 19th, 2024, 7:31 pm
[M]y ultimate goal here is writing a basic LLSSS tutorial for some of the simpler functions (e.g., running a search from zeros, extending a partial result, running a B0 search, etc.)
That's pretty scary given how rough it all is, how many crazy knobs and levers there are, and how often it all changes. It might be advisable to pin the tutorial to a specific version of the code.
Setups for simple searches aren't changing much, so I'm not too worried. I've also been waiting to write the tutorial until after I understand the search setups better and have made suggestions on how to make the setups easier. For example, the '@zero' argument makes basic from-zero searches trivial to set up when they were mildly difficult before, and I'm glad I didn't write the tutorial before this feature was added.

Speaking of '@zero', it would be nice to have a version for B0 rules. Obviously, there are two different setups depending on whether the first generation has an alive background or a dead background. I was wondering if the following could be used to put both setups in the same search, but if so I wasn't clever enough to figure out how.
amling wrote:
October 31st, 2024, 10:32 pm
Unfortunately WAO doesn't work with wildcards (it's on my radar but that WAO init code is extremely, extremely complicated and wildcards are going to make it even worse). I have instead special-cased a column of solid exclamation points to be understood as a splitting point.
I'm also wondering if the autochoke feature will be added to the master branch. Are there any downsides to including autochoke? I find the feature very useful for my low-spec laptop.
confocaloid wrote:
November 20th, 2024, 12:11 am
It would help to shift focus away from implementation details (which can change) and to the underlying concepts and ideas (which are more stable).
This is fine for a mainspace LLSSS article on the wiki, but any tutorial is going to be specifically about how to use Amling's LLSSS program with minimal discussion of underlying concepts.
hotcrystal0 wrote:
November 19th, 2024, 9:39 pm
Does LLSSS work in B3/S23 only? If not, what rules does it work in?
Use the "--rule" option to set the rule. For example, to run a recentering search for an odd-symmetric c/3 orthogonal ship of logical "width" 8 in Highlife (B36/S23), you can run

Code: Select all

 rlife llsss-recentering-wao --wao-left-pad 00 --wao-right-pad 00 --wao-idx ALL --rule 'B36/S23' c3-f2b '@zero' --ends zero_and_halt --left-edge odd 8
-Matthias Merzenich

amling
Posts: 1154
Joined: April 2nd, 2020, 9:47 pm

Re: amling search program principles discussion / brain dump

Post by amling » November 20th, 2024, 3:34 am

Sokwe wrote:
November 20th, 2024, 2:49 am
When setting up, for example, a 2c4-s2s search there are columns with "!" cells, rather than rows. I assume that I should remove the exact same number of left-side columns in each block, whether they are "!" or " " columns. Likewise for right-side columns. For example, if I have this:

Code: Select all

...
I would remove 3 columns on either side of each block to get this:

Code: Select all

...
Is that correct?

Then, if I want to run an ordinary LLSSS search, would I place the '?' cells in the exact same relative location in each block before running "rlife grid-tool from-uwi 2c4-s2s"?

I tried all this as I described and it seemed to work, but I want to make sure I'm doing the right things for the right reasons and not just getting lucky.
Yeah, based on the relative positions that first view is a UWI view and so yes, it should be trimmed to a rectangle (or rather matching rectangles in each block) and matching rectangles of question marks should be added. Generally the name of the game is "make UVW prisms" or, as it shakes out in the UWI view, "make corresponding UW rectangles".
Sokwe wrote:
November 20th, 2024, 2:49 am
Speaking of '@zero', it would be nice to have a version for B0 rules. Obviously, there are two different setups depending on whether the first generation has an alive background or a dead background. I was wondering if the following could be used to put both setups in the same search, but if so I wasn't clever enough to figure out how.
amling wrote:
October 31st, 2024, 10:32 pm
Unfortunately WAO doesn't work with wildcards (it's on my radar but that WAO init code is extremely, extremely complicated and wildcards are going to make it even worse). I have instead special-cased a column of solid exclamation points to be understood as a splitting point.
I don't see how wildcards could really help here. In particular, even if they were implemented in the obvious fashion there is no way to force matches between spines and so even if you've forced cells to match up/down you've still made the search state of "all possible vertical stripes".

As edges are allowed to have multiple values and the contents of center could prevent illegal mixing of mismatched phases, I think I could craft a search state representing the completely disjoint union of the starts for the two phases of the p2 agar, but unfortunately there is no grid that could be input to the current code to produce it. It's not inconceivable we could allow initial search states to be built as the union of multiple grids, but I am generally pessimistic about this entire B0 business because so much is changed and complicated by the presence of the background agar: you need different edges, you need different ends, you need to understand this phasing business for using WAO/WCAF, etc.
Sokwe wrote:
November 20th, 2024, 2:49 am
I'm also wondering if the autochoke feature will be added to the master branch. Are there any downsides to including autochoke? I find the feature very useful for my low-spec laptop.
Unclear. There were two version:

The one based on rewriting recentering to do exact expansion which is drifting further and further away and I'm a little hesitant to ship due to how it changes expansion. This is the one that bisects in mid_steps and I assume is what you've been testing with.

The one based on current recentering which shrunk one mid_steps at a time and was extremely, extremely slow. This would be a smaller change for normal searches to searches (i.e. none), and probably only a modest cost to the code, but is of course very slow.

I had turned my attention to other pursuits since I wasn't really sure what to do about these.

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

Re: amling search program principles discussion / brain dump

Post by Sokwe » November 20th, 2024, 4:03 am

amling wrote:
November 20th, 2024, 3:34 am
Sokwe wrote:
November 20th, 2024, 2:49 am
Speaking of '@zero', it would be nice to have a version for B0 rules. Obviously, there are two different setups depending on whether the first generation has an alive background or a dead background. I was wondering if the following could be used to put both setups in the same search, but if so I wasn't clever enough to figure out how.
amling wrote:
October 31st, 2024, 10:32 pm
Unfortunately WAO doesn't work with wildcards (it's on my radar but that WAO init code is extremely, extremely complicated and wildcards are going to make it even worse). I have instead special-cased a column of solid exclamation points to be understood as a splitting point.
I don't see how wildcards could really help here. In particular, even if they were implemented in the obvious fashion there is no way to force matches between spines and so even if you've forced cells to match up/down you've still made the search state of "all possible vertical stripes".

As edges are allowed to have multiple values and the contents of center could prevent illegal mixing of mismatched phases, I think I could craft a search state representing the completely disjoint union of the starts for the two phases of the p2 agar, but unfortunately there is no grid that could be input to the current code to produce it. It's not inconceivable we could allow initial search states to be built as the union of multiple grids, but I am generally pessimistic about this entire B0 business because so much is changed and complicated by the presence of the background agar: you need different edges, you need different ends, you need to understand this phasing business for using WAO/WCAF, etc.
If it's in any way complicated to combine both starting phases in the same search, then don't bother. It would however be nice to have something like '@B0-zero:0' and '@B0-zero:1' representing the two different starting phases to make from-zero search setup for strobing rules easy.

On that note, here is an update to the lua script that works properly with strobing rules (Edit: minor update to prevent it from copying a view slightly larger than the selected box):

Code: Select all

-- llsss-setup.lua
-- Select a pattern in Golly, run this script,
-- and the initial LLSSS phase chart for the 
-- pattern will be copied to the clipboard.
-- 
-- See the following link for further setup instructions:
--   https://conwaylife.com/forums/viewtopic.php?p=198188#p198188

local g = golly()
r = g.getselrect()
a = {}

if #r == 0 then
  g.warn("Error: no selection.")
  g.exit()
end

local p = tonumber(g.getstring("Enter the period."))
if p == nil or p ~= math.floor(p) or p <= 0 then
  g.warn("Error: period must be a positive integer.")
  g.exit()
end

for z = 1, 2*p do
  s = ""
  for y = 0, r[4]-1 do
    for x = 0, r[3]-1 do
      if g.getcell(x+r[1], y + r[2]) == 1 then
        if g.getrule():sub(1, 2) == "B0" and tonumber(g.getgen()) % 2 == 1 then
          s = s.."."
        else
          s = s.."*"
        end
      else
        if g.getrule():sub(1, 2) == "B0" and tonumber(g.getgen()) % 2 == 1 then
          s = s.."*"
        else
          s = s.."."
        end
      end
    end
    s = s.."\n"
  end
  a[z] = s
  g.run(1)
end

s = ""

for y = 1, r[4] do
  for z = 1, 2*p do
    theLines = {}
    for line in a[z]:gmatch("[^\n]+") do
      table.insert(theLines, line)
    end
    s = s.."| "..theLines[y].." "
  end
  s = s.."|\n"
end

g.setclipstr(s)
amling wrote:
November 20th, 2024, 3:34 am
Sokwe wrote:
November 20th, 2024, 2:49 am
I'm also wondering if the autochoke feature will be added to the master branch. Are there any downsides to including autochoke? I find the feature very useful for my low-spec laptop.
Unclear. There were two version:

The one based on rewriting recentering to do exact expansion which is drifting further and further away and I'm a little hesitant to ship due to how it changes expansion. This is the one that bisects in mid_steps and I assume is what you've been testing with.

The one based on current recentering which shrunk one mid_steps at a time and was extremely, extremely slow. This would be a smaller change for normal searches to searches (i.e. none), and probably only a modest cost to the code, but is of course very slow.
Yes, I was using the "exact expansion" version. I think it has some nice use cases beyond just memory reduction, but if it negatively impacts searches for others or results in difficult code maintenance, then it maybe shouldn't be added to the master branch. Regardless, I'll probably keep using it, because it's extremely useful given my limited memory.
-Matthias Merzenich

amling
Posts: 1154
Joined: April 2nd, 2020, 9:47 pm

Re: amling search program principles discussion / brain dump

Post by amling » November 20th, 2024, 4:39 am

Sokwe wrote:
November 20th, 2024, 4:03 am
amling wrote:
November 20th, 2024, 3:34 am
I am generally pessimistic about this entire B0 business because so much is changed and complicated by the presence of the background agar: you need different edges, you need different ends, you need to understand this phasing business for using WAO/WCAF, etc.
If it's in any way complicated to combine both starting phases in the same search, then don't bother. It would however be nice to have something like '@B0-zero:0' and '@B0-zero:1' representing the two different starting phases to make from-zero search setup for strobing rules easy.
Agar searches are really, really complicated and even just for the p2 B0 agar it's worse than just "it's two phases". We of course need V to be compatible with the agar namely have an even T component, but I think some weird things can happen with geometries depending on if U and W have even or odd T components.

If W's T component is even it means you might not need to run both phases as they are both represented? This is definitely the case for e.g. p2 but I would need to think about it to convince myself for the general case.

If U's T component is odd (e.g. "twisted" raw geometries) it means it switches phase and so your grid needs to be one wider than you might otherwise think. This also means you cover both phases on the first W row and so I think even if W's T value was odd you might not need to run two separate phases (they'd have the same 2 AF2-width transitions just in the other order).

It's been easy enough for me to look at a specific geometry and decide what to do when running searches, but I am a little worried about trying to encode the general principle.

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

Re: amling search program principles discussion / brain dump

Post by Sokwe » November 20th, 2024, 4:47 am

amling wrote:
November 20th, 2024, 4:39 am
Sokwe wrote:
November 20th, 2024, 4:03 am
It would be nice to have something like '@B0-zero:0' and '@B0-zero:1' representing the two different starting phases to make from-zero search setup for strobing rules easy.
It's been easy enough for me to look at a specific geometry and decide what to do when running searches, but I am a little worried about trying to encode the general principle.
Ah, never mind then. I was not aware of how complicated it is. I don't really run strobing searches myself, so I was making some assumptions. I don't think strobing search capabilities are in high demand at any rate, so it's not a big deal.
-Matthias Merzenich

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

Re: amling search program principles discussion / brain dump

Post by Sokwe » November 22nd, 2024, 5:02 am

For some reason I'm having trouble getting glide-symmetric searches to work. I thought I would only need to add "--left-edge reflect:gse" (and "--wao-left-edge-errors" in a WAO search), but I get the error

Code: Select all

thread 'main' panicked at src/entry.rs:286:18
Here is example input:

Code: Select all

./rlife llsss 2c4-f2b '@zero:12' --rule 'B3/S23' --left-edge reflect:gse --filters wcaf 0 0 0
It runs fine if "reflect:gse" is replaced with "odd" or "even".

Edit: corrected example input.
-Matthias Merzenich

amling
Posts: 1154
Joined: April 2nd, 2020, 9:47 pm

Re: amling search program principles discussion / brain dump

Post by amling » November 22nd, 2024, 1:04 pm

Sokwe wrote:
November 22nd, 2024, 5:02 am
For some reason I'm having trouble getting glide-symmetric searches to work. I thought I would only need to add "--left-edge reflect:gse" (and "--wao-left-edge-errors" in a WAO search), but I get the error

Code: Select all

thread 'main' panicked at src/entry.rs:286:18
Here is example input:

Code: Select all

./rlife llsss 2c4-f2b '@zero' --rule 'B3/S23' --left-edge reflect:gse --filters wcaf 0 0 0
It runs fine if "reflect:gse" is replaced with "odd" or "even".
I think that example input has a different problem ("llsss" and "@zero" don't go together), although either way the answer to the original question about edge is that it's just "--left-edge gse". The "reflect:" prefix used to select a distinct, fully geometry-generic symmetric edge implementation which was aligned slightly differently than all the unprefixed ones (which were a little hacky and specific to typical orthogonal geometries). Eventually I decided to fix that and promote it so now the prefix is gone and it's all the fully geometry-generic code.

amling
Posts: 1154
Joined: April 2nd, 2020, 9:47 pm

Re: amling search program principles discussion / brain dump

Post by amling » November 24th, 2024, 4:26 pm

Sokwe wrote:
November 22nd, 2024, 5:02 am
For some reason I'm having trouble getting glide-symmetric searches to work. I thought I would only need to add "--left-edge reflect:gse" (and "--wao-left-edge-errors" in a WAO search), but I get the error...
I thought a bit more about it and decided to unify the argument conversion code so I could make improvements to them all together. Now somewhere in the output for the above command is:

Code: Select all

No such edge implementation: "reflect"
Available:
   pic:...
   grid:grid_file[str]:...
   zero
   even
   odd
   gutter
   gse
   gso
   cycle:w_size[usize]
   kgram:w_lookback[usize]:grid_file[str]
   pd:k[isize]:...
   any
I wouldn't call it "documentation" or even "help", but it's at least something. Similar displays should be produced for other types of arguments ("filters", "closures", "partials", etc.).

amling
Posts: 1154
Joined: April 2nd, 2020, 9:47 pm

Re: amling search program principles discussion / brain dump

Post by amling » November 25th, 2024, 4:57 am

Sokwe wrote:
November 25th, 2024, 1:04 am
Unfortunately, the llsss-recentering searches sometimes drift into the output spaceship stream:

Code: Select all

(snip)
I don't know of any way to avoid this in a recentering search.
There are a few possibilities but they are all some combination of painful and ineffective:

(*) Do nothing in setup and just post-filter partials and results. This head-in-sand technique is still relevant and viable for search projects in general that I use it often enough in comparable situations.

(*) You can re-orient W to be along the wave (of photons) and then used a fixed right edge. Probably going to be a very ugly geometry with terrible performance.

(*) You could try to use a fuzzy right edge to make any slice into the wave free, although you'd want to sketch the wave in your input picture down a bunch of W rows and this does allow interacting with the wave (as long as it's restored below). If the search reaches the end of the W rows of the wave sketched it would stop being able to extend those columns (except for partials which are present there and can act as a bottom for the wave) and so be unable to expand into them (and thus never wander right of that point). This might be acceptable.

(*) You could use a constraint (grid) to enforce zeros where the wave needs to go. You'd only be able to constrain however many W rows you include in the constraint grid file, but you can presumably accept the risk that it veers too far right after that if you make it sufficiently long. This is probably the best choice among those that actually do anything although I understand it is a bit on the tedious side.

As an example for the last, with 1.in:

Code: Select all

|                                      |                                      | LLLuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuRRR | LLLuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuRRR |
| LLLuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuRRR | LLLuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuRRR | .................................... | ...*..*............................. |
| ....*............................... | .................................... | ....*.*............................. | .......*............................ |
| ..........*......................... | ...***.............................. |                                      |                                      |
and 1.cstr:

Code: Select all

|                                      |                                      | LLLuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuRRR | LLLuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuRRR |
| LLLuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuRRR | LLLuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuRRR | WWWWWWWWWWWWW....................... | WWWWWWWWWWWWW....................... |
| WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWW....................... | WWWWWWWWWWWWW....................... | WWWWWWWWWWWWW....................... |
| WWWWWWWWWWWWW....................... | WWWWWWWWWWWWW....................... | WWWWWWWWWWWW........................ | WWWWWWWWWWWWW....................... |
| WWWWWWWWWWWWW....................... | WWWWWWWWWWWWW....................... | WWWWWWWWWWWW........................ | WWWWWWWWWWWWW....................... |
| WWWWWWWWWWWWW....................... | WWWWWWWWWWWWW....................... | WWWWWWWWWWWW........................ | WWWWWWWWWWWWW....................... |
| WWWWWWWWWWWWW....................... | WWWWWWWWWWWWW....................... | WWWWWWWWWWWW........................ | WWWWWWWWWWWWW....................... |
| WWWWWWWWWWWWW....................... | WWWWWWWWWWWWW....................... | WWWWWWWWWWWW........................ | WWWWWWWWWWWWW....................... |
| WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWW....................... | WWWWWWWWWWWWW....................... | WWWWWWWWWWWWW....................... |
| WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWW....................... | WWWWWWWWWWWWW....................... |
| WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWW....................... |
| WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWWW...................... |
| WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWWW...................... |
| WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWWW...................... |
| WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWWW...................... |
| WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWW...................... | WWWWWWWWWWWWWW...................... |
| WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWW...................... |
| WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWWW..................... |
| WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWWW..................... |
| WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWWW..................... |
| WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWWW..................... |
| WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWW..................... | WWWWWWWWWWWWWWW..................... |
| WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWW..................... |
| WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWWW.................... |
| WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWWW.................... |
| WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWWW.................... |
| WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWWW.................... |
| WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWW.................... | WWWWWWWWWWWWWWWW.................... |
| WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWW.................... |
| WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWWW................... |
| WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWWW................... |
| WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWWW................... |
| WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWWW................... |
| WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWW................... | WWWWWWWWWWWWWWWWW................... |
| WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWW................... |
| WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWWW.................. |
| WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWWW.................. |
| WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWWW.................. |
| WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWWW.................. |
| WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWW.................. | WWWWWWWWWWWWWWWWWW.................. |
| WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWW.................. |
| WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWWW................. |
| WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWWW................. |
| WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWWW................. |
| WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWWW................. |
| WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWW................. | WWWWWWWWWWWWWWWWWWW................. |
| WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWW................. |
| WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWWW................ |
| WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWWW................ |
| WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWWW................ |
| WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWWW................ |
| WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWW................ | WWWWWWWWWWWWWWWWWWWW................ |
| WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWW................ |
| WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWWW............... |
| WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWWW............... |
| WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWWW............... |
| WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWWW............... |
| WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWW............... | WWWWWWWWWWWWWWWWWWWWW............... |
| WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWW............... |
| WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWWW.............. |
| WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWWW.............. |
| WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWWW.............. |
| WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWWW.............. |
| WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWW.............. | WWWWWWWWWWWWWWWWWWWWWW.............. |
| WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWW.............. |
| WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWWW............. |
| WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWWW............. |
| WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWWW............. |
| WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWWW............. |
| WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWW............. | WWWWWWWWWWWWWWWWWWWWWWW............. |
| WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWW............. |
| WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWWW............ |
| WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWWW............ |
| WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWWW............ |
| WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWWW............ |
| WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWW............ | WWWWWWWWWWWWWWWWWWWWWWWW............ |
| WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWW............ |
| WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWWW........... |
| WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWWW........... |
| WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWWW........... |
| WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWWW........... |
| WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWW........... | WWWWWWWWWWWWWWWWWWWWWWWWW........... |
| WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWW........... |
| WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... |
| WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... |
| WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWW.......... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWW......... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWW........ |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWW....... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW...... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW..... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW... |
| WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW... | WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW... |                                      |                                      |
...you might run:

Code: Select all

rlife llsss-recentering c4k-1 --rule 'B25678/S4578' 1.in --constraint grid:1.cstr:none 15
This constraint is a possible split from one of the above partials combined with my estimate of the constrained 2x2 blocks of zeros around the photon wave sufficient to protect it. Note in particular the root labels of 1.in and 1.cstr match exactly (constraints are applied by matching root labels, for which they must be consistent, and not by the actual shape of the grid). The "none" in "grid:1.cstr:none" is what constraint should be applied to cells past the (bottom) end of the grid.
Last edited by amling on November 26th, 2024, 4:34 pm, edited 1 time in total.

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

Re: amling search program principles discussion / brain dump

Post by Sokwe » November 25th, 2024, 10:13 pm

amling wrote:
November 25th, 2024, 4:57 am
You could use a constraint (grid) to enforce zeros where the wave needs to go. You'd only be able to constrain however many W rows you include in the constraint grid file, but you can presumably accept the risk that it veers too far right after that if you make it sufficiently long. This is probably the best choice among those that actually doing anything although I understand it is a bit on the tedious side.
Thanks, this is exactly what I was looking for. Just for clarification, do the constraint file rows start at the row immediately below the last row in the input file, or do they overlap with the input file rows?
-Matthias Merzenich

amling
Posts: 1154
Joined: April 2nd, 2020, 9:47 pm

Re: amling search program principles discussion / brain dump

Post by amling » November 25th, 2024, 11:12 pm

Sokwe wrote:
November 25th, 2024, 10:13 pm
amling wrote:
November 25th, 2024, 4:57 am
You could use a constraint (grid) to enforce zeros where the wave needs to go. You'd only be able to constrain however many W rows you include in the constraint grid file, but you can presumably accept the risk that it veers too far right after that if you make it sufficiently long. This is probably the best choice among those that actually doing anything although I understand it is a bit on the tedious side.
Thanks, this is exactly what I was looking for. Just for clarification, do the constraint file rows start at the row immediately below the last row in the input file, or do they overlap with the input file rows?
The should be aligned as if they overlap starting from the front. In fact, I generated both the input and the constraint from this one combined view and find/replace commands:

Code: Select all

|                                      |                                      | LLLuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuRRR | LLLuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuRRR |
| LLLuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuRRR | LLLuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuRRR | .............xxxxxxxxxxxxxxxxxxxxxxx | ...*..*......xxxxxxxxxxxxxxxxxxxxxxx |
| ....*.........xxxxxxxxxxxxxxxxxxxxxx | .............xxxxxxxxxxxxxxxxxxxxxxx | ....*.*......xxxxxxxxxxxxxxxxxxxxxxx | .......*.....xxxxxxxxxxxxxxxxxxxxxxx |
| ..........*..xxxxxxxxxxxxxxxxxxxxxxx | ...***.......xxxxxxxxxxxxxxxxxxxxxxx | ????????????xxxxxxxxxxxxxxxxxxxxxxxx | ?????????????xxxxxxxxxxxxxxxxxxxxxxx |
| ?????????????xxxxxxxxxxxxxxxxxxxxxxx | ?????????????xxxxxxxxxxxxxxxxxxxxxxx | ????????????xxxxxxxxxxxxxxxxxxxxxxxx | ?????????????xxxxxxxxxxxxxxxxxxxxxxx |
| ?????????????xxxxxxxxxxxxxxxxxxxxxxx | ?????????????xxxxxxxxxxxxxxxxxxxxxxx | ????????????xxxxxxxxxxxxxxxxxxxxxxxx | ?????????????xxxxxxxxxxxxxxxxxxxxxxx |
| ?????????????xxxxxxxxxxxxxxxxxxxxxxx | ?????????????xxxxxxxxxxxxxxxxxxxxxxx | ????????????xxxxxxxxxxxxxxxxxxxxxxxx | ?????????????xxxxxxxxxxxxxxxxxxxxxxx |
| ?????????????xxxxxxxxxxxxxxxxxxxxxxx | ?????????????xxxxxxxxxxxxxxxxxxxxxxx | ????????????xxxxxxxxxxxxxxxxxxxxxxxx | ?????????????xxxxxxxxxxxxxxxxxxxxxxx |
| ??????????????xxxxxxxxxxxxxxxxxxxxxx | ?????????????xxxxxxxxxxxxxxxxxxxxxxx | ?????????????xxxxxxxxxxxxxxxxxxxxxxx | ?????????????xxxxxxxxxxxxxxxxxxxxxxx |
| ??????????????xxxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx | ?????????????xxxxxxxxxxxxxxxxxxxxxxx | ?????????????xxxxxxxxxxxxxxxxxxxxxxx |
| ??????????????xxxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx | ?????????????xxxxxxxxxxxxxxxxxxxxxxx |
| ??????????????xxxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx |
| ??????????????xxxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx |
| ??????????????xxxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx |
| ???????????????xxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx |
| ???????????????xxxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx |
| ???????????????xxxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx | ??????????????xxxxxxxxxxxxxxxxxxxxxx |
| ???????????????xxxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx |
| ???????????????xxxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx |
| ???????????????xxxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx |
| ????????????????xxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx |
| ????????????????xxxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx |
| ????????????????xxxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx | ???????????????xxxxxxxxxxxxxxxxxxxxx |
| ????????????????xxxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx |
| ????????????????xxxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx |
| ????????????????xxxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx |
| ?????????????????xxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx |
| ?????????????????xxxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx |
| ?????????????????xxxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx | ????????????????xxxxxxxxxxxxxxxxxxxx |
| ?????????????????xxxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx |
| ?????????????????xxxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx |
| ?????????????????xxxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx |
| ??????????????????xxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx |
| ??????????????????xxxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx |
| ??????????????????xxxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx | ?????????????????xxxxxxxxxxxxxxxxxxx |
| ??????????????????xxxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx |
| ??????????????????xxxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx |
| ??????????????????xxxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx |
| ???????????????????xxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx |
| ???????????????????xxxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx |
| ???????????????????xxxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx | ??????????????????xxxxxxxxxxxxxxxxxx |
| ???????????????????xxxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx |
| ???????????????????xxxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx |
| ???????????????????xxxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx |
| ????????????????????xxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx |
| ????????????????????xxxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx |
| ????????????????????xxxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx | ???????????????????xxxxxxxxxxxxxxxxx |
| ????????????????????xxxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx |
| ????????????????????xxxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx |
| ????????????????????xxxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx |
| ?????????????????????xxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx |
| ?????????????????????xxxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx |
| ?????????????????????xxxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx | ????????????????????xxxxxxxxxxxxxxxx |
| ?????????????????????xxxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx |
| ?????????????????????xxxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx |
| ?????????????????????xxxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx |
| ??????????????????????xxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx |
| ??????????????????????xxxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx |
| ??????????????????????xxxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx | ?????????????????????xxxxxxxxxxxxxxx |
| ??????????????????????xxxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx |
| ??????????????????????xxxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx |
| ??????????????????????xxxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx |
| ???????????????????????xxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx |
| ???????????????????????xxxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx |
| ???????????????????????xxxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx | ??????????????????????xxxxxxxxxxxxxx |
| ???????????????????????xxxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx |
| ???????????????????????xxxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx |
| ???????????????????????xxxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx |
| ????????????????????????xxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx |
| ????????????????????????xxxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx |
| ????????????????????????xxxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx | ???????????????????????xxxxxxxxxxxxx |
| ????????????????????????xxxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx |
| ????????????????????????xxxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx |
| ????????????????????????xxxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx |
| ?????????????????????????xxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx |
| ?????????????????????????xxxxxxxxxxx | ?????????????????????????xxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx |
| ?????????????????????????xxxxxxxxxxx | ?????????????????????????xxxxxxxxxxx | ?????????????????????????xxxxxxxxxxx | ????????????????????????xxxxxxxxxxxx |
| ?????????????????????????xxxxxxxxxxx | ?????????????????????????xxxxxxxxxxx | ?????????????????????????xxxxxxxxxxx | ?????????????????????????xxxxxxxxxxx |
| ?????????????????????????xxxxxxxxxxx | ?????????????????????????xxxxxxxxxxx | ?????????????????????????xxxxxxxxxxx | ?????????????????????????xxxxxxxxxxx |
| ?????????????????????????xxxxxxxxxxx | ?????????????????????????xxxxxxxxxxx | ?????????????????????????xxxxxxxxxxx | ?????????????????????????xxxxxxxxxxx |
| ??????????????????????????xxxxxxxxxx | ?????????????????????????xxxxxxxxxxx | ?????????????????????????xxxxxxxxxxx | ?????????????????????????xxxxxxxxxxx |
| ??????????????????????????xxxxxxxxxx | ??????????????????????????xxxxxxxxxx | ?????????????????????????xxxxxxxxxxx | ?????????????????????????xxxxxxxxxxx |
| ??????????????????????????xxxxxxxxxx | ??????????????????????????xxxxxxxxxx | ??????????????????????????xxxxxxxxxx | ?????????????????????????xxxxxxxxxxx |
| ??????????????????????????xxxxxxxxxx | ??????????????????????????xxxxxxxxxx | ??????????????????????????xxxxxxxxxx | ??????????????????????????xxxxxxxxxx |
| ??????????????????????????xxxxxxxxxx | ??????????????????????????xxxxxxxxxx | ??????????????????????????xxxxxxxxxx | ??????????????????????????xxxxxxxxxx |
| ??????????????????????????xxxxxxxxxx | ??????????????????????????xxxxxxxxxx | ??????????????????????????xxxxxxxxxx | ??????????????????????????xxxxxxxxxx |
| ???????????????????????????xxxxxxxxx | ??????????????????????????xxxxxxxxxx | ??????????????????????????xxxxxxxxxx | ??????????????????????????xxxxxxxxxx |
| ???????????????????????????xxxxxxxxx | ???????????????????????????xxxxxxxxx | ??????????????????????????xxxxxxxxxx | ??????????????????????????xxxxxxxxxx |
| ???????????????????????????xxxxxxxxx | ???????????????????????????xxxxxxxxx | ???????????????????????????xxxxxxxxx | ??????????????????????????xxxxxxxxxx |
| ???????????????????????????xxxxxxxxx | ???????????????????????????xxxxxxxxx | ???????????????????????????xxxxxxxxx | ???????????????????????????xxxxxxxxx |
| ???????????????????????????xxxxxxxxx | ???????????????????????????xxxxxxxxx | ???????????????????????????xxxxxxxxx | ???????????????????????????xxxxxxxxx |
| ???????????????????????????xxxxxxxxx | ???????????????????????????xxxxxxxxx | ???????????????????????????xxxxxxxxx | ???????????????????????????xxxxxxxxx |
| ????????????????????????????xxxxxxxx | ???????????????????????????xxxxxxxxx | ???????????????????????????xxxxxxxxx | ???????????????????????????xxxxxxxxx |
| ????????????????????????????xxxxxxxx | ????????????????????????????xxxxxxxx | ???????????????????????????xxxxxxxxx | ???????????????????????????xxxxxxxxx |
| ????????????????????????????xxxxxxxx | ????????????????????????????xxxxxxxx | ????????????????????????????xxxxxxxx | ???????????????????????????xxxxxxxxx |
| ????????????????????????????xxxxxxxx | ????????????????????????????xxxxxxxx | ????????????????????????????xxxxxxxx | ????????????????????????????xxxxxxxx |
| ????????????????????????????xxxxxxxx | ????????????????????????????xxxxxxxx | ????????????????????????????xxxxxxxx | ????????????????????????????xxxxxxxx |
| ????????????????????????????xxxxxxxx | ????????????????????????????xxxxxxxx | ????????????????????????????xxxxxxxx | ????????????????????????????xxxxxxxx |
| ?????????????????????????????xxxxxxx | ????????????????????????????xxxxxxxx | ????????????????????????????xxxxxxxx | ????????????????????????????xxxxxxxx |
| ?????????????????????????????xxxxxxx | ?????????????????????????????xxxxxxx | ????????????????????????????xxxxxxxx | ????????????????????????????xxxxxxxx |
| ?????????????????????????????xxxxxxx | ?????????????????????????????xxxxxxx | ?????????????????????????????xxxxxxx | ????????????????????????????xxxxxxxx |
| ?????????????????????????????xxxxxxx | ?????????????????????????????xxxxxxx | ?????????????????????????????xxxxxxx | ?????????????????????????????xxxxxxx |
| ?????????????????????????????xxxxxxx | ?????????????????????????????xxxxxxx | ?????????????????????????????xxxxxxx | ?????????????????????????????xxxxxxx |
| ?????????????????????????????xxxxxxx | ?????????????????????????????xxxxxxx | ?????????????????????????????xxxxxxx | ?????????????????????????????xxxxxxx |
| ??????????????????????????????xxxxxx | ?????????????????????????????xxxxxxx | ?????????????????????????????xxxxxxx | ?????????????????????????????xxxxxxx |
| ??????????????????????????????xxxxxx | ??????????????????????????????xxxxxx | ?????????????????????????????xxxxxxx | ?????????????????????????????xxxxxxx |
| ??????????????????????????????xxxxxx | ??????????????????????????????xxxxxx | ??????????????????????????????xxxxxx | ?????????????????????????????xxxxxxx |
| ??????????????????????????????xxxxxx | ??????????????????????????????xxxxxx | ??????????????????????????????xxxxxx | ??????????????????????????????xxxxxx |
| ??????????????????????????????xxxxxx | ??????????????????????????????xxxxxx | ??????????????????????????????xxxxxx | ??????????????????????????????xxxxxx |
| ??????????????????????????????xxxxxx | ??????????????????????????????xxxxxx | ??????????????????????????????xxxxxx | ??????????????????????????????xxxxxx |
| ???????????????????????????????xxxxx | ??????????????????????????????xxxxxx | ??????????????????????????????xxxxxx | ??????????????????????????????xxxxxx |
| ???????????????????????????????xxxxx | ???????????????????????????????xxxxx | ??????????????????????????????xxxxxx | ??????????????????????????????xxxxxx |
| ???????????????????????????????xxxxx | ???????????????????????????????xxxxx | ???????????????????????????????xxxxx | ??????????????????????????????xxxxxx |
| ???????????????????????????????xxxxx | ???????????????????????????????xxxxx | ???????????????????????????????xxxxx | ???????????????????????????????xxxxx |
| ???????????????????????????????xxxxx | ???????????????????????????????xxxxx | ???????????????????????????????xxxxx | ???????????????????????????????xxxxx |
| ???????????????????????????????xxxxx | ???????????????????????????????xxxxx | ???????????????????????????????xxxxx | ???????????????????????????????xxxxx |
| ????????????????????????????????xxxx | ???????????????????????????????xxxxx | ???????????????????????????????xxxxx | ???????????????????????????????xxxxx |
| ????????????????????????????????xxxx | ????????????????????????????????xxxx | ???????????????????????????????xxxxx | ???????????????????????????????xxxxx |
| ????????????????????????????????xxxx | ????????????????????????????????xxxx | ????????????????????????????????xxxx | ???????????????????????????????xxxxx |
| ????????????????????????????????xxxx | ????????????????????????????????xxxx | ????????????????????????????????xxxx | ????????????????????????????????xxxx |
| ????????????????????????????????xxxx | ????????????????????????????????xxxx | ????????????????????????????????xxxx | ????????????????????????????????xxxx |
| ????????????????????????????????xxxx | ????????????????????????????????xxxx | ????????????????????????????????xxxx | ????????????????????????????????xxxx |
| ?????????????????????????????????xxx | ????????????????????????????????xxxx | ????????????????????????????????xxxx | ????????????????????????????????xxxx |
| ?????????????????????????????????xxx | ?????????????????????????????????xxx | ????????????????????????????????xxxx | ????????????????????????????????xxxx |
| ?????????????????????????????????xxx | ?????????????????????????????????xxx | ?????????????????????????????????xxx | ????????????????????????????????xxxx |
| ?????????????????????????????????xxx | ?????????????????????????????????xxx | ?????????????????????????????????xxx | ?????????????????????????????????xxx |
| ?????????????????????????????????xxx | ?????????????????????????????????xxx | ?????????????????????????????????xxx | ?????????????????????????????????xxx |
| ?????????????????????????????????xxx | ?????????????????????????????????xxx |                                      |                                      |

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

Re: amling search program principles discussion / brain dump

Post by Sokwe » November 26th, 2024, 5:20 am

I noticed that you added a new exact expand branch. Is this just the old branch with updates from the master branch? Does it fix the bug in the forbidden block code? I use autochoke for many searches, so I'm interested in this.
-Matthias Merzenich

amling
Posts: 1154
Joined: April 2nd, 2020, 9:47 pm

Re: amling search program principles discussion / brain dump

Post by amling » November 26th, 2024, 5:30 am

Sokwe wrote:
November 26th, 2024, 5:20 am
I noticed that you added a new exact expand branch. Is this just the old branch with updates from the master branch? Does it fix the bug in the forbidden block code? I use autochoke for many searches, so I'm interested in this.
It is updated for very recent master although I would have to go digging to tell you exactly when the forbidden block bug is first fixed in that series of branches (1f6c731f8b1b is the fix). There was also a bug with "intraedge" closure (implementation detail of fuzzy edges) that got fixed somewhere in there.

amling
Posts: 1154
Joined: April 2nd, 2020, 9:47 pm

Re: amling search program principles discussion / brain dump

Post by amling » November 26th, 2024, 11:53 pm

I've reworked a bunch of the grid output code and along the way added some extra annotations to the output. Example output from a run with newer code:

Code: Select all

Shortest partial:
|                 |                 | LLLLLLLLuuRRRRR |
| ............... | ............... | ............... |
| ............... | ............... | ............... |
| ........**..... | ........**..... | .......****.... |
| ......***.*.... | .....**.*.**... | .....**.*.*.... |
| .....**...**... | .....**.*...... | ....*...*.*.... |
| ....*...*.**... | .....**.*.*.*.. | ....*...*..*... |
| .......**...*.. | .....*..*..*... | ........*.***.. |
| ....*.*.*...... | ...***..*..*... | ....*****.***.. |
| ...**...*.*.*.. | .......*...*... | ...**.**....... |
| ...**.....*.... | ..*....**...... | ......***.*.... |
| ...****.****... | ...*..*..*.*... | ...*.....*.**.. |
| .....*.....*... | ..**....**.**.. | .....**.**..... |
Random[ish] partial:
|                 |          SS     | LLLLLLLuuRRRRRR |
| ............... | ............... | ............... |
| ............... | ............... | ............... |
| .......**...... | .......**...... | ......****..... |
| ......*..*..... | ......**.**.... | ......**.*..... |
| .....*...**.... | .....*......... | .....*....*.... |
| .....*.*.**.... | .....*.....*... | ....*.*...*.... |
| ...***...**.... | ...*...*.**.... | ..**.....*..... |
| ...*.***....... | ..**.*.*.***... | ......**....*.. |
| ..*....**..**.. | ..***...*..**.. | ..*.*...*..**.. |
| ...*...*...**.. | .........*..... | ..*............ |
| .....*.**.**... | ...*.*......... | ....*.*.***.... |
| ...***.**.**... | .....*.**.**... | ...*.*..**.**.. |
The first W row above the cells is the root labels, which I've added to as many outputs as I could make it make sense for. For recentering random partials the W row above that mark the seed columns it used to pick the partial which hopefully will help make clear what was chosen randomly and what is just part of a shortest path to an edge.

amling
Posts: 1154
Joined: April 2nd, 2020, 9:47 pm

Re: amling search program principles discussion / brain dump

Post by amling » December 8th, 2024, 3:19 pm

I've done (and just pushed) a bunch of work mostly towards improving inertness and handling background agars better:

(*) There are now separate --inertness, --left-inertness, and --right-inertness options for recentering searches. The latter two override the former for their respective sides. All provided inertnesses are unioned together and closured fully at once which is slightly different than if you had provided them in some order as closures. Until we have more interesting inertnesses it's sort of hard to provide two truly distinct inertnesses anyway so it's all sort of academic right now. Ultimately I'd like to invent a "EDBV3" inertness that would let it find (parts of) known ships for free and then it will matter, but that's gonna have to be separate work some time later.

(*) SRV2 now understands inertnesses, of which it has three (an extra "middle" inertness for what is counted as inert between a potential split). Left and right inertness are pulled from the above options as you might guess and middle inertness always takes whatever --inertness was. This morass of options is confusing as heck so if you're trying to configure an interesting search feel free to check in here for a consult.

(*) SRV2 now tags the columns it thinks are inert so you can see what it sees. Not so interesting with "zero" inertness, but it can be handy for weirder searches.

Putting this all together, e.g. with p4.in:

Code: Select all

| LLLuuuuRRR | LLLuuuuRRR | LLLuuuuRRR | LLLuuuuRRR |
| .......... | .......... | .......... | .......... |
| .......... | .......... | .......... | .......... |
| .......... | .......... | .......... | ....**.... |
| .......... | .......... | ...****... | .......... |
...I can run:

Code: Select all

rlife llsss-recentering p4 p4.in --inertness pd:4 --partials srv2 11
...and then see somewhere in there SRV2 output like:

Code: Select all

20241208 10:32:55 [INFO] LlsssMonitorSeamRipperV2(2, 4) (split widths 5 / 2):
20241208 10:32:55 [INFO] | LLLLLL  MMM     RRRRRR | LLLLLL  MMM     RRRRRR | LLLLLL  MMM     RRRRRR | LLLLLL  MMM     RRRRRR |
20241208 10:32:55 [INFO] | LLLLLLLLLLuuuuRRRRRRRR | LLLLLLLLLLuuuuRRRRRRRR | LLLLLLLLLLuuuuRRRRRRRR | LLLLLLLLLLuuuuRRRRRRRR |
20241208 10:32:55 [INFO] | ...................... | ...................... | ...................... | ...................... |
20241208 10:32:55 [INFO] | ...................... | ...................... | ...................... | ...................... |
20241208 10:32:55 [INFO] | ...................... | ...................... | ...................... | ...........**......... |
20241208 10:32:55 [INFO] | ...................... | ...................... | ..........****........ | ...................... |
20241208 10:32:55 [INFO] | ........**............ | .........******....... | ........********...... | ........**.....*...... |
20241208 10:32:55 [INFO] | ......*...******...... | .......**.*...**...... | .......*....*.**...... | ......***............. |
20241208 10:32:55 [INFO] | .....*..*..**.*....... | .....*..***........... | .....**...**..*....... | .....*..*.*****.*..... |
20241208 10:32:55 [INFO] | ...***.**.....*.*..... | ...***..*..*..*.*..... | ...***.**..*...**..... | ...***..*...*.*.*..... |
20241208 10:32:55 [INFO] | ..*...*.*.*...*.***... | ..*.....*.**....***... | ..*....**.**..*.***... | ..*.....*.**..*.***... |
20241208 10:32:55 [INFO] | ..*.**.*..**.......*.. | ..*.**..*.....**...*.. | ..*.***...*...*....*.. | ..*.***.*.**.**....*.. |
20241208 10:32:55 [INFO] | ...*..**..*****...*... | ...*.*.***....**..*... | ...*....*.....*...*... | ...*.........**...*... |
The first W row there is L/M/R marks indicating the inert (still life) columns. It's of course not particularly interesting as a search, but it demonstrates the features.

(*) Fixed board can now be done w/o question marks and it will do the obvious thing and load the entire grid. With this I removed the required top/left/right pad arguments (and in fact refuse them for such no-question-mark grids). They are all now long-name options like "--top-pad" and default to zero. If this turns out to be too verbose for running fixed board search projects we can reinstate these as required unnamed args and just refuse non-zero values for no-question-mark grids.

(*) Changed fixed board "@zero:N" width N to indicate the entire board width, not just the non-edge part.

(*) Allowed typical modes (fixed board, recentering, and recentering WAO) to take multiple input files, separated by commas. This is unlikely to be useful to anyone per se, but it enables some of the following work.

(*) Invented a notion of background agar. The builtin list can seen as:

Code: Select all

$ rlife grid-tool agar-info
Built-in agars:
   b0
   blocks
   horizontal-stripes
   vertical-stripes
   zero
$
...and the details of one similarly:

Code: Select all

$ rlife grid-tool agar-info blocks
Agar "blocks":
   U: Vec3(3, 0, 0)
   V: Vec3(0, 0, 1)
   W: Vec3(0, 3, 0)
   Cells:
      | **. |
      | **. |
      | ... |
$
You can also define a custom one in a separate file and load that:

Code: Select all

$ cat checkerboard.agar
{
    vu: [2, 0, 0],
    vv: [0, 0, 1],
    vw: [1, 1, 0],
    cells: [
        [[0, 0, 0], false],
        [[1, 0, 0], true],
    ],
}
$ rlife run grid-tool agar-info @checkerboard.agar
Agar "@checkerboard.agar":
   U: Vec3(2, 0, 0)
   V: Vec3(0, 0, 1)
   W: Vec3(1, 1, 0)
   Cells:
      | .* |
$
One unfortunate bit is that agar positions have to be identifiable by a single U overlap by W overlap block. For typical searches this is 2 X columns by 2 Y rows, in all generations. This is true of small agars but e.g. something like width 3 chickenwire would not work (at least in some geometries). If you want to run with such an agar you might be able to hack it by multiplying U and W up. If you find yourself in such a position I would suggest dropping the details here and we'll figure out if we can swing it.

(*) "@agar" magic grids like the "@zero" ones. The implementations of these are sort of complicated and generally generate multiple overlapping or recombining grids to cover all positions w/in the agar.

It's a little inefficient in that in some cases this boils down to running multiple completely disconnected searches together in parallel when it would be better (for memory at least) to run them serially. Also in geometries with a GCD that the agar does not have (e.g. 2c4-f2b search in horizontal-stripes agar) some of the searches may be just rephased duplicates of each other which is extra silly and wasteful.

This is all to say that while this is a very convenient feature for quickly running searches, those trying to squeeze the last drops of perf out of a given search project may want to bite the bullet of producing the grids by hand and analyzing carefully what is happening.

(*) "agar" edges to extend the edges by examining the last few rows to figure out where it is in the agar.

(*) "agar" inertnesses to similarly not count agars towards widths.

(*) Agar cycle avoiding filter (ACAF) analogous to WCAF.

(*) "agar" ends to show patterns that end in one W overlap of agar, but not more than that (analogous to zero ends).

Put it all together and you can run e.g. B0 searches like:

Code: Select all

rlife llsss                 c2-f2b --rule B01356/S012345 '@agar:b0:15' --left-edge agar:b0 --right-edge agar:b0 --filters acaf:b0                                  --partials srv2 --ends agar:b0
rlife llsss-recentering     c2-f2b --rule B01356/S012345 '@agar:b0'    --left-edge agar:b0 --right-edge agar:b0 --filters acaf:b0                                  --partials srv2 --ends agar:b0 15
rlife llsss-recentering-wao c2-f2b --rule B01356/S012345 '@agar:b0'    --left-edge agar:b0 --right-edge agar:b0 --wao-left-pad 00 --wao-right-pad 00 --wao-idx ALL --partials srv2 --ends agar:b0 15
I've given it all some light testing and it's all worked as I expect, but it makes it still somewhat underbaked.

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

Re: amling search program principles discussion / brain dump

Post by Sokwe » December 10th, 2024, 6:24 am

LaundryPizza03 wrote:
September 1st, 2024, 7:19 pm
How do I stop an LLSSS search if a complete result is found?
As I was explaining how to set up a basic LLSSS search on Discord, the question of detecting when the program had found a solution came up again, and I came up with a "trick" to cause the program to panic after the first result without modifying the code. Simply grep the output stream for the first (and only the first) occurrence of "End ". When grep subsequently closes the pipe, it will cause rlife to panic and stop. More specifically, you can add the following to the end of a search string:

Code: Select all

 | tee >((grep -m 1 -A 2000 "End " | grep -v -m 2 -B 2000 "|") >> end-output.txt)
This will still send the search output to stdout, but if an end is encountered it will cause rlife to panic and will print the found object to the file end-output.txt. You can still send the ordinary output to a file by

Basically, it uses the tee utility to duplicate the output stream so that we can see it in stdout while also grepping for "End ". When it reaches the first line containing "End ", it looks at the next 2000 lines and finds among those the first line not containing "|" (note that the lines containing "|" are part of the discovered result). It then writes all the lines above that (i.e., those that do contain "|") to the file end-output.txt. Since grep was set to only find one occurrence of "End ", it closes the pipe and forces rlife to terminate.

Is this a reasonable trick? Is there anything wrong with it? Will it always work as intend? Could it be done more cleverly?
amling wrote:
December 8th, 2024, 3:19 pm
Invented a notion of background agar...

"@agar" magic grids like the "@zero" ones....

Put it all together and you can run e.g. B0 searches like...
Excellent! Now B0 searches can go into the tutorial I'm planning to write very soon. Does --ends agar:b0 solve the following problem regarding wickstretchers for p2 wicks?
amling wrote:
September 3rd, 2024, 11:38 pm
See a previous post about strobing rules and almost certainly add `--ends s_periodic:0:0:2`. If you end up buried in p2 wickerstretchers (and you don't like that), come back here and we can get you set up with the "nfa" ends to find proper ships.
Also, I've been meaning to ask if you could briefly explain (probably for the nth time) what --wao-left-pad, --wao-right-pad, and --wao-idx do and how their values affect the search. I'm trying to make sure I understand each option before I include them as part of the tutorial.
-Matthias Merzenich

amling
Posts: 1154
Joined: April 2nd, 2020, 9:47 pm

Re: amling search program principles discussion / brain dump

Post by amling » December 10th, 2024, 2:20 pm

Sokwe wrote:
December 10th, 2024, 6:24 am
Basically, it uses the tee utility to duplicate the output stream so that we can see it in stdout while also grepping for "End ". When it reaches the first line containing "End ", it looks at the next 2000 lines and finds among those the first line not containing "|" (note that the lines containing "|" are part of the discovered result). It then writes all the lines above that (i.e., those that do contain "|") to the file end-output.txt. Since grep was set to only find one occurrence of "End ", it closes the pipe and forces rlife to terminate.

Is this a reasonable trick? Is there anything wrong with it? Will it always work as intend? Could it be done more cleverly?
I'm not sure I have the stomach to attempt to code review or even understand that. If it works, great?

I grepped for "gol_log.*End" and the only ones not going through run_ssm_filter_ends[_full] are PD lite, PD rotor tree, max pop, and proj003. Given those are all pretty experimental projects anyway should I just rig run_ssm_filter_ends[_full] to check an LLSSS_SSM_FILTER_ENDS_HALT=true environment variable? It's easy enough to centralize that much of it and a small enough code change to weigh on the codebase a great deal less than anything else we've considered.
Sokwe wrote:
December 10th, 2024, 6:24 am
Excellent! Now B0 searches can go into the tutorial I'm planning to write very soon. Does --ends agar:b0 solve the following problem regarding wickstretchers for p2 wicks?
amling wrote:
September 3rd, 2024, 11:38 pm
See a previous post about strobing rules and almost certainly add `--ends s_periodic:0:0:2`. If you end up buried in p2 wickerstretchers (and you don't like that), come back here and we can get you set up with the "nfa" ends to find proper ships.
Yes in that it restricts any output about ends to be the agar proper but no in that those wickstretchers are still going to gum up search state and make such searches hard to run (e.g. will never terminate by exhaustion).
Sokwe wrote:
December 10th, 2024, 6:24 am
Also, I've been meaning to ask if you could briefly explain (probably for the nth time) what --wao-left-pad, --wao-right-pad, and --wao-idx do and how their values affect the search. I'm trying to make sure I understand each option before I include them as part of the tutorial.
Yeah, WAO has at this point arguably graduated from insane experiment to actual feature. Let me cook up an easy demo problem and I will try to explain the ideas as best I can. Stay tuned.

amling
Posts: 1154
Joined: April 2nd, 2020, 9:47 pm

Re: amling search program principles discussion / brain dump

Post by amling » December 10th, 2024, 3:50 pm

Sokwe wrote:
December 10th, 2024, 6:24 am
Also, I've been meaning to ask if you could briefly explain (probably for the nth time) what --wao-left-pad, --wao-right-pad, and --wao-idx do and how their values affect the search. I'm trying to make sure I understand each option before I include them as part of the tutorial.
To motivate WAO, let's consider the problem of trying to find a c/1 back for this wick in B2ak3jr5y/S5i:

Code: Select all

x = 2, y = 25, rule = B2ak3jr5y/S5i
2o$2o$2o$2o$2o$2o$2o$2o$2o$2o$2o$2o$2o$2o$2o$2o$2o$2o$2o$2o$2o$2o$2o$
2o$2o!
The fact that it's small and a possible solution can probably be guessed from reverse engineering the rule string isn't really the point, so just imagine this was a real search problem (which will save me the trouble of having to sketch diagrams for a more complicated geometry than c1-f2b).

I'm going to simplify discussion of geometry below quite a bit. Anywhere I say X I probably mean U and "2 X columns" is either "AF2 - 1 U columns" or "one U overlap (U neighorhood minus 1 columns)". Anywhere I say Y I probably mean T by which I probably mean W and "2 Y rows" is "one W overlap (W neighborhood minus 1 rows)". Most of this will be analogous for typical geometries although when W=T some things are a little different than W=Y. Perhaps I will try to circle back with a bit about a more interesting geometry later.

As for our proposed problem, you could try to run the search with recentering directly like:

Code: Select all

$ cat 1.in
| LLLuuRRR |
| ...**... |
| ...**... |
$ rlife llsss-recentering c1-f2b --rule 'B2ak3jr5y/S5i' '1.in' --filters wcaf 10
...
But the search would presumably be buried in photons (err, maybe not, but just imagine it would) with partials like (invented, not from an actual search):

Code: Select all

| ........**.. |
| ........**.. |
| ...**...**.. |
| ........**.. |
| ..*..*..**.. |
| ........**.. |
| ........**.. |
This is not pruned by WCAF since columns 4 and 5 do deviate from the cycle in question, but doesn't actually engage the prompt.

To avoid this you could ask "where is the left-most deviation from the cycle?" and try to sketch input files describing that. This is what I used to do before WAO and it was painful and error-prone. Here the simplest set we might come up with are...

Separated far to the left:

Code: Select all

| LLLuMMMuuRRRRR |
| .......**..... |
| .......**..... |
| ...*WWWWWWWW.. |
The state will include paths through the roots like "LLLuMMuuRRR" (note just 2 Ms!) so this repesents the first deviation (what WAO calls "error") being at least two columns separated from the wick.

Then of course there's separated one column:

Code: Select all

| LLLuuuuRRRRR |
| .....**..... |
| .....**..... |
| ...*WWWWWW.. |
Separated zero columns:

Code: Select all

| LLLuuuRRRRR |
| ....**..... |
| ....**..... |
| ...*WWWWW.. |
In the left wick column:

Code: Select all

| LLLuuRRRRR |
| ...**..... |
| ...**..... |
| ....WWWW.. |
In the right wick column:

Code: Select all

| LLLuuRRRRR |
| ...**..... |
| ...**..... |
| ...*.WWW.. |
Etc...

Code: Select all

| LLLuuuRRRRR |
| ...**...... |
| ...**...... |
| ...***WWW.. |

| LLLuuuuRRRRR |
| ...**....... |
| ...**....... |
| ...**.*WWW.. |

| LLLuuMMMuRRRRR |
| ...**......... |
| ...**......... |
| ...**...*WWW.. |
This works, and some of these inputs are unable to ignore the prompt by adding photons and extending the wick, but it is extremely error-prone and complicated and this is all for what is a very, very simple prompt.

In the cases where I was doing this I wanted to allow errors a little further out from the prompt without being lumped into the left-most bucket so I would frequently break this first input file:

Code: Select all

| LLLuMMMuuRRRRR |
| .......**..... |
| .......**..... |
| ...*WWWWWWWW.. |
Into further divisions like:

Code: Select all

| LLLuuuuuRRRRR |
| ......**..... |
| ......**..... |
| ...*WWWWWWW.. |

| LLLuMMMuuuRRRRR |
| ........**..... |
| ........**..... |
| ...*WWWWWWWWW.. |
Where the first is separated by two columns and the second is separated by three or more. This can be equivalently written as:

Code: Select all

| LLLuuMMMuuRRRRR |
| ........**..... |
| ........**..... |
| ...*WWWWWWWWW.. |
This all also worked (the further subdivision) but it was even worse, so I set out to fromalize the process and make the computer do it.

The way WAO works, is it duplicates all user-provided root labels into multiple types. Mostly they are distinguished by "has the error happened yet" (where "yet" is here or to the left). In our original input file of "LLLuuRRR" the 3-width windows that are legal transitions are:

Code: Select all

LLL
LLu
Luu
uuR
uRR
RRR
But now we'd want to have each of these duplicated 4 times with every combination of no-no-no, no-no-yes, no-yes-yes, and yes-yes-yes. But then where do we do that subdivision business? We add additional roots tag types indicating "left-of-error-window" (I'm gonna mark these "A"), "in-error-window (along with position)" (I'm gonna mark these with numbers indicating position) and "right-of-error-window" (I'm gonna mark these with "B"). Now all the 3 column transitions we need to include fall into three categories...

(*) They could be "left of window", with tags AAA. In this case we get all 3-width combinations of the original input file:

Code: Select all

AAA
LLL

AAA
LLu

AAA
Luu

AAA
uuR

AAA
uRR

AAA
RRR
(*) They could be "right of window", looking the same with tags BBB.

(*) They could be "near a window". To find all the 3-width transitions involved we need 2 "A" left of the window, the window, and 2 "B" right of the window. For no padding the window is one wide (tagged "1") and so the five tags are "AA1BB". We still have to generate all possible 5-width combinations of the user-provided roots (and cell values, but not pictured below) and collect all the possible width 3 windows from these 5-width pictures:

Code: Select all

AA1BB
LLLLL

AA1BB
LLLLu

AA1BB
LLLuu

AA1BB
LLuuR

AA1BB
LuuRR

AA1BB
uuRRR

AA1BB
uRRRR

AA1BB
RRRRR
This display (of 5-width regions around the error window) is what is displayed at the top of WAO searches. E.g. this actual display:

Code: Select all

$ cat 2.in
| LLLuuRRR |
| ...**... |
| ...**... |
| ...**... |
$ rlife llsss-recentering-wao c1-f2b --rule 'B2ak3jr5y/S5i' '2.in' --wao-left-pad 00 --wao-right-pad 00 00
20241210 10:38:36 [INFO] WAO error window #0 (excluded):
20241210 10:38:36 [INFO] | LLLLL |
20241210 10:38:36 [INFO] | ..... |
20241210 10:38:36 [INFO] | ..... |
20241210 10:38:36 [INFO] | ..x.. |
20241210 10:38:36 [INFO] WAO error window #1 (excluded):
20241210 10:38:36 [INFO] | LLLLu |
20241210 10:38:36 [INFO] | ....* |
20241210 10:38:36 [INFO] | ....* |
20241210 10:38:36 [INFO] | ..x.* |
20241210 10:38:36 [INFO] WAO error window #2 (excluded):
20241210 10:38:36 [INFO] | LLLuu |
20241210 10:38:36 [INFO] | ...** |
20241210 10:38:36 [INFO] | ...** |
20241210 10:38:36 [INFO] | ..x** |
20241210 10:38:36 [INFO] WAO error window #3 (excluded):
20241210 10:38:36 [INFO] | LLuuR |
20241210 10:38:36 [INFO] | ..**. |
20241210 10:38:36 [INFO] | ..**. |
20241210 10:38:36 [INFO] | ..o*. |
20241210 10:38:36 [INFO] WAO error window #4 (excluded):
20241210 10:38:36 [INFO] | LuuRR |
20241210 10:38:36 [INFO] | .**.. |
20241210 10:38:36 [INFO] | .**.. |
20241210 10:38:36 [INFO] | .*o.. |
20241210 10:38:36 [INFO] WAO error window #5 (excluded):
20241210 10:38:36 [INFO] | uuRRR |
20241210 10:38:36 [INFO] | **... |
20241210 10:38:36 [INFO] | **... |
20241210 10:38:36 [INFO] | **x.. |
20241210 10:38:36 [INFO] WAO error window #6 (excluded):
20241210 10:38:36 [INFO] | uRRRR |
20241210 10:38:36 [INFO] | *.... |
20241210 10:38:36 [INFO] | *.... |
20241210 10:38:36 [INFO] | *.x.. |
20241210 10:38:36 [INFO] WAO error window #7 (excluded):
20241210 10:38:36 [INFO] | RRRRR |
20241210 10:38:36 [INFO] | ..... |
20241210 10:38:36 [INFO] | ..... |
20241210 10:38:36 [INFO] | ..x.. |
...
The root tag type (which I was marking A/1/B) is not included in the display since it's the same every time (and at the time this was all written there wasn't even a way to include such annotations in displays). The cell values corresponding to the input files are shown and the one that will be forced to make the first error is marked with o/x instead (well, really, the tile where the first error will happen e.g. c4d-down, 2c4-f2b, etc. will have more than one such cell). This is also slightly misleading in that in the actual search the constraints on the cell values in that key row are not what is shown here. Left of the first error will be constrained to equal the input, the first error tile will be constrained to not completely match the input. Right of the first error will be unconstrained. Maybe I should change these displays to reflect that somehow?

Not shown anywhere in the output are the AAA and BBB transitions but they're not very interesting.

Running the same with --wao-right-pad 01 gets 6-width windows with tag types AA12BB:

Code: Select all

WAO error window #0 (excluded):
| LLLLLL |
| ...... |
| ...... |
| ..x... |
WAO error window #1 (excluded):
| LLLLLu |
| .....* |
| .....* |
| ..x..* |
WAO error window #2 (excluded):
| LLLLuu |
| ....** |
| ....** |
| ..x.** |
WAO error window #3 (excluded):
| LLLuuR |
| ...**. |
| ...**. |
| ..x**. |
WAO error window #4 (excluded):
| LLuuRR |
| ..**.. |
| ..**.. |
| ..o*.. |
WAO error window #5 (excluded):
| LuuRRR |
| .**... |
| .**... |
| .*o... |
WAO error window #6 (excluded):
| uuRRRR |
| **.... |
| **.... |
| **x... |
WAO error window #7 (excluded):
| uRRRRR |
| *..... |
| *..... |
| *.x... |
WAO error window #8 (excluded):
| RRRRRR |
| ...... |
| ...... |
| ..x... |
The net effect is it has subdivided what was "window #0" previously (error separated by 2 or more columns from wick) into "window #0" (error separated by 3 or more columns from wick) and "window #1" (error separated by exactly 2 columns).

So as a slight summary, "--wao-left-pad" controls how much subdivision is forced on the left side of the error and "--wao-right-pad" controls how much subdivision is forced on the right side of the error.

--wao-idx then selects which of these errors windows to include in the search.

Now if you think about our extra useless photon partial from before...

Code: Select all

| ........**.. |
| ........**.. |
| ...**...**.. |
| ........**.. |
| ..*..*..**.. |
| ........**.. |
| ........**.. |
...it can only match the left-most error window so as long as I don't include that window in the search this partial won't be there to gum it up.

For this search specifically, running all WAO idxs and unlimited width...

Code: Select all

rlife llsss-recentering-wao c1-f2b --rule 'B2ak3jr5y/S5i' '2.in' --wao-left-pad 00 --wao-right-pad 00 --wao-idx ALL XX
...#1, #3, #4, and #5 die quickly (e.g. "WAO idx #1 terminated", and there are therefore no patterns, at any width, that first deviate in those places). Going back and running individual searches, for example...

Code: Select all

rlife llsss-recentering-wao c1-f2b --rule 'B2ak3jr5y/S5i' '2.in' --wao-left-pad 00 --wao-right-pad 00 --wao-idx 6 XX
It's clear that #0, #6, and #7 all have results that refuse to engage the prompt, e.g. this from #6:

Code: Select all

Shortest partial:
| LLuuRRRRR |
| ..**..... |
| ..**..... |
| ..**.**.. |
| ..**..... |
| ..**..*.. |
| ..**..... |
| ..**..... |
But #2 (the only remaining one) does appear forced to engage the prompt and eventually finds:

Code: Select all

End [thinnest] "LlsssEndsZero":
| LLLuuRRR |
| ...**... |
| ...**... |
| ..*..*.. |
| ...**... |
| ........ |
| ...*.... |
| ........ |
| ........ |
Now for real geometries these pictures can get a bit more complicated. Take for example, this input file which I would use to search for a 4c/8 continuation of the hive wall:

Code: Select all

$ cat 3.in
|         |         |         |         |         |         |         | LLLuRRR |
|         |         |         |         |         | LLLuRRR | ***.... | ***.... |
|         |         |         | LLLuRRR | ...*... | ...*... | ...*... | ...*... |
|         | LLLuRRR | ***.... | ***.... | ***.... | ***.... | ***.... |         |
| ....... | ....... | ....... | ....... | ....... |         |         |         |
| ***.... | ***.... | ***.... |         |         |         |         |         |
| ...*... |         |         |         |         |         |         |         |
It will probably make more sense in UWI vision...

Code: Select all

$ rlife grid-tool to-uwi 4c8-f2b < 3.in
| LLLuRRR | LLLuRRR | LLLuRRR | LLLuRRR |
| ....... | ***.... | ...*... | ***.... |
| ....... | ***.... | ...*... | ***.... |
| ....... | ***.... | ...*... | ***.... |
| ....... | ***.... | ...*... | ***.... |
| ....... | ***.... | ...*... | ***.... |
Note it is 5 W rows long, which is one more than the usual "W overlap" normal searches require. This extra row tells WAO what not to extend with. We also see that it repeats every W step so there is just the one W phasing of this. For more complicated wicks and geometries this may be a harder question to answer and it my be necessary to run more than one input file if there are multiple essentially distinct W phases the first error could be at.

Now to see the windows run...

Code: Select all

rlife llsss-recentering-wao 4c8-f2b '3.in' --wao-left-pad 00 --wao-right-pad 00 00
...and see windows like...

Code: Select all

WAO error window #1 (excluded):
|       |       |       |       |       |       |       | LLLLu |
|       |       |       |       |       | LLLLu | ****. | ****. |
|       |       |       | LLLLu | ....* | ....* | ....* | ....* |
|       | LLLLu | ****. | ****. | ****. | ****. | **o*. |       |
| ..... | ..... | ..... | ..... | ..x.. |       |       |       |
| ****. | ****. | **o*. |       |       |       |       |       |
| ..x.* |       |       |       |       |       |       |       |
There are four cells marked with o/x and the first (left-most) error will be allowed to be in any one, or rather than combination of the 4 (the tile) will not be allowed to all match the input file.

Finally, --wao-left-edge-errors and --wao-right-edge-errors... These cause it to generate special error windows for first errors happening close to the edge of partials, in the edge (namely the leftmost 2 columns). For normal inputs and agar/zero edges the edges themselves wouldn't even propose any possible errors so these aren't necessary but for symmetry edges (odd/even/gutter/gse/gso) it's very much necessary to cover the entire space.



I know that's a lot of detail. Let me know if there is something I should expand or reword. The best practices I think mostly boil down to...

(*) Searching from agar/zero? Don't worry about W phasing as there is only the one for zeroes and magic input "@agar" will generate what is necessary to cover everything for agars. Padding isn't going to subdivide anything meaningfully so set it to zero to maximize deduplication of state bits. Include --wao-XXX-edge-errors if and only if you have a symmetry on the respective edge. Probably run `--wao-idx ALL` unless there is more than one error window (for an agar) and you want to run the searches separately, presumably for memory reasons.

(*) Trying to produce a back/front for a wick (or extend a greyship edge, etc.)? Make sure to cover all possible W phases with separate input files. Probably start with paddings 1 (the default) and --wao-idx ALL. If search gets gummed up with refusal to engage the prompt, start removing idxs (generally the left-most and right-most, can always run an individual idx search separately to see if a given one is bad), maybe bumping padding first to split them up more fine-grainedly if you don't want to remove an idx that is a problem but you think might also include good results. Same as above, include --wao-XXX-edge-errors iff symmetry edge. Almost certainly post your input files and commands here for sanity check.

amling
Posts: 1154
Joined: April 2nd, 2020, 9:47 pm

Re: amling search program principles discussion / brain dump

Post by amling » December 10th, 2024, 7:10 pm

I know that was a lot of details already, but I thought of a few more demos worth walking through and a few more things worth explaining for sophisticated uses. Simple zero/agar searches probably don't need to know or think about any of this with the possible exception of the "tile error mask" business, although anyone even thinking of doing that should absolutely check in here anyway.

(*) "Engagement" searches versus "solution" searches.

Veteran LLSSS users will probably already know this, but it's definitely worth keeping in mind the trick of copying a partial into a new search. Even very careful use of WAO can be inefficient and duplicative. Most search projects I do that use it will have a first engagement phase of finding a beginning of a pattern and then a solving phase to extend or complete partials from the engagement phase.

I cannot stress enough that outside of the most simple possible use of "find any pattern that moves at X velocity" that get lucky immediately, virtually none of my LLSSS projects aiming for a positive result have been run as single shot searches (negative results of proving there can be no pattern are another matter, of course).

(*) "W misalignment".

WCAF plus copying a partial into a new search when the engagement search gets gummed up refusing to engage the pattern could sort of hack it, and did have to hack it a great deal before WAO. But WAO can force engaging a prompt that is a very long cycle in the W direction or is not even aligned that way at all (without having to twist the geometry to make it have a W period). Perhaps see examples below (e.g. c2-s2s "space non-filler").

(*) "W phasing".

I mentioned this above, about having to have multiple input files to handle W phasings, but let's walk through some examples.

First, trying to find a back for the c/2 "space non-filler" wave at c2-s2s. This looks like:

Code: Select all

| .......***.......... | ......***........... |
| .......*............ | .......*............ |
| .........***........ | ........***......... |
| .........*.......... | .........*.......... |
| ...........***...... | ..........***....... |
| ...........*........ | ...........*........ |
I've started it off in a semi-random alignment with a bunch of space on both sides. If I cut this right here for WAO the input file would look like:

Code: Select all

| LLLuuuuuuRRR | LLLuuuuuuRRR |
| ....***..... | ...***...... |
| ....*....... | ....*....... |
| ......***... | .....***.... |
If I go down one W (Y) it would look like:

Code: Select all

| LLLuuuuuRRR | LLLuuuuuRRR |
| ...*....... | ...*....... |
| .....***... | ....***.... |
| .....*..... | .....*..... |
If I run WAO with these two different input files I will get very different engagements. However if I can down 2 W (2 Y) it would look the same as the first so that's it.

As a second example consider trying to find a back for this 2c/2 wick at 2c2-f2b:

Code: Select all

|               | ....**.**.... |
| ....**.**.... | ....**.**.... |
| ....**.**.... | ...*.....*... |
| ...*.*.*.*... | .....*.*..... |
| .....*.*..... | .....*.*..... |
| ....*...*.... | ............. |
| ............. | ....**.**.... |
| ....**.**.... | ....**.**.... |
| ....**.**.... | ...*.*.*.*... |
| ...*.....*... | .....*.*..... |
| .....*.*..... | ....*...*.... |
| .....*.*..... | ............. |
| ............. | ....**.**.... |
| ....**.**.... |               |
In UWI space this looks like this:

Code: Select all

| ....**.**.... | ....**.**.... |
| ....**.**.... | ....**.**.... |
| ...*.....*... | ...*.*.*.*... |
| .....*.*..... | .....*.*..... |
| .....*.*..... | ....*...*.... |
| ............. | ............. |
| ....**.**.... | ....**.**.... |
| ....**.**.... | ....**.**.... |
| ...*.*.*.*... | ...*.....*... |
| .....*.*..... | .....*.*..... |
| ....*...*.... | .....*.*..... |
| ............. | ............. |
| ....**.**.... | ....**.**.... |
If I cut that at the top it would look like (still in UWI):

Code: Select all

| LLLuuuuuuuRRR | LLLuuuuuuuRRR |
| ....**.**.... | ....**.**.... |
| ....**.**.... | ....**.**.... |
| ...*.....*... | ...*.*.*.*... |
or back in XYT:

Code: Select all

|               | LLLuuuuuuuRRR |
| LLLuuuuuuuRRR | ....**.**.... |
| ....**.**.... | ....**.**.... |
| ....**.**.... | ...*.....*... |
| ...*.*.*.*... |               |
If I cut it one W (Y) down:

Code: Select all

|               | LLLuuuuuuuRRR |
| LLLuuuuuuuRRR | ....**.**.... |
| ....**.**.... | ...*.*.*.*... |
| ...*.....*... | .....*.*..... |
| .....*.*..... |               |
...and so on. But when I get to 6 W down something interesting happens:

Code: Select all

|               | LLLuuuuuuuRRR |
| LLLuuuuuuuRRR | ....**.**.... |
| ....**.**.... | ....**.**.... |
| ....**.**.... | ...*.*.*.*... |
| ...*.....*... |               |
This is the same as the first input file, but rotated V/2 (1c/1). The results for running this (and the other 5 duplicates) are going to look very, very similar (only maybe very slightly different due to tile ordering) and I would not bother.

As one final example, consider this p7 wick:

Code: Select all

| .....*...... | ....**...... | ....**.*.... | ....**.*.... | ....**..*... | ....**..*... | ....*....... |
| ....*.**.... | ....*.**.... | ...*..**.... | ...*..**.... | .......*.... | ......*..... | ......**.... |
| ....**..*... | ....**..*... | ....*....... | .....*...... | ....**...... | ....**.*.... | ....**.*.... |
| .......*.... | ......*..... | ......**.... | ....*.**.... | ....*.**.... | ...*..**.... | ...*..**.... |
| ....**...... | ....**.*.... | ....**.*.... | ....**..*... | ....**..*... | ....*....... | .....*...... |
| ....*.**.... | ...*..**.... | ...*..**.... | .......*.... | ......*..... | ......**.... | ....*.**.... |
| ....**..*... | ....*....... | .....*...... | ....**...... | ....**.*.... | ....**.*.... | ....**..*... |
| ......*..... | ......**.... | ....*.**.... | ....*.**.... | ...*..**.... | ...*..**.... | .......*.... |
| ....**.*.... | ....**.*.... | ....**..*... | ....**..*... | ....*....... | .....*...... | ....**...... |
| ...*..**.... | ...*..**.... | .......*.... | ......*..... | ......**.... | ....*.**.... | ....*.**.... |
| ....*....... | .....*...... | ....**...... | ....**.*.... | ....**.*.... | ....**..*... | ....**..*... |
| ......**.... | ....*.**.... | ....*.**.... | ...*..**.... | ...*..**.... | .......*.... | ......*..... |
| ....**.*.... | ....**..*... | ....**..*... | ....*....... | .....*...... | ....**...... | ....**.*.... |
| ...*..**.... | .......*.... | ......*..... | ......**.... | ....*.**.... | ....*.**.... | ...*..**.... |
| .....*...... | ....**...... | ....**.*.... | ....**.*.... | ....**..*... | ....**..*... | ....*....... |
Cut 0 W and 1 W down they are:

Code: Select all

| LLLuuuuuuRRR | LLLuuuuuuRRR | LLLuuuuuuRRR | LLLuuuuuuRRR | LLLuuuuuuRRR | LLLuuuuuuRRR | LLLuuuuuuRRR |
| .....*...... | ....**...... | ....**.*.... | ....**.*.... | ....**..*... | ....**..*... | ....*....... |
| ....*.**.... | ....*.**.... | ...*..**.... | ...*..**.... | .......*.... | ......*..... | ......**.... |
| ....**..*... | ....**..*... | ....*....... | .....*...... | ....**...... | ....**.*.... | ....**.*.... |

Code: Select all

| LLLuuuuuuRRR | LLLuuuuuuRRR | LLLuuuuuuRRR | LLLuuuuuuRRR | LLLuuuuuuRRR | LLLuuuuuuRRR | LLLuuuuuuRRR |
| ....*.**.... | ....*.**.... | ...*..**.... | ...*..**.... | .......*.... | ......*..... | ......**.... |
| ....**..*... | ....**..*... | ....*....... | .....*...... | ....**...... | ....**.*.... | ....**.*.... |
| .......*.... | ......*..... | ......**.... | ....*.**.... | ....*.**.... | ...*..**.... | ...*..**.... |
The second is just the first, flipped left to right and shifted 5 generations later. The total space of findable partials is thus the same (rotated 5/7 V anyway) but the the left-right flip does sort of changes how partials are sorted into buckets by earliest, i.e. left-most error. I would still choose not to bother running the second file.

(*) "Tile error mask".

I saved the worst for last for sure...

I've changed the error window displays to reflect the constraints that will actually happen. Periods and asterisks are fixed values. x/o are jointly forced to mismatch. Ws are unconstrained. For example, c4d-down:

Code: Select all

$ rlife llsss-recentering-wao c4d-down '@zero' --wao-left-pad 00 --wao-right-pad 00 00
20241210 14:45:50 [INFO] WAO error window #0 (excluded):
20241210 14:45:50 [INFO] | ZZZZZ | ZZZZZ | ZZZZZ | ZZZZZ |
20241210 14:45:50 [INFO] | ..... | ..... | ..... | ..... |
20241210 14:45:50 [INFO] | ..... | ..... | ..... | ..... |
20241210 14:45:50 [INFO] | ..xWW | ..xWW | ..xWW | ..xWW |
...
But this is sort of wasteful! There is no reason to allow any of the first three x's to be nonzero as they are earlier in a sense (namely their fractional W value) than the last. --wao-tile-error-mask lets us force only some of them to be allowed, e.g. here I would use 0b1000 (8) to only allow the fourth (in tile search order!) to have the first error (and the rest are forced to match the input file):

Code: Select all

$ rlife llsss-recentering-wao c4d-down '@zero' --wao-left-pad 00 --wao-right-pad 00 --wao-tile-error-mask 8 00
20241210 14:47:54 [INFO] WAO error window #0 (excluded):
20241210 14:47:54 [INFO] | ZZZZZ | ZZZZZ | ZZZZZ | ZZZZZ |
20241210 14:47:54 [INFO] | ..... | ..... | ..... | ..... |
20241210 14:47:54 [INFO] | ..... | ..... | ..... | ..... |
20241210 14:47:54 [INFO] | ...WW | ...WW | ...WW | ..xWW |
This is very hard to get right, and not just because you have to enter a bit mask in decimal! Consider a weird geometry like 2c8d-down:

Code: Select all

$ rlife llsss-recentering-wao 2c8d-down '@zero' --wao-left-pad 00 --wao-right-pad 00 00
20241210 14:52:11 [INFO] WAO error window #0 (excluded):
20241210 14:52:11 [INFO] |        |        |        |        | ZZZZZ  | ZZZZZ  | ZZZZZ  | ZZZZZ  |
20241210 14:52:11 [INFO] |  ZZZZZ |  ZZZZZ |  ZZZZZ |  ZZZZZ | .....  | .....  | .....  | .....  |
20241210 14:52:11 [INFO] |  ..... |  ..... |  ..... |  ..... | .....  | .....  | .....  | .....  |
20241210 14:52:11 [INFO] |  ..... |  ..... |  ..... |  ..... | ..xWW  | ..xWW  | ..xWW  | ..xWW  |
20241210 14:52:11 [INFO] |  ..xWW |  ..xWW |  ..xWW |  ..xWW |        |        |        |        |
How should this be limited? Some careful thought shows that the first six (in tile search order which is actually generations 1-3 and 5-7 above) being zero is definitely okay. The last two bits (generations 4 and 8) are weird though. Combinations 01 and 10 are both okay although they are wastefully running rephasings of the same stuff. 11 is also okay. Either way we can't just remove either bit. Carefully generated input files (or maybe even just one?) could remove 01 and allow both 10 and 11 but it's not something I can imagine communicating to the WAO code. I would run 2c8d-down with 0b11000000 (192):

Code: Select all

$ rlife llsss-recentering-wao 2c8d-down '@zero' --wao-left-pad 00 --wao-right-pad 00 --wao-tile-error-mask 192 00
20241210 14:54:46 [INFO] WAO error window #0 (excluded):
20241210 14:54:46 [INFO] |        |        |        |        | ZZZZZ  | ZZZZZ  | ZZZZZ  | ZZZZZ  |
20241210 14:54:46 [INFO] |  ZZZZZ |  ZZZZZ |  ZZZZZ |  ZZZZZ | .....  | .....  | .....  | .....  |
20241210 14:54:46 [INFO] |  ..... |  ..... |  ..... |  ..... | .....  | .....  | .....  | .....  |
20241210 14:54:46 [INFO] |  ..... |  ..... |  ..... |  ..... | ...WW  | ...WW  | ...WW  | ..xWW  |
20241210 14:54:46 [INFO] |  ...WW |  ...WW |  ...WW |  ..xWW |        |        |        |        |
...
It can get even weirder than that. What about c6k-1?

Code: Select all

$ rlife llsss-recentering-wao c6k-1 '@zero' --wao-left-pad 00 --wao-right-pad 00 00
20241210 14:55:31 [INFO] WAO error window #0 (excluded):
20241210 14:55:31 [INFO] |       |       |       | ZZZZZ | ZZZZZ | ZZZZZ |
20241210 14:55:31 [INFO] | ZZZZZ | ZZZZZ | ZZZZZ | ..... | ..... | ..... |
20241210 14:55:31 [INFO] | ..... | ..... | ..... | ..... | ..... | ..... |
20241210 14:55:31 [INFO] | ..... | ..... | ..... | ..xWW | ..xWW | ..xWW |
20241210 14:55:31 [INFO] | ..xWW | ..xWW | ..xWW |       |       |       |
It's reasonably easy to see that refusing the first 4 is fine similar to 2c8d-down above.

I believe due to the slight twist of this geometry (namely V having a bit of an X shift) it should even be possible to eliminate one more, but I'm not actually sure which (I assume it's the fifth?). My mind simply cannot contain the nature of c6k geometry long enough or well enough to be sure of the answer. I have thus always run c6k-1 searches with 0b110000 (48):

Code: Select all

$ rlife llsss-recentering-wao c6k-1 '@zero' --wao-left-pad 00 --wao-right-pad 00 --wao-tile-error-mask 48 00
20241210 14:57:15 [INFO] WAO error window #0 (excluded):
20241210 14:57:15 [INFO] |       |       |       | ZZZZZ | ZZZZZ | ZZZZZ |
20241210 14:57:15 [INFO] | ZZZZZ | ZZZZZ | ZZZZZ | ..... | ..... | ..... |
20241210 14:57:15 [INFO] | ..... | ..... | ..... | ..... | ..... | ..... |
20241210 14:57:15 [INFO] | ..... | ..... | ..... | ...WW | ...WW | ..xWW |
20241210 14:57:15 [INFO] | ...WW | ...WW | ..xWW |       |       |       |
...
Unfortunately I have no idea how to make this subfeature anything resembling usable. I don't think the code working out the right value is going to be possible when I can't even personally figure out c6k-1 even with just zeros, much less arbitrary insane geometries with complicated input files.

As a first approximation, for from-zeros or from-agar searches: Named geometries that are b2f or f2b cannot benefit from tile error mask. s2s geometries that are not NcN-s2s I believe can always benefit (although I didn't demo/explain this above...). Diagonal and knightwise that are not NcNd-down or NcNd-up I believe can always benefit from it. Raw geometries I cannot possibly predict. Anyone running any search that might benefit should feel free to check in here for me to try to work it out and provide the right mask value.
Last edited by amling on December 31st, 2024, 2:05 am, edited 1 time in total.

amling
Posts: 1154
Joined: April 2nd, 2020, 9:47 pm

Re: amling search program principles discussion / brain dump

Post by amling » December 10th, 2024, 7:32 pm

amling wrote:
December 10th, 2024, 7:10 pm
I believe due to the slight twist of this geometry (namely V having a bit of an X shift) it should even be possible to eliminate one more, but I'm not actually sure which (I assume it's the fifth?). My mind simply cannot contain the nature of c6k geometry long enough or well enough to be sure of the answer.
As is so often true, being forced to explain it and then think about the general case sometimes makes things clearer. I believe for a from-zeros or from-agar search masking to cells that share the lexically greatest (fractional W, fractional U) value w/in the tile is correct.

If you had a first error at a lesser fractional W value you could shift the entire pattern by the difference between the first error and any such cell and it would only (strictly) increase W values of all non-agar cells and give that first error the maximal fractional W value. Any cells shifted in from "above" (lower integer W values) will not be errors.

If you had an error with maximal fractional W but then lesser fractional U value you could again take the difference between this first error and any such cell and it would leave W unchanged (they have the same value!). U values would be shifted but if you look at the entire pattern worth of positions with that same critical W value, sorted by full U value, you're just shifting them all right again. You end up with no new errors "left" (smaller integer U value) of the key tile. Similarly all new cells shifted into the key tile weren't errors and so now all the errors in the key tile have that maximal (fractional W, fractional U) value.

While I might now be convinced to run c6k-1 searches with mask 0b100000, I'm still not sure about implementing this in general, especially in light of more complicated input files.

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

Re: amling search program principles discussion / brain dump

Post by Sokwe » December 10th, 2024, 7:58 pm

Thanks, I'll get around to reading that all soon. For now, I think I'll start writing a rough draft of a tutorial for LLSSS spaceship searches.
amling wrote:
December 10th, 2024, 2:20 pm
should I just rig run_ssm_filter_ends[_full] to check an LLSSS_SSM_FILTER_ENDS_HALT=true environment variable? It's easy enough to centralize that much of it and a small enough code change to weigh on the codebase a great deal less than anything else we've considered.
So would this essentially cause a halt in any case where "End " would have been printed, like in my silly grep trick? If so, that's exactly what I want. I'm usually only looking for the first spaceship or partial completion I can find, so it's nice to have a way to automatically stop the search when it succeeds.
amling wrote:
December 8th, 2024, 3:19 pm
Fixed board can now be done w/o question marks and it will do the obvious thing and load the entire grid. With this I removed the required top/left/right pad arguments (and in fact refuse them for such no-question-mark grids). They are all now long-name options like "--top-pad" and default to zero. If this turns out to be too verbose for running fixed board search projects we can reinstate these as required unnamed args and just refuse non-zero values for no-question-mark grids.
I don't mind the change. I'll just write the tutorial for whatever the current version does. Don't let the existence of the tutorial discourage you from changing the input options. We can always update the tutorial if they change.
-Matthias Merzenich

amling
Posts: 1154
Joined: April 2nd, 2020, 9:47 pm

Re: amling search program principles discussion / brain dump

Post by amling » December 10th, 2024, 9:17 pm

Sokwe wrote:
December 10th, 2024, 7:58 pm
amling wrote:
December 10th, 2024, 2:20 pm
should I just rig run_ssm_filter_ends[_full] to check an LLSSS_SSM_FILTER_ENDS_HALT=true environment variable? It's easy enough to centralize that much of it and a small enough code change to weigh on the codebase a great deal less than anything else we've considered.
So would this essentially cause a halt in any case where "End " would have been printed, like in my silly grep trick? If so, that's exactly what I want. I'm usually only looking for the first spaceship or partial completion I can find, so it's nice to have a way to automatically stop the search when it succeeds.
Something like it done and pushed. LLSSS_HALT_ON_ENDS will make e.g. this otherwise-endless search halt:

Code: Select all

$ env LLSSS_HALT_ON_ENDS=true rlife llsss 2c4-f2b '@zero:9'
...
20241210 17:03:52 [INFO] End ("LlsssEndsZero"):
20241210 17:03:52 [INFO] |           |           | ......... | ......... |
20241210 17:03:52 [INFO] | ......... | ......... | ......... | ......... |
20241210 17:03:52 [INFO] | ......... | ......... | ......... | ....*.... |
20241210 17:03:52 [INFO] | ......... | ....*.... | ...***... | ...***... |
20241210 17:03:52 [INFO] | ...***... | ...***... | ..*..*... | ...*.**.. |
20241210 17:03:52 [INFO] | ...*..*.. | ..**.*... | .....*... | ....***.. |
20241210 17:03:52 [INFO] | ...*..... | ..***.... | .....*... | ....**... |
20241210 17:03:52 [INFO] | ...*..... | ...**.... | ..*.*.... | ......... |
20241210 17:03:52 [INFO] | ....*.*.. | ......... | ......... | ......... |
20241210 17:03:52 [INFO] | ......... | ......... | ......... |           |
20241210 17:03:52 [INFO] | ......... |           |           |           |
20241210 17:03:52 [INFO] End ("LlsssEndsZero"):
20241210 17:03:52 [INFO] |           |           | ......... | ......... |
20241210 17:03:52 [INFO] | ......... | ......... | ......... | ......... |
20241210 17:03:52 [INFO] | ......... | ......... | ......... | ....*.... |
20241210 17:03:52 [INFO] | ......... | ....*.... | ...***... | ...***... |
20241210 17:03:52 [INFO] | ...***... | ...***... | ...*..*.. | ..**.*... |
20241210 17:03:52 [INFO] | ..*..*... | ...*.**.. | ...*..... | ..***.... |
20241210 17:03:52 [INFO] | .....*... | ....***.. | ...*..... | ...**.... |
20241210 17:03:52 [INFO] | .....*... | ....**... | ....*.*.. | ......... |
20241210 17:03:52 [INFO] | ..*.*.... | ......... | ......... | ......... |
20241210 17:03:52 [INFO] | ......... | ......... | ......... |           |
20241210 17:03:52 [INFO] | ......... |           |           |           |
20241210 17:03:52 [WARNING] Halt requested (ends), stopping...
...
20241210 17:03:52 [INFO] Done
If LLSSS documentation existed it would probably say that the configuration knob is subject to renegotiation both in terms of existing at all and even in terms of what ends honor it. For now it's just SSM ends which includes zero and agar ends at least (but e.g. does not include pd_lite even though it includes pd). On a related note ("renegotiation"), I've removed the zero_and_halt ends since I think this supersedes it and I have never really liked it.

On a semi-related note now that we're getting more of them, these environment variables got some infrastructure love (although they need even more, especially in terms of listing them to know what's available). They're checked up front quite aggressively so if you set one that is not known to the program (e.g. typo) or one that will not parse as the type of value it's supposed to be, you'll find out quite fast. If there is a HOME environment variable (I have no idea for Windows...) we will read `.llsssrc` from there as well (environment variables override RC file overrides builtin defaults). This json (really json5) configuration there e.g. would have the same effect as the above "env LLSSS_HALT_ON_ENDS=true":

Code: Select all

{
    "LLSSS_HALT_ON_ENDS": true,
}
Going forward I hope this sort of thing might allow for more variation in behaviour for user taste although I am as unable as ever to predict other human beings' desires in this regard so I'm not sure exactly what behaviours.

EDIT: I added a "show-env" command:

Code: Select all

$ env LLSSS_HALT_ON_ENDS=true rlife show-env
LLSSS_HALT_ON_ENDS: true (from environment variable)
LLSSS_INIT_CA_CHECKS: true (default)
LLSSS_MAX_TABLE_SIZE: 27 (default)
LLSSS_RC_ENDS_FULL: true (default)
It shows all known options, their values, and where they were set from.

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

Re: amling search program principles discussion / brain dump

Post by Sokwe » December 11th, 2024, 1:58 am

amling wrote:
December 10th, 2024, 2:20 pm
should I just rig run_ssm_filter_ends[_full] to check an LLSSS_SSM_FILTER_ENDS_HALT=true environment variable? It's easy enough to centralize that much of it and a small enough code change to weigh on the codebase a great deal less than anything else we've considered.
amling wrote:
December 10th, 2024, 9:17 pm
Something like it done and pushed. LLSSS_HALT_ON_ENDS will make e.g. this otherwise-endless search halt:

Code: Select all

rlife llsss 2c4-f2b '@zero:9'
I'm now wondering if it should be a runtime option of rlife, rather than an environment variable. The environment variable is fine for me, but I wonder if setting environment variables makes it harder to figure out for others. I'm also unsure whether halt on ends should be the default or not. Programs generally at most pause after a result is found (e.g., WLS, JLS, RLS) and often do not pause or stop and just keep printing results (e.g., ikpx2, gfind, zfind, qfind). Based on that, I would lean towards having halt on ends disabled by default.

It would also be nice if the search could stop after a specified number of ends are found, not necessarily just one. I imagine this could still be accomplished by having LLSSS_HALT_ON_ENDS take a positive integer value, or it could presumably be given as a runtime option as mentioned above. Let me know if this is more difficult than I imagine it to be, although it seems like it should be pretty simple.

Regardless of what you end up doing, I'll write the tutorial to explain it. As always, let me know if I'm being too pushy or needling.

Edit: I have one other request that I presume would be simple. Can you add predefined diagonally oriented geometries for diagonal speeds with names like c4d-f2b, c4d-s2s, and c4d-b2f? I know such geometries aren't the most efficient for LLSSS, but they would make setting up some searches (like diagonal symmetric or glide symmetric searches) easier.
-Matthias Merzenich

amling
Posts: 1154
Joined: April 2nd, 2020, 9:47 pm

Re: amling search program principles discussion / brain dump

Post by amling » December 11th, 2024, 1:29 pm

Sokwe wrote:
December 11th, 2024, 1:58 am
amling wrote:
December 10th, 2024, 2:20 pm
...LLSSS_HALT_ON_ENDS...
I'm now wondering if it should be a runtime option of rlife, rather than an environment variable. The environment variable is fine for me, but I wonder if setting environment variables makes it harder to figure out for others
The environment variables are environment variables rather than command line arguments not so much for any strong philosophical reason, but rather the unfortunate implementation detail that they cut through code weirdly and are hard/annoying to plumb all the way to the top argument parsing. Perhaps at some point I'll see if I can plumb them to the top all together and allow them all to be set in arguments. I guess TBD but I'm not optimistic.
Sokwe wrote:
December 11th, 2024, 1:58 am
I'm also unsure whether halt on ends should be the default or not. Programs generally at most pause after a result is found (e.g., WLS, JLS, RLS) and often do not pause or stop and just keep printing results (e.g., ikpx2, gfind, zfind, qfind). Based on that, I would lean towards having halt on ends disabled by default.
I pretty clearly do not want it enabled in my typical search projects and I would really rather not have to turn it off every time I run a search and/or in an RC file on every machine I run searches on.
Sokwe wrote:
December 11th, 2024, 1:58 am
It would also be nice if the search could stop after a specified number of ends are found, not necessarily just one. I imagine this could still be accomplished by having LLSSS_HALT_ON_ENDS take a positive integer value, or it could presumably be given as a runtime option as mentioned above. Let me know if this is more difficult than I imagine it to be, although it seems like it should be pretty simple.
That might be harder than you think. Try this:

Code: Select all

rlife llsss-recentering-wao c2-f2b '@zero' --wao-left-pad 00 --wao-right-pad 00 --wao-idx ALL XX
...and tell me how many ships it found (for counting purposes) when it finds the first bunch, keeping in mind this exists:

Code: Select all

x = 51, y = 36, rule = B3/S23
6bo17bo$5b3o15b3o$3b2ob3o13b3ob2o$4bo2bob2o4bo4b2obo2bo$b2obo4bobob2ob
2obobo4bob2o$b2obobo2bobo7bobo2bobob2o$bo8b3obobob3o8bo$2o7b2o9b2o7b2o
7$6bo27bo$5b3o25b3o$3b2ob3o23b3ob2o$4bo2bob2o4bo4bo4bo4b2obo2bo$b2obo
4bobob2ob2ob3ob2ob2obobo4bob2o$b2obobo2bobo7b3o7bobo2bobob2o$bo8b3obob
ob2ob2obobob3o8bo$2o7b2o19b2o7b2o7$6bo37bo$5b3o35b3o$3b2ob3o33b3ob2o$
4bo2bob2o4bo4bo4bo4bo4bo4b2obo2bo$b2obo4bobob2ob2ob3ob2ob2ob3ob2ob2obo
bo4bob2o$b2obobo2bobo7b3o7b3o7bobo2bobob2o$bo8b3obobob2ob2obobob2ob2ob
obob3o8bo$2o7b2o29b2o7b2o!
Do people really want to find "7 ships, but no more"?
Sokwe wrote:
December 11th, 2024, 1:58 am
I have one other request that I presume would be simple. Can you add predefined diagonally oriented geometries for diagonal speeds with names like c4d-f2b, c4d-s2s, and c4d-b2f? I know such geometries aren't the most efficient for LLSSS, but they would make setting up some searches (like diagonal symmetric or glide symmetric searches) easier.
Maybe? Do you think c4d-f2b is "raw:1:0:0:-1:-1:4:0:0:1"? "raw:1:-1:0:-1:-1:4:0:0:1"? Something else?

EDIT: I thought about this some more and it's maybe even worse than I thought...

To focus on the interesting part, I think we all agree in this case V=(-1, -1, 4) and W=T. The question is what to make U. Above I proposed U=X and U=X-Y. Traditionally LLSSS has not performed well with non-axis-aligned geometries which had suggested U=X might do better but U=X-Y is in a sense perpendicular the motion of travel which is maybe desirable for its own reasons. They both cover the same theoretical space of findable almost half planes (EDIT 2025/02/28 nope, nope, nope, they do cover the same space of finite patterns though). In the particular case of c/4d I think you might even want U=X/2+Y/2+V/2 (or (0, -1, 2)) which skips the full diagonal problems of U=X-Y but is still perpendicular to travel. This sort of trick unfortunately doesn't work for a speed like c/3d though.

However! After some careful thinking (or running "geom-info" on the above), I've realized all the half diagonal U geometries are going to require AF2=5 (or greater) which makes them only suitable for rather custom and difficult search projects. U=X-Y does work in AF2=3 and so I guess this makes a reasonable case that any sort of diagonal easy mode is gonna have to be that. Choosing W in the general case is a bit tricky, but it's the same sort of problem as we have already solved in the orthogonal case (e.g. consider 2c/5).

b2f is going to work out more or less the same.

s2s unfortunately is its own bag of worms. It's a lot of the same problems of f2b only U and W have sort of been switched.

Do we want U=T? Presumably not, and instead some multiple of that to get AF2 down, which for c/Nd is always going to end up being U=NT (or X+Y mod V) anyway. But for 2c/5d (V=(-2, -2, 5)) U=3T is actually enough to get AF2 down to 3. EDIT2: Nope, nope, nope, this doesn't make sense. For 2c/5d we'd want U to be a multiple of (1, 1, -2) and the first multiple that gets AF2=3 is (5, 5, -10) which is (1, 1, 0) mod V. Maybe it's always U=X+Y?

Do we want W=-X+Y? Probably, but the same half diagonal trick for W=-X/2+Y/2+V/2, at least where V is divisible by two would probably be better. Or maybe just W=Y? Unclear how valuable building perpendicular to travel is.

Anyway, the point I was really trying to make is that geometry choices are much more complicated in the diagonal case. I included "up" and "down" geometries in the code already since they were what I was always running and were some combination of ease of management and reasonable performance for all the asymmetric branch solving I was doing.
Last edited by amling on February 28th, 2025, 6:33 pm, edited 1 time in total.

Post Reply