Skip to content

Commit

Permalink
Merge pull request #66 from kobanium/develop
Browse files Browse the repository at this point in the history
bugfix for analyze command
  • Loading branch information
kobanium authored Jun 13, 2023
2 parents 32c86b7 + 8e76b12 commit 657540b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 4 additions & 5 deletions gtp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,17 +302,16 @@ def _analyze(self, mode: str, arg_list: List[str]) -> NoReturn:
mode (str): 解析モード。値は"lz"か"cgos"。
arg_list (List[str]): コマンドの引数リスト (手番の色, 更新間隔)。
"""
color = arg_list[0]
interval = 0
if len(arg_list) >= 2:
interval = int(arg_list[1])/100

if color[0][0] in ['B', 'b']:
if arg_list[0][0] in ['B', 'b']:
to_move = Stone.BLACK
elif color[0][0] == ['B', 'w']:
elif arg_list[0][0] in ['W', 'w']:
to_move = Stone.WHITE
else:
respond_failure("lz-analyze color")
respond_failure(f"{mode}-analyze color")
return

analysis_query = {
Expand All @@ -339,7 +338,7 @@ def _genmove_analyze(self, mode: str, arg_list: List[str]) -> NoReturn:
elif color.lower()[0] == 'w':
genmove_color = Stone.WHITE
else:
respond_failure("genmove_analyze color")
respond_failure(f"{mode}-genmove_analyze color")
return

if self.use_network:
Expand Down
3 changes: 2 additions & 1 deletion program.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@
# 思考時間管理処理の改良。
# Version 0.7.0 : lz-analyze, lz-genmove_analyze, cgos-analyze, cgos-genmove_analyzeコマンドのサポート。
# 強化学習に関するバグと超劫の判定処理のバグの修正。
VERSION="0.7.0"
# Version 0.7.1 : 解析コマンドのバグ修正。
VERSION="0.7.1"

0 comments on commit 657540b

Please sign in to comment.