Skip to content

mapluisch/ACM-Rush-Hour

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Proseminar ACM: Rush-Hour

Rush Hour-Puzzle solver and editor written in C# / Unity. ACM Proseminar, Universität Tübingen, by Martin Pluisch (2019)

Based on the ACM programming contest problem "Rush Hour": PDF

My resulting paper, describing the details of my implementation: PDF

UI Screenshot

Input

InputField

You can enter your puzzle on the left hand side (make sure to use the same input-syntax as the ACM problem states above).

Editor

The preferred way to enter a puzzle is the editor; press on the pencil in the upper right corner to toggle the editor state.

Hover above the parking lot in the center and choose which car you want to place via the keyboard number-row (not the numpad).

Solving a puzzle

Output

To solve a puzzle, simply press the "Solve" button in the lower left.

It'll automatically solve your puzzle and describe all necessary steps in the lower right scroll-text.

You can click through the different solution-steps or "autoplay", using the buttons in the middle right.

Implementation

The actual solve-algorithm uses breadth-first search (to ensure an optimal solution).

To store & compare different search-nodes, I use a HashSet<int> (for fast O(1) "contains"-operations).

The hardest possible Rush Hour puzzle is solved within ~0.05 seconds.

About

Rush Hour-Puzzle solver and editor written in C# / Unity. ACM Proseminar, Universität Tübingen.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages