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:
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.