LociOiling Lv 1
ST Softwalker 2.0 is an updated version of a local wiggle recipe originally written by Seagat2011 and thom001.
This version of ST Softwalker adds a cleanup routine, which restores the best score and summarizes the results when the recipe is cancelled. This is helpful in a recipe which runs until cancelled.
The recipe's scriptlog output is now more focused on reporting gains. There should be fewer scriptlog lines in most cases. Scores and gains are now rounded to three decimal places. Small gains are reported as "tiny" to avoid being rounded to zero.
As before, there is no user dialog. Softwalker 2.0 starts to work immediately.
Softwalker 2.0 has been trimmed down to only 200 lines, but this version should behave like the original in most cases. One exception is the case of very small gains. The original Softwalker could get stuck on a particular segment range, repeating local wiggle as long as there was a tiny gain, of only 0.0001 points. Softwalker 2.0 repeats local wiggle on a given range a maximum of 100 times before moving on. The recipe will eventually revisit the same segment range at the same minimum gain unless cancelled.
How Softwalker works
Softwalker starts by looking for a minimum local wiggle gain of 10 points. Segments are initially divided into 2 groups. Softwalker does local wiggle on each of the groups, in sequence. Each group is a specific range of segments.
The first segment range always starts with segment 1. For a given number of groups, all segment ranges have the same size except for the last range. The last range may be smaller than other ranges.
For each segment range, if the local wiggle gain exceeds the minimum gain, local wiggle is repeated. Local wiggle is done on each range at least once. Up to 100 local wiggles (of 30 cycles each) may be tried before Softwalker moves on the the next range.
After processing all segment ranges for a given group size, the group size is doubled, and the process repeats for the new segment ranges, with the same minimum gain. So, the group sizes are 2, 4, 8, 16, 32, 64, 128, and so on. A larger number of groups means fewer segments in each range.
Once the size of the segment ranges reaches 1 segment each, the number of groups is reset to 2, and the minimum gain is divided by 5. So the minimum gain starts at 10 points, then becomes 2 points, then 0.4 points, then 0.08 points, and so on.
When the minimum gain changes, the recipe does a regular wiggle and a shake of the entire protein.
When minimum gain goes below 0.0001 points, everything resets, and a new run starts with 2 groups and a minimum gain of 10 points. The recipe continues to run until cancelled.
Scriptlog output
Older versions of Softwalker produced a lot of "Range" and "Ending Range" messages. Gains were also reported, but the messages tended to get lost among all the "Range" messages
In Softwalker 2.0, the initial "Step" message has been changed to include a run number, with the words "minimum gain" in place of "Step":
---- Run 1, minimum gain 10 points ---- 05/25/23 20:59:02
Each run also has an end message, showing the total gain:
---- Run 1 ended, +0.002 gain, score 10344.233---- 05/26/23 20:09:48
All gain reports use "tiny" for gains less than 0.001 points.
New messages show the size of the ranges being processed:
Local wiggle on 16 ranges of 4 segments
As before, the last segment range in each set may be shorter than the other ranges.
Each group of ranges also has an end message:
Ended 4 ranges, tiny gain, score 10344.359
There are no more "Range" and "Ending Range" messages. The specific range being worked on is only reported when there's a gain. Any gain is reported when there is no more gain or when the maximum number of tries is exhausted:
+2.94 gain, score 8542.396, 1 try, range: 1-4
The number of "tries" reported is how many time the range was local wiggled. Each local wiggle has a fixed length of 30 cycles.
Possible enhancements and miscellaneous
Softwalker has several fixed parameters:
- the initial number of segment groups (2)
- the initial minimum gain (10 points)
- minimum gain reset threshold (<0.0002 points)
- the number of times local wiggle is repeated for a given range. (100 tries)
- the number of local wiggle cycles in each try (30 cycles)
- group size increase factor (2)
- minimum gain decrease factor (0.02)
A user dialog could allow changing these parameters.
Softwalker does not modify the filter/objective settings. Disabled filters are left disabled throughout. Objectives could be disabled selectively for performance.
Softwalker has a slightly quirky way of dividing segments into groups. Given a puzzle size of 60 segments, Softwalker divides it into one group of 31 segments, and one group of 29 segments. A slightly refined method could produce more evenly sized ranges.
Softwalker always starts at segment 1, and then follows with each range in order of its starting segment. The order of starts could be reversed or randomized. When a shorter range is needed, it could appear in a random spot among the other ranges.
Acknowledgements
Thanks to SemperRabbit for dusting off this golden oldie, and to gmn for sharing.
There were once many versions of this classic recipe, but most of them were lost with the conversion to the new Foldit, when old recipes using the "V1" Foldit Lua interface were dropped. It's still technically possible to recover old "V1" recipes from a saved all.macro cookbook file.