From 623968e1fff8510c5c46cd2dd73550aa6e78dd44 Mon Sep 17 00:00:00 2001 From: Sander Land Date: Sun, 12 Apr 2020 13:18:12 +0200 Subject: [PATCH] clean up --- KataGo/analysis_config.cfg | 4 ++-- controller.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/KataGo/analysis_config.cfg b/KataGo/analysis_config.cfg index 8aeaf54..6cebae5 100644 --- a/KataGo/analysis_config.cfg +++ b/KataGo/analysis_config.cfg @@ -30,7 +30,7 @@ reportAnalysisWinratesAs = BLACK # Make the bot never assume that its pass will end the game, even if passing would end and "win" under Tromp-Taylor rules. # Usually this is a good idea when using it for analysis or playing on servers where scoring may be implemented non-tromp-taylorly. # Defaults to true! Uncomment and set to false to disable this. -# conservativePass = true +conservativePass = true # When using territory scoring, self-play games continue beyond two passes with special cleanup # rules that may be confusing for human players. This option prevents the special cleanup phases from being @@ -55,7 +55,7 @@ maxVisits = 500 # number of visits, and thread contention will reduce efficiency, so cross-position parallelization is preferable # to numSearchThreads, but numSearchThreads is preferable if you want to reduce latency, and have individual # searches complete faster by doing fewer of them at a time. -numSearchThreads = 1 +numSearchThreads = 2 # GPU Settings------------------------------------------------------------------------------- diff --git a/controller.py b/controller.py index 4aafe15..754482c 100644 --- a/controller.py +++ b/controller.py @@ -252,7 +252,7 @@ class EngineControls(GridLayout): if mode == "extra": visits = sum([d["visits"] for d in current_move.analysis]) + self.visits[0][1] self.info.text = f"Performing additional analysis to {visits} visits" - self._request_analysis(current_move, visits=visits,priority=self.game_counter - 1_000) + self._request_analysis(current_move, min_visits=visits, priority=self.game_counter - 1_000) return elif mode == "sweep": analyze_moves = [Move(coords=(x, y)).gtp() for x in range(self.board_size) for y in range(self.board_size) if (x, y) not in stones] @@ -353,7 +353,7 @@ class EngineControls(GridLayout): else: # early on / root / etc self.outstanding_analysis_queries.append(copy.copy(query)) - def _request_analysis(self, move, faster=False, visits=0, priority=0): + def _request_analysis(self, move, faster=False, min_visits=0, priority=0): faster_fac = 5 if faster else 1 move_id = move.id moves = self.board.moves @@ -362,7 +362,7 @@ class EngineControls(GridLayout): "id": str(move_id), "moves": [[m.bw_player(), m.gtp()] for m in moves], "includeOwnership": True, - "maxVisits": max(visits, self.visits[fast][1] // faster_fac), + "maxVisits": max(min_visits, self.visits[fast][1] // faster_fac), "priority": priority, } if self.debug: