smack42 / DriftingDroids

DriftingDroids - yet another Ricochet Robots solver program
https://github.com/smack42/DriftingDroids/wiki
GNU General Public License v3.0
41 stars 12 forks source link

doesnt find the best solution #18

Closed rubo77 closed 4 years ago

rubo77 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 ;)