Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question about check evasion generation

Author: Johan de Koning

Date: 00:24:53 08/22/03

Go up one level in this thread


On August 21, 2003 at 04:18:15, Peter McKenzie wrote:

>On August 20, 2003 at 22:03:13, Jaime Benito de Valle Ruiz wrote:
>
>>My program uses a normal pseudo-legal generator and another one for check
>>evasions (how original!).
>>I was about to spend long hours (rather days) doing nearly-impossible speed
>>optimizations on the latter, when I start wondering if it's really worth the
>>effort, since this generation function is probably called very few times
>>compared to the "normal" one most of the time,
>
>Of course you could easily do a quick hack that counts the number of times the
>check evasion generator is called relative to the normal generator.  If you do
>this, please post the results here :-)

LOL

>I'd guess the ration would be something like 1:20.

That seems like a fair estimate for a perft search.
However, in a selective search checks and captures dominate the counts.
So my guess would be more like 1:2 (ie 1/3 of generations being in check), and
probably higher in endgames.

Brief testing on The King reveals that it's more like 1:1 in middle games and
2:1 in endgames with R or Q. But that's because TK does some checks and all
evasions in the Q-search. So for your local number you still need to get out of
that lazy chair and start typing. :-)

But there more to it than just check counts. Generating pseudo-legals when in
check might cost a lot of legality testing. But in-check positions are mostly of
the fail-high kind, and most of the fail-highs are accomplished by a capture
that is in the front of the move list. (Not tested, I don't have pseudo-legal
generation handy.)

... Johan



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.