Author: Robert Hyatt
Date: 10:00:11 09/20/04
Go up one level in this thread
On September 20, 2004 at 11:19:33, martin fierz wrote:
>On September 20, 2004 at 10:38:31, Robert Hyatt wrote:
>
>[snip]
>
>>>>>> if (tree->in_check[ply] && tree->last[ply]-tree->last[ply-1] == 1) {
>>>>>> tree->one_reply_extensions_done++;
>>>>>> extended+=onerep_depth;
>>>>>> }
>
>[snip]
>
>>>so the whole point of bob's code is that it runs 0.01% faster if he first checks
>>>for in_check and only then checks the (a-b == 1) thing, because he saves the
>>>a-b. at least that's what i assume when looking at it.
>>
>>No. in_check = 0 says use normal move generator. in_check = 1 says use special
>>check-evasion generator so that I don't have to cull all the illegal moves as I
>>try to search them.
>
>not "No." :-)
>i was talking about the code i've left unsnipped. it would be simpler if you
>left away the if tree->in_check[ply] part; i assume that is what is about 0.01%
>faster than doing only the second part.
>
>cheers
> martin
I'd rather not have the test. But it is mandatory, as when I generate moves, I
either call GenerateMoves() or GenerateCheckEvasions(), and then I drop into the
code you see. If I didn't qualify the in_check part, it is possible that I
would extend way too often. IE My first call to NextMove() generates one move
that comes from the hash table. That would look like a one-reply situation when
it isn't. If I start off in check, I generate all legal moves before I do
anything...
while ((tree->phase[ply] =
(tree->in_check[ply]) ? NextEvasion(tree, ply, wtm) : NextMove(tree,
ply, wtm))) {
That is the top of my "next move and search" loop. When I get to the one-reply
extension test, Either of the above could have been called, and NextMove() could
have produced just the hash move, or if none, one good capture, or if none, one
killer move, any of which would trigger the one-reply extension when it should
not...
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.