Skip to content

Releases: sanderland/katrain

v1.8.3: contribute to distributed training & setup position

05 Mar 21:59
93338e8
Compare
Choose a tag to compare

image

YouTube Tutorials

Major new features

  • Contribute to KataGo's distributed training run!

    • A new option in the main menu will assist you in setting up contributing to distributed training
    • Included binaries for Windows, Linux and MacOS should all support this mode.
      • Keep in mind that the newer M1 macs needs you to compile katago yourself for this, as the current brew version does not support distributed training.
    • You can watch games being played, exploring policy, potential moves and variations.
    • Hit [spacebar] to switch between automatically playing and manually browsing through the current game.
    • Most other options are disabled in this mode.
    • See here for more details.
  • Setup position in new game

    • The new game now has tabs for new game/edit rules/setup position
    • Setup position will generate a position where one player is ahead.
    • The intended use for this is to play against KataGo from an advantage, and try to win the game.
      • For an extra challenge use KataHandicap, but remember to manually set the playout doubling advantage.

Minor features and bug fixes

  • The 'show dots' toggle is back to having only two options, all off and 'some on'.
    • This was mainly due to the 'next mistake' navigation making the view with all evaluations somewhat redundant, and not warranting the confusing 3-state checkbox.
    • The option to determine how many moves to show then on is back in analysis options configuration.
  • The window size/position is now saved on exit and restored on startup.
  • The fast analysis and rewind to start options in 'load game' are now remembered.
  • A new analysis option 'Reset analysis' was added which resets analysis to a single engine query, removing alternate moves and child move derived info.
  • A new shortcut [escape] stops all analysis.
    • This can break some features which expect analysis to be present, such as AI moves. Resetting with h or toggling continuous analysis will typically fix such edge cases.
  • Nodes with clear location commands in the sgf (AE) are now correctly shown.
    • However, they are not analyzed.
    • Nodes with only edit position commands (AB/AW/AE) are now indicated in grey with a + in the move tree
  • Scoring by ownership square counting in japanese rules no longer confuses the last dame with a point.

Installation

  • Windows users can simply download and run the KaTrain.exe file attached, or download the KaTrainWindows.zip file and run the .exe in that (which is slightly faster to start up)
  • macOS users can use the attached KaTrainOSX.zip (unzip, mount .dmg, drag .app to applications)
    • Note that on the newer Macs with M1 architecture, you still need to brew install katago, or compile katago yourself.
  • Linux and macOS users can install using pip3 install -U katrain or follow instructions here.

Patches

  • 1.8.1 Fix for single exe (homeDataDir)
  • 1.8.2 Fix for cacert on alternate katago and sizing on retina displays.
  • 1.8.3 Fix for >1M visits display and windows single exe distributed engine startup

v1.7.2-1.7.6: Strongest distributed model + packaged app for OSX

23 Jan 11:00
34b3f92
Compare
Choose a tag to compare

This is another minor update, improving on some issues found in 1.7.1, and including better support for downloading models.

I've also managed to create a packaged release for OSX, thanks to kivy developer @matham. This package includes a pre-compiled katago executable and should be all you need to run KaTrain on OSX. So far this has been tested on OSX 10.14.

Features:

  • You can now download the confidently strongest distributed model from general settings.
  • You can now press shift-b to navigate from a deep variation back to the main branch, thanks to @LiamHz

Bug fixes

  • Better stabiility for model downloads.
  • Queries should be properly cleared on new game, preventing an incorrect 'forever busy' engine status.
  • Fix for initial player detection using PL[]

New Theme & New YouTube Tutorial

  • See here for the first theme added.
  • See here for a new YouTube video on using the 'insert moves' feature to improve your ability to review games in situations when both players ignore an urgent move for a long time.

Installation

  • Windows users can simply download and run the KaTrain.exe file attached, or download the .zip file and run the .exe in that (which is slightly faster to start up)
  • MacOS users can use the attached KaTrainOSX.zip (unzip, mount .dmg, drag .app to applications)
    • Note that on the newer Macs with M1 processor you still need to brew install katago
  • Linux and MacOS users can install using pip3 install -U katrain or follow instructions here.

Update 1.7.3

  • Fixes a bug in downloading katago versions.
  • Shuts down faster if an external command is used.
  • Avoids using the provided exe for new M1 macs and looks for a brewed binary instead.
  • Uses an older pyinstaller to give less false positives for antivirus programs

Update 1.7.4

  • Fixed a bug in download models.

Update 1.7.6

  • Better support for M1

v1.7.1: New KataGo with distributed models and bug busting

16 Jan 18:18
a583944
Compare
Choose a tag to compare

This release includes an upgrade to the latest KataGo version, along with a number of minor features and bug fixes.

Features:

  • The built-in KataGo, as well as the additional versions that can be downloaded, have been upgraded to v1.8
    • These are compatible with the newest distributed models
    • Using 'download models' in general settings will download the latest model of the distributed run.
  • SGF file improvements
    • You can now use the right click 'open with' feature of your OS to open an SGF file
    • KaTrain will now try to determine the encoding for SGF files without one, instead of using latin-1. This should help Chinese SGF files in particular
    • Pressing 'enter' in the load/save dialog when a directory is in the text field now navigates to that location
  • The root node is now analyzed using the 'fast' setting in a new game. This should make startup a bit quicker. Likewise, on changing models or rules, fast analysis is used to re-analyze the game.
  • Ancient chinese "stone scoring" rules option which includes group tax, thanks to @pdeblanc
  • Traditional Chinese translation thanks to @Tony-Liou
  • Some elements of the UI can now be resized using the themes feature.

Bug fixes:

  • Fix that prevents the automatic self-play feature from deadlocking when many simultaneous games were going on at the same time
  • Loading generated player names are now ignored
  • Saving analysis to existing SGF files no longer gives errors on re-loading
  • Passes in top moves no longer results in SQ[] in SGF files
  • Support for [tt] as passs on <19x19 boards
  • Invalid HA properties are ignored instead of causing crashes
  • Alt/Tab shortcuts should no longer interfere with switching windows using Alt-Tab
  • Better guess for the initial player, respecting the PL tag and existing branches. This should help unusual handicap placements.
  • Font size for the policy moves now scales properly.
  • Configuration popups are restricted to the window height, such that the save button is always visible.
  • Show dots as 'all off' now properly saved in config and respected on restarting
  • Upper-case extensions such as .SGF now show up in load file
  • Pressing up/down in the move tree when on a collapsed path no longer causes an error.

Installation

  • Windows users can simply download and run the KaTrain.exe file attached, or download the .zip file and run the .exe in that (which is slightly faster)
  • Linux and MacOS users can install using pip install -U katrain or follow instructions here.

v1.7: The big analysis and sgf features update

18 Dec 19:58
0e65aa1
Compare
Choose a tag to compare

A little history and a big thank you

This project was started at the end of last year as a small experiment in making a graphical UI for something, and has since grown to one of the most powerful tools for Go AI analysis. This could not have been done without the support and contributions of many. A big thank you to all them, as well as all the people who contacted me on reddit and discord to send me helpful feedback, kind words and go books. Finally, thanks to all my Github sponsors for their support.
To highlight the effect of some of the major contributors, I've prepared a little history highlighting how the program changed since release.

Major New Features

  • You are now free to show any two statistics on the 'top moves', including visits, (change in) win rate, (change in) score.
  • The analysis menu now includes several new options:
    • Select a region to search, restricting analysis to this part of the board until cancelled.
      • This is particularly useful for tsumego solving or joseki analysis. See the video below for an example.
      • The old 'local moves' has been removed in favour of this option.
    • Insert moves: this mode allows you to insert moves in-between the current and next move, creating a new variation in which the moves are played out as long as they're legal (skipping over any inserted moves).
      • This is helpful for improving analysis when a certain exchange or life & death situation is ignored by both players for a long time.
    • Play out the game to the end.
      • This can be used as a more vivid way to visualize which territories could end up with each player.
      • Note that you can right-click the generated node and 'un-collapse' it (or press c) to see the entire game.
  • Analysis can now be cached in the SGF, causing analysis to be instantly available upon loading with no need for calls to KataGo
    • Note that this uses tags unique to KaTrain, and the resulting files can be >1Mb.
    • If you want to do additional analysis after loading, using the same model file is recommended.
  • Support for themes, see here for details.
    • If you make any interesting themes, I would be happy to add them to the repository.

Local Joseki Analysis video

Local Joseki Analysis Video

Minor New Features and Changes

  • You can now edit player names similarly to changing komi and rules.
  • Saving a game no longer uses a default filename, but prompts you for one. Subsequent saves use the same file, unless 'save as' is used.
  • Generated comments and player names are now filtered out from loaded SGFs
    • Particularly, loading and saving repeatedly no longer causes analysis comments to duplicate.
    • Note that this only applies to files saved with the current version.
  • You can now go back to the last branching point with b.
  • You can collapse branches up to the last branching point with c. These collapsed states are also saved in SGF files.
  • The policy moves view has been revamped to show the numerical value, and coloured by order of magnitude.
  • Minimizing the score graph in analysis mode now expands the move tree.
  • You can toggle coordinates on/off with k, thanks to @blamarche.
  • You can now go to your previous mistake with shift-n or the backward red arrow.
  • Some keyboard shortcuts have been added or changed, see the manual for details.
  • Spanish has been removed as a language option as it could not be maintained. If you are interested in contributing, please see these instructions.

Bug fixes and performance improvements

  • Rendering has been sped up significantly by caching textures. This should make variations smoother in particular.
  • Empty komi values in SGFs no longer cause errors.
  • The PL[] tag gets correctly picked up on when loading SGFs with problems.

Installation

  • Windows users can simply download and run the KaTrain.exe file attached, or download the .zip file and run the .exe in that (which is slightly faster)
  • Linux and MacOS users can install using pip install -U katrain or follow instructions here.
    • Note that the gui framework kivy had a major release recently, and installation on MacOS seems better in particular.

Enjoy the update, and a very happy holidays!

v1.6: Find next mistake, smoother updates, new AI option

23 Nov 12:11
02d4e83
Compare
Choose a tag to compare

This release adds a number of features to improve ease of use and responsiveness.

Features:

  • The navigation now has a button for 'Next mistake' which forwards to the next point in the game with an 'orange' (3 point by default) mistake or worse.
    • If you don't want to see your opponent mistakes, set them to 'AI' and they will be skipped.
  • Integration with the new 1.7.0 version of KataGo has been improved:
    • smoother updates to analysis in progress.
    • on loading a new game, previous queries will be terminated, so you do not have to wait for useless results.
  • The analysis menu has a new 'local search' option which searches within 5 spaces of the last move.
  • The simple-style AI has been added from 1.5.1. This option tries to settle territory, often leading to simpler moves.
    • This AI has not yet been calibrated and is just displayed as '2 dan', but increasing the max point loss will weaken it.
  • Timer options have been improved.
    • You can set a 'main time' in addition to byo-yomi
    • You can set a 'minimal thinking time in byo-yomi', which blocks you moving too fast.
  • You can now update the komi and rules of a game in progress in the 'new game' screen.
    • Note that this triggers re-analysis of the entire game.
  • You can now right-click a node in the move tree and make that branch the main/top one.
  • The 'show dots' option now cycles between 'show all', 'show some' and 'show none' to avoid you having to go into analysis settings and set this to 0 when you want a game with no analysis information.
  • Clicking on the "B" or "W" circle in player options now swaps the players, making it easier to switch colours between games.
  • You can now paste a URL straight into the program with ctrl-v and your SGF will be downloaded and loaded, thanks to @wierzbowski
  • The engine status dot now shows the number of outstanding queries when there are more than 2. This should help get an indication of how long your SGF takes to analyze.
  • The 'top moves' score change display no longer caps at 0.0, but shows positive changes as well, which tend to happen when a 'surprising' move is found by the engine.

Bug fixes:

  • A suboptimal setting for the search was changed in v1.5.1, this has been fixed, and analysis should be faster.
  • Move placements in SGF files could occasionally lead to an error, which has been fixed.
  • Fonts should scale by your operating system's font settings, making the UI look better for people with very high screen resolutions.

Installation

  • Windows users can simply download and run the KaTrain.exe file attached, or download the .zip file and run the .exe in that (which is slightly faster)
  • Linux and MacOS users can install using pip install katrain or follow instructions here.

Enjoy!

1.5.1 Pre-release: Experimental simple style AIs

19 Oct 10:47
63f5f07
Compare
Choose a tag to compare

image

This is a pre-release intended to crowd-source the testing and refining of a new AI option.

Specifically it includes some AI options that are intended to play in a 'simple' way, but still leverage the full power of KataGo, avoiding some of the blind spots that the policy based AIs have.

As a little extra, it also has support for KataGo's latest feature for reporting back partial analysis queries, so the feedback during analysis should be a lot more responsive.

AI Options

The new options are:

  • Simple style: cares about all territory, preferring moves which clearly take or solidify own territory, even if this also solidifies the opponents territory.
  • Settle style: Similar, but only cares for stones, see issue #215 for details.

I am mainly interested in people's experience in how these AIs play, which one is nicer to play against, and any weird behaviour they exhibit.

Giving feedback

Any reports of experimenting with the settings is useful. You can add your experiences to this issue.

  • Useful: Feedback on which settings are more enjoyable to play against over the span of one or more games
  • Useful: Estimates of playing strenght at different settings (e.g. I am 1 dan and found these settings to give me a good opponent), or self-play experiments.
  • Useful: Suggestions for improvment to the move selection.
  • OK: Situations with huge blunders which destroy enjoyment, such as inappropriate passing, saved with full SGF ('ai thoughts') output.
  • OK: Sharing games which you found particularly enjoyable or interesting.
  • Less useful: Finding individual situations in which you find the move chosen to be 'not simple'.

In terms of calibrating the strength, these settings are expected to be most important:

  • max_points_lost - A higher value will be weaker, and a very low value reverts back to normal KataGo behaviour.
  • settled_weight - A higher value will be weaker, but play more strongly according to the style
  • wide_root_noise (in engine settings) - A higher value (of 0.02-0.05) will return more candidate moves, giving more opportunities to prefer the simple style, but also increase the chance of blunders.
  • max_visits (in engine settings) - more visits, more options, more likely to find a move appropriate to the style.

Fun experiments

For additional fun experiments, note:

  • A negative settled_weight will prefer unsettledness, leading to complicated positions
  • A positive settled_weight with a higher negative opponent_fac will prefer unsettledness of the opponent, leading to invasions.

Attachment and tenuki penalties can also be negative or zero to make these moves prefered instead of avoided.

These kind of inverse settings are not the focus of this release, but feel free to share interesting games along with their settings.

Installation

Note that these AIs require features of KataGo which are not in the last release, so you need to use either the built-in opencl katago provided (which is up-to-date) or compile from source yourself.

  • For windows, just download and run the attached .exe, or download the .zip and run KaTrain.exe (which is faster to start)
  • For linux, note that this release has not been uploaded to PyPi, but you can run the following to install it:
    • pip install https://github.com/sanderland/katrain/archive/v1.5.1.zip
    • Alternatively for running it without installation, you can git clone the branch and run it as usual with python -m katrain
    • The included opencl KataGo is updated for linux to include the latest unreleased fetures.
  • For MacOS, follow the linux instructions, and compile KataGo's master branch from source.

v1.5: Graphical updates, find alternatives, save results to sgf

18 Sep 18:31
a29ad6c
Compare
Choose a tag to compare

image

Improvements

  • A number of significant of graphical updates to analysis
    • The next moves are shown as a dashed line around the move rather than a semi-transparent stone, as overlap with 'top moves' hints was confusing.
      • If the next move is the top move, a dashed line with blue and the next player will be shown.
    • Top moves are softer circles, and fade out for low (<25) visits. This should both make any borders clearer as well as make the board less overwhelming. The threshold can be configured in config.json (low_visits) but is not yet in the UI.
    • When viewing policy moves, 'top moves' are now hidden to avoid overlap.
  • A new analysis option, 'find alternative moves', has been added. This will do a 'fast visits' search on all current move options, as well as request a second query avoiding all current moves.
  • The model and katago binary dropdowns now show a little description of the files you can select.
    • A bug where downloaded katago versions didn't show up in the dropdown has been fixed.
  • Resignation is now possible. This is mainly to allow people to have more complete SGF records.
    • Game results are now stored in the SGF as long as the result (B+R, W+3.5, etc) is showing on top of the board.
  • The rank estimator has been put away, as it was causing more confusion than anything and not actively being improved.
  • Improved support for FoxWQ's incorrectly formatted SGF files, with extreme komi/weird handicap settings being converted to reasonable values when the SGF contains "AP[foxwq]"
  • Rule set and komi are now shown in info on the first move.

Bug fixes:

  • A bug where the first player was incorrect for 1-stone handicap games was fixed.
  • A bug where katago kept running in the background on windows after the program closed has been fixed.

Installation

  • Windows users can simply download and run the KaTrain.exe file attached, or download the .zip file and run the .exe in that (which is slightly faster)
  • Linux and MacOS users can install using pip install katrain or follow instructions here.

Enjoy!

v1.4: KataGo for CPU only, improved analysis visualizations

26 Aug 19:02
c9575cf
Compare
Choose a tag to compare

With the release of KataGo v1.6.x, efficient support for CPU-only KataGo is finally here!

Short video with new features

preview

Features

  • Download and select any KataGo binary for windows or linux directly from within KaTrain.
    • Selecting an 'eigen' binary will allow you to use KaTrain without a GPU!
    • See the KataGo release notes for more information.
  • Override KataGo command.
    • Previously implemented as a hack where you could "quote" your katago path, it is now a separate field.
    • This can be used to connect to a remote server running a KataGo analysis engine.

image

  • Option to show point loss as text.

    • As the number of users has grown, it's clear that some prefer to see the point loss on each candidate move in detail, whether it be for analyzing pro games, or a difficulty distinguishing colours.
    • Although still turned off by default for a cleaner look, the option for this can be found under 'teaching/analysis settings'.
  • Animated 'pondering' indication when continuous analysis is on.

    • Before, it was often not clear whether the engine was still pondering or not, causing some confusion.
    • It now shows an half-orange and half-yellow spinning circle where the engine busy status is indicated.

image

  • Finally, when a move is undone in teaching mode, 'expected territory' will show expected losses in red.
    • This should allow for a hint on the important regions of the board, without checking the expected refutation in detail (which often gives away a bit too much).

image

Installation

  • Windows users can simply download and run the KaTrain.exe file attached, or download the .zip file and run the .exe in that (which is slightly faster)
  • Linux and MacOS users can install using pip install katrain or follow instructions here.
    • Note that unfortunately there are currently no pre-compiled binaries for mac for the newer KataGo versions.

Enjoy!

v1.3.3/v1.3.4: IME and SGF improvements, colourblind mode

02 Aug 10:41
3d28be4
Compare
Choose a tag to compare

New video on analyzing games:

Analysis Tutorial

Mostly minor improvements in this release.

  • SGF comments are shown in the 'info' field. Note that if the sgf was saved by KaTrain, this includes comments/notes previously generated.
  • SGF improvements for some unusual edge cases generated by older files and foxwq.
  • IME improvements on the notes field, which should now support typing chinese/japanese/korean more naturally.
  • Red-green colourblind theme now available under 'teaching settings'.
  • Bug fix for SGF file loading by copy-pasting a filename into the designated field.
  • Engine connector made a bit more robust against unexpected input, as seems to happen with some ssh connections.

For information on installing, please see the 1.3.1 release.

Update 1.3.4: Minor fix to teaching settings popup.

v1.3.2: 日本語 and sgf branch deletion

14 Jul 18:04
ce2e6e3
Compare
Choose a tag to compare

This release is relatively small, but as some of the features in it are much requested, I'm putting them out there sooner rather than later. Enjoy!

  • Japanese translation, thanks to @kaorahi for contributing.
  • Feature: Right click on a node in the move tree to get an option to delete it.
  • Feature: enter a command between "double quotes" for the 'katago path' setting will make it be used for the katago command, overriding any models/config setting. This is an experimental feature for power users who want to try remote katago setups.
  • Bug fix: The PV animation time setting was fixed.

For information on installing, please see the previous release.