Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Pre-calculated move generation

Author: Larry Griffiths

Date: 11:55:10 06/26/00

Go up one level in this thread


On June 26, 2000 at 12:31:22, ujecrh wrote:

>I wonder if it has already been tried or if it is not useful/feasible at all.
>
>The idea is that, excepting special moves like castle or en-passant we could
>easilly generate all possible moves for all possible piece/square at the very
>start of the engine. It would fill some arrays (like
>rook_moves[square][directions][moves/or destination square])with a total of
>about 4000 entries.
>
>Having not to generate moves during the search itself might save some time and
>even a slow move generator wold not be a problem as it would be called only at
>initialization of the engine.
>
>Is that completely wrong ?
>
>Ujecrh

It is not completely wrong :)

Writing a chess engine means going down rabbit trails sometimes :)
You will learn things if you try out your ideas.
It is my belief that you would be spending time looking at moves and testing
squares to see when a sliding sequence is blocked, or checking that the moves
are valid.  Capture moves usually result in cut-offs a lot more than non-capture
moves so the idea is to be able to generate only capture moves for all the
pieces hoping for a cutoff, then generating non-capture moves if a cut-off does
not occur.

Larry





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.