Page 1 of 1

Maze Solver

Posted: Fri Jul 25, 2014 9:56 pm
by GCHarder
Here's a program that uses three methods to solve mazes generated by the "Maze Creator" I posted earlier.

"Random Rat, AKA RANDY RAT", takes along time to find the exit but it WILL find the exit eventually. It's not due to the speed of the ZX81 but more due to the algorithm, the rat is pretty stupid and does a lot of backtracking. To help it along it will back fill dead ends and it will also travel in the same direction until a junction or wall is encountered then it will pick another direction to move. This helps it find dead ends more quickly. It is interesting to watch, for awhile, kind of like watching, well, a rat in a maze, you almost want to yell at it "GO RIGHT you idiot".

"Dead End Fill", fills in dead ends until only the solution(s) is left. Moves along quite nicely and is interesting to watch.

"Walkthru", uses a predefined pathway to guide the intrepid explorer to the exit.

No special hardware needed, just a 16K RAMPACK.

Regards;

Greg

Re: Maze Solver

Posted: Fri Jul 25, 2014 10:32 pm
by olofsen
Very interesting - thanks!

Re: Maze Solver

Posted: Sat Jul 26, 2014 11:00 pm
by Andy Rea
ah ah this looks well interesting, gonna take a look soon, thanks for sharing

regards Andy