From 94ed771bb8a74f7e22220a86471e12019762aca4 Mon Sep 17 00:00:00 2001 From: DarkCider <52292032+DarkCider@users.noreply.github.com> Date: Tue, 30 Jan 2024 20:03:27 +0100 Subject: [PATCH] Fix relative default paths for stockfish and lc0 --- chesspp/lc0_strategy.py | 3 +-- main.py | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/chesspp/lc0_strategy.py b/chesspp/lc0_strategy.py index cb1fe11..d12d746 100644 --- a/chesspp/lc0_strategy.py +++ b/chesspp/lc0_strategy.py @@ -9,7 +9,7 @@ _DIR = os.path.abspath(os.path.dirname(__file__)) class Lc0Strategy(IStrategy): - def __init__(self, path="../lc0/lc0", rollout_depth: int = 4, + def __init__(self, path="lc0/lc0", rollout_depth: int = 4, limit: chess.engine.Limit = chess.engine.Limit(depth=4)): super().__init__(rollout_depth) self._lc0 = None @@ -35,5 +35,4 @@ class Lc0Strategy(IStrategy): def analyze_board(self, board: chess.Board) -> int: score = score_lc0(board, self.lc0) - print("lc0 score", score) return score diff --git a/main.py b/main.py index 80d1330..28f135e 100644 --- a/main.py +++ b/main.py @@ -112,11 +112,11 @@ def read_arguments(): strategies = {"Random": StrategyEnum.Random, "Stockfish": StrategyEnum.Stockfish, "Lc0": StrategyEnum.Lc0} if os.name == 'nt': - stockfish_default = "../stockfish/stockfish-windows-x86-64-avx2" - lc0_default = "../lc0/lc0.exe" + stockfish_default = "stockfish/stockfish-windows-x86-64-avx2" + lc0_default = "lc0/lc0.exe" else: - stockfish_default = "../stockfish/stockfish-ubuntu-x86-64-avx2" - lc0_default = "../lc0/lc0" + stockfish_default = "stockfish/stockfish-ubuntu-x86-64-avx2" + lc0_default = "lc0/lc0" parser.add_argument("--proc", default=2, help="Number of processors to use for simulation, default=1") parser.add_argument("--time", default=0.5, help="Time limit for each simulation step, default=0.5")