by H.G.Muller » 16 May 2006, 13:34
Still, Michael, what you ask seems unrealistic to expect: that you post your source code on a web-site somewhere, and then hold it against people on a completely different website that they haven't solved any problems with it... While that other web-site does not even mention or specify the problem!
People on this forum are generally very helpful if you ask clearly formulated questions here. But just an "I tried it and it didn't work", without even posting what you tried... Bob is right, understanding someone elses code that you've never seen before is a hell of a lot larger job than 20 minutes. It would only be 20 minutes for someone that already intimately knows the code, like yourself.
So a much more fruitful approach would be post your search routine here, or better yet, a pseudo-code digest of your search routine, show how you tried changing it, and invite us to have a look at it. I am sure that would produce quick results. IID is conceptually very easy to implement. You have a depth argument to your seach(), and rather than using that argument directly in the body you replace it everywhere by an iter_depth that runs upto depth, as the loop index of a loop that you put around the bulk of your current search routine.
The only details to be added is how you would use what you learned in the previous iteration to improve the next one, a situation that is logically equivalent to when you get a hash hit of unsufficient depth.