The program, like every good maze solver accepted a two dimensional array of 'cells' as an input (where each cell was either accessible or an obstacle) and was to return the shortest possible route from the start to the destination cell. The program with its really cool recursive depth search algorithm I had proudly coded in VB at that time worked fine as long as it just had to find a path to the target.
However, when I tried to find the shortest possible one, it kept mysteriously freezing on some mazes, especially on those with few obstacles. I tried and tried but no matter what, I could not find the error. Until i realized that the program actually ran as expected, just that iterating through every single possible path on an almost blank 100x100 cells grid might just maybe not be the best idea. Should have used a heuristic breadth-first search to weight cells based on if they are moving closer to your destination or not.
It's not a perfect solution, but it returns the shortest route for 99% of all test cases. • hmphargh (unregistered). As someone who's written a few emulators, lemme tell you it's no fun. Congratulations on your tenacity.
However, your sense of purpose was a bit misguided. Glad you realize that now.:) About 1989-ish, I wrote an emulator for about 80% of the 8086 instruction set, in Pascal, on a VAX. I hated doing it, and the folks who needed it hated using it. Don't get me wrong, it worked fine; it's just that they hated running on an emulator when there was a lab full of perfectly functioning PC's with actual 8086 chips in the very next room). • Mark (unregistered).
It wasn't a recursion problem. As others have noted, it was more of a scaling problem - the amount of disk space required to store the log data was quickly exhausted. This is a WTF along the lines of 'no one will ever need more than 640K of RAM' and '14MB of disk space is such a huge amount of disk that no conceivable process could ever fill it up.' You youngsters and your terabyte filesystems and gigahertz processors. I have twin 114GB drives on a 3 year old system (not too shabby for it's day). Even with a few thousand photos of the kids, hundreds of songs and a handful of movies, I've only used about 30GB, and most of that is Windows updates.