Author: Uri Blass
Date: 04:22:25 03/31/02
Go up one level in this thread
On March 31, 2002 at 07:10:41, José Carlos wrote:
>On March 31, 2002 at 06:17:15, Klaus Friedel wrote:
>
>>Has anybody ever tried something like that in his null move code :
>>
>>
>> int nullDepth = depth - (NULL_REDUCE + 1)*DEPTH_BASE;
>>
>> if(tryNull){
>> executeNullMove();
>> beta -= NULL_BONUS;
>> value = - search(nullDepth, -beta, -beta+1, ply + 1);
>> undoNullMove();
>> if(value >= beta){
>> beta += NULL_BONUS;
>> ttStore();
>> return beta;
>> }
>> beta += NULL_BONUS;
>> }
>>
>>
>>Bigger values of NULL_BONUS increase the count of nodes prunded (but you migth
>>oversee some tactics). Values of about 30cp made my engine ply slightly better
>>than the default null-move (NULL_BONUS = 0).
>>
>>
>>Klaus
>
> A couple of thoughts:
> - You can be a bit faster declaring nullDepth inside the "if" and doing "beta
>+= NULL_BONUS;" just once, before "if(value >= beta){"
The code is going ot be slightly shorter but I do not see
why is it going to be faster and it seems to me the same speed.
You suggest to replace
if(value >= beta)
{
beta += NULL_BONUS;
ttStore();
return beta;
}
beta += NULL_BONUS;
by the following code:
beta+=NULL_BONUS;
if(value >= beta)
{
ttStore();
return beta;
}
In both cases beta+=NULL_BONUS is done exactly once in every case
so I do not see a reason that the shorter code
is going to be the faster code.
Uri
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.