Hi, I'm working on an algorithm that solves a maze from the inside, and seeks out 1 of the 4 exits on the sides, and after getting 1, it goes to the next until it has them all. The maze is always 22x22, and you only have 400 steps. I asked my teacher about using a recursive method to solve it, and he said that is probably the best way to go. But, the catch is that you don't know where the walls are, and they change every time. The rat (I'm trying to get a rat to all four exits) starts in the 4x4 box in the middle that has between 1 and 5 exits (it's different every time a maze is generated). The rat can see how far away a wall is, and you are allowed to store the positions in an array if you wish. He can also build walls and get his current x and y position.
(movement options are north, south, east, and west)
Here's an example of what a maze looks like:
http://farm4.static.flickr.com/3528/3201086335_4556d4aed7_o.jpg
I think that's everything, any help would be greatly appreciated =]