show text / kata update / win download fixes / readme
This commit is contained in:
1 parent
219f327c20
commit
e4c07e15b2
24 files changed
+144
-11
No files matched your search
@@ -14,6 +14,7 @@
|
||||
* [Previews and YouTube tutorials](#preview)
|
||||
* [Installation](#install)
|
||||
* [Manual](#ai)
|
||||
* [Configuring KataGo](#kata)
|
||||
* [Play against AI](#ai)
|
||||
* [Analyzing your Games](#analysis)
|
||||
* [Keyboard shortcuts](#keyboard)
|
||||
@@ -74,6 +75,21 @@ but has since grown to include a wide range of features, including:
|
||||
* [This page](INSTALL.md) has detailed instructions for Window, Linux and MacOS,
|
||||
as well as troubleshooting and setting up KataGo to use multiple GPUs.
|
||||
|
||||
## <a name="kata"></a> Configuring KataGo
|
||||
|
||||
KaTrain comes pre-packaged with a working KataGo (OpenCL version) for Windows and Linux operating systems, and the 15 block neural network.
|
||||
|
||||
To change the model, open 'General and Engine settings' in the application and 'Download models'. You can then select the model you want from the dropdown menu.
|
||||
|
||||
To change the katago binary,
|
||||
for example to the CPU version if you don't have a GPU, click 'Download KataGo versions'.
|
||||
You can then select the KataGO binary from the dropdown menu.
|
||||
|
||||
Finally, you can override the entire command used to start the analysis engine, which
|
||||
can be useful for connecting to a remote server. Do keep in mind that KaTrain uses the *analysis engine*
|
||||
of KataGo, and not the GTP engine.
|
||||
|
||||
|
||||
## <a name="ai"></a> Play against AI
|
||||
|
||||
* Select the players in the main menu, or under 'New Game'.
|
||||
@@ -181,7 +197,7 @@ In addition to shortcuts mentioned above and those shown in the main menu:
|
||||
* 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 versions compiled with large board sizes.
|
||||
* If still encountering problems, please start KataGo by itself to check for any errors it gives.
|
||||
* Note that if you don't have a GPU, or your GPU does not support OpenCL, you may not be able to use KataGo.
|
||||
* Note that if you don't have a GPU, or your GPU does not support OpenCL, you should use the 'eigen' binaries which run on CPU only.
|
||||
* How can I play on larger boards?
|
||||
* For windows, change the `katago` setting to `katrain\KataGo\katago-bs52.exe`. For other operating systems, you need to compile your own KataGo version with higher limits.
|
||||
|
||||
|
||||
Binary file not shown.
+4
-3
@@ -119,7 +119,7 @@ class KaTrainGui(Screen, KaTrainBase):
|
||||
) and getattr(self, "controls", None):
|
||||
self.controls.set_status(f"ERROR: {message}", STATUS_ERROR)
|
||||
|
||||
def animate_pondering(self,*_args):
|
||||
def animate_pondering(self, *_args):
|
||||
if not self.idle_analysis:
|
||||
self.board_controls.engine_status_pondering = -1
|
||||
else:
|
||||
@@ -330,7 +330,7 @@ class KaTrainGui(Screen, KaTrainBase):
|
||||
self.controls.timer.paused = True
|
||||
if not self.teacher_settings_popup:
|
||||
self.teacher_settings_popup = I18NPopup(
|
||||
title_key="teacher settings", size=[dp(800), dp(700)], content=ConfigTeacherPopup(self)
|
||||
title_key="teacher settings", size=[dp(800), dp(750)], content=ConfigTeacherPopup(self)
|
||||
).__self__
|
||||
self.teacher_settings_popup.content.popup = self.teacher_settings_popup
|
||||
self.teacher_settings_popup.open()
|
||||
@@ -339,7 +339,7 @@ class KaTrainGui(Screen, KaTrainBase):
|
||||
self.controls.timer.paused = True
|
||||
if not self.config_popup:
|
||||
self.config_popup = I18NPopup(
|
||||
title_key="general settings title", size=[dp(1200), dp(850)], content=ConfigPopup(self)
|
||||
title_key="general settings title", size=[dp(1200), dp(950)], content=ConfigPopup(self)
|
||||
).__self__
|
||||
self.config_popup.content.popup = self.config_popup
|
||||
self.config_popup.open()
|
||||
@@ -459,6 +459,7 @@ class KaTrainGui(Screen, KaTrainBase):
|
||||
if popup:
|
||||
if keycode[1] in ["f5", "f6", "f7", "f8"]: # switch between popups
|
||||
popup.dismiss()
|
||||
return
|
||||
else:
|
||||
return
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
true
|
||||
],
|
||||
"eval_off_show_last": 3,
|
||||
"text_point_loss": true,
|
||||
"eval_show_ai": true,
|
||||
"lock_ai": false
|
||||
},
|
||||
|
||||
@@ -43,7 +43,7 @@ class KataGoEngine:
|
||||
self.stderr_thread = None
|
||||
|
||||
exe = config.get("katago", "").strip()
|
||||
if config.get("altcommand",""):
|
||||
if config.get("altcommand", ""):
|
||||
self.command = config["altcommand"]
|
||||
else:
|
||||
if not exe:
|
||||
@@ -104,8 +104,12 @@ class KataGoEngine:
|
||||
ok = self.katago_process and self.katago_process.poll() is None
|
||||
if not ok and exception_if_dead:
|
||||
if self.katago_process:
|
||||
os_error += f"status {self.katago_process and self.katago_process.poll()}"
|
||||
died_msg = i18n._("Engine died unexpectedly").format(error=os_error)
|
||||
code = self.katago_process and self.katago_process.poll()
|
||||
if code == 3221225781:
|
||||
died_msg = i18n._("Engine missing DLL")
|
||||
else:
|
||||
os_error += f"status {code}"
|
||||
died_msg = i18n._("Engine died unexpectedly").format(error=os_error)
|
||||
self.katrain.log(died_msg, OUTPUT_ERROR)
|
||||
self.katago_process = None
|
||||
else:
|
||||
|
||||
@@ -436,6 +436,20 @@ class BadukPanWidget(Widget):
|
||||
col=[*self.eval_color(move_dict["pointsLost"])[:3], alpha],
|
||||
r=self.stone_size * scale,
|
||||
)
|
||||
if self.trainer_config["text_point_loss"]:
|
||||
if move_dict["pointsLost"] < 0.05:
|
||||
ptloss_text = "0.0"
|
||||
else:
|
||||
ptloss_text = f"{-move_dict['pointsLost']:+.1f}"
|
||||
sizefac = 1
|
||||
Color(*BLACK)
|
||||
draw_text(
|
||||
pos=(self.gridpos_x[move.coords[0]], self.gridpos_y[move.coords[1]]),
|
||||
text=ptloss_text,
|
||||
font_size=self.grid_size * sizefac / 2.5,
|
||||
font_name="Roboto",
|
||||
)
|
||||
|
||||
if i == 0:
|
||||
Color(*TOP_MOVE_BORDER_COLOR)
|
||||
Line(
|
||||
|
||||
@@ -443,7 +443,7 @@ class ConfigPopup(QuickConfigGui):
|
||||
}
|
||||
|
||||
KATAGOS = {
|
||||
"windows": {
|
||||
"win": {
|
||||
"Official OpenCL v1.6.0": "https://github.com/lightvector/KataGo/releases/download/v1.6.0/katago-v1.6.0-gpu-opencl-windows-x64.zip",
|
||||
"Official OpenCL v1.6.0 (32 bit)": "https://github.com/lightvector/KataGo/releases/download/v1.6.0/katago-v1.6.0-gpu-opencl-windows-x32-dont-use-unless-actually-32bit-windows.zip",
|
||||
"Official CUDA v1.6.0 (New NVIDIA cards)": "https://github.com/lightvector/KataGo/releases/download/v1.6.0/katago-v1.6.0-gpu-cuda10.2-windows-x64.zip",
|
||||
@@ -501,7 +501,7 @@ class ConfigPopup(QuickConfigGui):
|
||||
|
||||
def download_katas(self, *_largs):
|
||||
def unzipped_name(zipfile):
|
||||
if platform == "windows":
|
||||
if platform == "win":
|
||||
return zipfile.replace(".zip", ".exe")
|
||||
else:
|
||||
return zipfile.replace(".zip", "")
|
||||
@@ -517,6 +517,10 @@ class ConfigPopup(QuickConfigGui):
|
||||
)
|
||||
with open(path, "wb") as fout:
|
||||
fout.write(zipObj.read(exes[0]))
|
||||
for f in zipObj.namelist():
|
||||
if f.lower().endswith("dll"):
|
||||
with open(os.path.join(os.path.split(path)[0], f), "wb") as fout:
|
||||
fout.write(zipObj.read(f))
|
||||
else:
|
||||
os.rename(tmp_path, path)
|
||||
self.katrain.log(f"Download of katago binary {binary} model complete -> {path}", OUTPUT_INFO)
|
||||
|
||||
Binary file not shown.
@@ -633,3 +633,14 @@ msgstr "Detect platform and use provided binary"
|
||||
#. TODO - error message on trying to download models when already done
|
||||
msgid "All binaries downloaded"
|
||||
msgstr "All available binaries already downloaded"
|
||||
|
||||
#. TODO
|
||||
msgid "Engine missing DLL"
|
||||
msgstr ""
|
||||
"Failed to start KataGo due to missing DLL. Check the requiments, or try "
|
||||
"running the binary by itself for details. "
|
||||
|
||||
#. TODO - in addition to colour, show point loss as -0.1 etc on hints/top
|
||||
#. moves
|
||||
msgid "show point loss as text"
|
||||
msgstr "Show point loss on top moves"
|
||||
Binary file not shown.
@@ -677,3 +677,14 @@ msgstr "Detect platform and use provided binary"
|
||||
#. TODO - error message on trying to download models when already done
|
||||
msgid "All binaries downloaded"
|
||||
msgstr "All available binaries already downloaded"
|
||||
|
||||
#. TODO
|
||||
msgid "Engine missing DLL"
|
||||
msgstr ""
|
||||
"Failed to start KataGo due to missing DLL. Check the requiments, or try "
|
||||
"running the binary by itself for details. "
|
||||
|
||||
#. TODO - in addition to colour, show point loss as -0.1 etc on hints/top
|
||||
#. moves
|
||||
msgid "show point loss as text"
|
||||
msgstr "Show point loss on top moves"
|
||||
Binary file not shown.
@@ -25,8 +25,9 @@ msgstr "General & Engine Settings"
|
||||
msgid "menu:clocksettings"
|
||||
msgstr "Timer Settings"
|
||||
|
||||
#. TODO description updated
|
||||
msgid "menu:teachsettings"
|
||||
msgstr "Teaching Game Settings"
|
||||
msgstr "Teaching/Analysis Settings"
|
||||
|
||||
msgid "menu:aisettings"
|
||||
msgstr "AI Settings"
|
||||
@@ -366,6 +367,10 @@ msgstr ""
|
||||
"Show dots/SGF comments\n"
|
||||
" for AI players"
|
||||
|
||||
#. in addition to colour, show point loss as -0.1 etc on hints/top moves
|
||||
msgid "show point loss as text"
|
||||
msgstr "Show point loss on top moves"
|
||||
|
||||
#. removed as an option / can ignore
|
||||
msgid "lock ai when playing"
|
||||
msgstr ""
|
||||
@@ -510,6 +515,11 @@ msgstr ""
|
||||
"Engine died unexpectedly without sending output, possibly due to out of "
|
||||
"memory: {error}"
|
||||
|
||||
msgid "Engine missing DLL"
|
||||
msgstr ""
|
||||
"Failed to start KataGo due to missing DLL. Check the requiments, or try "
|
||||
"running the binary by itself for details. "
|
||||
|
||||
#. AI names, help etc
|
||||
msgid "strength:kyu"
|
||||
msgstr "k"
|
||||
|
||||
Binary file not shown.
@@ -673,3 +673,14 @@ msgstr "Detect platform and use provided binary"
|
||||
#. TODO - error message on trying to download models when already done
|
||||
msgid "All binaries downloaded"
|
||||
msgstr "All available binaries already downloaded"
|
||||
|
||||
#. TODO
|
||||
msgid "Engine missing DLL"
|
||||
msgstr ""
|
||||
"Failed to start KataGo due to missing DLL. Check the requiments, or try "
|
||||
"running the binary by itself for details. "
|
||||
|
||||
#. TODO - in addition to colour, show point loss as -0.1 etc on hints/top
|
||||
#. moves
|
||||
msgid "show point loss as text"
|
||||
msgstr "Show point loss on top moves"
|
||||
Binary file not shown.
@@ -714,3 +714,14 @@ msgstr "Detect platform and use provided binary"
|
||||
#. TODO - error message on trying to download models when already done
|
||||
msgid "All binaries downloaded"
|
||||
msgstr "All available binaries already downloaded"
|
||||
|
||||
#. TODO
|
||||
msgid "Engine missing DLL"
|
||||
msgstr ""
|
||||
"Failed to start KataGo due to missing DLL. Check the requiments, or try "
|
||||
"running the binary by itself for details. "
|
||||
|
||||
#. TODO - in addition to colour, show point loss as -0.1 etc on hints/top
|
||||
#. moves
|
||||
msgid "show point loss as text"
|
||||
msgstr "Show point loss on top moves"
|
||||
Binary file not shown.
@@ -656,3 +656,14 @@ msgstr "Detect platform and use provided binary"
|
||||
#. TODO - error message on trying to download models when already done
|
||||
msgid "All binaries downloaded"
|
||||
msgstr "All available binaries already downloaded"
|
||||
|
||||
#. TODO
|
||||
msgid "Engine missing DLL"
|
||||
msgstr ""
|
||||
"Failed to start KataGo due to missing DLL. Check the requiments, or try "
|
||||
"running the binary by itself for details. "
|
||||
|
||||
#. TODO - in addition to colour, show point loss as -0.1 etc on hints/top
|
||||
#. moves
|
||||
msgid "show point loss as text"
|
||||
msgstr "Show point loss on top moves"
|
||||
Binary file not shown.
@@ -649,3 +649,14 @@ msgstr "Detect platform and use provided binary"
|
||||
#. TODO - error message on trying to download models when already done
|
||||
msgid "All binaries downloaded"
|
||||
msgstr "All available binaries already downloaded"
|
||||
|
||||
#. TODO
|
||||
msgid "Engine missing DLL"
|
||||
msgstr ""
|
||||
"Failed to start KataGo due to missing DLL. Check the requiments, or try "
|
||||
"running the binary by itself for details. "
|
||||
|
||||
#. TODO - in addition to colour, show point loss as -0.1 etc on hints/top
|
||||
#. moves
|
||||
msgid "show point loss as text"
|
||||
msgstr "Show point loss on top moves"
|
||||
Binary file not shown.
@@ -674,3 +674,14 @@ msgstr "Detect platform and use provided binary"
|
||||
#. TODO - error message on trying to download models when already done
|
||||
msgid "All binaries downloaded"
|
||||
msgstr "All available binaries already downloaded"
|
||||
|
||||
#. TODO
|
||||
msgid "Engine missing DLL"
|
||||
msgstr ""
|
||||
"Failed to start KataGo due to missing DLL. Check the requiments, or try "
|
||||
"running the binary by itself for details. "
|
||||
|
||||
#. TODO - in addition to colour, show point loss as -0.1 etc on hints/top
|
||||
#. moves
|
||||
msgid "show point loss as text"
|
||||
msgstr "Show point loss on top moves"
|
||||
+7
-1
@@ -227,7 +227,7 @@
|
||||
hint_text: i18n._("engine:wide_root_noise:hint")
|
||||
MDBoxLayout:
|
||||
orientation: 'horizontal'
|
||||
size_hint: 1,1.5
|
||||
size_hint: 1,2
|
||||
MDBoxLayout:
|
||||
size_hint_x: 3.5 if self.children else 0.0001
|
||||
orientation: 'vertical'
|
||||
@@ -285,6 +285,12 @@
|
||||
LabelledIntInput:
|
||||
size_hint_x: 0.15
|
||||
input_property: "trainer/eval_off_show_last"
|
||||
DescriptionLabel:
|
||||
font_size: DESC_FONT_SIZE * 0.8
|
||||
text: i18n._("show point loss as text")
|
||||
AnchorLayout:
|
||||
LabelledCheckBox:
|
||||
input_property: "trainer/text_point_loss"
|
||||
DescriptionLabel:
|
||||
font_size: DESC_FONT_SIZE * 0.8
|
||||
text: i18n._("show ai dots")
|
||||
|
||||
Reference in new issue
Block a user