Computer Chess Club Archives


Search

Terms

Messages

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

Author: Daniel Clausen

Date: 03:51:08 11/25/99

Go up one level in this thread


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.



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.