Author: Miguel A. Ballicora
Date: 10:07:06 08/03/01
Go up one level in this thread
On August 03, 2001 at 11:02:26, Pham Minh Tri wrote:
>On August 02, 2001 at 13:00:27, Miguel A. Ballicora wrote:
>
>>I have an idea for debugging that probably was used before but I want some
>>opinions about it:
>>
>>I am thinking about a system to trace what is going in my engine when I see a
>>weird move during a game. The main problem is that it is extremely difficult
>>to reproduce the same conditions for search. I have seen once in a while a
>>very weird move that I cannot reproduce it if I set the position to search.
>>The obvious reason is because the tables, hash and history bring information
>>that I lack when I try to reproduce.
>>Clearing the tables before each move would be (I think) an easy way out. The
>>engine in this state will be easy to debug but I would be dodging the problem.
>>In that way I would not see problems caused by the tables. I would be debugging
>>probably only part of the engine, dodging the most prone to errors!.
>>Saving the tables is out of the question, I would fill my HD in no time.
>>
>>What I think I can do is to save how many nodes I searched in any particular
>>move. When I ran out of time I keep record of the nodes.
>>When I try to reproduce the game I set the limit of thinking in "nodes", rather
>>than "time". I should be able to reach exactly the same situation in the search
>>in each of the moves of the games. Moreover, I should be able to reproduce the
>>whole thing with the debug version. Maybe I can store a log with all this
>>information and after the game let the program chew it and see if the
>>reproduction is exact.
>>
>>I think that debugging is tedious, boring but extremely important to make the
>>engine play the way we want. Particularly for chess programs where
>>the bugs are nasty because sometimes the program does not crash, it just plays
>>worse "sometimes".
>>
>>I just came up with this idea this morning, is there anything that I am missing?
>>suggestions? Is it obvious and everybody already does this?
>>
>>Regards,
>>Miguel
>>PS: I think that this kind of testing could be done also with pondering!
>>just limiting the pondering to n = nodes.
>
>Good idea. I think it works well in my system. Thanks.
>
>However, the problem maybe the time for reproducing. If I need repeat some thing
>in the 100th move, I have to wait my computer spend many hours to reach that
>move. So I could re-check 1 or 2 times per day only.
At least, reproduce it in a long time is better than nothing.
but I think that something else could be done.
After you reproduce the bug, say, in move 100th, you can add a line in the
program:
if (nmove==100) {
save_all_tables (statefile);
}
So, then you can start with the epd position of the move 100 and add this line
retrieve_all_tables (statefile);
I believe that if all the hashtables, learning, history heuristics, history etc.
has been saved, and restored you should be able to start right in move 100
and reproduce the bug. Then you can trace it to death.
With this trick of saving and restoring in another sesion the problem that
Martin mentions in another message could also be solved.
Well, so far this is speculation, I'll have to try.
Regards,
Miguel
>
>I think another way little easier (I use it sometimes) is to use fix depths,
>both for normal search and pondering.
>
>Pham
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.