A deep learning technique to solve Rubik's cube and other problems step-by-step