mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Rename FromTo -> History (#963)
Previously, we had duplicated History: - one with (piece,to) called History - one with (from,to) called FromTo Now that we have only one, rename it to History, which is the generally accepted name in the chess programming litterature for this technique. Also correct some comments that had not been updated since the introduction of CMH. No functional change.
This commit is contained in:
@@ -212,7 +212,7 @@ void Search::clear() {
|
||||
for (Thread* th : Threads)
|
||||
{
|
||||
th->counterMoves.clear();
|
||||
th->fromTo.clear();
|
||||
th->history.clear();
|
||||
th->counterMoveHistory.clear();
|
||||
th->resetCalls = true;
|
||||
}
|
||||
@@ -985,7 +985,7 @@ moves_loop: // When in check search starts from here
|
||||
ss->history = (cmh ? (*cmh )[moved_piece][to_sq(move)] : VALUE_ZERO)
|
||||
+ (fmh ? (*fmh )[moved_piece][to_sq(move)] : VALUE_ZERO)
|
||||
+ (fmh2 ? (*fmh2)[moved_piece][to_sq(move)] : VALUE_ZERO)
|
||||
+ thisThread->fromTo.get(~pos.side_to_move(), move)
|
||||
+ thisThread->history.get(~pos.side_to_move(), move)
|
||||
- 8000; // Correction factor
|
||||
|
||||
// Decrease/increase reduction by comparing opponent's stat score
|
||||
@@ -1415,7 +1415,7 @@ moves_loop: // When in check search starts from here
|
||||
|
||||
Color c = pos.side_to_move();
|
||||
Thread* thisThread = pos.this_thread();
|
||||
thisThread->fromTo.update(c, move, bonus);
|
||||
thisThread->history.update(c, move, bonus);
|
||||
update_cm_stats(ss, pos.moved_piece(move), to_sq(move), bonus);
|
||||
|
||||
if ((ss-1)->counterMoves)
|
||||
@@ -1427,7 +1427,7 @@ moves_loop: // When in check search starts from here
|
||||
// Decrease all the other played quiet moves
|
||||
for (int i = 0; i < quietsCnt; ++i)
|
||||
{
|
||||
thisThread->fromTo.update(c, quiets[i], -bonus);
|
||||
thisThread->history.update(c, quiets[i], -bonus);
|
||||
update_cm_stats(ss, pos.moved_piece(quiets[i]), to_sq(quiets[i]), -bonus);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user