This commit is contained in:
Sander Land committed 2020-05-06 18:59:46 +02:00
1 parent 5ed38554ec
commit f97586a0d4
7 files changed
+22 -17

No files matched your search

+5 -2
View File
@@ -58,6 +58,7 @@ but has since grown to include a wide range of features, including:
## Manual
### Play
Under the 'play' tab you can select who is playing black and white.
* Human is simple play with potential feedback, but without auto-undo.
* Teach will give you instant feedback, and auto-undo bad moves to give you a second chance.
@@ -80,6 +81,7 @@ In short, if you are a weaker player you should mostly on large dots that are re
while stronger players can pay more attention to smaller mistakes.
#### AIs
Available AIs, with strength indicating an estimate for the default settings, are:
* **[9p+]** **Default** is full KataGo, above professional level.
@@ -115,7 +117,6 @@ Keyboard shortcuts are shown with **[key]**.
* **[s]**: Equalize: Re-evaluate all currently shown next moves with the same visits as the current top move. Useful to increase confidence in the suggestions with high uncertainty.
* **[d]**: Sweep: Evaluate all possible next moves. This can take a bit of time even though 'fast_visits' is used, but the result is nothing if not colourful.
## Keyboard and mouse shortcuts
In addition to shortcuts mentioned above, there are:
@@ -136,7 +137,6 @@ In addition to shortcuts mentioned above, there are:
* **[Ctrl-n]**: Load SGF from clipboard
* **[space]**: Pass
## Configuration
Configuration is stored in `config.json`. Most settings are now available to edit in the program, but some advanced options are not.
@@ -173,9 +173,12 @@ If you ever need to reset to the original settings, simply re-download the `conf
* The first startup of KataGo can be slow due to GPU tuning, after that it should be much faster.
* The program is running too slowly. How can I speed it up?
* Adjust the number of visits or maximum time allowed in the settings.
* KataGo crashes with out of memory errors, how can I prevent this?
* Try using a lower number for `nnMaxBatchSize` in `KataGo/analysis_config.cfg`, and avoid using the board size 29 version.
## Contributing
* Feedback and pull requests are both very welcome.
* For suggestions and planned improvements, see the 'issues' tab on github.
* You can also contact me on discord (Sander#3278) or [reddit](http://reddit.com/u/sanderbaduk) to give feedback, or simply show your appreciation.
+1 -1
View File
@@ -15,7 +15,7 @@ if True or bot in ["dev", "local"]:
else:
GTP2OGS = "node ../stable-gtp2ogs"
BOT_SETTINGS = f" --maxconnectedgames {MAXGAMES} --maxhandicapunranked 25 --maxhandicapranked 1 --boardsizesranked 19 --boardsizesunranked all --komisranked automatic,5.5,6.5,7.5 --komisunranked all"
if 'beta' in bot:
if "beta" in bot:
BOT_SETTINGS += " --beta"
else:
BOT_SETTINGS += " --rankedonly"
+1 -1
View File
@@ -3,7 +3,7 @@
"katago": "KataGo/katago-bs",
"model": "KataGo/models/b15-1.3.2.txt.gz",
"config": "KataGo/analysis_config.cfg",
"threads": 8,
"threads": 16,
"max_visits": 500,
"fast_visits": 50,
"max_time": 3.0,
+2 -2
View File
@@ -212,7 +212,7 @@ class SGFNode:
@property
def next_player(self):
if "B" in self.properties or "AB" in self.properties: # root or black moved
if "B" in self.properties or "AB" in self.properties: # root or black moved
return "W"
else:
return "B"
@@ -222,7 +222,7 @@ class SGFNode:
if "B" in self.properties or "AB" in self.properties:
return "B"
else:
return "W" # nb root is considered white played if no handicap stones are placed
return "W" # nb root is considered white played if no handicap stones are placed
class SGF:
+1
View File
@@ -179,6 +179,7 @@ class ConfigPopup(QuickConfigGui):
if not old_proc:
self.katrain.game.analyze_all_nodes() # old engine was broken, so make sure we redo any failures
self.katrain.update_state()
Clock.schedule_once(restart_engine, 0)
self.katrain.debug_level = self.config["debug"]["level"]
+7 -3
View File
@@ -7,6 +7,7 @@ from core.common import OUTPUT_INFO
from core.engine import KataGoEngine
from core.game import Game, KaTrainSGF
start = time.time()
if len(sys.argv) < 2:
exit(1)
inputfile = sys.argv[1]
@@ -18,9 +19,10 @@ with open("config.json") as f:
game_settings = settings["game"]
trainer_settings = settings["trainer"]
#engine_settings['threads'] = 32
# engine_settings['threads'] = 32
engine_settings["max_time"] = 1000
class Logger:
def log(self, msg, level):
if level <= OUTPUT_INFO:
@@ -32,11 +34,13 @@ logger = Logger()
engine = KataGoEngine(logger, engine_settings)
move_tree = KaTrainSGF.parse_file(inputfile)
game = Game(logger, engine, game_settings, move_tree=None, analyze_fast=True)
game.root=move_tree
game.root = move_tree
reverse_nodes = game.root.nodes_in_tree[::-1]
for n in reverse_nodes[::10]:
n.analyze(engine=engine)
while not n.analysis_ready:
time.sleep(0.01)
print(n.single_move,'done')
print(n.single_move, "done")
print(time.time() - start, "s")
+5 -8
View File
@@ -7,6 +7,7 @@ from core.common import OUTPUT_INFO
from core.engine import KataGoEngine
from core.game import Game, KaTrainSGF
start = time.time()
if len(sys.argv) < 2:
exit(1)
inputfile = sys.argv[1]
@@ -18,11 +19,11 @@ with open("config.json") as f:
game_settings = settings["game"]
trainer_settings = settings["trainer"]
engine_settings['threads'] = 16
#engine_settings['katago'] = 'KataGo/katago-bs'
engine_settings["threads"] = 16
engine_settings["max_time"] = 1000
engine_settings["max_visits"] = 50
class Logger:
def log(self, msg, level):
if level <= OUTPUT_INFO:
@@ -41,9 +42,5 @@ while remaining > 0:
print(f"Waiting for {remaining} queries")
time.sleep(0.1)
msg = game.write_sgf(
sgf_settings["sgf_save"],
trainer_config=trainer_settings,
save_feedback=sgf_settings["save_feedback"],
eval_thresholds=trainer_settings["eval_thresholds"],
)
msg = game.write_sgf(sgf_settings["sgf_save"], trainer_config=trainer_settings, save_feedback=sgf_settings["save_feedback"], eval_thresholds=trainer_settings["eval_thresholds"])
print(time.time() - start, "s")