Rush Hour Program

I am making a computer recreation of the game RushHour with the goal of getting a computer to solve the puzzle for me. RushHour is a puzzle game and in this game there are cars in a traffic jam and the goal is to clear a path so the red car can leave the board. In order to recreate the game, I need to imply the rules that are physically implied in the real game such as the cars can’t overlap, can’t jump over other cars, or leave the board (besides the red car).

My goal is to make a computer program successfully solve a RushHour puzzle in Python. I will do this by writing a program to randomly move the cars around until it finds the solution. I also need the code to explain to me its steps in figuring out the answer. When my program can do this, I want to be able to give it any RushHour puzzle and have it eventually find the solution.

I have started making my Python program and I can currently create images of a board with different colored cars on it. The next step is to write a function to move the cars and then make the cars obey the physical rules of the game. I need the code to recognize when I have solved the puzzle. Finally, I will make it record its moves and make the code randomly move until it solves the puzzle.

Comments