Computer Chess Club Archives


Search

Terms

Messages

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

Author: Robert Hyatt

Date: 14:51:37 07/24/00

Go up one level in this thread


On July 24, 2000 at 17:46:18, Larry Griffiths wrote:

>On July 24, 2000 at 14:30:53, Robert Hyatt wrote:
>
>Hmm... The Lady or the Tiger...
>
>>
>>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."
>>
>
>Yuk, Gag, Puk! Dont like this approach.  Its the Tiger for sure.



Think about this:  99%+ of all moves are perfectly legal.  Do you want to
do the incheck test on them to make sure they are legal, which means you do
the incheck test for 100% of your moves.  Or do you want to do the "I capture
a king to prove your last move was illegal" which only happens 1% of the
time.

_that_ is the efficiency issue I mentioned.

If you use null move you have to be careful, because null move will certainly
fail high if you are mated. :)




>
>>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.
>
>Do I smell Perfume :) Must be the Lady...
>
>This is my current approach and I must make it more efficent :)
>
>Larry.



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.