Search This Blog

Saturday, December 18, 2010

More on the Maze

I redid the mouse/maze simulator.  It is much faster.  I also wrote it in a more procedural fashion.  I am getting a better idea of what the code will look like on the Pic this way.  I just swapped the files, so the old code is no longer available.  Instead, the new code is here:
maze and mouse simulator

This program parses a character based maze file.  Here is an example file:
Sample Maze File

It should be easy to create new mazes with this format.  Remember the IEEE rules.  The middle four tiles are the goal and must have at least one way to enter.  The start tile is in the lower left ( south west ) corner.  It must have only one open direction.  This simulator is only geared to the competition 16 x 16 mazes.

Screenshots:
The Maze in its Initial State

 The Maze After First "Flood" - no walls known

The Solved Maze - some unexplored cells

The next step for me is to figure out why gpsim isn't working with the I2C eeprom 256k bit module.  I can do everything but acknowledge polling.  It always times out.  This is odd since the code runs on a real Pic.

No comments:

Post a Comment