mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 12:07:43 +00:00
Rewrite do_null_move()
Use a more traditional approach, along the same lines of do_move(). It is true that we copy more in do_null_move(), but we save the work in undo_null_move(). Speed test shows the new code to be even a bit faster. No functional change.
This commit is contained in:
+2
-2
@@ -667,12 +667,12 @@ namespace {
|
||||
if (eval - PawnValueMg > beta)
|
||||
R += ONE_PLY;
|
||||
|
||||
pos.do_null_move<true>(st);
|
||||
pos.do_null_move(st);
|
||||
(ss+1)->skipNullMove = true;
|
||||
nullValue = depth-R < ONE_PLY ? -qsearch<NonPV, false>(pos, ss+1, -beta, -alpha, DEPTH_ZERO)
|
||||
: - search<NonPV>(pos, ss+1, -beta, -alpha, depth-R);
|
||||
(ss+1)->skipNullMove = false;
|
||||
pos.do_null_move<false>(st);
|
||||
pos.undo_null_move();
|
||||
|
||||
if (nullValue >= beta)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user