Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Must I do KingInCheck after every move when using BitBoards ?

Author: Robert Hyatt

Date: 11:30:53 07/24/00

Go up one level in this thread


On July 24, 2000 at 12:58:58, Larry Griffiths wrote:

>
>It appears that I must test to see if the King is in Check after every move now
>that I am using Bitboards since it produces moves reguardless of the King being
>in check.
>
>Any Opinions/Suggestions?
>
>Larry :)


It depends on how you implement your search.  There is nothing wrong with
making moves that are illegal, and then at the next ply you capture the king
and return a value that says "that move was illegal, ignore it."

Or you can check for in check after a move...  It doesn't matter as far as
playing legal chess goes, it simply becomes a matter of efficiency and how you
want to write the search code.



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.