Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: debugging move generation routines

Author: Mike Siler

Date: 19:38:59 01/10/04

Go up one level in this thread


On January 10, 2004 at 20:44:33, Jaime Benito de Valle Ruiz wrote:

>On January 10, 2004 at 19:09:34, Toni wrote:
>
>>Hi all,
>>
>>I've written the move generation routines for my engine. I'm now debugging them.
>>I've tested some positions in which there are castlings, en-passant captures and
>>promotions, and everything seems OK, but when computing perft sometimes it gives
>>wrong values at depth 4 or higher. The question is how to debug that, since the
>>number of moves involved is enormous.
>>
>>regards
>>
>>fermath
>
>Unless you want to create an automated way of checking this, when running a,
>let's say perft 4, and make sure your program displays the perft-1 (3) nodes
>that you get for every move, and compare them with the values of other programs.
>Pick one of the moves that has a wrong number of nodes, and make a perft 3 from
>that position. Again, you'll have a list of perft-1 (2) for each move, and at
>least one will be wrong. Repeat the process until you reach perft 1, and then
>you'll be able to see what move is illegal, and you'll be able to track the bug.
>I cannot remember which one, but there is a free program that has this "perft"
>and shows the node-count for every move rather than just giving you the total.
>Search the archives.
>Good luck,
>
>  Jaime

Albert Bertilsson's program "Sharper" is what you should use. The command
"divide x" will do a perft x and show you the number of positions resulting from
each root move. Also, Sharper is really fast, which is nice when you realize you
have a problem with perft 9 :)

It's available here:
http://www.albert.nu/default.asp?sub=programs/default.asp?sub=dperft/main.htm

Michael



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.