Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Thats not incremental

Author: Sune Fischer

Date: 03:05:18 10/29/02

Go up one level in this thread


On October 29, 2002 at 04:45:02, Severi Salminen wrote:

>>In incremental move generation I understand that we have different phases of
>>move generation viz GEN_HASH_MOVE, GEN_KILLER_MOVE, GEN_CAP etc
>>My question is, suppose we generate the lone hash move in the GEN_HASH_MOVE
>>phase and suppose (unfortunately) it did'nt result in a cutoff so we have to
>>generate more moves, say we are in GEN_CAP phase, do we test each move whether
>>it has already been tried in GEN_HASH_MOVE and GEN_KILLER_MOVE phase OR do we
>>simply generate all the moves without worrying whether the hash move (or killer
>>moves) gets tried twice.
>
>First of all: I think the above is not traditionally called incremental move
>generation. Incremental move generation means (if I'm not mistaken here) that we
>update the legal moves list only when necessary between plies - we don't
>generate them every ply. So in opening position we generate all moves for black
>and white. White then moves e4. This affects then e4 pawn (of course) and king,
>queen, g-knight and light bishop. Other pieces (including black) can make same
>moves as before e4. So maybe the above should be called generation of moves in
>phases or something.

I agree, incremental move generation is something different (and even more
complex).

>Secondly: what do you think is faster: searching a branch of maybe hundreds of
>thousands of nodes (usually hash move generates a big sub-tree), or going
>through an array of about 40 elements? The latter of course. So I think that
>also in your engine you definitely should _not_ search any moves twice.

I only go through the capture movelist, and that's because I order them by SEE
which is relative expensive.
For the remaining non-capture moves I don't scan the list, I wait as long as
possible and check only at the last moment before actually tying the move. So if
I do get a cut-off I save checking the rest of the moves.

 // non-captures search:
 while (moves_left) {
  move=nextMove();
  if (move==hash_move || move==killer1  || move==killer2)
    continue;
  makeMove(move);
  ....
 }

-S.
>Severi





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.