Browse Source

Add database format

master
Macoy Madson 3 years ago
parent
commit
96906b5ec8
  1. 20
      ReadMe.org

20
ReadMe.org

@ -3,3 +3,23 @@
This is a project for V. She loves [[https://en.wikipedia.org/wiki/Rush_Hour_(board_game)][Rush Hour]] puzzles. For her birthday, I have a goal to make a Rush Hour player for her Android phone, using my [[https://macoy.me/code/macoy/cakelisp/][Cakelisp]] and [[https://macoy.me/code/macoy/gamelib][Gamelib]] tools.
I am using [[https://www.michaelfogleman.com/rush/][Michael Fogleman's Rush Hour database]] ([[https://web.archive.org/web/20201101044241/https://www.michaelfogleman.com/rush/][archive.org]]) in order to provide her tons of puzzles.
* Database format
/(The following text is copied from [[https://www.michaelfogleman.com/rush/][Michael Fogleman's Rush Hour database]] ([[https://web.archive.org/web/20201101044241/https://www.michaelfogleman.com/rush/][archive.org]]), for easier reference)/
#+BEGIN_QUOTE
The database is a simple text file with just a few columns. There is one row for every valid (solvable, minimal) cluster. The columns are: # of moves, board description, and cluster size (# of reachable states).
The board description is a 36-character string representing the state of the unsolved board. It is a 6x6 2D array in row-major order. The characters in the description follow these simple rules:
o empty cell
x wall (fixed obstacle)
A primary piece (red car)
B - Z all other pieces
I used lowercase o instead of periods . for the empty cells in the database so that the entire board description can be selected with a double-click.
#+END_QUOTE
An example board:
#+BEGIN_SRC C
60 IBBxooIooLDDJAALooJoKEEMFFKooMGGHHHM 2332
#+END_SRC

Loading…
Cancel
Save