Dann Corbit wrote:Karlo Bala wrote:
Something similar was done in rob*****:
Code: Select all
null_do();
hole_new = DEPTH - null_riduzione;
hole_new -= ((uint32)(MINIMUM(POSITION_0->value - VALUE, 96))) / 32;
He seems to have gotten away with a lot less math. Maybe it is a better idea.
However, this approach does not account for existing depth and the reductions will be titanic for huge scores (which is perhaps a good thing).
I was thinking about something more simple too, avoiding floating point calculations if I can. Basically using the value from hash is like doing the verification search for free
before, or maybe even instead of, null-move search. You maybe can get away with not searching at all but it is a bit dangerous
More conservative approach is severely downsizing null-move depth if the quality of your pre-verification search is good enough and the value found is high enough above beta. Then you do not really need any deep null move search, also possibly because
a) long null move searches are only searching nonsense,
b) do not improve the quality of threat moves -important in Stockfish- much and
c) pollute the hashtable.
For instance, you can decide not to null move at all if you find no hash information, forcing you to search so at least the next time you pass here you have a good pre-verification search done. I'm not sure if it helps but that is what I am doing in Rainbow Serpent at the moment. In Ancalagon I did different things. The Null move dynamic reduction is all just copied from Stockfish but there you could do more, just as Robbolito/Ippolit/Rybka seems to be doing and just as in the Smooth Scaling Null Move from you Dann.
These are the present conditions for doing null move in Rainbow Serpent but they are not very sophisticated:
Code: Select all
// Null move search
if ( allowNullmove
&& depth > OnePly
&& !isCheck
&& !value_is_mate(beta)
&& (ttValue >= beta || ttDepth <= depth-2*OnePly)
&& approximateEval >= beta - NullMoveMargin
&& ok_to_do_nullmove(pos))
{
ss[ply].currentMove = MOVE_NULL;
StateInfo st;
pos.do_null_move(st);
int R = (depth >= 5 * OnePly ? 4 : 3); // Null move dynamic reduction, no changes from Stockfish here
if (ss[ply - 2].currentMove == MOVE_NULL) nullBeta = beta + 0x20;
Value nullValue = -search(pos, ss, -(nullBeta-1), depth-R*OnePly, ply+1, false, threadID);
As it is, I always have both ttValue and ttDepth when starting a null move search and I think you can do much more with it, just like in Smooth Scaling Nullmove.