Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

puzzle that just hangs with no timeout #12

Closed
smack42 opened this issue Aug 7, 2018 · 5 comments
Closed

puzzle that just hangs with no timeout #12

smack42 opened this issue Aug 7, 2018 · 5 comments

Comments

@smack42
Copy link
Owner

smack42 commented Aug 7, 2018

reported via BoardGameGeek
https://boardgamegeek.com/article/29708792#29708792

Hi Michael

Really enjoy using this program, thanks for making it.

After a few weeks with no issues (except the occasional timeout due to solution requiring >16 steps), I've come across a puzzle that just hangs with no timeout) per the below screenshot.

@smack42
Copy link
Owner Author

smack42 commented Aug 7, 2018

The screenshot posted at BGG shows a custom board 8x8 with 5 robots.

This is the saved board state:

!DriftingDroids_game!ECF20C7D!AAABM3jaY2BgYOAAYVYgwQXlaAOxERAzATEDIxQw
MDJgAkYGJGFGVC6aMkY4E6YUwWdEiDAiG4aikkR7GeEOp8wBUCFTZgYIyQgAutIBMQ==!

It's a solution01 position, which means that the active robot can reach the goal in zero or one moves (in this example it's one move).

@smack42
Copy link
Owner Author

smack42 commented Aug 7, 2018

The solver finished after 2240 seconds (almost 38 minutes!) and found some 11-move solutions, including many duplicates.
This is the expected result of the "solution01 solver mode" that doesn't store any visited positions because it must be able to visit them more than once. That's why it runs very slowly and discovers some solutions several times.
So this is not really a bug but just a result of the "slow solution01" special case.

@smack42
Copy link
Owner Author

smack42 commented Aug 10, 2018

Ideas for improvements:

  • somehow speed up the "solution01 mode"
  • add an option to allow the user to disable "solution01 mode"
  • better algorithm to eliminate duplicate solutions

smack42 added a commit that referenced this issue Sep 16, 2018
We store as KnownStates the positions of the other (non-goal) robots, in order to avoid searching their positions multiple times. The goal robot can still drift on its sub-optimal path which it has to take, because we don't store its positions in KnownStates.
fixes issue #12
@smack42
Copy link
Owner Author

smack42 commented Sep 16, 2018

I've found a way to speed up the "solution01 mode" and committed a code change.
The example board given here is now solved in less than 1 second. The solver finds one solution of 11 moves.
So, this issue seems to be closed, just have to do more tests...

@smack42
Copy link
Owner Author

smack42 commented Sep 17, 2018

closed by release 1.3.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant