Challenge: sum of squares. Let's break 299
|
01-22-2018, 01:11 PM
(This post was last modified: 01-22-2018 01:13 PM by Thomas Okken.)
Post: #24
|
|||
|
|||
RE: Challenge: sum of squares. Let's break 299
According to the main comment, that function does perform simple backtracking, but with two important twists: it is randomized, and it gives up and restarts after a certain number of steps with no solution.
I had a moment of déjà vu reading that, because years ago, I wrote a FreeCell solver that was able to find solutions, through backtracking (with a bunch of FreeCell-specific optimizations), by giving up when it got stuck and trying again, randomized, until it found a solution. It was surprisingly effective (as in: it solved every starting position I threw at it, and quickly), but I had totally forgotten about it and it never occurred to me to try that approach here. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)