summary refs log tree commit diff stats
path: root/missing
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-02-21 21:45:17 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-02-21 21:45:17 -0500
commitf6413b88fba9ac6d61c7ecdd8a1a300b69368c8d (patch)
tree5aa32bafd5670974e13dd4c7c27ee68bd2030741 /missing
parenta8f3a69fdf0428fc26121bfb9d705fdef904eef4 (diff)
downloadmazeoflife-f6413b88fba9ac6d61c7ecdd8a1a300b69368c8d.tar.gz
mazeoflife-f6413b88fba9ac6d61c7ecdd8a1a300b69368c8d.tar.bz2
mazeoflife-f6413b88fba9ac6d61c7ecdd8a1a300b69368c8d.zip
Ensured that generated levels are possible
I wrote a pathfinding algorithm that will attempt to solve boards as they are generated. I tried a variety of algorithms, most of which either did not terminate in a timely fashion. Depth-first search, with a tendancy towards moving towards the center, proved to be the best algorithm, and managed to solve boards the other algorithms timed out on. Because the algorithm was mostly tested on levels 0-9, and level diversity increases dramatically past that point (to the point where, past level 50, I am concerned that actual impossible boards may appear), I cannot be completely sure that the algorithm will perform as desired. To help debug, the program will dump a string representing a board state if an impossible board is generated.

Also fixed a bug in wrap().
Diffstat (limited to 'missing')
0 files changed, 0 insertions, 0 deletions