mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00: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:
parent
3f3365221b
commit
403db5a6e9
3 changed files with 5 additions and 4 deletions
|
@ -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");
|
||||
|
|
|
@ -124,7 +124,7 @@ namespace {
|
|||
}
|
||||
else if (token == "ucinewgame")
|
||||
{
|
||||
push_button("Clear Hash");
|
||||
push_button("New Game");
|
||||
Position::init_piece_square_tables();
|
||||
RootPosition.from_fen(StartPosition);
|
||||
}
|
||||
|
|
|
@ -125,6 +125,7 @@ namespace {
|
|||
o["Threads"] = Option(1, 1, 8);
|
||||
o["Hash"] = Option(32, 4, 4096);
|
||||
o["Clear Hash"] = Option(false, BUTTON);
|
||||
o["New Game"] = Option(false, BUTTON);
|
||||
o["Ponder"] = Option(true);
|
||||
o["OwnBook"] = Option(true);
|
||||
o["MultiPV"] = Option(1, 1, 500);
|
||||
|
|
Loading…
Add table
Reference in a new issue