Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Move generation

Author: Uri Blass

Date: 02:11:15 08/14/03

Go up one level in this thread


On August 14, 2003 at 02:27:40, Rick Bischoff wrote:

>Hi everyone,
>
>In my latest exercise in futility, I am coding different Board/Move generation
>schemes and was wondering what raw move generation scores you get.  Let's define
>"raw move generation" as follows:
>
>1) All piece moves
>2) No special moves (castling, en passant) pawn promotions are not special.
>
>And then define the following coroutines:
>
>int wmetaperft(Board, depth) {
>-- if (depth == 0) return 1;
>--else {
>---nodes = 0
>---generateMoves for White
>---For each Move M,
>----makeMove M
>----nodes += bmetaperft(B, depth - 1)
>----unmakeMove
>---End for
>---return nodes

I think that you test mainly making moves and not generating moves

You can get better number by the following code that does not make the last
ply(changes were marked by **):

int wmetaperft(Board, depth) {
-- if (depth == 0) return 1;
--else {
---nodes = 0
---generateMoves for White
---For each Move M,
**if (depth>1)
**{
----makeMove M
----nodes += bmetaperft(B, depth - 1)
----unmakeMove
  }
**else
** nodes+=1;
}
---End for
---return nodes


Uri



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.