Katrain
Improve your Baduk skills by training with KataGo!
Install / Use
/learn @sanderland/KatrainREADME
<a name="manual"></a> KaTrain
KaTrain is a tool for analyzing games and playing go with AI feedback from KataGo:
- Review your games to find the moves that were most costly in terms of points lost.
- Play against AI and get immediate feedback on mistakes with option to retry.
- Play against a wide range of weakened versions of AI with various styles.
- Automatically generate focused SGF reviews which show your biggest mistakes.
Manual
<table> <td> <td><a href="http://github.com/sanderland/katrain/blob/master/README.md"><img alt="English" src="https://github.com/sanderland/katrain/blob/master/katrain/img/flags/flag-uk.png" width=50></a> <a href="http://translate.google.com/translate?sl=en&tl=de&u=https%3A%2F%2Fgithub.com%2Fsanderland%2Fkatrain%2Fblob%2Fmaster%2FREADME.md"><img alt="German" src="https://github.com/sanderland/katrain/blob/master/katrain/img/flags/flag-de.png" width=50></a> <a href="http://translate.google.com/translate?sl=en&tl=fr&u=https%3A%2F%2Fgithub.com%2Fsanderland%2Fkatrain%2Fblob%2Fmaster%2FREADME.md"><img alt="French" src="https://github.com/sanderland/katrain/blob/master/katrain/img/flags/flag-fr.png" width=50></a> <a href="http://translate.google.com/translate?sl=en&tl=uk&u=https%3A%2F%2Fgithub.com%2Fsanderland%2Fkatrain%2Fblob%2Fmaster%2FREADME.md"><img alt="Ukrainian" src="https://github.com/sanderland/katrain/blob/master/katrain/img/flags/flag-ua.png" width=50></a> <a href="http://translate.google.com/translate?sl=en&tl=ru&u=https%3A%2F%2Fgithub.com%2Fsanderland%2Fkatrain%2Fblob%2Fmaster%2FREADME.md"><img alt="Russian" src="https://github.com/sanderland/katrain/blob/master/katrain/img/flags/flag-ru.png" width=50></a> <br/> <a href="http://translate.google.com/translate?sl=en&tl=tr&u=https%3A%2F%2Fgithub.com%2Fsanderland%2Fkatrain%2Fblob%2Fmaster%2FREADME.md"><img alt="Turkish" src="https://github.com/sanderland/katrain/blob/master/katrain/img/flags/flag-tr.png" width=50></a> <a href="http://translate.google.com/translate?sl=en&tl=zh-CN&u=https%3A%2F%2Fgithub.com%2Fsanderland%2Fkatrain%2Fblob%2Fmaster%2FREADME.md"><img alt="Simplified Chinese" src="https://github.com/sanderland/katrain/blob/master/katrain/img/flags/flag-cn.png" width=50></a> <a href="http://translate.google.com/translate?sl=en&tl=zh-TW&u=https%3A%2F%2Fgithub.com%2Fsanderland%2Fkatrain%2Fblob%2Fmaster%2FREADME.md"><img alt="Traditional Chinese" src="https://github.com/sanderland/katrain/blob/master/katrain/img/flags/flag-tw.png" width=50></a> <a href="http://translate.google.com/translate?sl=en&tl=ko&u=https%3A%2F%2Fgithub.com%2Fsanderland%2Fkatrain%2Fblob%2Fmaster%2FREADME.md"><img alt="Korean" src="https://github.com/sanderland/katrain/blob/master/katrain/img/flags/flag-ko.png" width=50></a> <a href="http://translate.google.com/translate?sl=en&tl=ja&u=https%3A%2F%2Fgithub.com%2Fsanderland%2Fkatrain%2Fblob%2Fmaster%2FREADME.md"><img alt="Japanese" src="https://github.com/sanderland/katrain/blob/master/katrain/img/flags/flag-jp.png" width=50></a>
</td> </table><a name="preview"></a> Preview and Youtube Videos
<img alt="screenshot" src="https://raw.githubusercontent.com/sanderland/katrain/master/screenshots/analysis.png" width="550">| Local Joseki Analysis | Analysis Tutorial | Teaching Game Tutorial |
|:-----------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------:|
|
|
|
|
<a name="install"></a> Installation
- See the releases page for downloadable executables for Windows and macOS.
- Alternatively use
pipx install katrainto install the latest version from PyPI on any 64-bit OS in an isolated environment. - On macOS, you can also use
brew install katrainto install the app. - This page 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, 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. Particularly the latter may offer much better performance on NVIDIA GPUs, but will be harder to set up: see here for more details.
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'.
- In a teaching game, KaTrain will analyze your moves and automatically undo those that are sufficiently bad.
- When playing against AI, note that the "Undo" button will undo both the AI's last move and yours.
Instant feedback
The dots on the move indicate how many points were lost by that move.
- The colour indicates the size of the mistake according to KataGo
- The size indicates if the mistake was actually punished. Going from fully punished at maximal size, to no actual effect on the score at minimal size.
In short, if you are a weaker player you should mostly focus on large dots that are red or purple, while stronger players can pay more attention to smaller mistakes. If you want to hide some colours on the board, or not output details for them in SGFs,you can do so under 'Configure Teacher'.
AIs
This section describes the available AIs.
In the 'AI settings', settings which have been tested and calibrated are at the top and have a lighter color, changing these will show an estimate of rank. This estimate should be reasonably accurate as long as you have not changed the other settings.
- Recommended options for serious play include:
- KataGo is full KataGo, above professional level. The analysis and feedback given is always based on this full strength KataGo AI.
- Calibrated Rank Bot was calibrated on various bots (e.g. GnuGo and Pachi at different strength settings) to play a balanced game from the opening to the endgame without making serious (DDK) blunders. Further discussion can be found here and here.
- Simple Style Prefers moves that solidify both player's territory, leading to relatively simpler moves.
- Legacy options which were developed earlier include:
- ScoreLoss is KataGo analyzing as usual, but choosing from potential moves depending on the expected score loss, leading to a varied style with mostly small mistakes.
- Policy uses the top move from the policy network (it's 'shape sense' without reading).
- Policy Weighted picks a random move weighted by the policy, leading to a varied style with mostly small mistakes, and occasional blunders due to a lack of reading.
- Blinded Policy picks a number of moves at random and play the best move among them, being effectively 'blind' to part of the board each turn. Calibrated rank is based on the same idea, and recommended over this option.
- Options that are more on the 'fun and experimental' side include:
- Variants of Blinded Policy, which use the same basic strategy, but with a twist:
- Local Style will consider mostly moves close to the last move.
- Tenuki Style will consider mostly moves away from the last move.
- Influential Style will consider
- Variants of Blinded Policy, which use the same basic strategy, but with a twist:
Related Skills
node-connect
328.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
80.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
328.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
80.9kCommit, push, and open a PR
