This commit is contained in:
Sander Land committed 2020-04-26 23:40:01 +02:00
1 parent 52aefb47f4
commit edabc38128
3 files changed
+8 -2

No files matched your search

+1 -1
View File
@@ -75,7 +75,7 @@ def ai_move(game: Game, ai_mode: str, ai_settings: Dict) -> Tuple[Move, GameNode
weighted_coords = [(policy_grid[y][x] * weight(x, y), weight(x, y), x, y) for x in range(size[0]) for y in range(size[1]) if policy_grid[y][x] > 0]
ai_thoughts += f"Generated weights for {ai_mode} according to weight factor {ai_settings['line_weight']} and distance from 4th line. "
elif "local" in ai_mode or "tenuki" in ai_mode:
var = ai_settings["local_stddev"] ** 2
var = ai_settings["stddev"] ** 2
if not cn.single_move or cn.single_move.coords is None:
weighted_coords = [(1, 1, *top_policy_move.coords)] # if "pick" in ai_mode -> even
ai_thoughts += f"No previous non-pass move, faking weights to play top policy move. "
+6
View File
@@ -55,6 +55,12 @@ ai_settings["pick_n"] = 5 # dropping below 7k at 5/0.33
ai_strategy = "P+Weighted"
ai_settings = {"pick_override": 0.95}
ai_strategy = "P+Local"
ai_settings["pick_frac"] = 0.0
ai_settings["pick_n"] = 20
ai_settings["stddev"] = 1.0
logger.log(f"STARTED ENGINE", OUTPUT_ERROR)
game = Game(Logger(), engine, {})
+1 -1
View File
@@ -4,4 +4,4 @@ GREETING="Hello, welcome to an experimental version of KaTrain AIs - These are b
GREETING="Hello, welcome to an experimental version of KaTrain AIs - These are based on weakened policy nets of KataGo. Current mode is: Policy-weighted random style."
BYEMSG="Thank you for playing. If you have any feedback, please message my admin!"
MAXGAMES=3
gtp2ogs --apikey $(cat my/apikey) --username katrain-dev --greeting "$GREETING" --rankedonly --farewell "$BYEMSG" --debug --ogspv katago --noclock --speeds blitz,live --maxconnectedgames $MAXGAMES --persist --minrank 15k --noautohandicap --maxhandicap 0 --fakerank 3k --boardsizes 9,13,19 --komis automatic,6.5 -- python ai2gtp.py
gtp2ogs --apikey $(cat my/apikey) --username katrain-dev --greeting "$GREETING" --rankedonly --farewell "$BYEMSG" --ogspv katago --noclock --speeds blitz,live --maxconnectedgames $MAXGAMES --persist --minrank 15k --noautohandicap --maxhandicap 0 --fakerank 3k --boardsizes 9,13,19 --komis automatic,6.5 -- python ai2gtp.py