Rush Hour Game + Solver

Programmed using Python 2.7

info

Background

This project was created as the final assignment for an introductory programming course taught in Python at Carnegie Mellon University. The assignment was to create a computer program using Python that was more complex than an homework assignment which could be completed over the span of the week. (See Course Gallery)

help

Project Selection

When I was 8 years old, my uncle gave me the Rush Hour Railroad Game as a present. I enjoyed spending hours on the more difficult puzzles which helped improve my problem solving skills. I wanted to create a computerized version that allows children who prefer playing digital games to develop their brains playing the same game I grew up with.

build

Algorithm

In my implementation of finding the solution for a game board, I combined Breadth First Search, which creates a tree of all possible moves, and A-star for prioritizing which branches to traverse first based on the weight given to that branch. I assigned the weight to different branches based on the number of other pieces that need to be moved.

Check out this video of my game in action!