Don wrote:petero2 wrote:tpetzke wrote:Hi Matthew,
1 one ply search is easy to debug. Note the position where it happens and then for every move in the list look which one causes the trouble and why it is going so deep.
You can do this step by step, you will probably note something wrong with the code that lets you bang your head on the wall a few times. (Like one move captures the king or so)
This happened to me quite a few times.
Thomas...
In Texel I have written code that dumps the whole search tree to a file. Things like alhpa, beta, depth, ply, score, score type (upper/lower bound or exact), evaluation score and hash key are stored. I can then run the program in a special mode that lets me navigate in the search tree stored in the file. This makes it relatively easy to understand why the program is doing something stupid even in deep searches and without disabling parts of the search algorithms.
The tree logging/analysis code is in the files treeLogger.hpp and treeLogger.cpp in this zip file:
http://web.comhem.se/petero2home/texel101.zip
That is an excellent idea. I have done this myself but only in an ad-hoc manner to solve a specific bug.
that's what i do to debug parallel search since 1999. dumping to a textfile had however 2 disadvantages:
a) the files would get too big to download back then (i had a 56k6 modem at home and Bob's quad Xeon is obviously in USA).
b) writing to a textfile takes a lot of system time, so the odds a parallel bug occurs dramatically reduces.
So i store it in shared memory (which means you're got a limited time for the error to occur) then dump that to a binary file. That binary file compressed i can download and then with a parser parse it to a textfile with all information.
It's really useful for all sorts of things, as long as you know where to look at inside those huge files. The expanded textfiles usually were gigabytes huge.
Try to find a parallel bug then!
In 2002 i changed the habit for the parallel search - i wrote on a paper the parallel functionality and tried to prove it correct on paper. That removed a LOT of the pain
