Author: Albert Bertilsson
Date: 13:29:47 03/22/03
Go up one level in this thread
On March 21, 2003 at 19:01:15, Anthony Cozzie wrote: >Debugging Suggestion (from the desk of Vincent Diepeveen, actually): > >Make a header file for sharper with code that looks like so: > >#ifdef _DEBUG_LOGGING_ENABLED_ >#define print_ab_entry printf("ndid: %d new subcall of alpha-beta, windows = >etc"); >#endif >#else >#define print_ab_entry >#endif > >This way my source still looks good without thousands of #ifdefs in the code, >and I can turn on debugging and log everything zappa does: every hash probe, >every recursive call, etc. You can use grep to look at the file, e.g.: > >grep 000000001 zappa_debug_log > >000000001: calling PVS, childid = 000000001, move= Nd4, A=800, B=900, D=3, >check=1 >000000001: PVS returns, score=835 >000000001: calling PVS, childid = 000000003, move= Ne3, A=835, B=900, D=2, >check=0 >000000001: PVS returns, score=625 > >Then, suppose there is an error with the evaluation of Ne3, I type grep >000000003 zappa_debug_log and I can rapidly zero in on the problem. > >One of the problems with alpha-beta is that it will 'hide' errors from you. >Your program almost certainly has bugs in the hashing (it took me *8 months* to >iron out everything in zappa and I still don't completely trust the hash table), >and probably other bugs. > >anthony Thanx for the tip, I'll have a look at this, I'm still a novice so I guess it will take me some time to understand what's causing my problems. And I'll definetly have a close look at hash keys although I feel quite confident in them (that confidence might be the real trouble!). /Regards Albert
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.