>Hi All, yes I know it's an old topic :-) but , I felt like having a bit of fun ! , I've just written a GUI TOH using C# and have it working fine - including a "Solve" button which shows an animated solution starting the game from scratch, what I would like to provide , is , if the player ( me ) gets stuck part of the way through a game and needs to see the solution, is , to solve it from the current state of play - my maths fail me here :-( - anyone know how to do this ?
One non-mathematical approach:
- Before the game even starts, you know the "optimal" solution
- As the player makes moves, check them against the optimal solution
- If the player's moves are optimal, well and good
- If they are not optimal (i.e. "mistakes"), start tracking the moves
- If the player gives up, you can "undo" their mistakes one at a time, going back to where they made the first mistake, then you solve it optimally from there
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up