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

doesnt find the best solution #18

Closed
rubo77 opened this issue Nov 17, 2019 · 2 comments
Closed

doesnt find the best solution #18

rubo77 opened this issue Nov 17, 2019 · 2 comments

Comments

@rubo77
Copy link

rubo77 commented Nov 17, 2019

This puzzle is solved best in 7 moves, but the solver only finds a solution with 9

Screenshot_20191114-224555

I guess it ignores a solution, where the red uses the staight line to the goal

@smack42
Copy link
Owner

smack42 commented Nov 17, 2019

I've copied the game state from your screenshot into DriftingDroids:

!DriftingDroids_game!C5DFD19D!AAAEL3ja5ZJLCoAwDETzRBBBxCt4VvdeWBdWrf2
kaS9gYEqSTpMMjYjIcqN3x+GwO6wO2zQOM8rEtJBOCfg8JRWdVWViHdKYwIh9EKojYUft
1s1i2M/Qmj+35JNNg3H7yEPJx9ZKmkMrzuejcGp6avP94L+xF/63C+CdU7r35AKtFQUm!

The latest released version (1.3.7) of DriftingDroids finds a 9-moves solution, because it doesn't allow the red robot to move straight to the goal:

1:  ↑  red North
2:  ←  red West
3:  ↓  red South
4:  ←  red West
5:  ↑  red North
6:  →  red East
7:  ↓  red South
8:  →  red East
9:  ↓  red South

However, the latest code change (commit 67057cf, implemented in response to issue #13) allows the program to find two 7-moves solutions, with the red robot moving straight to the goal:

1:  ↓  yellow South
2:  →  yellow East
3:  ↓  yellow South
4:  ←  yellow West
5:  ↓  green South
6:  →  yellow East rebound
7:  →  red East
1:  ←  red West
2:  ↓  green South
3:  ←  green West
4:  ↑  green North
5:  →  red East rebound
6:  ↓  green South rebound
7:  ←  red West

So, the issue you've reported is not a bug nor a missing feature of DriftingDroids. Please make sure that your program uses the latest code of the DriftingDroids solver.

@rubo77
Copy link
Author

rubo77 commented Nov 17, 2019

OK, so this is the same problem as solved in #13.
Now I remember: I tested in Roboyard 7.1 which still uses the solver without that fix.

sorry the bother again.

I hope I will soon be able to implement the board-setting im/export into Roboyard ;)

@rubo77 rubo77 closed this as completed Nov 17, 2019
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

2 participants