From 1ee3df03c6ce993803a5a730de663ce09dfd429e Mon Sep 17 00:00:00 2001 From: Sander Land Date: Sun, 18 Oct 2020 22:16:05 +0200 Subject: [PATCH] pass less quickly/stupidly --- katrain/core/ai.py | 2 +- katrain/core/constants.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/katrain/core/ai.py b/katrain/core/ai.py index 8d38062..b15a1d6 100644 --- a/katrain/core/ai.py +++ b/katrain/core/ai.py @@ -360,7 +360,6 @@ def generate_ai_move(game: Game, ai_mode: str, ai_settings: Dict) -> Tuple[Move, ai_thoughts += f"ScoreLoss strategy found {len(candidate_ai_moves)} candidate moves (best {top_cand.gtp()}) and chose {aimove.gtp()} (weight {topmove[1]:.3f}, point loss {topmove[0]:.1f}) based on score weights." elif ai_mode in [AI_SIMPLE_OWNERSHIP, AI_SETTLE_STONES]: stones_with_player = {(*s.coords, s.player) for s in game.stones} - stones_without_player = {s.coords for s in game.stones} next_player_sign = cn.player_sign(cn.next_player) if ai_mode == AI_SIMPLE_OWNERSHIP: @@ -417,6 +416,7 @@ def generate_ai_move(game: Game, ai_mode: str, ai_settings: Dict) -> Tuple[Move, and "ownership" in d and (d["order"] <= 1 or d["visits"] >= ai_settings.get("min_visits", 1)) for move in [Move.from_gtp(d["move"], player=cn.next_player)] + if not (move.is_pass and d["pointsLost"] > 0.75) ], key=lambda t: t[5]["pointsLost"] + ai_settings["attach_penalty"] * t[3] diff --git a/katrain/core/constants.py b/katrain/core/constants.py index ce59cb7..680d33a 100644 --- a/katrain/core/constants.py +++ b/katrain/core/constants.py @@ -71,8 +71,8 @@ AI_STRENGTH = { # dan ranks, backup if model is missing. TODO: remove some? AI_INFLUENCE: -7, AI_TERRITORY: -7, AI_RANK: float("nan"), - AI_SIMPLE_OWNERSHIP: 3, - AI_SETTLE_STONES: 4, + AI_SIMPLE_OWNERSHIP: 2, + AI_SETTLE_STONES: 2, } AI_OPTION_VALUES = {