Fire's null_new_depth
Posted: Thu Feb 24, 2011 12:23 am
I was looking at Sentinel's Fire code, and null_move.h. It appears as though the null_new_depth function defined in null_move.h is not actually used. The code looks interesting and I was wondering if I am wrong and that the null move routines do indeed use this. Can you enlighten me?
Here's the code:
Here's the code:
Code: Select all
static int null_new_depth ( int depth, int delta ) {
double ddelta, r;
uint64 Nodes = 0;
int cpu, rp;
for ( cpu = 0; cpu < NumThreads; cpu++ )
for ( rp = 0; rp < RPperCPU; rp++ )
Nodes += RootPosition[cpu][rp].nodes;
ddelta = MIN ( ( double ) delta, 225.0 );
if ( depth < 34 || Nodes <= 5000 * 1000 )
r = 8 + sqrt ( ddelta * depth ) / 60.0;
else if ( depth < 46 || Nodes <= 200000 * 1000 )
r = 10 + sqrt ( ddelta * depth ) / 60.0;
else
r = 12 + sqrt ( ddelta * depth ) / 60.0;
return ( depth - ( int ) r );
}