Git Product home page Git Product logo

katrain's Introduction

KaTrain

Latest Release License:MIT GitHub Downloads PyPI Downloads Discord

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

English German French Russian Turkish

Simplified Chinese Traditional Chinese Korean Japanese

Preview and Youtube Videos

screenshot

Local Joseki Analysis Analysis Tutorial Teaching Game Tutorial
Local Joseki Analysis Video Analysis Tutorial  Teaching Game Tutorial

Installation

  • See the releases page for downloadable executables for Windows and macOS.
  • Alternatively use pip3 install -U katrain to install the latest version from PyPI on any 64-bit OS.
  • On macOS, you can also use brew install katrain to 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.

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.

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 mostly 4th+ line moves, leading to a center-oriented style.
      • Territory Style is biased in the opposite way, towards 1-3rd line moves.
    • KataJigo is KataGo attempting to win by 0.5 points, typically by responding to your mistakes with an immediate mistake of it's own.
    • KataAntiMirror is KataGo assuming you are playing mirror go and attempting to break out of it with profit as long as you are.

The Engine based AIs (KataGo, ScoreLoss, KataJigo) are affected by both the model and choice of visits and maximum time, while the policy net based AIs are affected by the choice of model file, but work identically with 1 visit.

Further technical details and discussion on some of these AIs can be found on this thread at the life in 19x19 forums.

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: Toggles showing coloured evaluation 'dots' on the last few moves or not.
      • You can configure the thresholds, along with how many of the last moves they are shown for under 'Teaching/Analysis Settings'.
    • [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]: Select area of interest: set an area and search only for moves in this box. Good for solving tsumegos. Note that some results may appear outside the box due to establishing a baseline for the best move, and the opponent can tenuki in variations.
    • [h]: Reset analysis. This reverts the analysis to what the engine returns after a normal query, removing any additional exploration.
    • [i]: Start insertion mode. Allows you to insert moves, to improve analysis when both players ignore an important exchange or life and death situation. Press again to stop inserting and copy the rest of the branch.
    • [l]: Play out the game until the end and add as a collapsed branch, to visualize the potential effect of mistakes. This is done in the background, and can be started at several nodes at once when comparing the results at different starting positions.
    • [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.
      • [shift+spacebar]: As above, but does not turn 'top moves' hints on when it is off.
    • [enter] AI move. Makes the AI move for the current player regardless of current player selection.
    • [F2]: Deeper full game analysis. Analyze the entire game to a higher number of visits.
    • [F3]: Performance report. Show an overview of performance statistics for both players.
    • [F10]: Tsumego Frame. After placing a life and death problem in a corner/side, use this to fill up the rest of the board to improve AI's ability in solving life and death problems.

Keyboard and mouse shortcuts

In addition to shortcuts mentioned above and those shown in the main menu:

  • [Alt]: Open the main menu.
  • [~] or [ ` ] or [F12]: Cycles through more minimalistic UI modes.
  • [k]: Toggle display of board coordinates.
  • [p]: Pass
  • [m]: Toggle the move number on the board
  • [pause]: Pause/Resume timer
  • [arrow left] or [z]: Undo move. Hold shift for 10 moves at a time, or ctrl to skip to the start.
  • [arrow right] or [x]: Redo move. Hold shift for 10 moves at a time, or ctrl to skip to the end.
  • [arrow up/down] Switch branch, as would be expected from the move tree.
  • [home/end] Go to the beginning/end of the game.
  • [pageup] Make the currently selected node the main branch
  • [Ctrl-delete] Delete current node.
  • [c] Collapse/Uncollapse the branch from the current node to the previous branching point.
  • [b] Go back to the previous branching point.
  • [Shift-b] Go back the main branch.
  • [n] As in clicking the forward red arrow, go to one move before the next mistake (orange or worse) by a human player.
  • [Shift-n] As in clicking the backward red arrow, go to one move before the previous mistake.
  • [scroll mouse]:
    • When hovering the cursor over the right panel: Redo/Undo move.
    • When hovering over a candidate move: Scroll through principal variation.
  • [middle/scroll wheel click]: Add principal variation to the move tree. When scrolling, only moves up to the point you are viewing are added.
  • [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 the 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.
  • [Escape]: Stop all analysis.

Contributing to distributed training

Starting in December 2020, KataGo started distributed training. This allows people to all help generate self-play games to increase KataGo's strength and train bigger models.

KaTrain 1.8.0+ makes it easy to contribute to distributed training: simply select the option from the main menu, register an account, and click run. During this mode you can do little more than watch games.

Keep in mind that partial games are not uploaded, so it is best to plan to keep it running for at least an hour, if not several, for the most effective contribution.

A few keyboard shortcuts have special functions in this mode:

  • [Spacebar] Switch between manually navigating the current game, and automatically advancing it.
  • [Escape]: This sends the quit command to KataGo, which starts a slow shutdown, finishing partial games but not starting new ones. Only works on v1.11+.
  • [Pause]: Pauses/resumes contributions via the pause and resume commands introduced in KataGo v1.11.

Themes

See these instructions for how to modify the look of any graphics or colours, and creating or install themes.

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 nnMaxBatchSize in KataGo/analysis_config.cfg, 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.
  • The font size is too small
    • On some ultra-high resolution monitors, dialogs and other elements with text can appear too small. Please see these instructions to adjust them.
  • The app crashes with an error about "unable to find any valuable cutbuffer provider"
    • Install xclip using sudo apt-get install xclip

Support / Contribute

GitHub issues Contributors

  • Ideas, feedback, and contributions to code or translations are all very welcome.
    • For suggestions and planned improvements, see open issues on github to check if the functionality is already planned.
  • You can join the Computer Go Community Discord (formerly Leela Zero & Friends) (use the #gui channel) to get help, discuss improvements, or simply show your appreciation. Please do not use github issues to ask for technical help, this is only for bugs, suggestions and discussing contributions.

katrain's People

Contributors

bale-go avatar blamarche avatar boltomli avatar carton avatar davehcdn avatar dependabot[bot] avatar divanorama avatar dontbtme avatar drm00 avatar fohristiwhirl avatar harleqin avatar hiuxia avatar isty2e avatar kameone avatar liamhz avatar loker404 avatar pdeblanc avatar popz73 avatar rexl2018 avatar sanderland avatar satoshi-yoda avatar tegularius avatar tony-liou avatar wierzbowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

katrain's Issues

Downloading models isn't working on my mac

I just installed 1.2.1 and tried out the "Download Models" command. I am not seeing the progress percentages shown in your 1.2.1 graphic, and I am not seeing any activity in the destination directory. After a while I clicked on the "Download Models" button again, and it seems to have tried to run another download session in parallel.
Screen Shot 2020-06-21 at 2 51 08 PM

I was, however, able to download the new 20-block model directly from the katago releases page, so it shouldn't be a network problem.

Exception when using touch screen

When using a touch screen on a Windows device to play a move or click on any UI element, the click fails to register and the info pane shows "ERROR: Exception AttributeError: "'WM_MotionEvent' object has no attribute 'button'" in base.py line 334.

Cannot play on MacOS

Here is my log:

[INFO   ] [Logger      ] Record log in /Users/michael/.kivy/logs/kivy_20-05-07_7.txt
[INFO   ] [Kivy        ] v1.11.1
[INFO   ] [Kivy        ] Installed at "/usr/local/lib/python3.7/site-packages/kivy/__init__.py"
[INFO   ] [Python      ] v3.7.6 (default, Dec 30 2019, 19:38:26)
[Clang 11.0.0 (clang-1100.0.33.16)]
[INFO   ] [Python      ] Interpreter at "/usr/local/opt/python/bin/python3.7"
[INFO   ] [Factory     ] 184 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_imageio, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO   ] [Clipboard   ] Provider: sdl2(['clipboard_nspaste'] ignored)
[INFO   ] [Text        ] Provider: sdl2
[INFO   ] [Window      ] Provider: sdl2
[INFO   ] [GL          ] Using the "OpenGL ES 2" graphics system
[INFO   ] [GL          ] Backend used <sdl2>
[INFO   ] [GL          ] OpenGL version <b'2.1 INTEL-14.6.12'>
[INFO   ] [GL          ] OpenGL vendor <b'Intel Inc.'>
[INFO   ] [GL          ] OpenGL renderer <b'Intel(R) Iris(TM) Graphics 6100'>
[INFO   ] [GL          ] OpenGL parsed version: 2, 1
[INFO   ] [GL          ] Shading version <b'1.20'>
[INFO   ] [GL          ] Texture max size <16384>
[INFO   ] [GL          ] Texture max units <16>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO   ] [GL          ] NPOT texture support is available
Using config file /Users/michael/00_works/00_go/katrain/config.json
/Users/michael/00_works/00_go/katrain/img/icon.png
Starting KataGo with KataGo/katago analysis -model KataGo/models/b15-1.3.2.txt.gz -config KataGo/analysis_config.cfg -analysis-threads 8
Sending query QUERY:1: {"rules": "japanese", "priority": -999999, "analyzeTurns": [0], "maxVisits": 500, "komi": 6.5, "boardXSize": 19, "boardYSize": 19, "includeOwnership": true, "includePolicy": true, "moves": [], "overrideSettings": {"maxTime": 3.0}, "id": "QUERY:1"}
[INFO   ] [Base        ] Start application main loop
2020-05-07 13:42:06+0700: Analysis Engine starting...
2020-05-07 13:42:06+0700: KataGo v1.3.3
2020-05-07 13:42:06+0700: nnRandSeed0 = 14475186504788670381
2020-05-07 13:42:06+0700: After dedups: nnModelFile0 = KataGo/models/b15-1.3.2.txt.gz useFP16 auto useNHWC auto
2020-05-07 13:42:10+0700: Found OpenCL Platform 0: Apple (Apple) (OpenCL 1.2 (Apr 19 2020 03:01:37))
2020-05-07 13:42:10+0700: Found 2 device(s) on platform 0 with type CPU or GPU or Accelerator
2020-05-07 13:42:10+0700: Found OpenCL Device 0: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz (Intel) (score 102)
2020-05-07 13:42:10+0700: Found OpenCL Device 1: Intel(R) Iris(TM) Graphics 6100 (Intel Inc.) (score 6000102)
2020-05-07 13:42:10+0700: Using OpenCL Device 1: Intel(R) Iris(TM) Graphics 6100 (Intel Inc.) OpenCL 1.2
2020-05-07 13:42:10+0700: Loaded tuning parameters from: /Users/michael/.katago/opencltuning/tune6_gpuIntelRIrisTMGraphics6100_x19_y19_c192_mv8.txt
Sending query QUERY:2: {"rules": "japanese", "priority": 1, "analyzeTurns": [1], "maxVisits": 500, "komi": 6.5, "boardXSize": 19, "boardYSize": 19, "includeOwnership": true, "includePolicy": true, "moves": [["B", "Q17"]], "overrideSettings": {"maxTime": 3.0}, "id": "QUERY:2"}
2020-05-07 13:42:18+0700: Loaded model KataGo/models/b15-1.3.2.txt.gz
2020-05-07 13:42:18+0700: OpenCL backend: Model version 8
2020-05-07 13:42:18+0700: OpenCL backend: Model name: b15c192-s1672170752-d466197061
2020-05-07 13:42:18+0700: Analyzing up to 8 positions at at time in parallel
2020-05-07 13:42:18+0700: Started, ready to begin handling requests
Sending query QUERY:3: {"rules": "japanese", "priority": 1, "analyzeTurns": [2], "maxVisits": 500, "komi": 6.5, "boardXSize": 19, "boardYSize": 19, "includeOwnership": true, "includePolicy": true, "moves": [["B", "Q17"], ["W", "P16"]], "overrideSettings": {"maxTime": 3.0}, "id": "QUERY:3"}
[36.2][QUERY:1] KataGo Analysis Received: dict_keys(['id', 'moveInfos', 'ownership', 'turnNumber'])
ERROR: Error in engine callback for query QUERY:1: 'rootInfo'
[34.2][QUERY:2] KataGo Analysis Received: dict_keys(['id', 'moveInfos', 'ownership', 'turnNumber'])
ERROR: Error in engine callback for query QUERY:2: 'rootInfo'

Move tree support

UI support for showing the move tree.
Main blocker for getting this started is figuring out the UI design for this - ideas / basic mockups would speed this up, so please comment if you have any ideas.

Some minor graphics glitches on macOs

The settings panels are garbled by overprinting:
General and Engine Settings

The "Setup New Game" panel has a problem with some of the values not printing entirely inside the boxes:
Setup New Gaame

Furthermore, when I click on the value "7" to change the number of handicap stones, it is the "komi" field that is selected. To select and change the handicap value I have to click above on the board size field.

Engine crashes when out of memory

image

My friend is seeing this when running KaTrain (he is using a Japanese Windows computer). After the error occurs the UI becomes unresponsive. Just wondering if you had any ideas what could be going on.

Better dots scaling

The current size is a tad uniformly big, probably because temperature tends to be 10+ throughout most of the game. Should it scale to 20+ in fighting situation/l&d mistakes? scale non-quadratically?

Selective sweep

Received a suggestion to improve sweep to not do the entire board.
Options could be top fraction of top policy move?

The problem with having more than one Katrain

Hello.
If you have two versions of the same Katrain in different locations, such as a standalone Katrain and the Katrain that comes with the megapack, changing the settings of one also seems to affect the other.

Is this some kind of mistake on my part? Or was it intentionally made that way from the beginning?

KaTrain crashes when loading SGF file

(First off, thanks for a great application!)

When I try to load an SGF file into KaTrain, the application crashes.

When I debug the loading, I get the following error:

'NoneType' object has no attribute 'strip'
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> /Users/steveflinter/src/katrain/katrain/core/sgf_parser.py(325)_parse_branch()
-> property, value = match[1], match[2].strip()[1:-1]

I'm running on a Macbook Pro (Catalina), using python 3.7.4 (miniconda). The AI engine is katago 1.4.2. I'm using the 1.1.2 version of KaTrain:

commit dc22aa88526fb6446f908259f06020d649a2d0a9 (HEAD -> master, tag: v1.1.2, origin/master, origin/HEAD)

Here's the SGF file (generated by Dragon Go Server):

(
;FF[4]GM[1]
AP[DGS:1.20.5]
PC[Dragon Go Server: https://www.dragongoserver.net/]
DT[2020-06-02,2020-06-15]
GN[sflinter-Bokaiido-1321916-20200615]
SO[https://www.dragongoserver.net/game.php?gid=1321916]
PB[Emmanuel Volte (Bokaiido)]
PW[Steve Flinter (sflinter)]
BR[2k]
WR[1k]
XM[207]
GC[Game ID: 1321916
Game Type: GO (1:1)
Rated: Y

White Start Rating: 1k (+4%) - Elo rating 2004
Black Start Rating: 2k (-30%) - Elo rating 1869]
OT[30 days with 1 day extra per move]
RU[Japanese]
SZ[19]
KM[0.5]
;B[pd]
;W[dp]
;B[fq]
;W[cn]
;B[oq]
;W[dc]
;B[jp]
;W[qp]
;B[qq]
;W[rq]
;B[rr]
;W[pq]
;B[qr]
;W[op]
;B[pr]
;W[nq]
;B[pp]
;W[po]
;B[rp]
;W[pq]
;B[or]
;W[ro]
;B[sq]
;W[qf]
;B[pp]
;W[qo]
;B[oo]
;W[pq]
;B[np]
;W[on]
;B[pp]
;W[nn]
;B[qh]
;W[of]
;B[nd]
;W[pi]
;B[qm]
;W[pm]
;B[qk]
;W[qi]
;B[pl]
;W[ol]
;B[ok]
;W[nl]
;B[rn]
;W[so]
;B[nk]
;W[mk]
;B[ni]
;W[mj]
;B[oi]
;W[ph]
;B[mi]
;W[pj]
;B[pk]
;W[ln]
;B[lp]
;W[mf]
;B[ki]
;W[qc]
;B[qd]
;W[rd]
;B[pc]
;W[rb]
;B[qb]
;W[rc]
;B[kc]
;W[di]
;B[jh]
;W[jk]
;B[gc]
;W[ce]
;B[fo]
;W[ic]
;B[id]
;W[jd]
;B[hd]
;W[jc]
;B[kd]
;W[je]
;B[lf]
;W[if]
;B[gf]
;W[hg]
;B[fh]
;W[hi]
;B[gg]
;W[dg]
;B[fj]
;W[gi]
;B[fi]
;W[ij]
;B[dj]
;W[cj]
;B[ck]
;W[ci]
;B[dk]
;W[dr]
;B[er]
;W[eq]
;B[fr]
;W[en]
;B[gm]
;W[in]
;B[ho]
;W[me]
;B[ke]
;W[mb]
;B[mc]
;W[kb]
;B[lb]
;W[la]
;B[lc]
;W[nb]
;B[jb]
;W[ka]
;B[ob]
;W[ib]
;B[nc]
;W[kf]
;B[kg]
;W[jf]
;B[le]
;W[mg]
;B[lg]
;W[fb]
;B[rj]
;W[ri]
;B[cq]
;W[dq]
;B[cr]
;W[ds]
;B[bo]
;W[bn]
;B[co]
;W[do]
;B[bs]
;W[ar]
;B[cp]
;W[ap]
;B[ao]
;W[bq]
;B[dm]
;W[dn]
;B[bk]
;W[an]
;B[cd]
;W[de]
;B[dd]
;W[ed]
;B[cc]
;W[be]
;B[ec]
;W[db]
;B[fc]
;W[cb]
;B[ee]
;W[bc]
;B[fd]
;W[bj]
;B[kk]
;W[kl]
;B[jj]
;W[il]
;B[hk]
;W[ik]
;B[ii]
;W[ih]
;B[hj]
;W[ji]
;B[qe]
;W[re]
;B[ii]
;W[gb]
;B[si]
;W[sh]
;B[sj]
;W[rl]
;B[rm]
;W[sn]
;B[sm]
;W[lj]
;B[mh]
;W[io]
;B[ip]
;W[li]
;B[lh]
;W[kj]
;B[ji]
;W[jg]
;B[kh]
;W[qa]
;B[pb]
;W[ko]
;B[eb]
;W[ea]
;B[bd]
;W[ad]
;B[ed]
;W[bb]
;B[br]
;W[fm]
;B[gl]
;W[gn]
;B[hn]
;W[aq]
;B[em]
)

Config UI support

UI support for editing settings.
Low priority for me, but if anyone would want to take this up, a PR would be welcome.

Better name

The current one is a code name from early on. Better suggestions welcome.

improved UI for ai settings

Sliders for different settings with reasonable value ranges.

Possibly future or only for some now: Model of settings -> strength that gives an indication of what they do.

download models

idea: set folder for models instead of path
within that path, have a dropdown of available models and option to download others.

I can't start KaTrain-v1.1.2

Download KaTrain-v1.1.2, unzip it, and then run KaTrain.exe and The following error occurs
無題
I know this is probably an elementary error, but I'd appreciate any advice.

Can I install on Suse Linux without being root?

I tried to run the setup and got the output shown below, which says I may need to be root. Is it possible to install KaTrain to a user directory instead, or do I indeed need to be root? In either case, perhaps you could mention this in the instructions.

(N.B. I have a KataGo executable available.)

pjtraill@linux-czvq:~/Documents/Fun/Go/Programmes/KaTrain/katrain> python --version
Python 3.6.10
pjtraill@linux-czvq:~/Documents/Fun/Go/Programmes/KaTrain/katrain> python3 setup.py install
['katrain', 'katrain.KataGo', 'katrain.core', 'katrain.gui', 'katrain.models'] {'': ['*.json', '*.kv'], 'katrain': ['KataGo/OpenCL.dll', 'KataGo/__init__.py', 'KataGo/analysis_config.cfg', 'KataGo/boost_filesystem-vc142-mt-x64-1_72.dll', 'KataGo/katago', 'KataGo/katago-bs52.exe', 'KataGo/katago.exe', 'KataGo/msvcp140.dll', 'KataGo/msvcp140_1.dll', 'KataGo/msvcp140_2.dll', 'KataGo/vcruntime140.dll', 'KataGo/vcruntime140_1.dll', 'KataGo/zlib1.dll', 'models/__init__.py', 'models/b15-1.3.2.txt.gz', 'img/anim_analyze.gif', 'img/anim_pvtop.gif', 'img/anim_teach.gif', 'img/icon.png', 'img/screenshot_analyze.png', 'img/screenshot_play.png', 'img/flaticon/bar.png', 'img/flaticon/gears.png', 'img/flaticon/go-game.png', 'img/flaticon/next.png', 'img/flaticon/next5.png', 'img/flaticon/next999.png', 'img/flaticon/open-folder.png', 'img/flaticon/previous.png', 'img/flaticon/previous5.png', 'img/flaticon/previous999.png', 'img/flaticon/bar.png', 'img/flaticon/gears.png', 'img/flaticon/go-game.png', 'img/flaticon/next.png', 'img/flaticon/next5.png', 'img/flaticon/next999.png', 'img/flaticon/open-folder.png', 'img/flaticon/previous.png', 'img/flaticon/previous5.png', 'img/flaticon/previous999.png'], 'tests': []}
running install
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/usr/lib/python3.6/site-packages/test-easy-install-8066.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /usr/lib/python3.6/site-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://setuptools.readthedocs.io/en/latest/easy_install.html

Please make the appropriate changes for your system and try again.

ai strength model

User changes AI settings -> magic -> show strength based on current settings

Loading an SGF without analyzing it

_ Sometimes we only want to analyze some parts of a game, like matters of life and death, a joseki trick, the endgame, etc.
_ Sometimes we want to replay some parts of a game against bots for practice, like an invasion, a running battle, the endgame, etc.

  1. The problem is that currently as far as I know there's no way to simply open an SGF without the engine starting an analysis of the entire game.
  2. There is also no way to interrupt an analysis (apart from shutting down Katrain :D)

_ Sometimes we want to take a look at previously analyzed SGF.

  1. Sadly we can't reuse saved SGF from Katrain itself. If a user saved in an SGF say 3 analyzed big mistakes, he probably would expect Katrain to be able to open it and interpret directly the saved data by showing accordingly 3 dots, scores, win rates, lost points, PVs and Top moves.

Move navigation / rewind after load

Suggestion " Maybe just adding something to load and then set the board to the first move? For longer games undoing back to the first move can be kind of annoying."

Not sure how to do this UI wise, maybe an option when loading from file, where the popup gives more flexibility.

UI Font (Size) Configuration?

It seems trivial alongside the core of the program, but is there any possibilty of having the fonts (or at least font sizes) configurable?

I opened this on a large monitor, and the fonts are coming up fairly huge and distracting. I can see that they're being resized on the fly as the window resizes, but in most situations I'd much prefer a consistent size even if the window is resized. Ideally, it would be really useful to be able to set at least the font size, and preferably the fonts themselves, for the UI.

More Effective Timer Sounds

Using v1.2.0, timer' sounds currently inform us that:
_ A few seconds remain till the end of our byoyomi period.
_ 1 second remains till the end of our byoyomi period.
As a result, if you play after hearing the last sound, you may or may not have played on time: there's no way to know without directly looking at the timer, which would defeat the purpose of having sounds in my opinion.
Likewise, you can't know if you lost on time or not without taking a look at the timer, which is hard when you're focusing on the board. Chances are you'll continue playing until you realize that it's been a while since you heard the timer at all.

In short, to be effective, I believe sounds should inform us that:
_ A few seconds remain till the end of our byoyomi period.
_ We lost a byoyomi period
_ We lost on time

FileNotFoundError

Hi, the program is currently looking for a nonexistent(?) file called 'katago' inside 'KataGo'.

Using config file config.json
[INFO   ] [Text        ] Provider: sdl2
[INFO   ] [Window      ] Provider: sdl2
[INFO   ] [GL          ] Using the "OpenGL ES 2" graphics system
[INFO   ] [GL          ] Backend used <sdl2>
[INFO   ] [GL          ] OpenGL version <b'2.1 INTEL-12.10.14'>
[INFO   ] [GL          ] OpenGL vendor <b'Intel Inc.'>
[INFO   ] [GL          ] OpenGL renderer <b'Intel(R) Iris(TM) Graphics 6100'>
[INFO   ] [GL          ] OpenGL parsed version: 2, 1
[INFO   ] [GL          ] Shading version <b'1.20'>
[INFO   ] [GL          ] Texture max size <16384>
[INFO   ] [GL          ] Texture max units <16>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO   ] [GL          ] NPOT texture support is available
[INFO   ] [Base        ] Start application main loop
 Exception in thread Thread-1:
 Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner
     self.run()
   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 870, in run
     self._target(*self._args, **self._kwargs)
   File "/Users/andrewyli/Downloads/katrain/controller.py", line 61, in _engine_thread
     self.kata = subprocess.Popen(self.command, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 800, in __init__
     restore_signals, start_new_session)
   File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1551, in _execute_child
     raise child_exception_type(errno_num, err_msg, err_filename)
 FileNotFoundError: [Errno 2] No such file or directory: 'KataGo/katago': 'KataGo/katago'

Broken Pipe error when loading SGF file

I downloaded the SGF from OGS

here is the console output when I load it

MESSAGE analyze-sgf ['']
MESSAGE analyze-sgf ['(;FF[4]\nCA[UTF-8]\nGM[1]\nDT[2020-04-02]\nPC[OGS: https://online-go.com/game/22785149]\nGN[Friendly Match]\nPB[shigazaru]\nPW[Seadentist]\nBR[3k]\nWR[4k]\nTM[60]OT[30 fischer]\nRE[W+R]\nSZ[19]\nKM[6.5]\nRU[Japanese]\n;B[pd]\n(;W[pp]\nC[Seadentist: hi\n]\n(;B[dp]\n(;W[dd]\nC[shigazaru: hi\n]\n(;B[qn]\n(;W[qo]\n(;B[pn]\n(;W[mq]\n(;B[pi]\n(;W[fq]\n(;B[cn]\n(;W[dr]\n(;B[hp]\n(;W[cq]\n(;B[fp]\n(;W[gq]\n(;B[gp]\n(;W[bo]\n(;B[eq]\n(;W[er]\n(;B[co]\n(;W[bn]\n(;B[bp]\n(;W[cp]\n(;B[bm]\n(;W[bq]\n(;B[an]\n(;W[ap]\n(;B[cf]\n(;W[ce]\n(;B[df]\n(;W[cm]\n(;B[bl]\n(;W[dm]\n(;B[en]\n(;W[ck]\n(;B[ed]\n(;W[ec]\n(;B[dc]\n(;W[cc]\n(;B[fc]\n(;W[db]\n(;B[fd]\n(;W[ch]\n(;B[eh]\n(;W[ek]\n(;B[hq]\n(;W[jq]\n(;B[nc]\n(;W[qf]\n(;B[qe]\n(;W[pf]\n(;B[ne]\n(;W[ri]\n(;B[qh]\n(;W[rh]\n(;B[rf]\n(;W[rg]\n(;B[re]\n(;W[qi]\n(;B[pj]\n(;W[qk]\n(;B[pk]\n(;W[ql]\n(;B[ro]\n(;W[rp]\n(;B[po]\n(;W[qp]\n(;B[op]\n(;W[pl]\n(;B[ol]\n(;W[om]\n(;B[pm]\n(;W[nl]\n(;B[ok]\n(;W[nm]\n(;B[no]\n(;W[rn]\n(;B[rm]\n(;W[so]\n(;B[qj]\n(;W[rj]\n(;B[lo]\n(;W[oq]\n(;B[rl]\n(;W[rk]\n(;B[nk]\n(;W[qm]\n(;B[ml]\n(;W[nn]\n(;B[oo]\n(;W[ln]\n(;B[mn]\n(;W[mm]\n(;B[mo]\n(;W[ll]\n(;B[mk]\n(;W[kn]\n(;B[ko]\n(;W[jn]\n(;B[jo]\n(;W[in]\n(;B[io]\n(;W[gn]\nC[Seadentist: thx\n]\n))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))', False, False]
sending query for move 2: {'id': '2', 'moves': [], 'rules': 'japanese', 'komi': 6.5, 'boardXSize': 19, 'bo
ERROR: Exception in Engine thread: [Errno 32] Broken pipe

the SGF file
https://online-go.com/api/v1/games/22785149/sgf

anyone else had a similar issue?

How to change the character-set?

I can't write note in Korean language and I can't read Korean character when browsing to open sgf file to analyze.
Is there any setting which I can edit to change program character-set?
20200521_131036
20200521_131117

Point Lost/Gained on the right

I just found out about this program and like it a lot, however I immediately noticed a problem when analysing a game of mine. I the UI-element where Score/Win rate/Point loss are displayed numerically I found it very confusing that the point loss jumps between Black/White and even Loss/Gain. When i am just clicking through the moves I'd much rather see the gain for black every time and if he lost points display it with a "-" sign. The way it is now I activly have to read the whole line every time I click a move foward and sometimes I even get a double negativ (i.e. loss for white = gain for black).

Wish: do not dot KaTrain’s move until I answer it

Problem

I have noticed that it is a great but undesirable help to see whether KaTrain’s latest move is good or not rather than having to decide that myself, but I can only suppress this by altogether suppressing dots for the AI player. This option is perhaps good when playing a normal game against an AI, but for a teaching game it seems best to me to provide feedback as soon as I have made my decision. The problem does not, of course, arise, when playing a full strength AI, but when playing a weakened AI it is is unfortunate.

Proposal

Might I suggest an option (enabled by default) not to put a dot on KaTrain’s move until it is answered by the user?

P.S.

I have just successfully upgraded to 1.0.6 and am, being about 7 or 8 kyu, practising with teaching games against P:Tenuki and plain games against P:Pick. I think this is very useful, but I think Lizzie may be more helpful for analysis.

[Error report] Got an error over 15blocks nets.

  1. When I tried to use 20b.bin.gz net I met an error.
  2. Tried with 15b.bin.gz net then works well.
  3. Tried with 40b.bin.gz net and met an error too.
  4. Tried with 20b.txt.gz net and met an error too.
    I guess bigger than 15 blocks net causes error.
    katrain_err1
    katrain_err2

Error: Engine died unexpectedly. Possibly due to out of memory

Hi,

I tried running KaTrain using Python 3.6.9 on Ubuntu 18.04 on a Lenovo X1 Carbon (so no dedicated GPU). After a couple of moves I got this error message

[INFO ] [Logger ] Record log in /home/pato/.kivy/logs/kivy_20-05-05_4.txt
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/home/pato/.local/lib/python3.6/site-packages/kivy/init.py"
[INFO ] [Python ] v3.6.9 (default, Apr 18 2020, 01:56:04)
[GCC 8.4.0]
[INFO ] [Python ] Interpreter at "/usr/bin/python3"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
xclip version 0.12
Copyright (C) 2001-2008 Kim Saunders et al.
Distributed under the terms of the GNU GPL
[INFO ] [Clipboard ] Provider: xclip
[INFO ] [CutBuffer ] cut buffer support enabled
[INFO ] [Text ] Provider: sdl2
[INFO ] [Window ] Provider: sdl2(['window_egl_rpi'] ignored)
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version <b'3.0 Mesa 19.2.8'>
[INFO ] [GL ] OpenGL vendor <b'Intel Open Source Technology Center'>
[INFO ] [GL ] OpenGL renderer <b'Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) '>
[INFO ] [GL ] OpenGL parsed version: 3, 0
[INFO ] [GL ] Shading version <b'1.30'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <32>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [GL ] NPOT texture support is available
Using config file /home/pato/codes/katrain/config.json
/home/pato/codes/katrain/img/icon.png
Starting KataGo with ['KataGo/katago-bs', 'analysis', '-model', 'KataGo/models/b15-1.3.2.txt.gz', '-config', 'KataGo/analysis_config.cfg', '-analysis-threads', '8']
Sending query QUERY:1: {"rules": "japanese", "priority": -999999, "analyzeTurns": [0], "maxVisits": 500, "komi": 6.5, "boardXSize": 19, "boardYSize": 19, "includeOwnership": true, "includePolicy": true, "moves": [], "overrideSettings": {"maxTime": 3.0}, "id": "QUERY:1"}
[INFO ] [ProbeSysfs ] device match: /dev/input/event4
[INFO ] [MTD ] Read event from </dev/input/event4>
[INFO ] [Base ] Start application main loop
[WARNING] [MTD ] Unable to open device "/dev/input/event4". Please ensure you have the appropriate permissions.
2020-05-05 12:19:10-0400: Analysis Engine starting...
2020-05-05 12:19:10-0400: KataGo v1.3.5+bs29 (special board size 29 version)
2020-05-05 12:19:10-0400: nnRandSeed0 = 15025222834647999029
2020-05-05 12:19:10-0400: After dedups: nnModelFile0 = KataGo/models/b15-1.3.2.txt.gz useFP16 auto useNHWC auto
Sending query QUERY:2: {"rules": "japanese", "priority": 1, "analyzeTurns": [1], "maxVisits": 500, "komi": 6.5, "boardXSize": 19, "boardYSize": 19, "includeOwnership": true, "includePolicy": true, "moves": [["B", "Q16"]], "overrideSettings": {"maxTime": 3.0}, "id": "QUERY:2"}
terminate called after throwing an instance of 'StringError'
what(): OpenCL error at /home/dwugcloud/data/kata/cpp/neuralnet/openclhelpers.cpp, func err, line 188, error CL_PLATFORM_NOT_FOUND_KHR
Sending query QUERY:3: {"rules": "japanese", "priority": 1, "analyzeTurns": [2], "maxVisits": 500, "komi": 6.5, "boardXSize": 19, "boardYSize": 19, "includeOwnership": true, "includePolicy": true, "moves": [["B", "Q16"], ["W", "D4"]], "overrideSettings": {"maxTime": 3.0}, "id": "QUERY:3"}
ERROR: Engine died unexpectedly, possibly due to out of memory: [Errno 32] Broken pipe

Let me know if I'm missing any information. Thanks!!

SGF reading support

[x] load from file?
[ ] read branches?
[x] common handicap stones
[ ] support placement of stones

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.