Closed runar-rkmedia closed 1 year ago
Upon investigating, it seems the this would use the breadth-first-solver, and therefore goes through very many variations. Increasing the limits returns hints, but it takes too long.
Forcing use of the depth-first-solver does not give any results, even after increasing the limits beyond what is reasonable. Did this work previously? I might need to check some versions back.
I believe a better solver could be created here, especially for challenges. Challenges typically do not generate new cells, like infinite games are (as defined by their rules). This should make it possible to solve a game more algorithmically, instead of brute forcing it. I'll need to think about this one a bit. But typically I think it should be possible to create a generator that returns a list of a sorted ideal solution, ignoring if the path is possible to get to. This is also more aligned with how humans typically think when attempting to solve these games.
Also, some things are generally better to do in a game, so perhaps it should weigh these actions higher. For instance, it is generally better to do 4x4 into 16 to generate 32, than to do 4+4 into 8 to generate 16. Perhaps we should just attempt all possible multiplications before any additions.
Suggested instruction:
This should reduce the attempts by a whole lot, and likely to produce better results without so much brute-forcing.
The suggestion was added with 3a7ee7d2, which looks like it solves these types of boards really well.
We now have three different game-solving algorithms, each with their own strengths and weaknesses. I don't really see a way around having multiple algorithms for this, as each of them are really fast at some board, and really slow at others. There is some logic that attempts to pick the best algorithm.
The board returns an error:
the error logged by the server was: