diff --git a/main.cpp b/main.cpp index a8fc3c8..13d2cb9 100644 --- a/main.cpp +++ b/main.cpp @@ -9,7 +9,7 @@ #include "eval.h" #include "endgame.h" -#define TOPPLE_VER "0.0.3" +#define TOPPLE_VER "0.0.4" const unsigned int MB = 1048576; @@ -247,6 +247,7 @@ int main(int argc, char *argv[]) { std::cout << *board << std::endl; } } else if (cmd == "quit") { + search_abort = true; std::cout << "exiting" << std::endl; break; } diff --git a/search.h b/search.h index 4ec8862..dca683c 100644 --- a/search.h +++ b/search.h @@ -89,7 +89,7 @@ namespace search_heur { } private: - move_t killers[MAX_PLY][2] = {0}; + move_t killers[MAX_PLY][2] = {{EMPTY_MOVE}}; }; } @@ -104,7 +104,7 @@ struct search_limits_t { { // Try and use a consistent amount of time per move time_limit = (time / - (moves_to_go > 0 ? moves_to_go : std::max(60 - now, 40))); + (moves_to_go > 0 ? moves_to_go + 1: std::max(60 - now, 40))); // Handle increment: Look to gain some time if there isn't much left time_limit += inc / 2;