Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: speed in multithreaded chess programs

Author: Uri Blass

Date: 01:41:38 01/24/02

Go up one level in this thread


On January 24, 2002 at 02:19:11, Tony Werten wrote:
<snipped>
>>Here is our perft function:
>>
>>unsigned int perft(Position * board, int depth) {
>>        Position perft_board;
>>        Move_Stack moves[MAX_MOVES];
>
>This uses to much stack. Make a global array and you use a pointer to it.
>
>>        int num_moves,
>>            i;
>>        unsigned int nodes;
>>
>>        if (depth <= 0) {
>>                return 0;
>>        }
>>
>>        num_moves = 0;
>>        nodes = 0;
>>
>>        gen(board, &moves[0], &num_moves);
>
>Don't generate all moves at once. At least split it in capture and noncapture
>moves.

I do not understand why do you need to split it in capture and noncapture moves
for calculating the perft function.

I think that it is a waste of time to generate captures and later generate non
captures when the target is to calculate perft faster but maybe I am wrong(I did
not try it).

I agree that it seems to be a good idea for a chess playing program because the
target of a chess playing program is not only to generate moves faster but to
play better and you need to waste less time in ordering of moves and in qsearch
later if you generate first captures and later noncaptures.

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.