Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Newbie Chess programmer help please ?

Author: Geoff

Date: 07:49:36 04/18/03

Go up one level in this thread


On April 18, 2003 at 10:14:51, Daniel Clausen wrote:

>On April 18, 2003 at 09:55:13, Geoff wrote:
>
>>Hi
>>
>>I have just started my first few tentative steps of trying to figure out how
>>to write a computer chess program. Its going fairly well but I hit a slight
>>snag. I have been starting off by reading and using Tom Kerrigan's excellent
>>program. I have begun by using a simple Negamax search that looks at every
>>possible node, I have added a counter for the number of nodes searched.
>>
>>When I print this out for a 1 ply search from the normal start position I
>>get the expected
>>
>>1 ply  =  21        I.E root node + 20 white moves (16 pawn moves and 4
>>knight moves)
>>
>>however, my program gives me
>>
>> 2 ply =  421
>>
>> 3 ply = 9,323
>>
>> 4 ply = 206,604
>
>ply 0     1       (total 1)
>ply 1     20      (total 21)
>ply 2     400     (total 421)
>ply 3     8'902   (total 9'323)
>ply 4     197'281 (total 206'604)
>
>
>>I suspect my figures for ply's 2 to 4 are wrong, but it is dificult to prove
>>one way or another ?
>
>Your numbers are correct. You can verify such numbers with programs which
>support the 'perft <ply>' command, e.g Crafty.
>
>Btw: A good position to test your move generator is this one (also called
>'KiwiPete-position' - at least by me :)
>
>[D] r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq -
>
>It's a good test position since it involves many things like ep, castling etc.
>The number of legal positions for ply 1 and so on are: 48; 2,039; 97,862;
>4,085,603; 193,690,690; 8,031,647,685 ('finger kiwipete' in the ICC shows this
>information too)
>
>Good luck! :)
>
>Sargon

Hi Daniel

Thanks for that very speedy reply, I was pleasantly surprised you confirmed my
figures were right :-)
The reason I thought mine were wrong was that I quickly hacked Tom's program to
make it do no beta cutoffs and no search extensions so that theoretically it
should have given me the same set of numbers.
When I ran the 2 programs they only agreed at ply 1, I naturally concluded it
was my program that must be wrong !
The probable explanation is that my quick hack of Toms program was wrong, I must
have missed something.

Thanks for the interesting test position I will go and try that now. See if I
get the right numbers !

Incidentally is Crafty just a Winboard engine or does it have its own interface
? If it is just a Winboard engine how would I enter the 'perft <ply>' command ?

             Regards Geoff



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.