Merge official-stockfish/master
authorFabian Fichter <ianfab@users.noreply.github.com>
Thu, 11 Feb 2021 22:29:23 +0000 (23:29 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Thu, 11 Feb 2021 22:29:23 +0000 (23:29 +0100)
bench: 4387592

1  2 
src/movepick.cpp

@@@ -109,10 -105,10 +109,10 @@@ void MovePicker::score() 
  
        else if (Type == QUIETS)
            m.value =      (*mainHistory)[pos.side_to_move()][from_to(m)]
 -                   + 2 * (*continuationHistory[0])[pos.moved_piece(m)][to_sq(m)]
 -                   +     (*continuationHistory[1])[pos.moved_piece(m)][to_sq(m)]
 -                   +     (*continuationHistory[3])[pos.moved_piece(m)][to_sq(m)]
 -                   +     (*continuationHistory[5])[pos.moved_piece(m)][to_sq(m)]
 +                   + 2 * (*continuationHistory[0])[history_slot(pos.moved_piece(m))][to_sq(m)]
-                    + 2 * (*continuationHistory[1])[history_slot(pos.moved_piece(m))][to_sq(m)]
-                    + 2 * (*continuationHistory[3])[history_slot(pos.moved_piece(m))][to_sq(m)]
++                   +     (*continuationHistory[1])[history_slot(pos.moved_piece(m))][to_sq(m)]
++                   +     (*continuationHistory[3])[history_slot(pos.moved_piece(m))][to_sq(m)]
 +                   +     (*continuationHistory[5])[history_slot(pos.moved_piece(m))][to_sq(m)]
                     + (ply < MAX_LPH ? std::min(4, depth / 3) * (*lowPlyHistory)[ply][from_to(m)] : 0);
  
        else // Type == EVASIONS
                m.value =  PieceValue[MG][pos.piece_on(to_sq(m))]
                         - Value(type_of(pos.moved_piece(m)));
            else
-               m.value =  (*mainHistory)[pos.side_to_move()][from_to(m)]
-                        + (*continuationHistory[0])[history_slot(pos.moved_piece(m))][to_sq(m)]
+               m.value =      (*mainHistory)[pos.side_to_move()][from_to(m)]
 -                       + 2 * (*continuationHistory[0])[pos.moved_piece(m)][to_sq(m)]
++                       + 2 * (*continuationHistory[0])[history_slot(pos.moved_piece(m))][to_sq(m)]
                         - (1 << 28);
        }
  }