Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: annoying en passant x-ray

Author: Sune Fischer

Date: 16:43:00 11/30/03

Go up one level in this thread


On November 30, 2003 at 18:50:07, Gerd Isenberg wrote:

><snip>
>>>The rule I would follow is:  "You cannot play a move which puts your own king
>>>into check."  I hope that was built into all chess engines.
>>>
>>>Bob D.
>>
>>Sure, but if you want to implement legal move generation,
>>to avoid making/unmaking invalid moves, you need some other conditions.
>>Ep is a bit annoying, all others are easier to implement.
>>Pinned piece determination is required, but also fine for other purposes.
>>
>>Gerd
>
>There are always these pathological positions.
>This one to get the idea of legal move generation ;-)
>
>[D] 8/5p2/pP2k2p/P3q3/1p2Q3/rR2K1Rr/3B3P/2b3n1 w - -

No pun intended, but what is it that is so clever about legal move generation?

It seems faster to put off the expensive legality check until the last moment
just before you make the move.
That way you save a lot of legality checking if/when you fail high.

The only advantage that I can see, is that the move list might become 1-2 moves
shorter and therefore a bit faster to score and order, but for me the legality
checking of ~30 moves is more expensive.

-S.

-S.



This page took 0.01 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.