Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Check evasion : what's the point anyway?

Author: Robert Hyatt

Date: 07:49:08 08/24/04

Go up one level in this thread


On August 24, 2004 at 06:17:50, martin fierz wrote:

>as a related question to mridul's post: i don't have a special check evasion
>generator. i just have a single normal move generator and if it's a check, i
>will have to execute all the normal moves, and undo them again after seeing that
>it's still a check.
>
>does anyone have an estimate on how much a specialized check-evasion move
>generator would speed up a program?
>is it really worth it?
>
>cheers
>  martin


It is faster.  What you avoid is (a) a call to MakeMove() and then a call to
InCheck() to see if the resulting position is legal.

In tactical positions it obviously helps more.  In normal positions less since
there are fewer checks.  I can't quote exact numbers since I did mine so long
ago, but I vaguely remember that it was worth 10%.  I should add that with
bitboards it is easier to do than without (I did it both ways since Cray Blitz
didn't do bitboards).

I believe that when I tested, I was not doing the InCheck() test.  I did a
MakeMove() and a call to Search() which would generate moves there and notice
that the king was getting captured.  That is the most efficient way to do this
in normal positions, but when there are _lots_ of checks, the recursive call
overhead, plus generating moves, makes the special-purpose generator more
efficient.  I later went to the InCheck() approach as null-move while in check
is a killer (bad) idea. :)

If you want real performance data, it would not be hard for me to modify Crafty
to not use the special generator.  Another good side-effect of the special
generator is that it only produces legal moves and you know exactly how many
there are before you start the search, if you want to do a "one legal reply"
extension.  It is harder to do if you have to first exclude illegal moves one by
one...



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.