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:
Marco Costalba
2009-12-01 11:56:48 +01:00
parent 3f3365221b
commit 403db5a6e9
3 changed files with 5 additions and 4 deletions

View File

@@ -402,13 +402,13 @@ bool think(const Position& pos, bool infinite, bool ponder, int side_to_move,
Problem = false;
ExactMaxTime = maxTime;
if (button_was_pressed("New Game"))
loseOnTime = false; // reset at the beginning of a new game
// Read UCI option values
TT.set_size(get_option_value_int("Hash"));
if (button_was_pressed("Clear Hash"))
{
TT.clear();
loseOnTime = false; // reset at the beginning of a new game
}
bool PonderingEnabled = get_option_value_bool("Ponder");
MultiPV = get_option_value_int("MultiPV");