Author: Peter Fendrich
Date: 16:11:15 12/26/02
Go up one level in this thread
On December 26, 2002 at 17:47:37, Uri Blass wrote: >Is there a fast way to find what is the first step that 2 similiar programs with >source code go different when you ignore specific part. > >I have 2 programs that are supposed to be the same except the fact that one save >time in order of moves. > >They are not the same. > >What I need is a third program that run the first 2 programs in the same time >and tell me the first step that they are different(difference in the procedure >that calculates order of moves does not count). > >I do not like to spend hours on trying to figure out the exact place that they >are different when after finding a place that they are different(can happen >after millions of nodes) I find again that they are different for different >unknown reason. > >This is exactly what happened to me now. > >Uri I have my own debugging code inside the program turned on by a #if statement that you adapted in your perft case: #if _DEBUG ... #endif For your type of problem I have a function that output all the moves (with some information as attached) in the tree in a form that is easy to read. I can narrow the output by giving two restrictions: 1) Output moves until max depth (not the same as what iteration it is) 2) Output moves only under a certain PV-line. For instance max detpth=5 and PV-line e4 e5 Nf3 doesn't blow up the output file very much but even a very big output file can be searched... This helps me to capture som tricky bugs and all sorts of things connected to move ordering and other tree issues. It let me track down what I'm looking for to a narrow part of the code and in some hard cases I have temporary coded more restrictions and special designed debbuging aids. It's quite a lot of work but once made it has proved to be very useful over and over again. My problem (as many others) is the few hours left each week for this hobby but this code has definitely paid back. Peter
This page took 0 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.