stellar

UCI Chess engine written in C++20
git clone git://git.dimitrijedobrota.com/stellar.git
Log | Files | Refs | README | LICENSE |

commit0a46402c5b440a635a843d73708c8d39841ad245
parent8213ab4717734de4b920fb5776bd0c15b58f5d2f
authorDimitrije Dobrota <mail@dimitrijedobrota.com>
dateFri, 1 Dec 2023 22:42:59 +0000

Experimental time fix

Diffstat:
MCMakeLists.txt|+-
Msrc/engine/engine.cpp|++

2 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/CMakeLists.txt b/CMakeLists.txt

@@ -3,7 +3,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

project(
Stellar
VERSION 9.0.3
VERSION 9.0.4
DESCRIPTION "Chess engine written in C++"
HOMEPAGE_URL https://git.dimitrijedobrota.com/stellar.git
LANGUAGES CXX

diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp

@@ -419,6 +419,7 @@ Move search_position(const uci::Settings &settingsr) {

rtable = repetition::Table();
Move lastBest;
uint64_t mid_point = settings->starttime + (settings->stoptime - settings->starttime) / 2;
uint8_t max_depth = settings->depth ? settings->depth : MAX_PLY;
for (uint8_t depth = 1; depth <= max_depth; depth++) {
lastBest = pvtable.best();

@@ -455,6 +456,7 @@ Move search_position(const uci::Settings &settingsr) {

std::cout << " pv " << pvtable << std::endl;
if (depth >= mate_ply) break;
if (!settings->depth && timer::get_ms() > mid_point) break;
}
settings->board = board;