diff --git a/.github/workflows/osxbuild.yaml b/.github/workflows/osxbuild.yaml index bbf1e42..5128d09 100644 --- a/.github/workflows/osxbuild.yaml +++ b/.github/workflows/osxbuild.yaml @@ -7,11 +7,11 @@ on: jobs: osx_app: - runs-on: macos-11 + runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: 3.8 - name: Build KataGo diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 40348ce..3788e84 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.7', '3.11'] # '3.8', '3.9', steps: - uses: actions/checkout@v2 diff --git a/README.md b/README.md index 762efe1..a18968f 100644 --- a/README.md +++ b/README.md @@ -67,12 +67,14 @@ KaTrain is a tool for analyzing games and playing go with AI feedback from KataG ## Configuring KataGo -KaTrain comes pre-packaged with a working KataGo (OpenCL version) for Windows, Linux, and pre-M1 Mac operating systems, and the 15 block model. +KaTrain comes pre-packaged with a working KataGo (OpenCL version) for Windows, Linux, and pre-M1 Mac operating systems, and the rather old 15 block model. 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, e.g. to the Eigen/CPU version if you don't have a GPU, click 'Download KataGo versions'. You can then select the KataGo binary from the dropdown menu. +There are also CUDA and TensorRT versions available on [the KataGo release site](https://github.com/lightvector/KataGo/releases). Particularly the latter may offer much better performance on NVIDIA GPUs, but will be harder to +set up: [see here for more details](https://github.com/lightvector/KataGo#opencl-vs-cuda-vs-tensorrt-vs-eigen). 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* diff --git a/katrain/KataGo/katago b/katrain/KataGo/katago index 1c5da81..3e27d4e 100755 Binary files a/katrain/KataGo/katago and b/katrain/KataGo/katago differ diff --git a/katrain/KataGo/katago.exe b/katrain/KataGo/katago.exe index 8863205..245d390 100644 Binary files a/katrain/KataGo/katago.exe and b/katrain/KataGo/katago.exe differ diff --git a/katrain/config.json b/katrain/config.json index 1157760..e26f6f5 100644 --- a/katrain/config.json +++ b/katrain/config.json @@ -28,7 +28,7 @@ "anim_pv_time": 0.5, "debug_level": 0, "lang": "en", - "version": "1.12.1", + "version": "1.13.0", "load_fast_analysis": false, "load_sgf_rewind": true }, diff --git a/katrain/core/constants.py b/katrain/core/constants.py index ae29c1b..4aa1010 100644 --- a/katrain/core/constants.py +++ b/katrain/core/constants.py @@ -1,5 +1,5 @@ PROGRAM_NAME = "KaTrain" -VERSION = "1.12.3" +VERSION = "1.13.0" HOMEPAGE = "https://github.com/sanderland/katrain" CONFIG_MIN_VERSION = "1.11.0" # keep config files from this version ANALYSIS_FORMAT_VERSION = "1.0" diff --git a/katrain/core/sgf_parser.py b/katrain/core/sgf_parser.py index 61cbc4e..64e4257 100644 --- a/katrain/core/sgf_parser.py +++ b/katrain/core/sgf_parser.py @@ -576,7 +576,10 @@ class SGF: key = line[4] raw_move = line[5:7].lower() - value = chr(ord(raw_move[0]) - 1) + chr(ord(raw_move[1]) - 1) + if raw_move == "aa": + value = "" # pass + else: + value = chr(ord(raw_move[0]) - 1) + chr(ord(raw_move[1]) - 1) node = cls._NODE_CLASS(parent=node) node.set_property(key, value) diff --git a/katrain/gui/popups.py b/katrain/gui/popups.py index 25d1660..bd43f31 100644 --- a/katrain/gui/popups.py +++ b/katrain/gui/popups.py @@ -471,7 +471,8 @@ class BaseConfigPopup(QuickConfigGui): "20 block model": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170e-b20c256x2-s5303129600-d1228401921.bin.gz", "30 block model": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170-b30c320x2-s4824661760-d1229536699.bin.gz", "40 block model": "https://github.com/lightvector/KataGo/releases/download/v1.4.5/g170-b40c256x2-s5095420928-d1229425124.bin.gz", - "18 'nested residual block' model": "https://github.com/lightvector/KataGo/releases/download/v1.12.0/b18c384nbt-uec.bin.gz", + "18 'nested residual block' model": "https://github.com/lightvector/KataGo/releases/download/v1.12.2/b18c384nbt-uec.bin.gz", + "18 block 'optimistic policy' model": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/b18c384nbt-optimisticv13-s5971M.bin.gz", } MODEL_DESC = { "Fat 40 block model": "https://d3dndmfyhecmj0.cloudfront.net/g170/neuralnets/g170e-b40c384x2-s2348692992-d1229892979.zip", @@ -480,22 +481,20 @@ class BaseConfigPopup(QuickConfigGui): KATAGOS = { "win": { - "OpenCL v1.12.3": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-opencl-windows-x64.zip", - "Eigen AVX2 (Modern CPUs) v1.12.3": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-eigenavx2-windows-x64.zip", - "Eigen (CPU, Non-optimized) v1.12.3": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-eigen-windows-x64.zip", - "OpenCL v1.12.3 (bigger boards)": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-opencl-windows-x64+bs29.zip", + "OpenCL v1.13.0": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-opencl-windows-x64.zip", + "Eigen AVX2 (Modern CPUs) v1.13.0": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-eigenavx2-windows-x64.zip", + "Eigen (CPU, Non-optimized) v1.13.0": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-eigen-windows-x64.zip", + "OpenCL v1.13.0 (bigger boards)": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-opencl-windows-x64+bs29.zip", }, "linux": { - "OpenCL v1.12.3": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-opencl-linux-x64.zip", - "Eigen AVX2 (Modern CPUs) v1.12.3": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-eigenavx2-linux-x64.zip", - "Eigen (CPU, Non-optimized) v1.12.3": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-eigen-linux-x64.zip", - "OpenCL v1.12.3 (bigger boards)": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-opencl-linux-x64+bs29.zip", + "OpenCL v1.13.0": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-opencl-linux-x64.zip", + "Eigen AVX2 (Modern CPUs) v1.13.0": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-eigenavx2-linux-x64.zip", + "Eigen (CPU, Non-optimized) v1.13.0": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-eigen-linux-x64.zip", + "OpenCL v1.13.0 (bigger boards)": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-opencl-linux-x64+bs29.zip", }, "just-descriptions": { - "CUDA v1.12.3 (Windows)": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-cuda11.2-windows-x64.zip", - "CUDA v1.12.3 (Linux)": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.3-cuda11.1-linux-x64.zip", - "Cuda/TensorRT v1.12.3 (Windows)": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.1-trt8.2-cuda11.2-windows-x64.zip", - "Cuda/TensorRT v1.12.3 (Linux)": "https://github.com/lightvector/KataGo/releases/download/v1.12.3/katago-v1.12.1-trt8.2-cuda11.1-linux-x64.zip", + "CUDA v1.13.0 (Windows)": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-cuda11.2-windows-x64.zip", + "CUDA v1.13.0 (Linux)": "https://github.com/lightvector/KataGo/releases/download/v1.13.0/katago-v1.13.0-cuda11.1-linux-x64.zip", }, } diff --git a/katrain/i18n/locales/cn/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/cn/LC_MESSAGES/katrain.mo index e15d650..a9e7d56 100644 Binary files a/katrain/i18n/locales/cn/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/cn/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/cn/LC_MESSAGES/katrain.po b/katrain/i18n/locales/cn/LC_MESSAGES/katrain.po index dc03016..d8b8ca5 100644 --- a/katrain/i18n/locales/cn/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/cn/LC_MESSAGES/katrain.po @@ -962,3 +962,7 @@ msgstr "to move" #. TODO - Restrict analysis to move range msgid "limit to moves" msgstr "Limit to moves" + +#. TODO +msgid "contribute:passwordwarning" +msgstr "(Stored as plain text, do not re-use this anywhere)" diff --git a/katrain/i18n/locales/de/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/de/LC_MESSAGES/katrain.mo index 74f10d3..6f57215 100644 Binary files a/katrain/i18n/locales/de/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/de/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/de/LC_MESSAGES/katrain.po b/katrain/i18n/locales/de/LC_MESSAGES/katrain.po index 7332435..770c9cf 100644 --- a/katrain/i18n/locales/de/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/de/LC_MESSAGES/katrain.po @@ -744,18 +744,18 @@ msgstr "Cache-Analyse in SGF" msgid "menu:save-as" msgstr "Spiel speichern als..." -#. Laden # sgf load button +#. Laden msgid "Load File" msgstr "Spiel laden" -#. Save SGF (Popup) # sgf save popup +#. Save SGF (Popup) msgid "save sgf title" msgstr "SGF-Datei speichern" -#. Save button # sgf save button +#. Save button msgid "Save File" msgstr "Datei speichern" @@ -1031,3 +1031,7 @@ msgstr "to move" #. TODO - Restrict analysis to move range msgid "limit to moves" msgstr "Limit to moves" + +#. TODO +msgid "contribute:passwordwarning" +msgstr "(Stored as plain text, do not re-use this anywhere)" diff --git a/katrain/i18n/locales/en/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/en/LC_MESSAGES/katrain.mo index ab952cd..d2e2750 100644 Binary files a/katrain/i18n/locales/en/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/en/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/en/LC_MESSAGES/katrain.po b/katrain/i18n/locales/en/LC_MESSAGES/katrain.po index 7d3913d..d18bac6 100644 --- a/katrain/i18n/locales/en/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/en/LC_MESSAGES/katrain.po @@ -590,6 +590,9 @@ msgstr "Username" msgid "contribute:password" msgstr "Password" +msgid "contribute:passwordwarning" +msgstr "(Stored as plain text, do not re-use this anywhere)" + msgid "contribute:register" msgstr "Register" diff --git a/katrain/i18n/locales/fr/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/fr/LC_MESSAGES/katrain.mo index f1b7b6c..3e6d8d2 100644 Binary files a/katrain/i18n/locales/fr/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/fr/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/fr/LC_MESSAGES/katrain.po b/katrain/i18n/locales/fr/LC_MESSAGES/katrain.po index e1ffe2a..1db23a1 100644 --- a/katrain/i18n/locales/fr/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/fr/LC_MESSAGES/katrain.po @@ -1000,3 +1000,7 @@ msgid "move range analysis" msgstr "" "Analyse de partie approfondie du coup {start_move} au coup {end_move} " "({visits} visites/coup)." + +#. TODO +msgid "contribute:passwordwarning" +msgstr "(Stored as plain text, do not re-use this anywhere)" diff --git a/katrain/i18n/locales/jp/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/jp/LC_MESSAGES/katrain.mo index a5cc9c8..c8d1398 100644 Binary files a/katrain/i18n/locales/jp/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/jp/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/jp/LC_MESSAGES/katrain.po b/katrain/i18n/locales/jp/LC_MESSAGES/katrain.po index 6d8c36f..9eaee89 100644 --- a/katrain/i18n/locales/jp/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/jp/LC_MESSAGES/katrain.po @@ -1003,3 +1003,7 @@ msgstr "to move" #. TODO - Restrict analysis to move range msgid "limit to moves" msgstr "Limit to moves" + +#. TODO +msgid "contribute:passwordwarning" +msgstr "(Stored as plain text, do not re-use this anywhere)" diff --git a/katrain/i18n/locales/ko/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/ko/LC_MESSAGES/katrain.mo index de0d073..b1dcff5 100644 Binary files a/katrain/i18n/locales/ko/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/ko/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/ko/LC_MESSAGES/katrain.po b/katrain/i18n/locales/ko/LC_MESSAGES/katrain.po index 7bb7333..bba0bb5 100644 --- a/katrain/i18n/locales/ko/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/ko/LC_MESSAGES/katrain.po @@ -936,3 +936,7 @@ msgstr "to move" #. TODO - Restrict analysis to move range msgid "limit to moves" msgstr "Limit to moves" + +#. TODO +msgid "contribute:passwordwarning" +msgstr "(Stored as plain text, do not re-use this anywhere)" diff --git a/katrain/i18n/locales/ru/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/ru/LC_MESSAGES/katrain.mo index 34ef8fe..b26c723 100644 Binary files a/katrain/i18n/locales/ru/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/ru/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/ru/LC_MESSAGES/katrain.po b/katrain/i18n/locales/ru/LC_MESSAGES/katrain.po index edd7b2d..5b64758 100644 --- a/katrain/i18n/locales/ru/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/ru/LC_MESSAGES/katrain.po @@ -966,3 +966,7 @@ msgstr "Только для ходов" #. status message msgid "move range analysis" msgstr "Анализ ходов от {start_move} до {end_move} с {visits} посещениями" + +#. TODO +msgid "contribute:passwordwarning" +msgstr "(Stored as plain text, do not re-use this anywhere)" diff --git a/katrain/i18n/locales/tr/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/tr/LC_MESSAGES/katrain.mo index 334fdf2..5aa1f39 100644 Binary files a/katrain/i18n/locales/tr/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/tr/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/tr/LC_MESSAGES/katrain.po b/katrain/i18n/locales/tr/LC_MESSAGES/katrain.po index b1db245..31995b7 100644 --- a/katrain/i18n/locales/tr/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/tr/LC_MESSAGES/katrain.po @@ -1066,3 +1066,7 @@ msgstr "to move" #. TODO - Restrict analysis to move range msgid "limit to moves" msgstr "Limit to moves" + +#. TODO +msgid "contribute:passwordwarning" +msgstr "(Stored as plain text, do not re-use this anywhere)" diff --git a/katrain/i18n/locales/tw/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/tw/LC_MESSAGES/katrain.mo index 38ca493..b26ae0f 100644 Binary files a/katrain/i18n/locales/tw/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/tw/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/tw/LC_MESSAGES/katrain.po b/katrain/i18n/locales/tw/LC_MESSAGES/katrain.po index 5f3caef..d9f87fd 100644 --- a/katrain/i18n/locales/tw/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/tw/LC_MESSAGES/katrain.po @@ -985,3 +985,7 @@ msgstr "to move" #. TODO - Restrict analysis to move range msgid "limit to moves" msgstr "Limit to moves" + +#. TODO +msgid "contribute:passwordwarning" +msgstr "(Stored as plain text, do not re-use this anywhere)" diff --git a/katrain/popups.kv b/katrain/popups.kv index 6801ca4..68e7f9d 100644 --- a/katrain/popups.kv +++ b/katrain/popups.kv @@ -397,6 +397,9 @@ icon: "eye" pos_hint: {"center_x": 0, "center_y": .5} on_press: password.password = not password.password + SmallDescriptionLabel: + padding_x: dp(40) + text: i18n._("contribute:passwordwarning") DescriptionLabel: text: '' id: error diff --git a/requirements.txt b/requirements.txt index aa4099b..ca6f5d1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,5 +8,5 @@ Kivy-Garden==0.1.4 kivymd==0.104.1 Pillow==9.3.0 Pygments==2.7.4 -requests==2.25.0 +requests==2.31.0 urllib3==1.26.5 \ No newline at end of file diff --git a/setup.py b/setup.py index bb4e5e7..80ddc0a 100644 --- a/setup.py +++ b/setup.py @@ -50,7 +50,7 @@ setup( "chardet", # for automatic encoding detection ], dependency_links=["https://kivy.org/downloads/simple/"], - python_requires=">=3.7, <3.11", + python_requires=">=3.7, <4.0", entry_points={"console_scripts": ["katrain=katrain.__main__:run_app"]}, classifiers=[ "Development Status :: 5 - Production/Stable",