Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: null move improvement ?

Author: José Carlos

Date: 08:01:46 03/31/02

Go up one level in this thread


On March 31, 2002 at 08:40:26, Klaus Friedel wrote:

>On March 31, 2002 at 07:22:25, Uri Blass wrote:
>
>>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
>
>The code I posted is not complete. As posted here anyone would move some
>statements. But thats not the point, as it doesn't affect functionality.
>
>The question is: Does the lower branching factor gained by moving the
>null-window weight out the danger of pruning away important lines.
>
>Your "improvement" is wrong. If you move the line "beta+=NULL_BONUS" you have to
>adjust the if-expression:
>
>beta += NULL_BONUS;
>if(value >= beta - NULL_BONUS){
>  ttStore();
>  return beta;
>}

  Sorry. Of course you're right.

  José C.



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.