From ad862d61e2894a52621af21e16ac9777e850090d Mon Sep 17 00:00:00 2001 From: Thomas Lindner Date: Thu, 29 Dec 2022 21:46:09 +0100 Subject: [PATCH] fix stockfish usage, reduce hashtable size, ship sound files --- setup.cfg | 4 ++++ src/blunderboard/blunderevaluator.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 674fa3b..6e32231 100644 --- a/setup.cfg +++ b/setup.cfg @@ -26,6 +26,10 @@ install_requires = [options.packages.find] where = src +[options.data_files] +sounds/blunder = sounds/blunder/tts_what_a_blunder.mp3 +sounds/illegal = sounds/illegal/alarm.mp3 + [options.entry_points] console_scripts = blunderboard = blunderboard:main diff --git a/src/blunderboard/blunderevaluator.py b/src/blunderboard/blunderevaluator.py index f07fc25..4af8112 100644 --- a/src/blunderboard/blunderevaluator.py +++ b/src/blunderboard/blunderevaluator.py @@ -16,7 +16,7 @@ class BlunderEvaluator: # More threads will make the engine stronger, but should be kept at less than # the number of logical processors on your computer. "Ponder": "false", - "Hash": 256, + "Hash": 16, # Default size is 16 MB. It's recommended that you increase this value, but keep # it as some power of 2. E.g., if you're fine using 2 GB of RAM, set Hash to # 2048 (11th power of 2). @@ -35,13 +35,13 @@ class BlunderEvaluator: self.engine = Stockfish() self.settings = engine_settings self.engine.update_engine_parameters(self.settings) + self.engine.set_position() self.current_evaluation = ( self.engine.get_evaluation() ) # This is not necessary, now that I think about it. self.evaluations: list[dict] = [] self.current_wdl = self.engine.get_wdl_stats() self.wdls: list[tuple[int, int, int]] = [] - self.engine.set_position() def reset(self): self.engine.set_position()