Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The body of this solution is copied from day 16 (#20). Instead of "cost" per square, we use the number of moves it took to get to that square and no longer need to calculate the cost, it's all just based on moves. This technique worked for small puzzles, but it failed when running at the larger, 70x70 puzzle.
After debugging, it appeared the number of threads per iteration was growing exponentially around iteration 120. There was no possibility to cull threads because no solution had been found yet. To remedy this, we switch to a more depth first algorithm that processes new threads first, and limits the number to be processed per loop to a fixed number. With this technique, we can then find a solution faster, which allows us to shed more threads that aren't optimal so that we don't grow exponentially.
Finally, I swept the thread pool size manually. It appears that a smaller pool size resulted in a faster, more efficient path to the solution, but dropping it bellow ten resulted in the wrong answer and below seven resulted in no answer.