Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question: For maximum efficiency, where do you use InCheck() function

Author: Tom Kerrigan

Date: 22:37:20 11/25/01

Go up one level in this thread


On November 25, 2001 at 18:12:17, William Bryant wrote:

>I think my program uses InCheck() to often, slowing down the search.
>
>I'm looking for comments and suggestions of different ways to utilize the
>function, and decrease the number of calls.
>
>At present, I call it at the end of each MakeMove() to see if this is an
>illegal position.
>
>Suggestions and discussion appreciated.
>
>William

You can generate and play illegal moves, and put a test in your move generator
to see if it generates a king capture. If it does, you know an illegal move was
played and you can back up. I know that many programs work like this. My program
does not, because I don't think the performance benefit (maybe 5-15%) is worth
the added complexity.

-Tom



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.