Skip to content

Commit

Permalink
Clear hash on ucinewgame (#45)
Browse files Browse the repository at this point in the history
Bench: 32800648
  • Loading branch information
Aryan1508 committed Jun 19, 2021
1 parent b78c85b commit 93af1c7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Bit-Genie/src/uci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "benchmark.h"
#include "searchinit.h"

const char *version = "5.45";
const char *version = "5.5";

namespace
{
Expand Down Expand Up @@ -181,5 +181,11 @@ void uci_input_loop(int argc, char **argv)
table.reset();
BenchMark::bench(position, table);
}

else if (command == UciCommands::ucinewgame)
{
uci_stop(worker);
table.reset();
}
}
}
3 changes: 3 additions & 0 deletions Bit-Genie/src/uciparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ bool UciParser::operator==(UciCommands type) const
case UciCommands::bench:
return command == "bench";

case UciCommands::ucinewgame:
return command == "ucinewgame";

default:
return false;
break;
Expand Down
1 change: 1 addition & 0 deletions Bit-Genie/src/uciparse.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ enum class UciCommands
go,
stop,
setoption,
ucinewgame,

// *debugging/other purpose commands*
print,
Expand Down

1 comment on commit 93af1c7

@Aryan1508
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regression test against previous release (v5)

http://167.114.125.235:8080/test/1770/

ELO   | 120.67 +- 10.37 (95%)
SPRT  | 10.0+0.1s Threads=1 Hash=16MB
LLR   | 0.00 (-2.94, 2.94) [0.00, 0.00]
Games | N: 3512 W: 1892 L: 719 D: 901

Please sign in to comment.