![]() ![]() How do you know if the program is making progress? That's seems hard to tell without it running to completion. Alternatively, if I were to find a good heuristic, how long would you expect A* to take to find the solution? With 12 3, the algorithm slowed to checking 1 node every 20 seconds, so yeah.ĭoes anyone know how I’m supposed to write the heuristic? It’s a 3D space that moves with rotations, so I’m not sure how to apply Manhattan distance. Essentially, the heuristic function was now determining the “best” move out of any combination of the next 3 moves. Then, there were 12 2, for every possible combination of 2 moves (like twisting the top face left and then the front face right), then there were 12 3, for every possible combination of 3 moves. Originally, there were 12 moves (for twisting each face either left or right). expanding the possible moves from just one twist to multiple twists. I tried fixing it by giving it some foresight, i.e. The program is taking way too long to run, and doesn’t seem to be making progress. if there’s a red on a certain point where there should be a green according to the goal state), and it doesn’t seem to work. For the heuristic, I’m using an overly simple function that just adds 1 to h for every incorrect tile (e.g. For path cost, I’m just adding 1 to g per move. I’m trying to make a Rubik’s cube solver using A*, but I’m having trouble thinking of a heuristic that’s any good. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |