Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: I don't use illegal moves EVER

Author: leonid

Date: 05:42:29 11/25/99

Go up one level in this thread


On November 25, 1999 at 06:51:08, Daniel Clausen wrote:

>Hi
>
>On November 24, 1999 at 21:30:03, Robert Hyatt wrote:
>>
>>However, if you reach ply X and the side on move _is_ in check, then most of
>>the moves are going to be illegal.  It turns out to be useful to cull the
>>illegal moves more quickly than making the move and then discovering that it
>>is illegal.  With bitmaps, it is pretty efficient to generate legal moves
>>only, when you know you are in check to start with...
>
>I'm currently working on an inCheck-MoveGenerator. Most of the moves it
>generates are legal, but still not all. Consider the following: your king
>is checked by an enemy rook on the other side of the board. So I generate
>moves which:
>
>  -capture the enemy rook
>  -put a piece between the enemy rook and your king
>  -move king out of check
>
>But it's still possible that the piece you moved between the enemy rook
>and your king is pinned too, and therefore the move is illegal. Doesn't
>happen often, but it does.
>
>So my engine can detect most of the 1-legal-move-only positions and
>extend, but not all. For the moment I don't consider this a serious
>problem, since my engine has a lot of other problems. :)
>
>Kind regards,
> -sargon
>
>PS. Concerning NPS: With a special inCheck-MoveGenerator the NPS should
>    drop, although the programs performance overall increases. If you
>    use a lot of inCheck-extensions the NPS-drop is even bigger, because
>    the extensions LEAD to positions where you are in check and therefore
>    most moves are illegal.


I am curious about your InCheck-MovesGenerator. Do you use it for producing all
the moves beside the moves of the King? And if you do so, how you start your
procedure that recognize the legality of the moves? Do you make this by finding
at the beginning of given ply position of the King? And do you make work this
generator before even finding one single move? I am asking this to recognize my
part of the logic that correspond to your generator.

Thanks,
Leonid.




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.