Katrain

Latest version: v1.15.0

Safety actively analyzes 688775 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 5

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

1.7.1

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](https://github.com/sanderland/katrain/blob/master/INSTALL.md).

1.7

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](CONTRIBUTIONS.md) of many. A big thank you to all them, as well as all the people who contacted me on [reddit](https://www.reddit.com/user/sanderbaduk/) and [discord](https://discord.gg/AjTPFpN) to send me helpful feedback, kind words and go books. Finally, thanks to all my [Github sponsors](https://github.com/sponsors/sanderland) for their support.
To highlight the effect of some of the major contributors, I've prepared a little [history](https://imgur.com/a/4RUG02G) 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](THEMES.md) 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](http://i.imgur.com/YcpmSBx.png)](https://www.youtube.com/watch?v=tXniX57KtKk)

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](README.md) 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](CONTRIBUTIONS.md) 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](https://github.com/sanderland/katrain/blob/master/INSTALL.md).
* 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!

1.6

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](https://github.com/sanderland/katrain/blob/master/INSTALL.md).

Enjoy!

1.5.1pre

![image](https://user-images.githubusercontent.com/48946947/96442193-02738f00-120b-11eb-8dbe-454d2c1b843c.png)


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](https://github.com/sanderland/katrain/issues/220).

* 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](https://github.com/sanderland/katrain/blob/master/INSTALL.md) 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.

1.5

![image](https://user-images.githubusercontent.com/48946947/93624979-7c80e000-f9e1-11ea-9f64-a94f71e825ba.png)

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](https://github.com/sanderland/katrain/blob/master/INSTALL.md).

Enjoy!

Page 3 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.