mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-06 10:53:50 +08:00
Don't clear hash at the beginning of a new game
After 900 games at 1+0 Mod vs Orig +217 =480 -196 +8 ELO Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -402,13 +402,13 @@ bool think(const Position& pos, bool infinite, bool ponder, int side_to_move,
|
|||||||
Problem = false;
|
Problem = false;
|
||||||
ExactMaxTime = maxTime;
|
ExactMaxTime = maxTime;
|
||||||
|
|
||||||
|
if (button_was_pressed("New Game"))
|
||||||
|
loseOnTime = false; // reset at the beginning of a new game
|
||||||
|
|
||||||
// Read UCI option values
|
// Read UCI option values
|
||||||
TT.set_size(get_option_value_int("Hash"));
|
TT.set_size(get_option_value_int("Hash"));
|
||||||
if (button_was_pressed("Clear Hash"))
|
if (button_was_pressed("Clear Hash"))
|
||||||
{
|
|
||||||
TT.clear();
|
TT.clear();
|
||||||
loseOnTime = false; // reset at the beginning of a new game
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PonderingEnabled = get_option_value_bool("Ponder");
|
bool PonderingEnabled = get_option_value_bool("Ponder");
|
||||||
MultiPV = get_option_value_int("MultiPV");
|
MultiPV = get_option_value_int("MultiPV");
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ namespace {
|
|||||||
}
|
}
|
||||||
else if (token == "ucinewgame")
|
else if (token == "ucinewgame")
|
||||||
{
|
{
|
||||||
push_button("Clear Hash");
|
push_button("New Game");
|
||||||
Position::init_piece_square_tables();
|
Position::init_piece_square_tables();
|
||||||
RootPosition.from_fen(StartPosition);
|
RootPosition.from_fen(StartPosition);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ namespace {
|
|||||||
o["Threads"] = Option(1, 1, 8);
|
o["Threads"] = Option(1, 1, 8);
|
||||||
o["Hash"] = Option(32, 4, 4096);
|
o["Hash"] = Option(32, 4, 4096);
|
||||||
o["Clear Hash"] = Option(false, BUTTON);
|
o["Clear Hash"] = Option(false, BUTTON);
|
||||||
|
o["New Game"] = Option(false, BUTTON);
|
||||||
o["Ponder"] = Option(true);
|
o["Ponder"] = Option(true);
|
||||||
o["OwnBook"] = Option(true);
|
o["OwnBook"] = Option(true);
|
||||||
o["MultiPV"] = Option(1, 1, 500);
|
o["MultiPV"] = Option(1, 1, 500);
|
||||||
|
|||||||
Reference in New Issue
Block a user