Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Newbie Chess programmer help please ?

Author: Daniel Clausen

Date: 07:14:51 04/18/03

Go up one level in this thread


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



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.