Need a better heuristic for solving a 2x2x2 rubiks cube

486 Views Asked by At

I am writing a Python program that solves a 2x2x2 rubiks cube using A* and beam search. However, if I scramble the puzzle more than ten times the program keeps running forever, and I think it is because the heuristic I am using is incorrect. My heuristic function just counts the average number of unique colors on each face of the rubik's cube and returns it, but I am not sure how to test if it is admissible. Can someone give me tips on how to check whether the heuristic is admissible or not? Thank you.