mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 11:39:15 +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;
|
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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue