Skip to content

Commit

Permalink
Add move overhead uci option
Browse files Browse the repository at this point in the history
Bench: 2134743
  • Loading branch information
SzilBalazs committed Aug 15, 2023
1 parent aef8618 commit ed01336
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/chess/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ using Ply = int8_t;

constexpr int64_t INF_TIME = 1'000'000'000'000'000;
constexpr int64_t INF_NODES = 1'000'000'000'000'000;
constexpr int64_t MOVE_OVERHEAD = 30;
constexpr Score UNKNOWN_SCORE = 300000;
constexpr Score INF_SCORE = 200000;
constexpr Score MATE_VALUE = 100000;
Expand Down
1 change: 1 addition & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ namespace chess {

namespace search {
Depth lmr_reductions[200][MAX_PLY + 1];
int64_t TimeManager::MOVE_OVERHEAD = 30;
}

void init_all() {
Expand Down
3 changes: 3 additions & 0 deletions src/search/time_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
namespace search {
class TimeManager {
public:

static int64_t MOVE_OVERHEAD;

/**
* Initializes time management with the given limits.
*
Expand Down
6 changes: 6 additions & 0 deletions src/uci/uci.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ namespace uci {
},
1, 128);

options.emplace_back(
"Move_Overhead", "30", "spin", [&]() {
search::TimeManager::MOVE_OVERHEAD = get_option<int>("Move_Overhead");
},
0, 1000);

options.emplace_back(
"UCI_ShowWDL", "false", "check", [&]() {
search::report::set_show_wdl(get_option<bool>("UCI_ShowWDL"));
Expand Down

0 comments on commit ed01336

Please sign in to comment.