Should Dann's depth be halved or something ? The R (r) he calculated is already multiplied by OnePly , then when doing recursion it will be multiplied by OnePly again. Originally he used depth without dividing by OnePly (which I think is 2) , so I think that will double the reduction depth If that is the case then it is going to be very aggressive.
#ifdef SMOOTH_REDUCTION
double delta = approximateEval - beta;
delta = max(delta, 1.0); double ddepth = double(depth);
double r = 0.18 * ddepth + 3.1 + log(delta)/5.0;
r = r > ddepth ? ddepth : r;
int R = int(r);
#else
// Null move dynamic reduction based on depth
int R = (depth >= 5 * OnePly ? 4 : 3);
// Null move dynamic reduction based on value
if (approximateEval - beta > PawnValueMidgame)
R++;
#endif
nullValue = -search(pos, ss, -(beta-1), depth-R*OnePly, ply+1, false, threadID);
Last edited by Daniel Shawul on Tue Dec 29, 2009 7:14 pm, edited 1 time in total.
Note that I do not have the 1.62 sources, which have additional corrections.
I guess that the curve can be greatly improved. It was a first hack eyeball guestimate.
Ahaaaaa you changed the indentation of the functions !!!
In a project where more then one people work changing indentation of the whole file is never a good idea. It becomes difficult to spot the real differences for no gain at all.
Scales null move smoothly. I get about +150 Elo so far in my testing. How about yours?
I hope I'm wrong, but this is extremely hard to believe. I would be pleasantly surprised if this change increased the strength even by 20 Elo points. I haven't done any tests yet, though.
Daniel Shawul wrote:Should Dann's depth be halved or something ? The R (r) he calculated is already multiplied by OnePly , then when doing recursion it will be multiplied by OnePly again. Originally he used depth without dividing by OnePly (which I think is 2) , so I think that will double the reduction depth If that is the case then it is going to be very aggressive.
#ifdef SMOOTH_REDUCTION
double delta = approximateEval - beta;
delta = max(delta, 1.0); double ddepth = double(depth);
double r = 0.18 * ddepth + 3.1 + log(delta)/5.0;
r = r > ddepth ? ddepth : r;
int R = int(r);
#else
// Null move dynamic reduction based on depth
int R = (depth >= 5 * OnePly ? 4 : 3);
// Null move dynamic reduction based on value
if (approximateEval - beta > PawnValueMidgame)
R++;
#endif
nullValue = -search(pos, ss, -(beta-1), depth-R*OnePly, ply+1, false, threadID);
It means that when position evaluation is less then beta (very common case, more then 50% of cases) we don't have _any_ reduction but just a normal search ??????
In this case Dann's logic is like to do _not_ do null move when position evaluation is less then beta
double r = 0.18 * ddepth + 3.1 + log(delta)/5.0;
Balancing this equation is perhaps the next challenge? I need to think about this...
I think that it may be interesting to balance this equation also with
replacing approximateEval = quick_evaluate(pos) by something that is closer to the real evaluation or the real evaluation.
Even if evaluate(pos) is too expensive to calculate then it is not expensive to calculate average difference between quick_evaluate() and evaluate()
for the cases that evaluate() is being calculated and later use the average value for better approximation.
Uri
It would also be possible to do an IID like approch (IOW, search depth/2, depth-k, or something along those lines).
Scales null move smoothly. I get about +150 Elo so far in my testing. How about yours?
I hope I'm wrong, but this is extremely hard to believe. I would be pleasantly surprised if this change increased the strength even by 20 Elo points. I haven't done any tests yet, though.
How did you test this?
If you have a 64 bit PC, try this one (my previous posting of the JA build had a defect because I forgot to tell him to add macro definition for SMOOTH_SCALING): http://cap.connx.com/chess-engines/new- ... 16s_ja.rar
I tested by play against the unmodified stockfish, with fast paced games. I only had 30 games, and so randomness is (of course) huge and it is entirely possible that there will be no improvement at all.
Scales null move smoothly. I get about +150 Elo so far in my testing. How about yours?
I hope I'm wrong, but this is extremely hard to believe. I would be pleasantly surprised if this change increased the strength even by 20 Elo points. I haven't done any tests yet, though.
How did you test this?
If you have a 64 bit PC, try this one (my previous posting of the JA build had a defect because I forgot to tell him to add macro definition for SMOOTH_SCALING): http://cap.connx.com/chess-engines/new- ... 16s_ja.rar
I tested by play against the unmodified stockfish, with fast paced games. I only had 30 games, and so randomness is (of course) huge and it is entirely possible that there will be no improvement at all.