Go/Baduk/Weiqi播放和教学应用程序,带有各种AIs
KaTrain的Python项目详细描述
KaTrain
Introduction
KaTrain is a tool for analyzing and playing go with AI feedback from KataGo.
The original idea was to give immediate feedback on the many large mistakes we make in terms of inefficient moves, but has since grown to include a wide range of features, including:
- 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.
- Play against a stronger player and use the retry option instead of handicap stones.
- Automatically generate focused SGF reviews which show your biggest mistakes.
Previews and Youtube Videos
Play against an AI Teacher
Analyze your games
YouTube videos
^{tb 2}$Installation
- See the releases page用于Windows的可下载可执行文件。在
- 或者使用
pip3 install -U katrain
在任何64位操作系统上安装PyPI的最新版本。在 - This page有关于windows、Linux和MacOS的详细说明, 以及故障排除和设置KataGo使用多个gpu。在
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, 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.
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.
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 as well as 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和{a10}。在
- Simple Style喜欢巩固两个玩家领地的移动方式,从而导致相对简单的移动。在
- ScoreLoss像往常一样分析,但是 根据预期的失分从潜在的动作中进行选择,导致风格多变,大多是小错误。在
- Policy使用来自策略网络的顶部移动(它是“形状感知”而不是读取)。在
- Policy Weighted选择按策略加权的随机移动,导致风格多样,大多数是小错误,偶尔由于缺乏阅读而出错。在
- Blinded Policy随机选择若干个移动,并在其中发挥最佳的移动,实际上是“盲目”的一部分董事会每回合。校准等级是基于相同的想法,并建议超过此选项。在
- 更具“趣味性和实验性”的选项包括:
- Blinded Policy的变体,它们使用相同的基本策略,但有一个扭曲:
- Local Style将主要考虑接近最后一次移动的移动。在
- Tenuki Style将主要考虑远离最后一步的移动。在
- important Style将主要考虑第四行以上的移动,从而形成一种中心导向的风格。在
- Territory Style则相反,倾向于1-3行移动。在
- KataJigo是KataGo试图以0.5分的优势获胜,通常是用自己的直接错误来回应你的错误。在
- Blinded Policy的变体,它们使用相同的基本策略,但有一个扭曲:
基于引擎的人工智能(KataGo、ScoreLoss、KataJigo)受访问模式和访问选择以及最长时间的影响, 而基于策略网的人工智能系统受模型文件选择的影响,但一次访问的效果相同。在
关于这些AIs的更多技术细节和讨论可以在19x19论坛的life中的this线程上找到。在
Analysis
Analysis options in KaTrain allow you to explore variations and request more in-depth analysis from the engine at any point in the game.
Keyboard shortcuts are shown with [key].
[Tab]: Switch between analysis and play modes.
- AI moves, teaching mode and timers are suspended in analysis mode.
- The state of the analysis options and right-hand side panels and options is saved independently for 'play' and 'analyze', allowing you to quickly switch between a more minimalistic 'play' mode and more complex 'analysis' mode.
The checkboxes at the top of the screen:
- [q]: Child moves are shown. On by default, can turn it off to avoid obscuring other information or when wanting to guess the next move.
- [w]: Show all dots: Show all evaluation dots instead of the last few.
- You can configure how many are shown with this setting off, and whether they are shown for AIs under 'Configure Teacher'.
- [e]: Top moves: Show the next moves KataGo considered, colored by their expected point loss. Small/faint dots indicate high uncertainty and never show text (lower than your 'fast visits' setting). Hover over any of them to see the principal variation.
- [r]: Policy moves: Show KataGo's policy network evaluation, i.e. where it thinks the best next move is purely from the position, and in the absence of any 'reading'. This turns off the 'top moves' setting as the overlap is often not useful.
- [t]: Expected territory: Show expected ownership of each intersection.
The analysis options available under the 'Analysis' button are used for deeper evaluation of the position:
- [a]: Deeper analysis: Re-evaluate the position using more visits, usually resulting in a more accurate evaluation.
- [s]: Equalize visits: 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]: Analyze all moves: Evaluate all possible next moves. This can take a bit of time even though 'fast_visits' is used, but can be useful to see how many reasonable next moves are available.
- [f]: Find alternatives: Increases analysis of current candidate moves to at least the 'fast visits' level, and request a new query that excludes all current candidate moves.
- [g]: Find local responses: Searches within 5 spaces of the last move only.
- [spacebar]: Turn continuous analysis on/off. This will continuously improve analysis of the current position, similar to Lizzie's 'pondering', but only when there are no other queries going on.
- [enter] AI move. Makes the AI move for the current player regardless of current player selection.
Keyboard and mouse shortcuts
In addition to shortcuts mentioned above and those shown in the main menu:
- [Shift]: Open the main menu.
- [~] or [ ` ] or [m]: Cycles through more minimalistic UI modes.
- [p]: Pass
- [b]: Pause/Resume timer
- [arrow left] or [z]: Undo move. Hold alt for 10 moves at a time, or ctrl to skip to the start.
- [arrow right] or [x]: Redo move. Hold alt for 10 moves at a time, or ctrl to skip to the start.
- [arrow up/down] Switch branch, as would be expected from the move tree.
- [n] As in clicking the red arrow, go to one move before the next mistake (orange or worse) by a human player.
- [home/end] Go to the beginning/end of the game.
- [scroll up]: Undo move. Only works when hovering the cursor over the board.
- [scroll down]: Redo move. Only works when hovering the cursor over the board.
- [click on a move]: See detailed statistics for a previous move, along with expected variation that was best instead of this move.
- [double-click on a move]: Navigate directly to just before that point in the game.
- [Ctrl-V]: Load SGF from clipboard and do a 'fast' analysis of the game (with a high priority normal analysis for the last move).
- [Ctrl-C]: Save SGF to clipboard.
FAQ
- 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 ^{
} in ^{ }, 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 should use the 'eigen' binaries which run on CPU only.
- Try using a lower number for ^{
Support / Contribute
- 想法、反馈和对代码或翻译的贡献都是非常受欢迎的。
- 有关建议和计划的改进,请参阅github上的open issues,以检查功能是否已经计划好。在
- 我正在寻找更多的贡献者翻译这本手册和程序本身。帮助解决这个问题最好的办法是在不和时联系我。在
- 你可以通过discord(桑德3278)与我联系,KakaoTalk 或者Reddit来寻求帮助,讨论改进,或者只是表达你的感激之情。在
- 您也可以通过Github Sponsors向项目捐款。在
- 项目
标签: