fasdfsa commited on
Commit
4ba2137
·
1 Parent(s): 788e92d

成功用上新引擎

Browse files
katrain/config.json CHANGED
@@ -1,19 +1,19 @@
1
- {
2
  "engine": {
3
- "katago": "",
4
- "altcommand": "",
5
- "model": "katrain/models/kata1-b18c384nbt-s9996604416-d4316597426.bin.gz",
6
- "humanlike_model": "",
7
- "config": "katrain/KataGo/analysis_config.cfg",
8
- "max_visits": 500,
9
- "fast_visits": 25,
10
- "max_time": 8.0,
11
- "wide_root_noise": 0.04,
12
- "_enable_ownership": true
13
- },
14
- "contribute": {
15
- "katago": "",
16
- "config": "katrain/KataGo/contribute_config.cfg",
17
  "ownership": false,
18
  "maxgames": 6,
19
  "movespeed": 2,
 
1
+ {
2
  "engine": {
3
+ "katago": "katrain/KataGo2/katago.exe",
4
+ "altcommand": "",
5
+ "model": "katrain/models2/kata1-b28c512nbt-s10544735488-d5229296520.bin.gz",
6
+ "humanlike_model": "",
7
+ "config": "katrain/KataGo2/analysis_config.cfg",
8
+ "max_visits": 500,
9
+ "fast_visits": 25,
10
+ "max_time": 8.0,
11
+ "wide_root_noise": 0.04,
12
+ "_enable_ownership": true
13
+ },
14
+ "contribute": {
15
+ "katago": "",
16
+ "config": "katrain/KataGo2/contribute_config.cfg",
17
  "ownership": false,
18
  "maxgames": 6,
19
  "movespeed": 2,
katrain/kataGO2/README.txt ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ KataGo v1.16.3
2
+ https://github.com/lightvector/KataGo
3
+
4
+ For neural nets from the latest run, download from here:
5
+ https://katagotraining.org/
6
+ For nets from earlier runs, see:
7
+ https://katagoarchive.org/
8
+
9
+ For the human SL net (b18c384nbt-humanv0.bin.gz), it was released with:
10
+ https://github.com/lightvector/KataGo/releases/tag/v1.15.0
11
+
12
+ For differences between this version and older versions, see releases page at
13
+ https://github.com/lightvector/KataGo/releases/
14
+
15
+ -----------------------------------------------------
16
+ USAGE:
17
+ -----------------------------------------------------
18
+ KataGo is just an engine and does not have its own graphical interface. So generally you will want to use KataGo along with a GUI or analysis program.
19
+ (https://github.com/lightvector/KataGo#guis)
20
+
21
+ FIRST: Run a command like this to make sure KataGo is working, with the neural net file you downloaded. On OpenCL, it will also tune for your GPU.
22
+
23
+ ./katago.exe benchmark # if you have default_gtp.cfg and default_model.bin.gz
24
+ ./katago.exe benchmark -model <NEURALNET>.bin.gz # if you have default_gtp.cfg
25
+ ./katago.exe benchmark -model <NEURALNET>.bin.gz -config gtp_custom.cfg # use this .bin.gz neural net and this .cfg file
26
+
27
+ It will tell you a good number of threads. Edit your .cfg file and set "numSearchThreads" to that many to get best performance.
28
+
29
+ OR: Run this command to have KataGo generate a custom gtp config for you based on answering some questions:
30
+
31
+ ./katago.exe genconfig -model <NEURALNET>.bin.gz -output gtp_custom.cfg
32
+
33
+ NEXT: A command like this will run KataGo's engine. This is the command to give to your [GUI or analysis program](#guis) so that it can run KataGo.
34
+
35
+ ./katago.exe gtp # if you have default_gtp.cfg and default_model.bin.gz
36
+ ./katago.exe gtp -model <NEURALNET>.bin.gz # if you have default_gtp.cfg
37
+ ./katago.exe gtp -model <NEURALNET>.bin.gz -config gtp_custom.cfg # use this .bin.gz neural net and this .cfg file
38
+
39
+ You may need to specify different paths when entering KataGo's command for a GUI program, e.g.:
40
+
41
+ path/to/katago.exe gtp -model path/to/<NEURALNET>.bin.gz
42
+ path/to/katago.exe gtp -model path/to/<NEURALNET>.bin.gz -config path/to/gtp_custom.cfg
43
+
44
+ KataGo should be able to work with any GUI program that supports GTP, as well as any analysis program that supports Leela Zero's `lz-analyze` command, such as Lizzie (https://github.com/featurecat/lizzie) or Sabaki (https://sabaki.yichuanshen.de/).
45
+
46
+ NOTE for Windows users:
47
+ If you encounter errors due to a missing "msvcp140.dll" or "msvcp140_1.dll" or "msvcp140_2.dll" or "vcruntime140.dll" or similar, you need to download and install the Microsoft Visual C++ Redistributable, here:
48
+ https://www.microsoft.com/en-us/download/details.aspx?id=48145
49
+ If this is for a 64-bit Windows version of KataGo, these dll files have already been included for you, otherwise you will need to install them yourself. On a 64-bit Windows version, there is a rare chance that you may need to delete them if you already have it installed yourself separately and the pre-included files are actually causing problems running KataGo.
50
+
51
+ -----------------------------------------------------
52
+ HUMAN-STYLE PLAY AND ANALYSIS:
53
+ -----------------------------------------------------
54
+
55
+ You can also have KataGo imitate human play if you download the human SL model b18c384nbt-humanv0.bin.gz from https://github.com/lightvector/KataGo/releases/tag/v1.15.0, and run a command like the following, providing both a model and the human SL model:
56
+
57
+ ./katago.exe gtp -model <NEURALNET>.bin.gz -human-model b18c384nbt-humanv0.bin.gz -config gtp_human5k_example.cfg
58
+
59
+ The gtp_human5k_example.cfg configures KataGo to imitate 5-kyu-level players. You can change it to imitate other ranks too, as well as to do many more things, including making KataGo play in a human style but still at a strong level or analyze in interesting ways. Read the config file itself for documentation on some of these possibilities!
60
+
61
+ And see also this guide to using the human SL model, which is written from the perspective of the JSON-based analysis engine mentioned below, but is also applicable to gtp as well.
62
+ https://github.com/lightvector/KataGo/blob/master/docs/Analysis_Engine.md#human-sl-analysis-guide
63
+
64
+ -----------------------------------------------------
65
+ OTHER THINGS YOU CAN DO:
66
+ -----------------------------------------------------
67
+
68
+ Run a JSON-based analysis engine (https://github.com/lightvector/KataGo/blob/master/docs/Analysis_Engine.md) that can do efficient batched evaluations for a backend Go service:
69
+
70
+ ./katago.exe analysis -model <NEURALNET>.gz -config <ANALYSIS_CONFIG>.cfg
71
+
72
+ Run a high-performance match engine that will play a pool of bots against each other sharing the same GPU batches and CPUs with each other:
73
+
74
+ ./katago.exe match -config <MATCH_CONFIG>.cfg -log-file match.log -sgf-output-dir <DIR TO WRITE THE SGFS>
75
+
76
+ Force OpenCL tuner to re-tune:
77
+
78
+ ./katago.exe tuner -config <GTP_CONFIG>.cfg
79
+
80
+ Print version:
81
+
82
+ ./katago.exe version
83
+
84
+
85
+ -----------------------------------------------------
86
+ OPENCL VS CUDA VS EIGEN VS METAL:
87
+ -----------------------------------------------------
88
+ Explanation of the various versions available at https://github.com/lightvector/KataGo/releases
89
+
90
+ OpenCL - Use this if you have a modern GPU and want the easiest setup.
91
+
92
+ TensorRT, CUDA11 - Try one of these if you have a top-end NVIDIA GPU, are willing to do some more technical setup work, and care about getting every bit of performance. It MIGHT OR MIGHT NOT be faster than OpenCL! You have to test it on your specific GPU. TensorRT requires CUDA11 as well, and is likely to be the fastest.
93
+
94
+ Eigen AVX2 - Use this if you have no good GPU, but you have an Intel or AMD CPU from the last several years. This is a pure CPU version of KataGo.
95
+
96
+ Eigen - Use this if you don't have a GPU or your GPU is too old to work, and your CPU turns out not to support AVX2 or FMA. This is a pure CPU version for KataGo for
97
+ This is the pure CPU version of KataGo, with no special instructions, which should hopefully run just about anywhere.
98
+
99
+ Metal - Specific to MacOS, try this with Apple system gpus/accelerators.
100
+
101
+ -----------------------------------------------------
102
+ TUNING FOR PERFORMANCE:
103
+ -----------------------------------------------------
104
+ You will very likely want to tune some of the parameters in `default_gtp.cfg` for your system for good performance, including the number of threads, fp16 usage, NN cache size, pondering settings, and so on. You can also adjust things like KataGo's resign threshold or utility function. Most of the relevant parameters should be be reasonably well documented directly inline in that config.
105
+
106
+ There are other a few notes about usage and performance at : https://github.com/lightvector/KataGo
107
+
108
+ -----------------------------------------------------
109
+ TROUBLESHOOTING:
110
+ -----------------------------------------------------
111
+ Some common issues are described here:
112
+ https://github.com/lightvector/KataGo#common-causes-of-errors
113
+
114
+ Or, feel free to hop into the Leela Zero discord chat, which has become a general chatroom for a variety of computer Go hobbyists and users, and which you can often find people willing to help.
115
+ https://discord.gg/fhDHgfk
116
+
117
+
118
+
119
+
katrain/kataGO2/analysis_config.cfg ADDED
@@ -0,0 +1,418 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Config for KataGo C++ Analysis engine, i.e. "./katago.exe analysis"
2
+
3
+ # Example config for C++ (non-python) analysis engine
4
+
5
+ # SEE NOTES ABOUT PERFORMANCE AND MEMORY USAGE IN gtp_example.cfg
6
+ # SEE NOTES ABOUT numSearchThreads AND OTHER IMPORTANT PARAMS BELOW!
7
+
8
+ # Logs------------------------------------------------------------------------------------
9
+
10
+ # Where to output log?
11
+ logDir = analysis_logs # Each run of KataGo will log to a separate file in this dir
12
+ # logDirDated = analysis_logs # Use this instead of logDir to also write separate dated subdirs
13
+ # logFile = analysis.log # Use this instead of logDir to just specify a single file directly
14
+ # logToStderr = true # Echo everything output to log file to stderr as well
15
+ # logAllRequests = false # Log all input lines received to the analysis engine.
16
+ # logAllResponses = false # Log all lines output to stdout from the analysis engine.
17
+ # logErrorsAndWarnings = true # Log all lines output to stdout from the analysis engine that are errors and warnings
18
+ # logSearchInfo = false # Log debug info for every search performed
19
+
20
+ # Report a warning whenever a query contains a field that is unused. Helps to guard against
21
+ # typos when writing code that queries the analysis engine.
22
+ # warnUnusedFields = true
23
+
24
+ # Analysis------------------------------------------------------------------------------------
25
+
26
+ # Controls the number of moves after the first move in a variation.
27
+ # analysisPVLen = 15
28
+
29
+ # Report winrates for analysis as (BLACK|WHITE|SIDETOMOVE).
30
+ reportAnalysisWinratesAs = BLACK
31
+
32
+ # Larger values will make KataGo explore the top move(s) less deeply and accurately,
33
+ # but explore and give evaluations to a greater variety of moves.
34
+ # An extreme value like 1 will distribute many playouts across every move on the board, even very bad moves.
35
+ # NOTE: defaults to 0.04, under the presumption that the analysis engine will be used mainly for analysis.
36
+ # If you are intending to use the analysis engine to also play games and you want to maximize playing strength,
37
+ # set this to 0.0 either in this config or in the overrides.
38
+ # wideRootNoise = 0.04
39
+
40
+ # Try to limit the effect of possible bad or bogus move sequences in the
41
+ # history leading to this position from affecting KataGo's move predictions.
42
+ # ignorePreRootHistory = true
43
+
44
+ # Bot behavior---------------------------------------------------------------------------------------
45
+
46
+ # Handicap -------------
47
+
48
+ # Assume that if black makes many moves in a row right at the start of the game, then the game is a handicap game.
49
+ # This is necessary on some servers and for some GUIs and also when initializing from many SGF files, which may
50
+ # set up a handicap game using repeated GTP "play" commands for black rather than GTP "place_free_handicap" commands.
51
+ # However, it may also lead to incorrect understanding of komi if whiteHandicapBonus is used and a server does NOT
52
+ # have such a practice.
53
+ # Defaults to true! Uncomment and set to false to disable this behavior.
54
+ # assumeMultipleStartingBlackMovesAreHandicap = true
55
+
56
+ # Passing and cleanup -------------
57
+
58
+ # Make the bot never assume that its pass will end the game, even if passing would end and "win" under Tromp-Taylor rules.
59
+ # Usually this is a good idea when using it for analysis or playing on servers where scoring may be implemented non-tromp-taylorly.
60
+ # Defaults to true! Uncomment and set to false to disable this.
61
+ # conservativePass = true
62
+
63
+ # When using territory scoring, self-play games continue beyond two passes with special cleanup
64
+ # rules that may be confusing for human players. This option prevents the special cleanup phases from being
65
+ # reachable when using the bot for GTP play.
66
+ # Defaults to true! Uncomment and set to false if you want KataGo to be able to enter special cleanup.
67
+ # For example, if you are testing it against itself, or against another bot that has precisely implemented the rules
68
+ # documented at https://lightvector.github.io/KataGo/rules.html
69
+ # preventCleanupPhase = true
70
+
71
+ # Search limits-----------------------------------------------------------------------------------
72
+
73
+ # By default, if NOT specified in an individual request, limit maximum number of root visits per search to this much
74
+ maxVisits = 500
75
+ # If provided, cap search time at this many seconds
76
+ # maxTime = 60
77
+
78
+ # Search threads, batching, GPUs--------------------------------------------------------------------------
79
+
80
+ # Try a configuration like this if you only expect the engine to be handling a few queries at a time and you want
81
+ # individual queries to return more quickly, and are okay with the results being a bit lower-quality and the overall
82
+ # peak throughput on queries to be lower.
83
+ numAnalysisThreads = 2
84
+ numSearchThreadsPerAnalysisThread = 16
85
+
86
+ # Try a configuration like this if you expect to be sending large numbers of queries at a time, and want to maximize
87
+ # total throughput and also the evaluation quality of all the queries and you never care about the response latency
88
+ # of the individual queries, only the throughput as a whole.
89
+ # numAnalysisThreads = 32
90
+ # numSearchThreadsPerAnalysisThread = 1
91
+
92
+ # You will want to increase one or both numbers if you have a powerful GPU, and possibly decrease one or both if you
93
+ # have a very weak GPU, and play with the balance between them depending on your use case.
94
+ # Read the explanation below to understand how to set these parameters:
95
+
96
+ # EXPLANATION:
97
+ # numAnalysisThreads: the number of POSITIONS to be able to search in parallel.
98
+ # numSearchThreadsPerAnalysisThread: the number of threads to use in the tree search for EACH position.
99
+ # (older analysis configs might just have 'numSearchThreads', this is an alias for 'numSearchThreadsPerAnalysisThread')
100
+
101
+ # Therefore, the total number of search threads that may be active at a given time could be as large as the product:
102
+ # numAnalysisThreads * numSearchThreadsPerAnalysisThread
103
+
104
+ # Searching more positions in parallel is more efficient since the different threads aren't conflicting with each
105
+ # other on the same MCTS search tree. Using multiple threads on the same search will both make things slower
106
+ # and weaken the search (holding playouts fixed) due to out of date statistics on nodes and suboptimal exploration,
107
+ # although the cost is minor for only 2,4,8 threads.
108
+
109
+ # So unlike in GTP, which only ever searches one position at a time and where therefore you might as well make
110
+ # numSearchThreads as large as possible, in the analysis engine you often want you often want to keep numSearchThreads small,
111
+ # and instead parallelize across positions, so you can reduce conflict between threads and improve the overall throughput
112
+ # and strength of the search.
113
+
114
+ # But obviously you only get the benefit of parallelization across positions when you actually have lots of positions
115
+ # that you are querying at once! For example, setting numAnalysisThreads = 8 is useless if you only ever send one or two
116
+ # queries at a time!
117
+
118
+ # Therefore:
119
+ # * If you plan to use the analysis engine only for batch processing large numbers of positions,
120
+ # it's preferable to numSearchThreadsPerAnalysisThread to only a small number (e.g. 1,2,4) and use a higher numAnalysisThreads.
121
+ # * But if you sometimes plan to query the analysis engine for single positions, or otherwise in smaller quantities
122
+ # than -num-analysis-threads, or if you plan to be user-interactive such that the response time on some individual
123
+ # analysis requests is important to keep low, then set numSearchThreadsPerAnalysisThread to a larger number and use
124
+ # a lower numAnalysisThreads. That way, individual searches complete faster due to having more threads on each one.
125
+
126
+ # For 19x19 boards, weaker GPUs probably want a TOTAL number of threads (numAnalysisThreads * numSearchThreadsPerAnalysisThread)
127
+ # between 4 and 32. Mid-tier GPUs probably between 16 and 64. Strong GPUs probably between 32 and 256.
128
+ # But there's no substitute for experimenting and seeing what's best for your hardware and your usage case.
129
+
130
+ # Keep in mind that the number of threads you want does NOT necessarily have much to do with how many cores you have on your
131
+ # system. The optimal may easily exceed the number of cores! GPU batching is (usually) the dominant consideration.
132
+
133
+ # -------------
134
+
135
+ # nnMaxBatchSize is the max number of positions to send to a single GPU at once. Generally, it should be the case that:
136
+ # (number of GPUs you will use * nnMaxBatchSize) >= (numSearchThreads * num-analysis-threads)
137
+ # That way, when each threads tries to request a GPU eval, your batch size summed across GPUs is large enough to handle them
138
+ # all at once. However, it can be sensible to set this a little smaller if you are limited on GPU memory,
139
+ # too large a number may fail if the GPU doesn't have enough memory.
140
+ nnMaxBatchSize = 64
141
+
142
+ # Uncomment and set these smaller if you are going to use the analysis engine EXCLUSIVELY for smaller boards (or plan to
143
+ # run multiple instances, with some instances only handling smaller boards). It should improve performance.
144
+ # It may also mean you can use more threads profitably.
145
+ # maxBoardXSizeForNNBuffer = 19
146
+ # maxBoardYSizeForNNBuffer = 19
147
+
148
+ # Uncomment and set this to true if you are going to use the analysis engine EXCLUSIVELY for exactly the board size
149
+ # specified by maxBoardXSizeForNNBuffer and maxBoardYSizeForNNBuffer. It may slightly improve performance on some GPUs.
150
+ # requireMaxBoardSize = true
151
+
152
+ # TO USE MULTIPLE GPUS:
153
+ # Uncomment and set this to the number of GPUs you have and/or would like to use...
154
+ # AND if it is more than 1, uncomment the appropriate CUDA or OpenCL section below.
155
+ # numNNServerThreadsPerModel = 1
156
+
157
+ # Other General GPU Settings-------------------------------------------------------------------------------
158
+
159
+ # Cache up to 2 ** this many neural net evaluations in case of transpositions in the tree.
160
+ nnCacheSizePowerOfTwo = 23
161
+ # Size of mutex pool for nnCache is 2 ** this
162
+ nnMutexPoolSizePowerOfTwo = 17
163
+ # Randomize board orientation when running neural net evals?
164
+ nnRandomize = true
165
+
166
+
167
+ # TENSORRT GPU settings--------------------------------------
168
+ # These only apply when using the TENSORRT version of KataGo.
169
+
170
+ # IF USING ONE GPU: optionally uncomment and change this if the GPU you want to use turns out to be not device 0
171
+ # trtDeviceToUse = 0
172
+
173
+ # IF USING TWO GPUS: Uncomment these two lines (AND set numNNServerThreadsPerModel above):
174
+ # trtDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
175
+ # trtDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
176
+
177
+ # IF USING THREE GPUS: Uncomment these three lines (AND set numNNServerThreadsPerModel above):
178
+ # trtDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
179
+ # trtDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
180
+ # trtDeviceToUseThread2 = 2 # change this if the third GPU you want to use turns out to be not device 2
181
+
182
+ # You can probably guess the pattern if you have four, five, etc. GPUs.
183
+
184
+
185
+ # CUDA-specific GPU settings--------------------------------------
186
+ # These only apply when using the CUDA version of KataGo.
187
+
188
+ # IF USING ONE GPU: optionally uncomment and change this if the GPU you want to use turns out to be not device 0
189
+ # cudaDeviceToUse = 0
190
+
191
+ # IF USING TWO GPUS: Uncomment these two lines (AND set numNNServerThreadsPerModel above):
192
+ # cudaDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
193
+ # cudaDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
194
+
195
+ # IF USING THREE GPUS: Uncomment these three lines (AND set numNNServerThreadsPerModel above):
196
+ # cudaDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
197
+ # cudaDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
198
+ # cudaDeviceToUseThread2 = 2 # change this if the third GPU you want to use turns out to be not device 2
199
+
200
+ # You can probably guess the pattern if you have four, five, etc. GPUs.
201
+
202
+ # KataGo will automatically use FP16 or not based on the compute capability of your NVIDIA GPU. If you
203
+ # want to try to force a particular behavior though you can uncomment these lines and change them
204
+ # to "true" or "false". E.g. it's using FP16 but on your card that's giving an error, or it's not using
205
+ # FP16 but you think it should.
206
+ # cudaUseFP16 = auto
207
+ # cudaUseNHWC = auto
208
+
209
+
210
+ # ------------------------------
211
+ # Metal GPU settings
212
+ # ------------------------------
213
+ # These only apply when using the METAL version of KataGo.
214
+
215
+ # For one Metal instance: KataGo will automatically use the default device.
216
+ # metalDeviceToUse = 0
217
+
218
+ # For two Metal instance: Uncomment these options, AND set numNNServerThreadsPerModel = 2 above.
219
+ # This will create two Metal instances, best overlapping the GPU and CPU execution.
220
+ # metalDeviceToUseThread0 = 0
221
+ # metalDeviceToUseThread1 = 1
222
+
223
+ # The pattern continues for additional Metal instances.
224
+
225
+
226
+ # OpenCL-specific GPU settings--------------------------------------
227
+ # These only apply when using the OpenCL version of KataGo.
228
+
229
+ # Uncomment to tune OpenCL for every board size separately, rather than only the largest possible size
230
+ # openclReTunePerBoardSize = true
231
+
232
+ # IF USING ONE GPU: optionally uncomment and change this if the best device to use is guessed incorrectly.
233
+ # The default behavior tries to guess the 'best' GPU or device on your system to use, usually it will be a good guess.
234
+ # openclDeviceToUse = 0
235
+
236
+ # IF USING TWO GPUS: Uncomment these two lines and replace X and Y with the device ids of the devices you want to use.
237
+ # It might NOT be 0 and 1, some computers will have many OpenCL devices. You can see what the devices are when
238
+ # KataGo starts up - it should print or log all the devices it finds.
239
+ # (AND also set numNNServerThreadsPerModel above)
240
+ # openclDeviceToUseThread0 = X
241
+ # openclDeviceToUseThread1 = Y
242
+
243
+ # IF USING THREE GPUS: Uncomment these three lines and replace X and Y and Z with the device ids of the devices you want to use.
244
+ # It might NOT be 0 and 1 and 2, some computers will have many OpenCL devices. You can see what the devices are when
245
+ # KataGo starts up - it should print or log all the devices it finds.
246
+ # (AND also set numNNServerThreadsPerModel above)
247
+ # openclDeviceToUseThread0 = X
248
+ # openclDeviceToUseThread1 = Y
249
+ # openclDeviceToUseThread2 = Z
250
+
251
+ # You can probably guess the pattern if you have four, five, etc. GPUs.
252
+
253
+ # KataGo will automatically use FP16 or not based on testing your GPU during tuning. If you
254
+ # want to try to force a particular behavior though you can uncomment this lines and change it
255
+ # to "true" or "false". This is a fairly blunt setting - more detailed settings are testable
256
+ # by rerunning the tuner with various arguments.
257
+ # openclUseFP16 = auto
258
+
259
+
260
+ # Eigen-specific settings--------------------------------------
261
+ # These only apply when using the Eigen (pure CPU) version of KataGo.
262
+
263
+ # This is the number of CPU threads for evaluating the neural net on the Eigen backend.
264
+ # It defaults to min(numAnalysisThreads * numSearchThreadsPerAnalysisThread, numCPUCores).
265
+ # numEigenThreadsPerModel = X
266
+
267
+
268
+ # Misc Behavior --------------------
269
+
270
+ # If the board is symmetric, search only one copy of each equivalent move. Attempts to also account for ko/superko, will not theoretically perfect for superko.
271
+ # Uncomment and set to false to disable this.
272
+ # rootSymmetryPruning = true
273
+
274
+ # Uncomment and set to true to make KataGo avoid a particular joseki that some KataGo nets misevaluate,
275
+ # and also to improve opening diversity versus some particular other bots that like to play it all the time.
276
+ # avoidMYTDaggerHack = false
277
+
278
+ # Have KataGo mildly prefer to avoid playing the same joseki in every corner of the board.
279
+ # Uncomment to set to a specific value. A small value like 0.005 should produce already a noticeable behavior change.
280
+ # avoidRepeatedPatternUtility = 0.0
281
+
282
+ # Enable some hacks that mitigate rare instances when passing messes up deeper searches.
283
+ # enablePassingHacks = true
284
+
285
+ # Root move selection and biases------------------------------------------------------------------------------
286
+ # Uncomment and edit any of the below values to change them from their default.
287
+ # Not all of these parameters are applicable to analysis, some are only used for actual play
288
+
289
+ # Temperature for the early game, randomize between chosen moves with this temperature
290
+ # chosenMoveTemperatureEarly = 0.5
291
+ # Decay temperature for the early game by 0.5 every this many moves, scaled with board size.
292
+ # chosenMoveTemperatureHalflife = 19
293
+ # At the end of search after the early game, randomize between chosen moves with this temperature
294
+ # chosenMoveTemperature = 0.10
295
+ # Subtract this many visits from each move prior to applying chosenMoveTemperature
296
+ # (unless all moves have too few visits) to downweight unlikely moves
297
+ # chosenMoveSubtract = 0
298
+ # The same as chosenMoveSubtract but only prunes moves that fall below the threshold, does not affect moves above
299
+ # chosenMovePrune = 1
300
+
301
+ # Number of symmetries to sample (WITHOUT replacement) and average at the root
302
+ # rootNumSymmetriesToSample = 1
303
+
304
+ # Using LCB for move selection?
305
+ # useLcbForSelection = true
306
+ # How many stdevs a move needs to be better than another for LCB selection
307
+ # lcbStdevs = 5.0
308
+ # Only use LCB override when a move has this proportion of visits as the top move
309
+ # minVisitPropForLCB = 0.15
310
+
311
+ # Internal params------------------------------------------------------------------------------
312
+ # Uncomment and edit any of the below values to change them from their default.
313
+
314
+ # Scales the utility of winning/losing
315
+ # winLossUtilityFactor = 1.0
316
+ # Scales the utility for trying to maximize score
317
+ # staticScoreUtilityFactor = 0.10
318
+ # dynamicScoreUtilityFactor = 0.30
319
+ # Adjust dynamic score center this proportion of the way towards zero, capped at a reasonable amount.
320
+ # dynamicScoreCenterZeroWeight = 0.20
321
+ # dynamicScoreCenterScale = 0.75
322
+ # The utility of getting a "no result" due to triple ko or other long cycle in non-superko rulesets (-1 to 1)
323
+ # noResultUtilityForWhite = 0.0
324
+ # The number of wins that a draw counts as, for white. (0 to 1)
325
+ # drawEquivalentWinsForWhite = 0.5
326
+
327
+ # Exploration constant for mcts
328
+ # cpuctExploration = 1.0
329
+ # cpuctExplorationLog = 0.45
330
+
331
+ # Parameters that control exploring more in volatile positions, exploring less in stable positions.
332
+ # cpuctUtilityStdevPrior = 0.40
333
+ # cpuctUtilityStdevPriorWeight = 2.0
334
+ # cpuctUtilityStdevScale = 0.85
335
+
336
+ # FPU reduction constant for mcts
337
+ # fpuReductionMax = 0.2
338
+ # rootFpuReductionMax = 0.1
339
+ # fpuParentWeightByVisitedPolicy = true
340
+
341
+ # Parameters that control weighting of evals based on the net's own self-reported uncertainty.
342
+ # useUncertainty = true
343
+ # uncertaintyExponent = 1.0
344
+ # uncertaintyCoeff = 0.25
345
+
346
+ # Explore using optimistic policy
347
+ # rootPolicyOptimism = 0.2
348
+ # policyOptimism = 1.0
349
+
350
+ # Amount to apply a downweighting of children with very bad values relative to good ones
351
+ # valueWeightExponent = 0.25
352
+
353
+ # Slight incentive for the bot to behave human-like with regard to passing at the end, filling the dame,
354
+ # not wasting time playing in its own territory, etc, and not play moves that are equivalent in terms of
355
+ # points but a bit more unfriendly to humans.
356
+ # rootEndingBonusPoints = 0.5
357
+
358
+ # Make the bot prune useless moves that are just prolonging the game to avoid losing yet
359
+ # rootPruneUselessMoves = true
360
+
361
+ # Apply bias correction based on local pattern keys
362
+ # subtreeValueBiasFactor = 0.45
363
+ # subtreeValueBiasWeightExponent = 0.85
364
+
365
+ # Use graph search rather than tree search - identify and share search for transpositions.
366
+ # useGraphSearch = true
367
+
368
+ # How much to shard the node table for search synchronization
369
+ # nodeTableShardsPowerOfTwo = 16
370
+ # How many virtual losses to add when a thread descends through a node
371
+ # numVirtualLossesPerThread = 1
372
+
373
+ # Improve the quality of evals under heavy multithreading
374
+ # useNoisePruning = true
375
+
376
+
377
+ # Avoid SGF Patterns ------------------------------------------------------------------------------
378
+ # The parameters in this section provide a powerful way to customize KataGo to avoid moves that follow specific patterns
379
+ # based on a set of provided SGF files loaded upon startup. Uncomment them to use this feature.
380
+ # Additionally, if the SGF file contains the string %SKIP% in a comment on a move, that move will be ignored for this purpose.
381
+
382
+ # Load sgf files from this directory when the engine is started (ONLY on startup, will not reload unless engine is restarted)
383
+ # avoidSgfPatternDirs = path/to/directory/with/sgfs/
384
+ # You can also surround the file path in double quotes if the file path contains trailing spaces or hash signs.
385
+ # Within double quotes, backslashes are escape characters.
386
+ # avoidSgfPatternDirs = "path/to/directory/with/sgfs/"
387
+
388
+ # Penalize this much utility per matching move.
389
+ # Set this negative if you instead want to make KataGo favor the SGF patterns instead of penalizing it!
390
+ # This number does not need to be large, even 0.001 will make a difference. Too-large values may lead to bad play.
391
+ # avoidSgfPatternUtility = 0.001
392
+
393
+ # Optional - load only the newest this many files
394
+ # avoidSgfPatternMaxFiles = 20
395
+
396
+ # Optional - Penalty is multiplied by this per each older SGF file, so that old sgf files matter less than newer ones.
397
+ # avoidSgfPatternLambda = 0.90
398
+
399
+ # Optional - pay attention only to moves that were made by players with this name.
400
+ # For example you can set it to the name that your bot's past games will show up as in the SGF, so that the bot will only avoid repeating
401
+ # moves that itself made in past games, not the moves that its opponents made.
402
+ # avoidSgfPatternAllowedNames = my-ogs-bot-name1,my-ogs-bot-name2
403
+
404
+ # Optional - Ignore any moves in SGF files that occurred before this turn number.
405
+ # avoidSgfPatternMinTurnNumber = 0
406
+
407
+ # For more avoid patterns:
408
+ # You can also specify a second set of parameters, and a third, fourth, etc by numbering 2,3,4,...
409
+ # avoidSgf2PatternDirs = ...
410
+ # avoidSgf2PatternUtility = ...
411
+ # avoidSgf2PatternMaxFiles = ...
412
+ # avoidSgf2PatternLambda = ...
413
+ # avoidSgf2PatternAllowedNames = ...
414
+ # avoidSgf2PatternMinTurnNumber = ...
415
+
416
+
417
+
418
+
katrain/kataGO2/analysis_example.cfg ADDED
@@ -0,0 +1,418 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Config for KataGo C++ Analysis engine, i.e. "./katago.exe analysis"
2
+
3
+ # Example config for C++ (non-python) analysis engine
4
+
5
+ # SEE NOTES ABOUT PERFORMANCE AND MEMORY USAGE IN gtp_example.cfg
6
+ # SEE NOTES ABOUT numSearchThreads AND OTHER IMPORTANT PARAMS BELOW!
7
+
8
+ # Logs------------------------------------------------------------------------------------
9
+
10
+ # Where to output log?
11
+ logDir = analysis_logs # Each run of KataGo will log to a separate file in this dir
12
+ # logDirDated = analysis_logs # Use this instead of logDir to also write separate dated subdirs
13
+ # logFile = analysis.log # Use this instead of logDir to just specify a single file directly
14
+ # logToStderr = true # Echo everything output to log file to stderr as well
15
+ # logAllRequests = false # Log all input lines received to the analysis engine.
16
+ # logAllResponses = false # Log all lines output to stdout from the analysis engine.
17
+ # logErrorsAndWarnings = true # Log all lines output to stdout from the analysis engine that are errors and warnings
18
+ # logSearchInfo = false # Log debug info for every search performed
19
+
20
+ # Report a warning whenever a query contains a field that is unused. Helps to guard against
21
+ # typos when writing code that queries the analysis engine.
22
+ # warnUnusedFields = true
23
+
24
+ # Analysis------------------------------------------------------------------------------------
25
+
26
+ # Controls the number of moves after the first move in a variation.
27
+ # analysisPVLen = 15
28
+
29
+ # Report winrates for analysis as (BLACK|WHITE|SIDETOMOVE).
30
+ reportAnalysisWinratesAs = BLACK
31
+
32
+ # Larger values will make KataGo explore the top move(s) less deeply and accurately,
33
+ # but explore and give evaluations to a greater variety of moves.
34
+ # An extreme value like 1 will distribute many playouts across every move on the board, even very bad moves.
35
+ # NOTE: defaults to 0.04, under the presumption that the analysis engine will be used mainly for analysis.
36
+ # If you are intending to use the analysis engine to also play games and you want to maximize playing strength,
37
+ # set this to 0.0 either in this config or in the overrides.
38
+ # wideRootNoise = 0.04
39
+
40
+ # Try to limit the effect of possible bad or bogus move sequences in the
41
+ # history leading to this position from affecting KataGo's move predictions.
42
+ # ignorePreRootHistory = true
43
+
44
+ # Bot behavior---------------------------------------------------------------------------------------
45
+
46
+ # Handicap -------------
47
+
48
+ # Assume that if black makes many moves in a row right at the start of the game, then the game is a handicap game.
49
+ # This is necessary on some servers and for some GUIs and also when initializing from many SGF files, which may
50
+ # set up a handicap game using repeated GTP "play" commands for black rather than GTP "place_free_handicap" commands.
51
+ # However, it may also lead to incorrect understanding of komi if whiteHandicapBonus is used and a server does NOT
52
+ # have such a practice.
53
+ # Defaults to true! Uncomment and set to false to disable this behavior.
54
+ # assumeMultipleStartingBlackMovesAreHandicap = true
55
+
56
+ # Passing and cleanup -------------
57
+
58
+ # Make the bot never assume that its pass will end the game, even if passing would end and "win" under Tromp-Taylor rules.
59
+ # Usually this is a good idea when using it for analysis or playing on servers where scoring may be implemented non-tromp-taylorly.
60
+ # Defaults to true! Uncomment and set to false to disable this.
61
+ # conservativePass = true
62
+
63
+ # When using territory scoring, self-play games continue beyond two passes with special cleanup
64
+ # rules that may be confusing for human players. This option prevents the special cleanup phases from being
65
+ # reachable when using the bot for GTP play.
66
+ # Defaults to true! Uncomment and set to false if you want KataGo to be able to enter special cleanup.
67
+ # For example, if you are testing it against itself, or against another bot that has precisely implemented the rules
68
+ # documented at https://lightvector.github.io/KataGo/rules.html
69
+ # preventCleanupPhase = true
70
+
71
+ # Search limits-----------------------------------------------------------------------------------
72
+
73
+ # By default, if NOT specified in an individual request, limit maximum number of root visits per search to this much
74
+ maxVisits = 500
75
+ # If provided, cap search time at this many seconds
76
+ # maxTime = 60
77
+
78
+ # Search threads, batching, GPUs--------------------------------------------------------------------------
79
+
80
+ # Try a configuration like this if you only expect the engine to be handling a few queries at a time and you want
81
+ # individual queries to return more quickly, and are okay with the results being a bit lower-quality and the overall
82
+ # peak throughput on queries to be lower.
83
+ numAnalysisThreads = 2
84
+ numSearchThreadsPerAnalysisThread = 16
85
+
86
+ # Try a configuration like this if you expect to be sending large numbers of queries at a time, and want to maximize
87
+ # total throughput and also the evaluation quality of all the queries and you never care about the response latency
88
+ # of the individual queries, only the throughput as a whole.
89
+ # numAnalysisThreads = 32
90
+ # numSearchThreadsPerAnalysisThread = 1
91
+
92
+ # You will want to increase one or both numbers if you have a powerful GPU, and possibly decrease one or both if you
93
+ # have a very weak GPU, and play with the balance between them depending on your use case.
94
+ # Read the explanation below to understand how to set these parameters:
95
+
96
+ # EXPLANATION:
97
+ # numAnalysisThreads: the number of POSITIONS to be able to search in parallel.
98
+ # numSearchThreadsPerAnalysisThread: the number of threads to use in the tree search for EACH position.
99
+ # (older analysis configs might just have 'numSearchThreads', this is an alias for 'numSearchThreadsPerAnalysisThread')
100
+
101
+ # Therefore, the total number of search threads that may be active at a given time could be as large as the product:
102
+ # numAnalysisThreads * numSearchThreadsPerAnalysisThread
103
+
104
+ # Searching more positions in parallel is more efficient since the different threads aren't conflicting with each
105
+ # other on the same MCTS search tree. Using multiple threads on the same search will both make things slower
106
+ # and weaken the search (holding playouts fixed) due to out of date statistics on nodes and suboptimal exploration,
107
+ # although the cost is minor for only 2,4,8 threads.
108
+
109
+ # So unlike in GTP, which only ever searches one position at a time and where therefore you might as well make
110
+ # numSearchThreads as large as possible, in the analysis engine you often want you often want to keep numSearchThreads small,
111
+ # and instead parallelize across positions, so you can reduce conflict between threads and improve the overall throughput
112
+ # and strength of the search.
113
+
114
+ # But obviously you only get the benefit of parallelization across positions when you actually have lots of positions
115
+ # that you are querying at once! For example, setting numAnalysisThreads = 8 is useless if you only ever send one or two
116
+ # queries at a time!
117
+
118
+ # Therefore:
119
+ # * If you plan to use the analysis engine only for batch processing large numbers of positions,
120
+ # it's preferable to numSearchThreadsPerAnalysisThread to only a small number (e.g. 1,2,4) and use a higher numAnalysisThreads.
121
+ # * But if you sometimes plan to query the analysis engine for single positions, or otherwise in smaller quantities
122
+ # than -num-analysis-threads, or if you plan to be user-interactive such that the response time on some individual
123
+ # analysis requests is important to keep low, then set numSearchThreadsPerAnalysisThread to a larger number and use
124
+ # a lower numAnalysisThreads. That way, individual searches complete faster due to having more threads on each one.
125
+
126
+ # For 19x19 boards, weaker GPUs probably want a TOTAL number of threads (numAnalysisThreads * numSearchThreadsPerAnalysisThread)
127
+ # between 4 and 32. Mid-tier GPUs probably between 16 and 64. Strong GPUs probably between 32 and 256.
128
+ # But there's no substitute for experimenting and seeing what's best for your hardware and your usage case.
129
+
130
+ # Keep in mind that the number of threads you want does NOT necessarily have much to do with how many cores you have on your
131
+ # system. The optimal may easily exceed the number of cores! GPU batching is (usually) the dominant consideration.
132
+
133
+ # -------------
134
+
135
+ # nnMaxBatchSize is the max number of positions to send to a single GPU at once. Generally, it should be the case that:
136
+ # (number of GPUs you will use * nnMaxBatchSize) >= (numSearchThreads * num-analysis-threads)
137
+ # That way, when each threads tries to request a GPU eval, your batch size summed across GPUs is large enough to handle them
138
+ # all at once. However, it can be sensible to set this a little smaller if you are limited on GPU memory,
139
+ # too large a number may fail if the GPU doesn't have enough memory.
140
+ nnMaxBatchSize = 64
141
+
142
+ # Uncomment and set these smaller if you are going to use the analysis engine EXCLUSIVELY for smaller boards (or plan to
143
+ # run multiple instances, with some instances only handling smaller boards). It should improve performance.
144
+ # It may also mean you can use more threads profitably.
145
+ # maxBoardXSizeForNNBuffer = 19
146
+ # maxBoardYSizeForNNBuffer = 19
147
+
148
+ # Uncomment and set this to true if you are going to use the analysis engine EXCLUSIVELY for exactly the board size
149
+ # specified by maxBoardXSizeForNNBuffer and maxBoardYSizeForNNBuffer. It may slightly improve performance on some GPUs.
150
+ # requireMaxBoardSize = true
151
+
152
+ # TO USE MULTIPLE GPUS:
153
+ # Uncomment and set this to the number of GPUs you have and/or would like to use...
154
+ # AND if it is more than 1, uncomment the appropriate CUDA or OpenCL section below.
155
+ # numNNServerThreadsPerModel = 1
156
+
157
+ # Other General GPU Settings-------------------------------------------------------------------------------
158
+
159
+ # Cache up to 2 ** this many neural net evaluations in case of transpositions in the tree.
160
+ nnCacheSizePowerOfTwo = 23
161
+ # Size of mutex pool for nnCache is 2 ** this
162
+ nnMutexPoolSizePowerOfTwo = 17
163
+ # Randomize board orientation when running neural net evals?
164
+ nnRandomize = true
165
+
166
+
167
+ # TENSORRT GPU settings--------------------------------------
168
+ # These only apply when using the TENSORRT version of KataGo.
169
+
170
+ # IF USING ONE GPU: optionally uncomment and change this if the GPU you want to use turns out to be not device 0
171
+ # trtDeviceToUse = 0
172
+
173
+ # IF USING TWO GPUS: Uncomment these two lines (AND set numNNServerThreadsPerModel above):
174
+ # trtDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
175
+ # trtDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
176
+
177
+ # IF USING THREE GPUS: Uncomment these three lines (AND set numNNServerThreadsPerModel above):
178
+ # trtDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
179
+ # trtDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
180
+ # trtDeviceToUseThread2 = 2 # change this if the third GPU you want to use turns out to be not device 2
181
+
182
+ # You can probably guess the pattern if you have four, five, etc. GPUs.
183
+
184
+
185
+ # CUDA-specific GPU settings--------------------------------------
186
+ # These only apply when using the CUDA version of KataGo.
187
+
188
+ # IF USING ONE GPU: optionally uncomment and change this if the GPU you want to use turns out to be not device 0
189
+ # cudaDeviceToUse = 0
190
+
191
+ # IF USING TWO GPUS: Uncomment these two lines (AND set numNNServerThreadsPerModel above):
192
+ # cudaDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
193
+ # cudaDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
194
+
195
+ # IF USING THREE GPUS: Uncomment these three lines (AND set numNNServerThreadsPerModel above):
196
+ # cudaDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
197
+ # cudaDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
198
+ # cudaDeviceToUseThread2 = 2 # change this if the third GPU you want to use turns out to be not device 2
199
+
200
+ # You can probably guess the pattern if you have four, five, etc. GPUs.
201
+
202
+ # KataGo will automatically use FP16 or not based on the compute capability of your NVIDIA GPU. If you
203
+ # want to try to force a particular behavior though you can uncomment these lines and change them
204
+ # to "true" or "false". E.g. it's using FP16 but on your card that's giving an error, or it's not using
205
+ # FP16 but you think it should.
206
+ # cudaUseFP16 = auto
207
+ # cudaUseNHWC = auto
208
+
209
+
210
+ # ------------------------------
211
+ # Metal GPU settings
212
+ # ------------------------------
213
+ # These only apply when using the METAL version of KataGo.
214
+
215
+ # For one Metal instance: KataGo will automatically use the default device.
216
+ # metalDeviceToUse = 0
217
+
218
+ # For two Metal instance: Uncomment these options, AND set numNNServerThreadsPerModel = 2 above.
219
+ # This will create two Metal instances, best overlapping the GPU and CPU execution.
220
+ # metalDeviceToUseThread0 = 0
221
+ # metalDeviceToUseThread1 = 1
222
+
223
+ # The pattern continues for additional Metal instances.
224
+
225
+
226
+ # OpenCL-specific GPU settings--------------------------------------
227
+ # These only apply when using the OpenCL version of KataGo.
228
+
229
+ # Uncomment to tune OpenCL for every board size separately, rather than only the largest possible size
230
+ # openclReTunePerBoardSize = true
231
+
232
+ # IF USING ONE GPU: optionally uncomment and change this if the best device to use is guessed incorrectly.
233
+ # The default behavior tries to guess the 'best' GPU or device on your system to use, usually it will be a good guess.
234
+ # openclDeviceToUse = 0
235
+
236
+ # IF USING TWO GPUS: Uncomment these two lines and replace X and Y with the device ids of the devices you want to use.
237
+ # It might NOT be 0 and 1, some computers will have many OpenCL devices. You can see what the devices are when
238
+ # KataGo starts up - it should print or log all the devices it finds.
239
+ # (AND also set numNNServerThreadsPerModel above)
240
+ # openclDeviceToUseThread0 = X
241
+ # openclDeviceToUseThread1 = Y
242
+
243
+ # IF USING THREE GPUS: Uncomment these three lines and replace X and Y and Z with the device ids of the devices you want to use.
244
+ # It might NOT be 0 and 1 and 2, some computers will have many OpenCL devices. You can see what the devices are when
245
+ # KataGo starts up - it should print or log all the devices it finds.
246
+ # (AND also set numNNServerThreadsPerModel above)
247
+ # openclDeviceToUseThread0 = X
248
+ # openclDeviceToUseThread1 = Y
249
+ # openclDeviceToUseThread2 = Z
250
+
251
+ # You can probably guess the pattern if you have four, five, etc. GPUs.
252
+
253
+ # KataGo will automatically use FP16 or not based on testing your GPU during tuning. If you
254
+ # want to try to force a particular behavior though you can uncomment this lines and change it
255
+ # to "true" or "false". This is a fairly blunt setting - more detailed settings are testable
256
+ # by rerunning the tuner with various arguments.
257
+ # openclUseFP16 = auto
258
+
259
+
260
+ # Eigen-specific settings--------------------------------------
261
+ # These only apply when using the Eigen (pure CPU) version of KataGo.
262
+
263
+ # This is the number of CPU threads for evaluating the neural net on the Eigen backend.
264
+ # It defaults to min(numAnalysisThreads * numSearchThreadsPerAnalysisThread, numCPUCores).
265
+ # numEigenThreadsPerModel = X
266
+
267
+
268
+ # Misc Behavior --------------------
269
+
270
+ # If the board is symmetric, search only one copy of each equivalent move. Attempts to also account for ko/superko, will not theoretically perfect for superko.
271
+ # Uncomment and set to false to disable this.
272
+ # rootSymmetryPruning = true
273
+
274
+ # Uncomment and set to true to make KataGo avoid a particular joseki that some KataGo nets misevaluate,
275
+ # and also to improve opening diversity versus some particular other bots that like to play it all the time.
276
+ # avoidMYTDaggerHack = false
277
+
278
+ # Have KataGo mildly prefer to avoid playing the same joseki in every corner of the board.
279
+ # Uncomment to set to a specific value. A small value like 0.005 should produce already a noticeable behavior change.
280
+ # avoidRepeatedPatternUtility = 0.0
281
+
282
+ # Enable some hacks that mitigate rare instances when passing messes up deeper searches.
283
+ # enablePassingHacks = true
284
+
285
+ # Root move selection and biases------------------------------------------------------------------------------
286
+ # Uncomment and edit any of the below values to change them from their default.
287
+ # Not all of these parameters are applicable to analysis, some are only used for actual play
288
+
289
+ # Temperature for the early game, randomize between chosen moves with this temperature
290
+ # chosenMoveTemperatureEarly = 0.5
291
+ # Decay temperature for the early game by 0.5 every this many moves, scaled with board size.
292
+ # chosenMoveTemperatureHalflife = 19
293
+ # At the end of search after the early game, randomize between chosen moves with this temperature
294
+ # chosenMoveTemperature = 0.10
295
+ # Subtract this many visits from each move prior to applying chosenMoveTemperature
296
+ # (unless all moves have too few visits) to downweight unlikely moves
297
+ # chosenMoveSubtract = 0
298
+ # The same as chosenMoveSubtract but only prunes moves that fall below the threshold, does not affect moves above
299
+ # chosenMovePrune = 1
300
+
301
+ # Number of symmetries to sample (WITHOUT replacement) and average at the root
302
+ # rootNumSymmetriesToSample = 1
303
+
304
+ # Using LCB for move selection?
305
+ # useLcbForSelection = true
306
+ # How many stdevs a move needs to be better than another for LCB selection
307
+ # lcbStdevs = 5.0
308
+ # Only use LCB override when a move has this proportion of visits as the top move
309
+ # minVisitPropForLCB = 0.15
310
+
311
+ # Internal params------------------------------------------------------------------------------
312
+ # Uncomment and edit any of the below values to change them from their default.
313
+
314
+ # Scales the utility of winning/losing
315
+ # winLossUtilityFactor = 1.0
316
+ # Scales the utility for trying to maximize score
317
+ # staticScoreUtilityFactor = 0.10
318
+ # dynamicScoreUtilityFactor = 0.30
319
+ # Adjust dynamic score center this proportion of the way towards zero, capped at a reasonable amount.
320
+ # dynamicScoreCenterZeroWeight = 0.20
321
+ # dynamicScoreCenterScale = 0.75
322
+ # The utility of getting a "no result" due to triple ko or other long cycle in non-superko rulesets (-1 to 1)
323
+ # noResultUtilityForWhite = 0.0
324
+ # The number of wins that a draw counts as, for white. (0 to 1)
325
+ # drawEquivalentWinsForWhite = 0.5
326
+
327
+ # Exploration constant for mcts
328
+ # cpuctExploration = 1.0
329
+ # cpuctExplorationLog = 0.45
330
+
331
+ # Parameters that control exploring more in volatile positions, exploring less in stable positions.
332
+ # cpuctUtilityStdevPrior = 0.40
333
+ # cpuctUtilityStdevPriorWeight = 2.0
334
+ # cpuctUtilityStdevScale = 0.85
335
+
336
+ # FPU reduction constant for mcts
337
+ # fpuReductionMax = 0.2
338
+ # rootFpuReductionMax = 0.1
339
+ # fpuParentWeightByVisitedPolicy = true
340
+
341
+ # Parameters that control weighting of evals based on the net's own self-reported uncertainty.
342
+ # useUncertainty = true
343
+ # uncertaintyExponent = 1.0
344
+ # uncertaintyCoeff = 0.25
345
+
346
+ # Explore using optimistic policy
347
+ # rootPolicyOptimism = 0.2
348
+ # policyOptimism = 1.0
349
+
350
+ # Amount to apply a downweighting of children with very bad values relative to good ones
351
+ # valueWeightExponent = 0.25
352
+
353
+ # Slight incentive for the bot to behave human-like with regard to passing at the end, filling the dame,
354
+ # not wasting time playing in its own territory, etc, and not play moves that are equivalent in terms of
355
+ # points but a bit more unfriendly to humans.
356
+ # rootEndingBonusPoints = 0.5
357
+
358
+ # Make the bot prune useless moves that are just prolonging the game to avoid losing yet
359
+ # rootPruneUselessMoves = true
360
+
361
+ # Apply bias correction based on local pattern keys
362
+ # subtreeValueBiasFactor = 0.45
363
+ # subtreeValueBiasWeightExponent = 0.85
364
+
365
+ # Use graph search rather than tree search - identify and share search for transpositions.
366
+ # useGraphSearch = true
367
+
368
+ # How much to shard the node table for search synchronization
369
+ # nodeTableShardsPowerOfTwo = 16
370
+ # How many virtual losses to add when a thread descends through a node
371
+ # numVirtualLossesPerThread = 1
372
+
373
+ # Improve the quality of evals under heavy multithreading
374
+ # useNoisePruning = true
375
+
376
+
377
+ # Avoid SGF Patterns ------------------------------------------------------------------------------
378
+ # The parameters in this section provide a powerful way to customize KataGo to avoid moves that follow specific patterns
379
+ # based on a set of provided SGF files loaded upon startup. Uncomment them to use this feature.
380
+ # Additionally, if the SGF file contains the string %SKIP% in a comment on a move, that move will be ignored for this purpose.
381
+
382
+ # Load sgf files from this directory when the engine is started (ONLY on startup, will not reload unless engine is restarted)
383
+ # avoidSgfPatternDirs = path/to/directory/with/sgfs/
384
+ # You can also surround the file path in double quotes if the file path contains trailing spaces or hash signs.
385
+ # Within double quotes, backslashes are escape characters.
386
+ # avoidSgfPatternDirs = "path/to/directory/with/sgfs/"
387
+
388
+ # Penalize this much utility per matching move.
389
+ # Set this negative if you instead want to make KataGo favor the SGF patterns instead of penalizing it!
390
+ # This number does not need to be large, even 0.001 will make a difference. Too-large values may lead to bad play.
391
+ # avoidSgfPatternUtility = 0.001
392
+
393
+ # Optional - load only the newest this many files
394
+ # avoidSgfPatternMaxFiles = 20
395
+
396
+ # Optional - Penalty is multiplied by this per each older SGF file, so that old sgf files matter less than newer ones.
397
+ # avoidSgfPatternLambda = 0.90
398
+
399
+ # Optional - pay attention only to moves that were made by players with this name.
400
+ # For example you can set it to the name that your bot's past games will show up as in the SGF, so that the bot will only avoid repeating
401
+ # moves that itself made in past games, not the moves that its opponents made.
402
+ # avoidSgfPatternAllowedNames = my-ogs-bot-name1,my-ogs-bot-name2
403
+
404
+ # Optional - Ignore any moves in SGF files that occurred before this turn number.
405
+ # avoidSgfPatternMinTurnNumber = 0
406
+
407
+ # For more avoid patterns:
408
+ # You can also specify a second set of parameters, and a third, fourth, etc by numbering 2,3,4,...
409
+ # avoidSgf2PatternDirs = ...
410
+ # avoidSgf2PatternUtility = ...
411
+ # avoidSgf2PatternMaxFiles = ...
412
+ # avoidSgf2PatternLambda = ...
413
+ # avoidSgf2PatternAllowedNames = ...
414
+ # avoidSgf2PatternMinTurnNumber = ...
415
+
416
+
417
+
418
+
katrain/kataGO2/cacert.pem ADDED
The diff for this file is too large to render. See raw diff
 
katrain/kataGO2/contribute_config.cfg ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # Be careful not to share any config files where you have entered your password.
3
+
4
+ serverUrl = https://katagotraining.org/
5
+ username = Fill in your username here
6
+ password = Fill in your password here
7
+ # If your password has hash signs or trailing spaces, you can also surround the password with double quotes, like this.
8
+ # Within double quotes, backslashes are escape characters.
9
+ # password = "Fill in your password here"
10
+
11
+ # How many games should KataGo play at once? For good GPUs, putting too small a number here will be *very* inefficient.
12
+ # For absolute-top-tier GPUs, try numbers like 32, 40, 64, etc.
13
+ # For modern good middle-tier GPUs, you can try numbers like 8 or 16.
14
+ # For very old or weak GPUs, or if you want KataGo to put less load on your system, try 4.
15
+ maxSimultaneousGames = Fill in a number here
16
+
17
+ # Set to true if you want one of KataGo's games to be streamed to a text file, so you can watch.
18
+ # Follow in a separate shell with a command like the following:
19
+ # Linux: "tail -f watchgame.txt"
20
+ # Windows Powershell: "Get-Content .\watchgame.txt -Tail 50 -Wait"
21
+ watchOngoingGameInFile = false
22
+ watchOngoingGameInFileName = watchgame.txt
23
+
24
+ # If you use an https proxy to connect to the internet, set these to the host and port of your proxy.
25
+ # proxyHost = HOSTNAME
26
+ # proxyPort = 1234
27
+
28
+ # Special-purpose options. Most users should not need to adjust these.
29
+ # onlyPlayRatingMatches = false
30
+ # maxRatingMatches = 1
31
+ # disablePredownloadLoop = false
32
+ # warnTaskUnusedKeys = false
33
+
34
+ # KataGo will only use one GPU by default. You can edit the below if you have multiple GPUs and want to use them all.
35
+
36
+
37
+ # TO USE MULTIPLE GPUS:
38
+ # Set this to the number of GPUs you have and/or would like to use.
39
+ # **AND** if it is more than 1, uncomment the appropriate CUDA or OpenCL section below.
40
+ # numNNServerThreadsPerModel = 1
41
+
42
+
43
+ # TENSORRT GPU settings--------------------------------------
44
+ # These only apply when using the TENSORRT version of KataGo.
45
+
46
+ # IF USING ONE GPU: optionally uncomment and change this if the GPU you want to use turns out to be not device 0
47
+ # trtDeviceToUse = 0
48
+
49
+ # IF USING TWO GPUS: Uncomment these two lines (AND set numNNServerThreadsPerModel above):
50
+ # trtDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
51
+ # trtDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
52
+
53
+ # IF USING THREE GPUS: Uncomment these three lines (AND set numNNServerThreadsPerModel above):
54
+ # trtDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
55
+ # trtDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
56
+ # trtDeviceToUseThread2 = 2 # change this if the third GPU you want to use turns out to be not device 2
57
+
58
+ # You can probably guess the pattern if you have four, five, etc. GPUs.
59
+
60
+
61
+ # CUDA GPU settings--------------------------------------
62
+ # These only apply when using the CUDA version of KataGo.
63
+
64
+ # IF USING ONE GPU: optionally uncomment and change this if the GPU you want to use turns out to be not device 0
65
+ # cudaDeviceToUse = 0
66
+
67
+ # IF USING TWO GPUS: Uncomment these two lines (AND set numNNServerThreadsPerModel above):
68
+ # cudaDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
69
+ # cudaDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
70
+
71
+ # IF USING THREE GPUS: Uncomment these three lines (AND set numNNServerThreadsPerModel above):
72
+ # cudaDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
73
+ # cudaDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
74
+ # cudaDeviceToUseThread2 = 2 # change this if the third GPU you want to use turns out to be not device 2
75
+
76
+ # You can probably guess the pattern if you have four, five, etc. GPUs.
77
+
78
+ # KataGo will automatically use FP16 or not based on the compute capability of your NVIDIA GPU. If you
79
+ # want to try to force a particular behavior though you can uncomment these lines and change them
80
+ # to "true" or "false". E.g. it's using FP16 but on your card that's giving an error, or it's not using
81
+ # FP16 but you think it should.
82
+ # cudaUseFP16 = auto
83
+ # cudaUseNHWC = auto
84
+
85
+
86
+ # ------------------------------
87
+ # Metal GPU settings
88
+ # ------------------------------
89
+ # These only apply when using the METAL version of KataGo.
90
+
91
+ # For one Metal instance: KataGo will automatically use the default device.
92
+ # metalDeviceToUse = 0
93
+
94
+ # For two Metal instance: Uncomment these options, AND set numNNServerThreadsPerModel = 2 above.
95
+ # This will create two Metal instances, best overlapping the GPU and CPU execution.
96
+ # metalDeviceToUseThread0 = 0
97
+ # metalDeviceToUseThread1 = 1
98
+
99
+ # The pattern continues for additional Metal instances.
100
+
101
+
102
+ # OpenCL GPU settings--------------------------------------
103
+ # These only apply when using the OpenCL version of KataGo.
104
+
105
+ # Uncomment to tune OpenCL for every board size separately, rather than only the largest possible size
106
+ # openclReTunePerBoardSize = true
107
+
108
+ # IF USING ONE GPU: optionally uncomment and change this if the best device to use is guessed incorrectly.
109
+ # The default behavior tries to guess the 'best' GPU or device on your system to use, usually it will be a good guess.
110
+ # openclDeviceToUse = 0
111
+
112
+ # IF USING TWO GPUS: Uncomment these two lines and replace X and Y with the device ids of the devices you want to use.
113
+ # It might NOT be 0 and 1, some computers will have many OpenCL devices. You can see what the devices are when
114
+ # KataGo starts up - it should print or log all the devices it finds.
115
+ # (AND also set numNNServerThreadsPerModel above)
116
+ # openclDeviceToUseThread0 = X
117
+ # openclDeviceToUseThread1 = Y
118
+
119
+ # IF USING THREE GPUS: Uncomment these three lines and replace X and Y and Z with the device ids of the devices you want to use.
120
+ # It might NOT be 0 and 1 and 2, some computers will have many OpenCL devices. You can see what the devices are when
121
+ # KataGo starts up - it should print or log all the devices it finds.
122
+ # (AND also set numNNServerThreadsPerModel above)
123
+ # openclDeviceToUseThread0 = X
124
+ # openclDeviceToUseThread1 = Y
125
+ # openclDeviceToUseThread2 = Z
126
+
127
+ # You can probably guess the pattern if you have four, five, etc. GPUs.
128
+
129
+ # KataGo will automatically use FP16 or not based on testing your GPU during tuning. If you
130
+ # want to try to force a particular behavior though you can uncomment this lines and change it
131
+ # to "true" or "false". This is a fairly blunt setting - more detailed settings are testable
132
+ # by rerunning the tuner with various arguments.
133
+ # openclUseFP16 = auto
134
+
135
+
136
+ # Eigen-specific settings--------------------------------------
137
+ # These only apply when using the Eigen (pure CPU) version of KataGo.
138
+
139
+ # This is the number of CPU threads for evaluating the neural net on the Eigen backend.
140
+ # It defaults to numSearchThreads.
141
+ # numEigenThreadsPerModel = X
katrain/kataGO2/contribute_example.cfg ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # Be careful not to share any config files where you have entered your password.
3
+
4
+ serverUrl = https://katagotraining.org/
5
+ username = Fill in your username here
6
+ password = Fill in your password here
7
+ # If your password has hash signs or trailing spaces, you can also surround the password with double quotes, like this.
8
+ # Within double quotes, backslashes are escape characters.
9
+ # password = "Fill in your password here"
10
+
11
+ # How many games should KataGo play at once? For good GPUs, putting too small a number here will be *very* inefficient.
12
+ # For absolute-top-tier GPUs, try numbers like 32, 40, 64, etc.
13
+ # For modern good middle-tier GPUs, you can try numbers like 8 or 16.
14
+ # For very old or weak GPUs, or if you want KataGo to put less load on your system, try 4.
15
+ maxSimultaneousGames = Fill in a number here
16
+
17
+ # Set to true if you want one of KataGo's games to be streamed to a text file, so you can watch.
18
+ # Follow in a separate shell with a command like the following:
19
+ # Linux: "tail -f watchgame.txt"
20
+ # Windows Powershell: "Get-Content .\watchgame.txt -Tail 50 -Wait"
21
+ watchOngoingGameInFile = false
22
+ watchOngoingGameInFileName = watchgame.txt
23
+
24
+ # If you use an https proxy to connect to the internet, set these to the host and port of your proxy.
25
+ # proxyHost = HOSTNAME
26
+ # proxyPort = 1234
27
+
28
+ # Special-purpose options. Most users should not need to adjust these.
29
+ # onlyPlayRatingMatches = false
30
+ # maxRatingMatches = 1
31
+ # disablePredownloadLoop = false
32
+ # warnTaskUnusedKeys = false
33
+
34
+ # KataGo will only use one GPU by default. You can edit the below if you have multiple GPUs and want to use them all.
35
+
36
+
37
+ # TO USE MULTIPLE GPUS:
38
+ # Set this to the number of GPUs you have and/or would like to use.
39
+ # **AND** if it is more than 1, uncomment the appropriate CUDA or OpenCL section below.
40
+ # numNNServerThreadsPerModel = 1
41
+
42
+
43
+ # TENSORRT GPU settings--------------------------------------
44
+ # These only apply when using the TENSORRT version of KataGo.
45
+
46
+ # IF USING ONE GPU: optionally uncomment and change this if the GPU you want to use turns out to be not device 0
47
+ # trtDeviceToUse = 0
48
+
49
+ # IF USING TWO GPUS: Uncomment these two lines (AND set numNNServerThreadsPerModel above):
50
+ # trtDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
51
+ # trtDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
52
+
53
+ # IF USING THREE GPUS: Uncomment these three lines (AND set numNNServerThreadsPerModel above):
54
+ # trtDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
55
+ # trtDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
56
+ # trtDeviceToUseThread2 = 2 # change this if the third GPU you want to use turns out to be not device 2
57
+
58
+ # You can probably guess the pattern if you have four, five, etc. GPUs.
59
+
60
+
61
+ # CUDA GPU settings--------------------------------------
62
+ # These only apply when using the CUDA version of KataGo.
63
+
64
+ # IF USING ONE GPU: optionally uncomment and change this if the GPU you want to use turns out to be not device 0
65
+ # cudaDeviceToUse = 0
66
+
67
+ # IF USING TWO GPUS: Uncomment these two lines (AND set numNNServerThreadsPerModel above):
68
+ # cudaDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
69
+ # cudaDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
70
+
71
+ # IF USING THREE GPUS: Uncomment these three lines (AND set numNNServerThreadsPerModel above):
72
+ # cudaDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
73
+ # cudaDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
74
+ # cudaDeviceToUseThread2 = 2 # change this if the third GPU you want to use turns out to be not device 2
75
+
76
+ # You can probably guess the pattern if you have four, five, etc. GPUs.
77
+
78
+ # KataGo will automatically use FP16 or not based on the compute capability of your NVIDIA GPU. If you
79
+ # want to try to force a particular behavior though you can uncomment these lines and change them
80
+ # to "true" or "false". E.g. it's using FP16 but on your card that's giving an error, or it's not using
81
+ # FP16 but you think it should.
82
+ # cudaUseFP16 = auto
83
+ # cudaUseNHWC = auto
84
+
85
+
86
+ # ------------------------------
87
+ # Metal GPU settings
88
+ # ------------------------------
89
+ # These only apply when using the METAL version of KataGo.
90
+
91
+ # For one Metal instance: KataGo will automatically use the default device.
92
+ # metalDeviceToUse = 0
93
+
94
+ # For two Metal instance: Uncomment these options, AND set numNNServerThreadsPerModel = 2 above.
95
+ # This will create two Metal instances, best overlapping the GPU and CPU execution.
96
+ # metalDeviceToUseThread0 = 0
97
+ # metalDeviceToUseThread1 = 1
98
+
99
+ # The pattern continues for additional Metal instances.
100
+
101
+
102
+ # OpenCL GPU settings--------------------------------------
103
+ # These only apply when using the OpenCL version of KataGo.
104
+
105
+ # Uncomment to tune OpenCL for every board size separately, rather than only the largest possible size
106
+ # openclReTunePerBoardSize = true
107
+
108
+ # IF USING ONE GPU: optionally uncomment and change this if the best device to use is guessed incorrectly.
109
+ # The default behavior tries to guess the 'best' GPU or device on your system to use, usually it will be a good guess.
110
+ # openclDeviceToUse = 0
111
+
112
+ # IF USING TWO GPUS: Uncomment these two lines and replace X and Y with the device ids of the devices you want to use.
113
+ # It might NOT be 0 and 1, some computers will have many OpenCL devices. You can see what the devices are when
114
+ # KataGo starts up - it should print or log all the devices it finds.
115
+ # (AND also set numNNServerThreadsPerModel above)
116
+ # openclDeviceToUseThread0 = X
117
+ # openclDeviceToUseThread1 = Y
118
+
119
+ # IF USING THREE GPUS: Uncomment these three lines and replace X and Y and Z with the device ids of the devices you want to use.
120
+ # It might NOT be 0 and 1 and 2, some computers will have many OpenCL devices. You can see what the devices are when
121
+ # KataGo starts up - it should print or log all the devices it finds.
122
+ # (AND also set numNNServerThreadsPerModel above)
123
+ # openclDeviceToUseThread0 = X
124
+ # openclDeviceToUseThread1 = Y
125
+ # openclDeviceToUseThread2 = Z
126
+
127
+ # You can probably guess the pattern if you have four, five, etc. GPUs.
128
+
129
+ # KataGo will automatically use FP16 or not based on testing your GPU during tuning. If you
130
+ # want to try to force a particular behavior though you can uncomment this lines and change it
131
+ # to "true" or "false". This is a fairly blunt setting - more detailed settings are testable
132
+ # by rerunning the tuner with various arguments.
133
+ # openclUseFP16 = auto
134
+
135
+
136
+ # Eigen-specific settings--------------------------------------
137
+ # These only apply when using the Eigen (pure CPU) version of KataGo.
138
+
139
+ # This is the number of CPU threads for evaluating the neural net on the Eigen backend.
140
+ # It defaults to numSearchThreads.
141
+ # numEigenThreadsPerModel = X
katrain/kataGO2/default_gtp.cfg ADDED
@@ -0,0 +1,740 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Configuration for KataGo C++ GTP engine
2
+
3
+ # Run the program using: `./katago.exe gtp`
4
+
5
+ # In this example config, when a parameter is given as a commented out value,
6
+ # that value also is the default value, unless described otherwise. You can
7
+ # uncomment it (remove the pound sign) and change it if you want.
8
+
9
+ # ===========================================================================
10
+ # Running on an online server or in a real tournament or match
11
+ # ===========================================================================
12
+ # If you plan to run online or in a tournament, read through the "Rules"
13
+ # section below for proper handling of komi, handicaps, end-of-game cleanup,
14
+ # and other details.
15
+
16
+ # ===========================================================================
17
+ # Notes about performance and memory usage
18
+ # ===========================================================================
19
+ # Important: For good performance, you will very likely want to tune the
20
+ # "numSearchThreads" parameter in the Search limits section below! Run
21
+ # "./katago benchmark" to test KataGo and to suggest a reasonable value
22
+ # of this parameter.
23
+
24
+ # For multi-GPU systems, read "OpenCL GPU settings" or "CUDA GPU settings".
25
+ #
26
+ # When using OpenCL, verify that KataGo picks the correct device! Some systems
27
+ # may have both an Intel CPU OpenCL and GPU OpenCL. If # KataGo picks the wrong
28
+ # one, correct this by specifying "openclGpuToUse".
29
+ #
30
+ # Consider adjusting "maxVisits", "ponderingEnabled", "resignThreshold", and
31
+ # other parameters depending on your intended usage.
32
+
33
+ # ===========================================================================
34
+ # Command-line usage
35
+ # ===========================================================================
36
+ # All of the below values may be set or overridden via command-line arguments:
37
+ #
38
+ # -override-config KEY=VALUE,KEY=VALUE,...
39
+
40
+ # ===========================================================================
41
+ # Logs and files
42
+ # ===========================================================================
43
+ # This section defines where and what logging information is produced.
44
+
45
+ # Each run of KataGo will log to a separate file in this dir.
46
+ # This is the default.
47
+ logDir = gtp_logs
48
+ # Uncomment and specify this instead of logDir to write separate dated subdirs
49
+ # logDirDated = gtp_logs
50
+ # Uncomment and specify this instead of logDir to log to only a single file
51
+ # logFile = gtp.log
52
+
53
+ # Logging options
54
+ logAllGTPCommunication = true
55
+ logSearchInfo = true
56
+ logSearchInfoForChosenMove = false
57
+ logToStderr = false
58
+
59
+ # KataGo will display some info to stderr on GTP startup
60
+ # Uncomment the next line and set it to false to suppress that and remain silent
61
+ # startupPrintMessageToStderr = true
62
+
63
+ # Write information to stderr, for use in things like malkovich chat to OGS.
64
+ # ogsChatToStderr = false
65
+
66
+ # Uncomment and set this to a directory to override where openCLTuner files
67
+ # and other cached data is written. By default it saves into a subdir of the
68
+ # current directory on windows, and a subdir of ~/.katago on Linux.
69
+ # homeDataDir = PATH_TO_DIRECTORY
70
+
71
+ # ===========================================================================
72
+ # Analysis
73
+ # ===========================================================================
74
+ # This section configures analysis settings.
75
+ #
76
+ # The maximum number of moves after the first move displayed in variations
77
+ # from analysis commands like kata-analyze or lz-analyze.
78
+ # analysisPVLen = 15
79
+
80
+ # Report winrates for chat and analysis as (BLACK|WHITE|SIDETOMOVE).
81
+ # Most GUIs and analysis tools will expect SIDETOMOVE.
82
+ # reportAnalysisWinratesAs = SIDETOMOVE
83
+
84
+ # Extra noise for wider exploration. Large values will force KataGo to
85
+ # analyze a greater variety of moves than it normally would.
86
+ # An extreme value like 1 distributes playouts across every move on the board,
87
+ # even very bad moves.
88
+ # Affects analysis only, does not affect play.
89
+ # analysisWideRootNoise = 0.04
90
+
91
+ # Try to limit the effect of possible bad or bogus move sequences in the
92
+ # history leading to this position from affecting KataGo's move predictions.
93
+ # analysisIgnorePreRootHistory = true
94
+
95
+ # ===========================================================================
96
+ # Rules
97
+ # ===========================================================================
98
+ # This section configures the scoring and playing rules. Rules can also be
99
+ # changed mid-run by issuing custom GTP commands.
100
+ #
101
+ # See https://lightvector.github.io/KataGo/rules.html for rules details.
102
+ #
103
+ # See https://github.com/lightvector/KataGo/blob/master/docs/GTP_Extensions.md
104
+ # for GTP commands.
105
+
106
+ # Specify the rules as a string.
107
+ # Some legal values include:
108
+ # chinese, japanese, korean, aga, chinese-ogs, new-zealand, stone-scoring,
109
+ # ancient-territory, bga, aga-button
110
+ #
111
+ # For some human rulesets that require complex adjudication in tricky cases
112
+ # (e.g. japanese, korean) KataGo may not precisely match the ruleset in such
113
+ # cases but will do its best.
114
+ rules = tromp-taylor
115
+
116
+ # By default, the "rules" parameter is used, but if you comment it out and
117
+ # uncomment one option in each of the sections below, you can specify an
118
+ # arbitrary combination of individual rules.
119
+
120
+ # koRule = SIMPLE # Simple ko rules (triple ko = no result)
121
+ # koRule = POSITIONAL # Positional superko
122
+ # koRule = SITUATIONAL # Situational superko
123
+
124
+ # scoringRule = AREA # Area scoring
125
+ # scoringRule = TERRITORY # Territory scoring (special computer-friendly territory rules)
126
+
127
+ # taxRule = NONE # All surrounded empty points are scored
128
+ # taxRule = SEKI # Eyes in seki do NOT count as points
129
+ # taxRule = ALL # All groups are taxed up to 2 points for the two eyes needed to live
130
+
131
+ # Is multiple-stone suicide legal? (Single-stone suicide is always illegal).
132
+ # multiStoneSuicideLegal = false
133
+ # multiStoneSuicideLegal = true
134
+
135
+ # "Button go" - the first pass when area scoring awards 0.5 points and does
136
+ # not count for ending the game.
137
+ # Allows area scoring rulesets that have far simpler rules to achieve the same
138
+ # final scoring precision and reward for precise play as territory scoring.
139
+ # hasButton = false
140
+ # hasButton = true
141
+
142
+ # Is this a human ruleset where it's okay to pass before having physically
143
+ # captured and removed all dead stones?
144
+ # friendlyPassOk = false
145
+ # friendlyPassOk = true
146
+
147
+ # How handicap stones in handicap games are compensated
148
+ # whiteHandicapBonus = 0 # White gets no compensation for black's handicap stones (Tromp-taylor, NZ, JP)
149
+ # whiteHandicapBonus = N-1 # White gets N-1 points for black's N handicap stones (AGA)
150
+ # whiteHandicapBonus = N # White gets N points for black's N handicap stones (Chinese)
151
+
152
+ # ------------------------------
153
+ # Other rules hacks
154
+ # ------------------------------
155
+ # Uncomment and change to adjust what board size KataGo uses upon startup
156
+ # by default when GTP doesn't specify.
157
+ # defaultBoardSize = 19
158
+
159
+ # By default, Katago will use the komi that the GUI or GTP controller tries to set.
160
+ # Uncomment and set this to have KataGo ignore the controller and always use this komi.
161
+ # ignoreGTPAndForceKomi = 7
162
+
163
+ # ===========================================================================
164
+ # Bot behavior
165
+ # ===========================================================================
166
+
167
+ # ------------------------------
168
+ # Resignation
169
+ # ------------------------------
170
+
171
+ # Resignation occurs if for at least resignConsecTurns in a row, the
172
+ # winLossUtility (on a [-1,1] scale) is below resignThreshold.
173
+ allowResignation = true
174
+ resignThreshold = -0.90
175
+ resignConsecTurns = 3
176
+
177
+ # By default, KataGo may resign games that it is confidently losing even if they
178
+ # are very close in score. Uncomment and set this to avoid resigning games
179
+ # if the estimated difference is points is less than or equal to this.
180
+ # resignMinScoreDifference = 10
181
+
182
+ # Disallow resignation if turn number < resignMinMovesPerBoardArea * area of board.
183
+ # e.g 0.25 would prohibit resignation on 19x19 until after turn 361 * 0.25 ~= 90.
184
+ # resignMinMovesPerBoardArea = 0.00
185
+
186
+ # ------------------------------
187
+ # Handicap
188
+ # ------------------------------
189
+ # Assume that if black makes many moves in a row right at the start of the
190
+ # game, then the game is a handicap game. This is necessary on some servers
191
+ # and for some GUIs and also when initializing from many SGF files, which may
192
+ # set up a handicap game using repeated GTP "play" commands for black rather
193
+ # than GTP "place_free_handicap" commands; however, it may also lead to
194
+ # incorrect understanding of komi if whiteHandicapBonus is used and a server
195
+ # does not have such a practice. Uncomment and set to false to disable.
196
+ # assumeMultipleStartingBlackMovesAreHandicap = true
197
+
198
+ # Makes katago dynamically adjust in handicap or altered-komi games to assume
199
+ # based on those game settings that it must be stronger or weaker than the
200
+ # opponent and to play accordingly. Greatly improves handicap strength by
201
+ # biasing winrates and scores to favor appropriate safe/aggressive play.
202
+ # Does NOT affect analysis (lz-analyze, kata-analyze, used by programs like
203
+ # Lizzie) so analysis remains unbiased. Uncomment and set this to 0 to disable
204
+ # this and make KataGo play the same always.
205
+ # dynamicPlayoutDoublingAdvantageCapPerOppLead = 0.045
206
+
207
+ # Instead of "dynamicPlayoutDoublingAdvantageCapPerOppLead", you can comment
208
+ # that out and uncomment and set "playoutDoublingAdvantage" to a fixed value
209
+ # from -3.0 to 3.0 that will not change dynamically.
210
+ # ALSO affects analysis tools (lz-analyze, kata-analyze, used by e.g. Lizzie).
211
+ # Negative makes KataGo behave as if it is much weaker than the opponent.
212
+ # Positive makes KataGo behave as if it is much stronger than the opponent.
213
+ # KataGo will adjust to favor safe/aggressive play as appropriate based on
214
+ # the combination of who is ahead and how much stronger/weaker it thinks it is,
215
+ # and report winrates and scores taking the strength difference into account.
216
+ #
217
+ # If this and "dynamicPlayoutDoublingAdvantageCapPerOppLead" are both set
218
+ # then dynamic will be used for all games and this fixed value will be used
219
+ # for analysis tools.
220
+ # playoutDoublingAdvantage = 0.0
221
+
222
+ # Uncomment one of these when using "playoutDoublingAdvantage" to enforce
223
+ # that it will only apply when KataGo plays as the specified color and will be
224
+ # negated when playing as the opposite color.
225
+ # playoutDoublingAdvantagePla = BLACK
226
+ # playoutDoublingAdvantagePla = WHITE
227
+
228
+ # ------------------------------
229
+ # Passing and cleanup
230
+ # ------------------------------
231
+ # Make the bot never assume that its pass will end the game, even if passing
232
+ # would end and "win" under Tromp-Taylor rules. Usually this is a good idea
233
+ # when using it for analysis or playing on servers where scoring may be
234
+ # implemented non-tromp-taylorly. Uncomment and set to false to disable.
235
+ # conservativePass = true
236
+
237
+ # When using territory scoring, self-play games continue beyond two passes
238
+ # with special cleanup rules that may be confusing for human players. This
239
+ # option prevents the special cleanup phases from being reachable when using
240
+ # the bot for GTP play. Uncomment and set to false to enable entering special
241
+ # cleanup. For example, if you are testing it against itself, or against
242
+ # another bot that has precisely implemented the rules documented at
243
+ # https://lightvector.github.io/KataGo/rules.html
244
+ # preventCleanupPhase = true
245
+
246
+ # ------------------------------
247
+ # Miscellaneous behavior
248
+ # ------------------------------
249
+ # If the board is symmetric, search only one copy of each equivalent move.
250
+ # Attempts to also account for ko/superko, will not theoretically perfect for
251
+ # superko. Uncomment and set to false to disable.
252
+ # rootSymmetryPruning = true
253
+
254
+ # Uncomment and set to true to avoid a particular joseki that some networks
255
+ # misevaluate, and also to improve opening diversity versus some particular
256
+ # other bots that like to play it all the time.
257
+ # avoidMYTDaggerHack = false
258
+
259
+ # Prefer to avoid playing the same joseki in every corner of the board.
260
+ # Uncomment to set to a specific value. See "Avoid SGF patterns" section.
261
+ # By default: 0 (even games), 0.005 (handicap games)
262
+ # avoidRepeatedPatternUtility = 0.0
263
+
264
+ # Experimental logic to fight against mirror Go even with unfavorable komi.
265
+ # Uncomment to set to a specific value to use for both playing and analysis.
266
+ # By default: true when playing via GTP, but false when analyzing.
267
+ # antiMirror = true
268
+
269
+ # Enable some hacks that mitigate rare instances when passing messes up deeper searches.
270
+ # enablePassingHacks = true
271
+
272
+ # Uncomment and set this to true to prevent bad or bogus move sequences
273
+ # in the history leading to this position from affecting KataGo's move choices.
274
+ # Same as analysisIgnorePreRootHistory (see above) but applies to actual play.
275
+ # You can enable this if KataGo is being asked to play from positions that it did not
276
+ # choose the moves to reach.
277
+ # ignorePreRootHistory = false
278
+
279
+ # ===========================================================================
280
+ # Search limits
281
+ # ===========================================================================
282
+
283
+ # Terminology:
284
+ # "Playouts" is the number of new playouts of search performed each turn.
285
+ # "Visits" is the same as "Playouts" but also counts search performed on
286
+ # previous turns that is still applicable to this turn.
287
+ # "Time" is the time in seconds.
288
+
289
+ # For example, if KataGo searched 200 nodes on the previous turn, and then
290
+ # after the opponent's reply, 50 nodes of its search tree was still valid,
291
+ # then a visit limit of 200 would allow KataGo to search 150 new nodes
292
+ # (for a final tree size of 200 nodes), whereas a playout limit of of 200
293
+ # would allow KataGo to search 200 nodes (for a final tree size of 250 nodes).
294
+
295
+ # Additionally, KataGo may also move before than the limit in order to
296
+ # obey time controls (e.g. byo-yomi, etc) if the GTP controller has
297
+ # told KataGo that the game has is being played with a given time control.
298
+
299
+ # Limits for search on the current turn.
300
+ # If commented out or unspecified, the default is to have no limit.
301
+ maxVisits = 500
302
+ # maxPlayouts = 300
303
+ # maxTime = 10.0
304
+
305
+ # Ponder on the opponent's turn?
306
+ ponderingEnabled = false
307
+
308
+ # Limits for search when pondering on the opponent's turn.
309
+ # If commented out or unspecified, the default is to have no limit.
310
+ # Limiting the maximum time is recommended so that KataGo won't burn CPU/GPU
311
+ # forever and/or run out of RAM if left unattended while pondering is enabled.
312
+ # maxVisitsPondering = 5000
313
+ # maxPlayoutsPondering = 3000
314
+ maxTimePondering = 60.0
315
+
316
+
317
+ # ------------------------------
318
+ # Other search limits and behavior
319
+ # ------------------------------
320
+
321
+ # Approx number of seconds to buffer for lag for GTP time controls - will
322
+ # move a bit faster assuming there is this much lag per move.
323
+ lagBuffer = 1.0
324
+
325
+ # YOU PROBABLY WANT TO TUNE THIS PARAMETER!
326
+ # The number of threads to use when searching. On powerful GPUs the optimal
327
+ # threads may be much higher than the number of CPU cores you have because
328
+ # many threads are needed to feed efficient large batches to the GPU.
329
+ #
330
+ # Run "./katago benchmark" to tune this parameter and test the effect
331
+ # of changes to any of other parameters.
332
+ numSearchThreads = 6
333
+
334
+ # Play a little faster if the opponent is passing, for human-friendliness.
335
+ # Comment these out to disable them, such as if running a controlled match
336
+ # where you are testing KataGo with fixed compute per move vs other bots.
337
+ searchFactorAfterOnePass = 0.50
338
+ searchFactorAfterTwoPass = 0.25
339
+
340
+ # Play a little faster if super-winning, for human-friendliness.
341
+ # Comment these out to disable them, such as if running a controlled match
342
+ # where you are testing KataGo with fixed compute per move vs other bots.
343
+ searchFactorWhenWinning = 0.40
344
+ searchFactorWhenWinningThreshold = 0.95
345
+
346
+ # ===========================================================================
347
+ # GPU settings
348
+ # ===========================================================================
349
+ # This section configures GPU settings.
350
+ #
351
+ # Maximum number of positions to send to a single GPU at once. The default
352
+ # value is roughly equal to numSearchThreads, but can be specified manually
353
+ # if running out of memory, or using multiple GPUs that expect to share work.
354
+ # nnMaxBatchSize = <integer>
355
+
356
+ # Controls the neural network cache size, which is the primary RAM/memory use.
357
+ # KataGo will cache up to (2 ** nnCacheSizePowerOfTwo) many neural net
358
+ # evaluations in case of transpositions in the tree.
359
+ # Increase this to improve performance for searches with tens of thousands
360
+ # of visits or more. Decrease this to limit memory usage.
361
+ # If you're happy to do some math - each neural net entry takes roughly
362
+ # 1.5KB, except when using whole-board ownership/territory
363
+ # visualizations, where each entry will take roughly 3KB. The number of
364
+ # entries is (2 ** nnCacheSizePowerOfTwo). (E.g. 2 ** 18 = 262144.)
365
+ # You can compute roughly how much memory the cache will use based on this.
366
+ # nnCacheSizePowerOfTwo = 20
367
+
368
+ # Size of mutex pool for nnCache is (2 ** this).
369
+ # nnMutexPoolSizePowerOfTwo = 16
370
+
371
+ # Randomize board orientation when running neural net evals? Uncomment and
372
+ # set to false to disable.
373
+ # nnRandomize = true
374
+
375
+ # If provided, force usage of a specific seed for nnRandomize.
376
+ # The default is to use a randomly generated seed.
377
+ # nnRandSeed = abcdefg
378
+
379
+ # Uncomment and set to true to force GTP to use the maximum board size for
380
+ # internal buffers for the neural net. This will make KataGo slower when
381
+ # evaluating small boards, but will avoid a lengthy initialization time on every
382
+ # change of board size due to having to re-size the neural net buffers on the GPU.
383
+ # This can be useful for example, for OGS's persistent bot mode that uses a single
384
+ # bot instance to handle multiple games and may thrash between different board sizes
385
+ # if there are concurrent games of multiple sizes.
386
+ # gtpForceMaxNNSize = false
387
+
388
+ # ------------------------------
389
+ # Multiple GPUs
390
+ # ------------------------------
391
+ # Set this to the number of GPUs to use or that are available.
392
+ # IMPORTANT: If more than 1, also uncomment the appropriate TensorRT
393
+ # or CUDA or OpenCL section.
394
+ # numNNServerThreadsPerModel = 1
395
+
396
+ # ------------------------------
397
+ # TENSORRT GPU settings
398
+ # ------------------------------
399
+ # These only apply when using the TENSORRT version of KataGo.
400
+
401
+ # For one GPU: optionally uncomment this option and change if the GPU to
402
+ # use is not device 0.
403
+ # trtDeviceToUse = 0
404
+
405
+ # For two GPUs: Uncomment these options, AND set numNNServerThreadsPerModel above.
406
+ # Also, change their values if the devices you want to use are not 0 and 1.
407
+ # trtDeviceToUseThread0 = 0
408
+ # trtDeviceToUseThread1 = 1
409
+
410
+ # For three GPUs: Uncomment these options, AND set numNNServerThreadsPerModel above.
411
+ # Also, change their values if the devices you want to use are not 0 and 1 and 2.
412
+ # trtDeviceToUseThread0 = 0
413
+ # trtDeviceToUseThread1 = 1
414
+ # trtDeviceToUseThread2 = 2
415
+
416
+ # The pattern continues for additional GPUs.
417
+
418
+ # ------------------------------
419
+ # CUDA GPU settings
420
+ # ------------------------------
421
+ # These only apply when using the CUDA version of KataGo.
422
+
423
+ # For one GPU: optionally uncomment and change this if the GPU you want to
424
+ # use is not device 0
425
+ # cudaDeviceToUse = 0
426
+
427
+ # For two GPUs: Uncomment these options, AND set numNNServerThreadsPerModel above.
428
+ # Also, change their values if the devices you want to use are not 0 and 1.
429
+ # cudaDeviceToUseThread0 = 0
430
+ # cudaDeviceToUseThread1 = 1
431
+
432
+ # For three GPUs: Uncomment these options, AND set numNNServerThreadsPerModel above.
433
+ # Also, change their values if the devices you want to use are not 0 and 1 and 2.
434
+ # cudaDeviceToUseThread0 = 0
435
+ # cudaDeviceToUseThread1 = 1
436
+ # cudaDeviceToUseThread2 = 2
437
+
438
+ # The pattern continues for additional GPUs.
439
+
440
+ # KataGo will automatically use FP16 or not based on the compute capability
441
+ # of your NVIDIA GPU. If you want to try to force a particular behavior
442
+ # you can uncomment these lines and change them to "true" or "false".
443
+ # cudaUseFP16 = auto
444
+ # cudaUseNHWC = auto
445
+
446
+ # ------------------------------
447
+ # Metal GPU settings
448
+ # ------------------------------
449
+ # These only apply when using the METAL version of KataGo.
450
+
451
+ # For one Metal instance: KataGo will automatically use the default device.
452
+ # metalDeviceToUse = 0
453
+
454
+ # For two Metal instance: Uncomment these options, AND set numNNServerThreadsPerModel = 2 above.
455
+ # This will create two Metal instances, best overlapping the GPU and CPU execution.
456
+ # metalDeviceToUseThread0 = 0
457
+ # metalDeviceToUseThread1 = 1
458
+
459
+ # The pattern continues for additional Metal instances.
460
+
461
+ # ------------------------------
462
+ # OpenCL GPU settings
463
+ # ------------------------------
464
+ # These only apply when using the OpenCL version of KataGo.
465
+
466
+ # Uncomment and set to true to tune OpenCL for every board size separately,
467
+ # rather than only the largest possible size.
468
+ # openclReTunePerBoardSize = false
469
+
470
+ # For one GPU: optionally uncomment and change this if the best device to use is guessed incorrectly.
471
+ # The default behavior tries to guess the 'best' GPU or device on your system to use, usually it will be a good guess.
472
+ # openclDeviceToUse = 0
473
+
474
+ # For two GPUs: Uncomment these two lines and replace X and Y with the device ids of the devices you want to use.
475
+ # It might NOT be 0 and 1, some computers will have many OpenCL devices. You can see what the devices are when
476
+ # KataGo starts up - it should print or log all the devices it finds.
477
+ # (AND also set numNNServerThreadsPerModel above)
478
+ # openclDeviceToUseThread0 = X
479
+ # openclDeviceToUseThread1 = Y
480
+
481
+ # For three GPUs: Uncomment these three lines and replace X and Y and Z with the device ids of the devices you want to use.
482
+ # It might NOT be 0 and 1 and 2, some computers will have many OpenCL devices. You can see what the devices are when
483
+ # KataGo starts up - it should print or log all the devices it finds.
484
+ # (AND also set numNNServerThreadsPerModel above)
485
+ # openclDeviceToUseThread0 = X
486
+ # openclDeviceToUseThread1 = Y
487
+ # openclDeviceToUseThread2 = Z
488
+
489
+ # The pattern continues for additional GPUs.
490
+
491
+ # KataGo will automatically use FP16 or not based on testing your GPU during
492
+ # tuning. If you want to try to force a particular behavior though you can
493
+ # uncomment this option and change it to "true" or "false". This is a fairly
494
+ # blunt setting - more detailed settings are testable by rerunning the tuner
495
+ # with various arguments (./katago tuner).
496
+ # openclUseFP16 = auto
497
+
498
+ # ------------------------------
499
+ # Eigen-specific settings
500
+ # ------------------------------
501
+ # These only apply when using the Eigen (pure CPU) version of KataGo.
502
+
503
+ # Number of CPU threads for evaluating the neural net on the Eigen backend.
504
+ #
505
+ # Default: numSearchThreads
506
+ # numEigenThreadsPerModel = X
507
+
508
+ # ===========================================================================
509
+ # Root move selection and biases
510
+ # ===========================================================================
511
+ # Uncomment and edit any of the below values to change them from their default.
512
+
513
+ # If provided, force usage of a specific seed for various random things in
514
+ # the search. The default is to use a random seed.
515
+ # searchRandSeed = hijklmn
516
+
517
+ # Temperature for the early game, randomize between chosen moves with
518
+ # this temperature
519
+ # chosenMoveTemperatureEarly = 0.5
520
+
521
+ # Decay temperature for the early game by 0.5 every this many moves,
522
+ # scaled with board size.
523
+ # chosenMoveTemperatureHalflife = 19
524
+
525
+ # At the end of search after the early game, randomize between chosen
526
+ # moves with this temperature
527
+ # chosenMoveTemperature = 0.10
528
+
529
+ # Subtract this many visits from each move prior to applying
530
+ # chosenMoveTemperature (unless all moves have too few visits) to downweight
531
+ # unlikely moves
532
+ # chosenMoveSubtract = 0
533
+
534
+ # The same as chosenMoveSubtract but only prunes moves that fall below
535
+ # the threshold. This setting does not affect chosenMoveSubtract.
536
+ # chosenMovePrune = 1
537
+
538
+ # Number of symmetries to sample (without replacement) and average at the root
539
+ # rootNumSymmetriesToSample = 1
540
+
541
+ # Using LCB for move selection?
542
+ # useLcbForSelection = true
543
+
544
+ # How many stdevs a move needs to be better than another for LCB selection
545
+ # lcbStdevs = 5.0
546
+
547
+ # Only use LCB override when a move has this proportion of visits as the
548
+ # top move.
549
+ # minVisitPropForLCB = 0.15
550
+
551
+ # ===========================================================================
552
+ # Internal params
553
+ # ===========================================================================
554
+ # Uncomment and edit any of the below values to change them from their default.
555
+
556
+ # Scales the utility of winning/losing
557
+ # winLossUtilityFactor = 1.0
558
+
559
+ # Scales the utility for trying to maximize score
560
+ # staticScoreUtilityFactor = 0.10
561
+ # dynamicScoreUtilityFactor = 0.30
562
+
563
+ # Adjust dynamic score center this proportion of the way towards zero,
564
+ # capped at a reasonable amount.
565
+ # dynamicScoreCenterZeroWeight = 0.20
566
+ # dynamicScoreCenterScale = 0.75
567
+
568
+ # The utility of getting a "no result" due to triple ko or other long cycle
569
+ # in non-superko rulesets (-1 to 1)
570
+ # noResultUtilityForWhite = 0.0
571
+
572
+ # The number of wins that a draw counts as, for white. (0 to 1)
573
+ # drawEquivalentWinsForWhite = 0.5
574
+
575
+ # Exploration constant for mcts
576
+ # cpuctExploration = 1.0
577
+ # cpuctExplorationLog = 0.45
578
+
579
+ # Parameters that control exploring more in volatile positions, exploring
580
+ # less in stable positions.
581
+ # cpuctUtilityStdevPrior = 0.40
582
+ # cpuctUtilityStdevPriorWeight = 2.0
583
+ # cpuctUtilityStdevScale = 0.85
584
+
585
+ # FPU reduction constant for mcts
586
+ # fpuReductionMax = 0.2
587
+ # rootFpuReductionMax = 0.1
588
+ # fpuParentWeightByVisitedPolicy = true
589
+
590
+ # Parameters that control weighting of evals based on the net's own
591
+ # self-reported uncertainty.
592
+ # useUncertainty = true
593
+ # uncertaintyExponent = 1.0
594
+ # uncertaintyCoeff = 0.25
595
+
596
+ # Explore using optimistic policy
597
+ # rootPolicyOptimism = 0.2
598
+ # policyOptimism = 1.0
599
+
600
+ # Amount to apply a downweighting of children with very bad values relative
601
+ # to good ones.
602
+ # valueWeightExponent = 0.25
603
+
604
+ # Slight incentive for the bot to behave human-like with regard to passing at
605
+ # the end, filling the dame, not wasting time playing in its own territory,
606
+ # etc., and not play moves that are equivalent in terms of points but a bit
607
+ # more unfriendly to humans.
608
+ # rootEndingBonusPoints = 0.5
609
+
610
+ # Make the bot prune useless moves that are just prolonging the game to
611
+ # avoid losing yet.
612
+ # rootPruneUselessMoves = true
613
+
614
+ # Apply bias correction based on local pattern keys
615
+ # subtreeValueBiasFactor = 0.45
616
+ # subtreeValueBiasWeightExponent = 0.85
617
+
618
+ # Use graph search rather than tree search - identify and share search for
619
+ # transpositions.
620
+ # useGraphSearch = true
621
+
622
+ # How much to shard the node table for search synchronization
623
+ # nodeTableShardsPowerOfTwo = 16
624
+
625
+ # How many virtual losses to add when a thread descends through a node
626
+ # numVirtualLossesPerThread = 1
627
+
628
+ # Improve the quality of evals under heavy multithreading
629
+ # useNoisePruning = true
630
+
631
+ # ===========================================================================
632
+ # Automatic avoid patterns
633
+ # ===========================================================================
634
+ # The parameters in this section provide a way to bias away from moves that match
635
+ # patterns that this instance of KataGo has played in previous games, by auto-saving
636
+ # moves to a directory and then auto-loading and biasing against them each new game.
637
+ # Uncomment them to use them. When using this feature, all parameters must be specified.
638
+
639
+ # Different board sizes are tracked separately, but all board sizes share the same
640
+ # parameters by default. Every parameter *except* for autoAvoidRepeatDir and
641
+ # autoAvoidRepeatSaveChunkSize can be overridden per board size,
642
+ # e.g. "autoAvoidRepeatMinTurnNumber13x13". You must ALSO specify the
643
+ # defaults even if you have specified board-size-specific values.
644
+
645
+ # Directory to auto-save moves KataGo plays, to avoid them in future games.
646
+ # You can create a new empty directory and put its path here.
647
+ # If you run parallel instances of KataGo, use different directories if you
648
+ # want them not to share their biases, use the same directory if you want
649
+ # all of them to bias away from past moves that any of them have played.
650
+ # KataGo will also automatically DELETE old data in this directory, so it is
651
+ # recommended that if you do share the same directory between parallel instances,
652
+ # that they all use the same settings that affect data saving/deletion.
653
+ # autoAvoidRepeatDir = PATH_TO_NEW_DIRECTORY
654
+
655
+ # Penalize this much utility per matching move.
656
+ # Values that are too large may lead to bad play. The value of 0.004 is fairly large
657
+ # and might be large enough to result in some early weird/bad moves when trying
658
+ # to avoid past games' moves if enough games begin the same way. You can experiment with it.
659
+ # autoAvoidRepeatUtility = 0.004
660
+
661
+ # Per each new move saved, exponentially decay prior saved moves by this factor.
662
+ # This way, the bias against moves from many games ago is gradually phased out.
663
+ # For example, 0.9995 = 1 - 1/2000, so would be roughly 2000 prior moves worth of
664
+ # penalty weight remembered, in steady state. Depending on what turn number range
665
+ # you are saving, this might equate to a different number of games For example
666
+ # saving the first 50 moves per game would make this roughly 2000 / 50 = 40 games
667
+ # worth of memory.
668
+ # autoAvoidRepeatLambda = 0.9995
669
+
670
+ # Affects data saving/deletion.
671
+ # When the number of saved moves exceeds this, outright delete them to avoid too many
672
+ # files and disk space building up. Also may affect the speed of saving/loading on start
673
+ # of each game if this is set large and a lot of data builds up.
674
+ # autoAvoidRepeatMaxPoses = 10000
675
+
676
+ # Affects data saving/deletion.
677
+ # Only save data for moves within this turn number range of those games.
678
+ # E.g. setting autoAvoidRepeatMinTurnNumber to a number like 4 or 5 would tend to make
679
+ # KataGo not develop a bias against the initial 3-4 and 4-4 corner moves in almost every game.
680
+ # autoAvoidRepeatMinTurnNumber = 0
681
+ # autoAvoidRepeatMaxTurnNumber = 50
682
+
683
+ # Affects data saving/deletion.
684
+ # Within a single run of a program, wait to accumulate this many samples
685
+ # (possibly across multiple clear_boards/games) before saving the data.
686
+ # Can help to avoid writing too many small files to disk, especially when GTP is used
687
+ # in a way that clears the board very frequently (e.g. gtp2ogs pooled manager).
688
+ # autoAvoidRepeatSaveChunkSize = 200
689
+
690
+ # ===========================================================================
691
+ # Avoid SGF patterns
692
+ # ===========================================================================
693
+ # The parameters in this section provide a way to avoid moves that follow
694
+ # specific patterns based on a set of SGF files loaded upon startup.
695
+ # This is basically the same as the above "Automatic avoid patterns" section
696
+ # above except you supply your own SGF files to avoid moves from.
697
+ # Uncomment them to use this feature. Additionally, if the SGF file
698
+ # contains the string %SKIP% in a comment on a move, that move will be
699
+ # ignored for this purpose.
700
+
701
+ # Load SGF files from this directory when the engine is started
702
+ # (only on startup, will not reload unless engine is restarted)
703
+ # avoidSgfPatternDirs = path/to/directory/with/sgfs/
704
+ # You can also surround the file path in double quotes if the file path contains trailing spaces or hash signs.
705
+ # Within double quotes, backslashes are escape characters.
706
+ # avoidSgfPatternDirs = "path/to/directory/with/sgfs/"
707
+
708
+ # Penalize this much utility per matching move.
709
+ # Set this negative if you instead want to favor SGF patterns instead of
710
+ # penalizing them. This number does not need to be large, even 0.001 will
711
+ # make a difference. Values that are too large may lead to bad play.
712
+ # avoidSgfPatternUtility = 0.001
713
+
714
+ # Optional - load only the newest this many files
715
+ # avoidSgfPatternMaxFiles = 20
716
+
717
+ # Optional - Penalty is multiplied by this per each older SGF file, so that
718
+ # old SGF files matter less than newer ones.
719
+ # avoidSgfPatternLambda = 0.90
720
+
721
+ # Optional - pay attention only to moves made by players with this name.
722
+ # For example, set it to the name that your bot's past games will show up
723
+ # as in the SGF, so that the bot will only avoid repeating moves that itself
724
+ # made in past games, not the moves that its opponents made.
725
+ # avoidSgfPatternAllowedNames = my-ogs-bot-name1,my-ogs-bot-name2
726
+
727
+ # Optional - Ignore moves in SGF files that occurred before this turn number.
728
+ # avoidSgfPatternMinTurnNumber = 0
729
+
730
+ # For more avoid patterns:
731
+ # You can also specify a second set of parameters, and a third, fourth,
732
+ # etc. by numbering 2,3,4,...
733
+ #
734
+ # avoidSgf2PatternDirs = ...
735
+ # avoidSgf2PatternUtility = ...
736
+ # avoidSgf2PatternMaxFiles = ...
737
+ # avoidSgf2PatternLambda = ...
738
+ # avoidSgf2PatternAllowedNames = ...
739
+ # avoidSgf2PatternMinTurnNumber = ...
740
+
katrain/kataGO2/gtp_human5k_example.cfg ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # This is an example config for configuring KataGo to attempt to imitate a weaker human player.
3
+ # Running with this config requires giving a human SL model b18c384nbt-humanv0.bin.gz
4
+ # on the command line such as:
5
+ # ./katago gtp -config gtp_human5k_example.cfg -model your_favorite_normal_model_for_katago.bin.gz -human-model b18c384nbt-humanv0.bin.gz
6
+ # You can obtain the human model at https://github.com/lightvector/KataGo/releases/tag/v1.15.0
7
+
8
+ # Below, the most important parts of the config for human-like play are commented.
9
+ # See the original gtp_example for comments on other parameters.
10
+
11
+ # For another useful guide on human-style analysis, see here:
12
+ # https://github.com/lightvector/KataGo/blob/master/docs/Analysis_Engine.md#human-sl-analysis-guide
13
+
14
+ # It is ALSO possible to pass in simply '-model b18c384nbt-humanv0.bin.gz' and NOT
15
+ # pass in -human-model, i.e. use the human model as if it were KataGo's normal neural net.
16
+ # If you do that, you need to use a config more like the normal gtp_example.cfg, not this config!
17
+ # Keep in mind that if using the model normally, or if using -human-model but also altering
18
+ # parameters below to blend in some of KataGo's search, KataGo's play might NOT be very human-like,
19
+ # or might be human-like but play at a strength very different than the humanSLProfile.
20
+ # You can experiment, some of the comments below hopefully will help illustrate things too.
21
+
22
+ logDir = gtp_logs
23
+ logAllGTPCommunication = true
24
+ logSearchInfo = true
25
+ logSearchInfoForChosenMove = false
26
+ logToStderr = false
27
+
28
+ # Use these rules by default, but a GUI or GTP controller might override this.
29
+ rules = japanese
30
+
31
+ # When using -human-model, we only resign when far behind since a weaker player
32
+ # might continue to fight much longer than a strong bot normally would.
33
+ allowResignation = true
34
+ resignThreshold = -0.99
35
+ resignConsecTurns = 20
36
+ resignMinScoreDifference = 40
37
+ resignMinMovesPerBoardArea = 0.4
38
+
39
+ # Note: unless you change other parameters too, by default increasing visits won't do much.
40
+ # If humanSLChosenMoveProp = 1.0 AND humanSLChosenMovePiklLambda is a large number,
41
+ # then KataGo's normal search is ignored except for possibly choosing whether to pass/resign,
42
+ # so more visits will have no effect on play. Only the raw model is used for move selection.
43
+ # Still, having some visits is good for ensuring good pass/resign judgment, this is what the 40 visits
44
+ # are used for unless you change other parameters to make use of them for move choice too.
45
+ maxVisits = 40
46
+ numSearchThreads = 1
47
+ lagBuffer = 1.0
48
+
49
+ # Rough scale in seconds to randomly delay moving, so as not to respond instantly.
50
+ # Some moves will delay longer, some moves will delay a little less.
51
+ delayMoveScale = 2.0
52
+ delayMoveMax = 10.0
53
+
54
+ # ===========================================================================
55
+ # HUMAN SL PARAMETERS
56
+ # ===========================================================================
57
+
58
+ # The most important parameter for human-like play configuration!
59
+ # Choose the "profile" of players that the human SL model will imitate.
60
+ # Available options are:
61
+ # preaz_{RANK from 20k to 9d} - imitate player of given rank, before AlphaZero opening style became popular
62
+ # rank_{RANK from 20k to 9d} - imitate player of given rank, after human openings changed due to AlphaZero.
63
+ # preaz_{BRANK}_{WRANK} or rank_{BRANK}_{WRANK} - same, but imitate how black with the rank BR and white
64
+ # with the rank WR would play against each other, knowing that the other player is stronger/weaker than them.
65
+ # Warning: for rank differences > 9 ranks, or drastically mis-matched to the handicap used in the game,
66
+ # this may be out of distribution due to lack of training data and the model might not behave well! Experiment with care.
67
+ # proyear_{YEAR from 1800 to 2023} - imitate historical pros or insei from given year.
68
+ # NOTE: for pros or high-dan ranks the raw human SL model is NOT expected to match the *strength* of the players imitated
69
+ # because it does no search! Go AI reaching high-dan/pro ranks virtually always requires search.
70
+ # To increase strength and make use of the visits in the search, adjust values like humanSLChosenMovePiklLambda and temperature. See:
71
+ # https://github.com/lightvector/KataGo/blob/master/docs/Analysis_Engine.md#how-to-get-stronger-human-style-play
72
+ humanSLProfile = preaz_5k
73
+
74
+ # The probability that we should play a HUMAN-like move, rather than playing KataGo's move.
75
+ # Applies BEFORE temperature.
76
+ humanSLChosenMoveProp = 1.0
77
+
78
+ # If true, ignore the human SL model's choice of when to pass, and still use KataGo to determine that.
79
+ # The human SL model, in theory, is not guaranteed to be reliable at when to pass for all profiles,
80
+ # since e.g. some historical games omit passes.
81
+ humanSLChosenMoveIgnorePass = true
82
+
83
+ # By default humanSLChosenMovePiklLambda is a large number which effectively disables it.
84
+ # Setting it to a smaller number will "suppress" human-like moves that KataGo disapproves of.
85
+ # In particular, if set to, for example, 0.4 when KataGo judges a human SL move to lose 0.4 utility,
86
+ # it will substantially suppress the chance of playing that move (in particular, by a factor of exp(1)).
87
+ # Less-bad moves will also be suppressed, but not by as much, e.g. a move losing 0.2 would get lowered
88
+ # by a factor of exp(0.5).
89
+ # As configured lower down, utilities by default range from -1.0 (loss) to +1.0 (win), plus up to +/- 0.3 for score.
90
+ # WARNING: ONLY moves that KataGo actually searches will get suppressed! If a move is so bad that KataGo
91
+ # rejects it without searching it, it will NOT get suppressed.
92
+ # Therefore, to use humanSLChosenMovePiklLambda, it is STRONGLY recommended that you also use something
93
+ # like humanSLRootExploreProbWeightless to ensure most human moves including bad moves get searched,
94
+ # and ALSO use at least hundreds and ideally thousands of maxVisits, to ensure enough visits.
95
+ humanSLChosenMovePiklLambda = 100000000
96
+
97
+ # These parameters tell KataGo to use the human SL policy for exploration during search.
98
+ # Each of these specifies the probability that KataGo will perform PUCT using the Human SL policy to
99
+ # explore different moves, rather than using KataGo's normal policy, after a certain minimal number of visits.
100
+ # "Root": applies only at the root of the search
101
+ # "Pla": applies during non-root nodes of the search where it is katago's turn.
102
+ # "Opp": applies during non-root nodes of the search where it is the opponent's turn.
103
+ # "Weightless": search the move to evaluate it, but do NOT allow this visit to affect the parent's average utility.
104
+ # "Weightful": search the move to evaluate it, and DO allow this visit to affect the parent's average utility.
105
+ # For example, humanSLRootExploreProbWeightless = 0.5 would tell KataGo at the root of the search to spend
106
+ # 50% of its visits to judge different possible human moves, but NOT to use those visits for determining the
107
+ # value of the position (avoiding biasing the utility if some human SL moves are very bad).
108
+ # If you don't understand these well, ask for help or look up some online explainers for MCTS (Monte-Carlo Tree Search).
109
+ humanSLRootExploreProbWeightless = 0.0
110
+ humanSLRootExploreProbWeightful = 0.0
111
+ humanSLPlaExploreProbWeightless = 0.0
112
+ humanSLPlaExploreProbWeightful = 0.0
113
+ humanSLOppExploreProbWeightless = 0.0
114
+ humanSLOppExploreProbWeightful = 0.0
115
+
116
+ # When using the human SL policy for exploration during search, use this cPUCT.
117
+ # This only has an effect if at least one of humanSL{Root,Pla,Opp}ExploreProbWeight{less,ful} is nonzero.
118
+ humanSLCpuctExploration = 0.50
119
+
120
+ # Same as humanSLCpuctExploration, but NEVER diminshes its exploration no matter how many visits are used.
121
+ # Normally, PUCT will sharpen with visits and spend a diminishing proportion of visits on moves with lower utility.
122
+ # This is the coefficient for a term that does NOT diminish, i.e. if this is 0.2, then roughly moves within
123
+ # 0.2 utility (about 10% winrate) of the best move will forever continue getting a decent fraction of visits,
124
+ # smoothly falling off for greater utility differences.
125
+ # Note that in combination with Weightful exploration above, if used for Opp exploration, this could be used
126
+ # to model an opponent that will always have some chance to make small mistakes no matter how deep they search.
127
+ # If further this was increased to a very large value, it would model an opponent that always played according
128
+ # to the human SL raw policy. These might be interesting to experiment with for handicap play.
129
+ humanSLCpuctPermanent = 0.2
130
+
131
+
132
+ # ===========================================================================
133
+ # OTHER USEFUL PARAMETERS FOR HUMAN PLAY ADJUSTMENT
134
+ # ===========================================================================
135
+
136
+ # Choosing temperature near 1, and restricting it to only affect moves already below 1% chance,
137
+ # so that we sample close to the full range of human play.
138
+ # You can also reduce the temperature to settings more like the plain gtp_example.cfg.
139
+ # Then, rather than imitating a realistic human player, it will be more like imitating the
140
+ # *majority vote* of players at that rank. For example it would avoid a lot of blunders
141
+ # that players of that level would make, because even if players often blunder, the *majority vote*
142
+ # of players would be much less likely to select any given blunder that an individual player would.
143
+ chosenMoveTemperatureEarly = 0.85
144
+ chosenMoveTemperature = 0.70
145
+ chosenMoveTemperatureHalflife = 80
146
+ chosenMoveTemperatureOnlyBelowProb = 0.01 # temperature only starts to dampen moves below this
147
+ chosenMoveSubtract = 0
148
+ chosenMovePrune = 0
149
+
150
+ # Use a small NN cache to save memory since we're using very low visits anyways. You can increase
151
+ # these back to more like the plain gtp_example.cfg if you are doing more extensive searches to
152
+ # improve performance.
153
+ nnCacheSizePowerOfTwo = 17
154
+ nnMutexPoolSizePowerOfTwo = 14
155
+
156
+ # ===========================================================================
157
+ # PARAMETERS CHANGED FROM DEFAULT TO MAKE SURE HUMAN SL USAGE WORKS WELL
158
+ # ===========================================================================
159
+
160
+ # Make sure to take into account the recent moves in the game, don't ignore history.
161
+ # This will produce the best imitation/prediction, since humans definitely do play differently based on where the
162
+ # most recent moves in the game were, rather than coming fresh to the board position on every turn.
163
+ ignorePreRootHistory = false
164
+ analysisIgnorePreRootHistory = false
165
+
166
+ # Average 2 neural net samples at the root - ensures a bit smoother probabilities and results in
167
+ # 8 * 7 / 2 = 28 possible policies instead of 8 possibilities.
168
+ rootNumSymmetriesToSample = 2
169
+ # LCB improves strength for KataGo, but we disable it so it doesn't mess up move selection when blending human play.
170
+ useLcbForSelection = false
171
+
172
+ # We disable dynamicScoreUtilityFactor - the human SL model can make score predictions that are a bit swingy, so
173
+ # if we do want to do a search that blends human SL values in (TODO there isn't a way to do this anyways yet), using
174
+ # static score utility might be a bit more stable.
175
+ winLossUtilityFactor = 1.0
176
+ staticScoreUtilityFactor = 0.30
177
+ dynamicScoreUtilityFactor = 0.00
178
+
179
+ # Uncertainty improves strength for KataGo normally, but messes with the weights of playouts in complicated ways,
180
+ # so lets turn it off when doing human SL stuff.
181
+ useUncertainty = false
182
+
183
+ # Subtree value bias improves strength for KataGo normally, but messes with the values of nodes in complicated ways,
184
+ # so let's turn it off when doing human SL stuff.
185
+ subtreeValueBiasFactor = 0.0
186
+
187
+ # Noise pruning prunes out weight from moves that KataGo thinks are bad, but if we are doing human SL we might actively
188
+ # want to be playing or exploring and weighting "bad" but human-like moves. So disable this.
189
+ # Warning: when this is false, there is much less protection against the search severely misbehaving when you use too many threads.
190
+ # Make sure not to set numSearchThreads to be too large - at a minimum, keep at least a 20x buffer between
191
+ # the number of visits you use and the number of threads you use.
192
+ # (as an aside, ideally, you want to have visits be a sufficient factor larger than threads EVEN when
193
+ # useNoisePruning is true, this parameter just blunts the worst effects but doesn't entirely fix the badness).
194
+ useNoisePruning = false
katrain/kataGO2/gtp_human9d_search_example.cfg ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # This is an example config for configuring KataGo to attempt to imitate a 9d player and then
3
+ # further improving the strength (to possibly modestly superhuman) using KataGo's evaluations and search.
4
+
5
+ # By contrast, gtp_human5k_example.cfg uses only the raw neural net. Raw neural nets like the
6
+ # HumanSL net without search do NOT play accurately enough to reach top human levels.
7
+ # If you were to take gtp_human5k_example.cfg and swap out preaz_5k -> preaz_9d,
8
+ # despite *attempting* to imitate a 9d player, it would not actually achieve that strength.
9
+
10
+ # Due to the use of search, this config plays significantly stronger, and depending on how
11
+ # you adjust visits and parameters and what `-model` you use for KataGo's model, can probably
12
+ # reach 9d strength or higher.
13
+
14
+ # Using the search greatly reduces the "humanness" of the play in exchange for strength,
15
+ # but still retains noticeable bias from the human SL policy and may still play somewhat
16
+ # "human-style" openings and moves.
17
+
18
+ # Running with this config requires giving a human SL model b18c384nbt-humanv0.bin.gz
19
+ # on the command line such as:
20
+ # ./katago gtp -config gtp_human5k_example.cfg -model your_favorite_normal_model_for_katago.bin.gz -human-model b18c384nbt-humanv0.bin.gz
21
+ # You can obtain the human model at https://github.com/lightvector/KataGo/releases/tag/v1.15.0
22
+
23
+ # You can compare the config parameters here with gtp_human5k_example.cfg and see the differences
24
+ # and how they were achieved.
25
+ # gtp_human5k_example.cfg also has a bit more explanation on many of the parameters.
26
+
27
+ logDir = gtp_logs
28
+ logAllGTPCommunication = true
29
+ logSearchInfo = true
30
+ logSearchInfoForChosenMove = false
31
+ logToStderr = false
32
+
33
+ rules = japanese
34
+
35
+ # Adjusted resignation settings compared to gtp_human5k_example.cfg, to resign a bit more easily.
36
+ allowResignation = true
37
+ resignThreshold = -0.98 # was -0.99 in gtp_human5k_example.cfg
38
+ resignConsecTurns = 10 # was 20 in gtp_human5k_example.cfg
39
+ resignMinScoreDifference = 20 # was 40 in gtp_human5k_example.cfg
40
+ resignMinMovesPerBoardArea = 0.40
41
+
42
+ # maxVisits: With a config like this, more visits *will* make it stronger and fewer visits will make it weaker.
43
+ # But strength will NOT scale indefinitely upward with visits unlike KataGo's normal config without human SL.
44
+ # This is due to the strong bias of the human SL network.
45
+ # You can reduce this number if you are on weaker hardware. It may reduce strength a bit but will still
46
+ # provide a huge strength boost over using the humanSL network alone as in gtp_human5k_example.cfg
47
+ # It's NOT recommended to reduce this below about 30-40 visits, since that will result in too few explorations of a variety of moves.
48
+ # If you want to adjust strength, see humanSLChosenMovePiklLambda instead.
49
+ maxVisits = 400 # 40 in gtp_human5k_example.cfg.
50
+
51
+ # Having more than one thread speeds up search when visits are larger.
52
+ # Make sure the number of threads is much smaller than the number of visits, however.
53
+ numSearchThreads = 8 # 1 in gtp_human5k_example.cfg.
54
+ lagBuffer = 1.0
55
+
56
+ # Rough scale in seconds to randomly delay moving, so as not to respond instantly.
57
+ # Some moves will delay longer, some moves will delay a little less.
58
+ delayMoveScale = 2.0
59
+ delayMoveMax = 10.0
60
+
61
+ # Imitate human amateur 9d players (roughly based on ~KGS ranks)
62
+ humanSLProfile = preaz_9d # was preaz_5k in gtp_human5k_example.cfg
63
+ humanSLChosenMoveProp = 1.0
64
+ humanSLChosenMoveIgnorePass = true
65
+
66
+ # When a move starts to lose more than 0.08 utility (several percent winrate), downweight it.
67
+ # Increase this number to reduce the strength and use the human SL policy more and KataGo's evaluations less.
68
+ # Decrease this number a little more to improve strength even further and play less human-like.
69
+ # (although below 0.02 you probably are better off going back to a normal KataGo config and scaling visits).
70
+ # Since this uses KataGo's judgment, even at large values and with a weak-ranked humanSLProfile
71
+ # this may still produce a very strong player.
72
+ # To calibrate for some but less strength gain, it will take experimentation.
73
+ # In addition to increasing this value a lot, e.g. (0.2, 0.5, 1.0, 2.0,...)
74
+ # you can also try using old/small KataGo nets (e.g. b6c96, b10c128), reducing visits (though reducing below about 30-40
75
+ # is NOT recommended), or using the humanSLModel itself as the main "-model".
76
+ humanSLChosenMovePiklLambda = 0.08 # was 100000000 in gtp_human5k_example.cfg.
77
+
78
+ # Spend 80% of visits to explore humanSL moves to ensure they get evaluations to use with humanSLChosenMovePiklLambda
79
+ humanSLRootExploreProbWeightless = 0.8 # was 0 in gtp_human5k_example.cfg.
80
+ humanSLRootExploreProbWeightful = 0.0
81
+ humanSLPlaExploreProbWeightless = 0.0
82
+ humanSLPlaExploreProbWeightful = 0.0
83
+ humanSLOppExploreProbWeightless = 0.0
84
+ humanSLOppExploreProbWeightful = 0.0
85
+
86
+ humanSLCpuctExploration = 0.50
87
+ # Explore moves very widely according to the human SL policy even if they lose up to about 2.0 utility.
88
+ # This is not the largest this value can go, you increase it further to do even less filtering based on winrates
89
+ # as far as move exploration goes.
90
+ humanSLCpuctPermanent = 2.0 # was 0.2 in gtp_human5k_example.cfg.
91
+
92
+ # Reduced temperature settings - reduce the chance of picking unlikely low policy or low-value moves.
93
+ chosenMoveTemperatureEarly = 0.70 # was 0.85 in gtp_human5k_example.cfg.
94
+ chosenMoveTemperature = 0.25 # was 0.70 in gtp_human5k_example.cfg.
95
+ chosenMoveTemperatureHalflife = 30 # was 80 in gtp_human5k_example.cfg.
96
+ chosenMoveTemperatureOnlyBelowProb = 1.0 # was 0.01 in gtp_human5k_example.cfg.
97
+ chosenMoveSubtract = 0
98
+ chosenMovePrune = 0
99
+
100
+ # Since we're doing more search, increase size of neural net cache a bit for performance.
101
+ nnCacheSizePowerOfTwo = 20 # was 17 in gtp_human5k_example.cfg.
102
+ nnMutexPoolSizePowerOfTwo = 14
103
+
104
+ ignorePreRootHistory = false
105
+ analysisIgnorePreRootHistory = false
106
+
107
+ rootNumSymmetriesToSample = 2
108
+ useLcbForSelection = false
109
+
110
+ # Make score utility count a bit more
111
+ winLossUtilityFactor = 1.0
112
+ staticScoreUtilityFactor = 0.5 # was 0.3 in gtp_human5k_example.cfg.
113
+ dynamicScoreUtilityFactor = 0.5 # was 0.0 in gtp_human5k_example.cfg.
114
+
115
+ useUncertainty = false
116
+ subtreeValueBiasFactor = 0.0
117
+ useNoisePruning = false
katrain/kataGO2/katago.exe ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:911a375bf182288c769d8a24b8e43d0a6b42487ce0b5e93c7391f4e929e35ba2
3
+ size 4812800
katrain/kataGO2/libcrypto-3-x64.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f6560dc57d177417932d04295fcb5f5b9b3414bd3baa75897d8e8bb49e904b7
3
+ size 5148672
katrain/kataGO2/libssl-3-x64.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:45434db8a17a9ddf3953d85de7e2e4d0c22866593c490e18128ee5c7931db6d1
3
+ size 776704
katrain/kataGO2/libz.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f41b06ae70e84ce4215e657a9fed61b71b590423d0b19687dced8f95d759b319
3
+ size 95232
katrain/kataGO2/libzip.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c3151e9eab8bddffffd0cd180a5258b0de6cb8e780e47f7bd61b48875c1522f
3
+ size 184832
katrain/kataGO2/match_example.cfg ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Example config for C++ match runner
2
+ # This is an example template config for the "match" subcommand of KataGo. e.g:
3
+ # ./katago match -config-file configs/match_example.cfg -log-file match.log -sgf-output-dir match_sgfs/
4
+ #
5
+ # On a good GPU, the match subcommand enables testing of KataGo nets against each other
6
+ # or a net against itself with different parameters vastly faster than anything
7
+ # else, because multiple games can share GPU batching.
8
+ #
9
+ # Beware however of using this to test differing numbers of threads or test time-based search limits.
10
+ # Because many games will be run simultaneously, they will compete from each other for compute power,
11
+ # and although the total will run much faster than if you had run them one by one, you might also get
12
+ # substantially different results not reflective of the strength of a configuration when run in a real
13
+ # match setting, on a machine by itself. For fixed numbers of visits or playouts instead of fixed time,
14
+ # and with numSearchThreads = 1, there should be no problem though, because then the compute time has
15
+ # no influence on the result of the computation.
16
+ #
17
+ # See gtp config for descriptions of most of these params.
18
+ #
19
+ # For almost any parameter in this config that is related to a bot, rather than to the match as a whole
20
+ # (so, visits, search parameters, model files, etc. but NOT the rules, max games, log info, etc)
21
+ # you can specify them differentially between different bots by appending the index of the bot.
22
+ # For example, if you were testing different numbers of visits, you could try:
23
+ #
24
+ # numBots = 3
25
+ # botName0 = lowVisits
26
+ # botName1 = midVisits
27
+ # botName2 = highVisits
28
+ #
29
+ # maxVisits0 = 100
30
+ # maxVisits1 = 300
31
+ # maxVisits2 = 1000
32
+ #
33
+ # Or, if you were testing different neural nets, with different search configurations, you could do:
34
+ #
35
+ # nnModelFile0 = path/to/first/model/file.bin.gz
36
+ # nnModelFile1 = path/to/second/model/file.bin.gz
37
+ #
38
+ # And specify different search parameters for them if you wanted:
39
+ # cpuctExploration0 = 1.5
40
+ # cpuctExploration1 = 1.3
41
+
42
+ # Logs------------------------------------------------------------------------------------
43
+
44
+ logSearchInfo = false
45
+ logMoves = false
46
+ logGamesEvery = 50
47
+ logToStdout = true
48
+
49
+ # Bots-------------------------------------------------------------------------------------
50
+ # For multiple bots, you can specify their names as botName0,botName1, etc.
51
+ # If the bots are using different models, specify nnModelFile0, nnModelFile1, etc.
52
+
53
+ numBots=1
54
+ botName=FOO
55
+ nnModelFile=PATH_TO_MODEL
56
+
57
+ # These bots will not play each other, but will still be opponents for other bots
58
+ # secondaryBots = 0,1,3
59
+ # Only these bots will actually play games. Useful if you have a config file with many more
60
+ # bots defined but you want to only selectively enable a few.
61
+ # includeBots = 0,2,6
62
+
63
+ # Specify extra pairings of bots to play.
64
+ # extraPairs = 0-4,1-4
65
+ # Uncomment and set this to true if you don't want extraPairs to be mirrored by color.
66
+ # (i.e. 0-4 should mean 0 plays black and 4 plays white only, rather than having two games with swapped colors).
67
+ # extraPairsAreOneSidedBW = false
68
+
69
+ # Match-----------------------------------------------------------------------------------
70
+ numGameThreads=8 # How many games to run in parallel at a time?
71
+
72
+ numGamesTotal=1000000
73
+ maxMovesPerGame=1200
74
+
75
+ allowResignation = true
76
+ resignThreshold = -0.95
77
+ resignConsecTurns = 6
78
+
79
+ # Rules------------------------------------------------------------------------------------
80
+ # See https://lightvector.github.io/KataGo/rules.html for a description of the rules.
81
+
82
+ koRules = SIMPLE,POSITIONAL,SITUATIONAL
83
+ scoringRules = AREA,TERRITORY
84
+ taxRules = NONE,SEKI,ALL
85
+ multiStoneSuicideLegals = false,true
86
+ hasButtons = false,true
87
+
88
+ bSizes = 19,13,9
89
+ bSizeRelProbs = 90,5,5
90
+
91
+ # If you want to specify exact distributions of boards, including rectangles, specify this instead
92
+ # of bSizes. E.g. to randomize between a 7x5, a 9x12, and a 10x10 board with probabilities 25%, 25%, 50%:
93
+ # bSizesXY=7-5,9-12,10-10
94
+ # bSizeRelProbs = 1,1,2
95
+
96
+ komiAuto = True # Automatically adjust komi to what the neural nets think are fair
97
+ # komiMean = 7.5 # Specify explicit komi
98
+ # policyInitAreaProp = 0
99
+ # compensateAfterPolicyInitProb = 1.0 # Additionally make komi fair this often after the high-temperature moves.
100
+ # policyInitAreaTemperature = 1
101
+ handicapProb = 0.0
102
+ handicapCompensateKomiProb = 1.0
103
+ # numExtraBlackFixed = 3 # When playing handicap games, always use exactly this many extra black moves
104
+
105
+ # Search limits-----------------------------------------------------------------------------------
106
+
107
+ maxVisits = 500
108
+ # maxPlayouts = 300
109
+ # maxTime = 60
110
+
111
+ numSearchThreads = 1
112
+
113
+ # GPU Settings-------------------------------------------------------------------------------
114
+
115
+ nnMaxBatchSize = 32
116
+ nnCacheSizePowerOfTwo = 21
117
+ nnMutexPoolSizePowerOfTwo = 17
118
+ nnRandomize = true
119
+
120
+
121
+ # How many threads should there be to feed positions to the neural net?
122
+ # Server threads are indexed 0,1,...(n-1) for the purposes of the below GPU settings arguments
123
+ # that specify which threads should use which GPUs.
124
+ # NOTE: This parameter is probably ONLY useful if you have multiple GPUs, since each GPU will need a thread.
125
+ # If you're tuning single-GPU performance, use numSearchThreads instead.
126
+ numNNServerThreadsPerModel = 1
127
+
128
+
129
+ # TENSORRT GPU settings--------------------------------------
130
+ # These only apply when using the TENSORRT version of KataGo.
131
+
132
+ # IF USING ONE GPU: optionally uncomment and change this if the GPU you want to use turns out to be not device 0
133
+ # trtDeviceToUse = 0
134
+
135
+ # IF USING TWO GPUS: Uncomment these two lines (AND set numNNServerThreadsPerModel above):
136
+ # trtDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
137
+ # trtDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
138
+
139
+ # IF USING THREE GPUS: Uncomment these three lines (AND set numNNServerThreadsPerModel above):
140
+ # trtDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0
141
+ # trtDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1
142
+ # trtDeviceToUseThread2 = 2 # change this if the third GPU you want to use turns out to be not device 2
143
+
144
+ # You can probably guess the pattern if you have four, five, etc. GPUs.
145
+
146
+
147
+ # CUDA GPU settings--------------------------------------
148
+ # For the below, "model" refers to a neural net, from the nnModelFile parameter(s) above.
149
+ # cudaGpuToUse = 0 #use gpu 0 for all server threads (numNNServerThreadsPerModel) unless otherwise specified per-model or per-thread-per-model
150
+ # cudaGpuToUseModel0 = 3 #use gpu 3 for model 0 for all threads unless otherwise specified per-thread for this model
151
+ # cudaGpuToUseModel1 = 2 #use gpu 2 for model 1 for all threads unless otherwise specified per-thread for this model
152
+ # cudaGpuToUseModel0Thread0 = 3 #use gpu 3 for model 0, server thread 0
153
+ # cudaGpuToUseModel0Thread1 = 2 #use gpu 2 for model 0, server thread 1
154
+
155
+ # cudaUseFP16 = auto
156
+ # cudaUseNHWC = auto
157
+
158
+
159
+ # ------------------------------
160
+ # Metal GPU settings
161
+ # ------------------------------
162
+ # These only apply when using the METAL version of KataGo.
163
+
164
+ # For one Metal instance: KataGo will automatically use the default device.
165
+ # metalDeviceToUse = 0
166
+
167
+ # For two Metal instance: Uncomment these options, AND set numNNServerThreadsPerModel = 2 above.
168
+ # This will create two Metal instances, best overlapping the GPU and CPU execution.
169
+ # metalDeviceToUseThread0 = 0
170
+ # metalDeviceToUseThread1 = 1
171
+
172
+ # The pattern continues for additional Metal instances.
173
+
174
+
175
+ # OpenCL GPU settings--------------------------------------
176
+ # These only apply when using OpenCL as the backend for inference.
177
+ # (For GTP, we only ever have one model, when playing matches, we might have more than one, see match_example.cfg)
178
+
179
+ # Default behavior is just to always use gpu 0, you will want to uncomment and adjust one or more of these lines
180
+ # to take advantage of a multi-gpu machine
181
+ # openclGpuToUse = 0 #use gpu 0 for all server threads (numNNServerThreadsPerModel) unless otherwise specified per-model or per-thread-per-model
182
+ # openclGpuToUseModel0 = 3 #use gpu 3 for model 0 for all threads unless otherwise specified per-thread for this model
183
+ # openclGpuToUseModel1 = 2 #use gpu 2 for model 1 for all threads unless otherwise specified per-thread for this model
184
+ # openclGpuToUseModel0Thread0 = 3 #use gpu 3 for model 0, server thread 0
185
+ # openclGpuToUseModel0Thread1 = 2 #use gpu 2 for model 0, server thread 1
186
+
187
+ # Uncomment to tune OpenCL for every board size separately, rather than only the largest possible size
188
+ # openclReTunePerBoardSize = true
189
+
190
+ # openclUseFP16 = auto
191
+
192
+
193
+ # Eigen-specific settings--------------------------------------
194
+ # These only apply when using the Eigen (pure CPU) version of KataGo.
195
+
196
+ # This is the number of CPU threads for evaluating the neural net on the Eigen backend.
197
+ # It defaults to numSearchThreads.
198
+ # numEigenThreadsPerModel = X
199
+
200
+
201
+ # Root move selection and biases------------------------------------------------------------------------------
202
+ # Uncomment and edit any of the below values to change them from their default.
203
+ # Values in this section can be specified per-bot as well
204
+
205
+ chosenMoveTemperatureEarly = 0.60
206
+ # chosenMoveTemperatureHalflife = 19
207
+ chosenMoveTemperature = 0.20
208
+ # chosenMoveSubtract = 0
209
+ # chosenMovePrune = 1
210
+
211
+ # rootNumSymmetriesToSample = 1
212
+
213
+ # useLcbForSelection = true
214
+ # lcbStdevs = 5.0
215
+ # minVisitPropForLCB = 0.15
216
+
217
+ # Internal params------------------------------------------------------------------------------
218
+ # Uncomment and edit any of the below values to change them from their default.
219
+ # Values in this section can be specified per-bot as well
220
+
221
+ # winLossUtilityFactor = 1.0
222
+ # staticScoreUtilityFactor = 0.10
223
+ # dynamicScoreUtilityFactor = 0.30
224
+ # dynamicScoreCenterZeroWeight = 0.20
225
+ # dynamicScoreCenterScale = 0.75
226
+ # noResultUtilityForWhite = 0.0
227
+ # drawEquivalentWinsForWhite = 0.5
228
+
229
+ # cpuctExploration = 0.9
230
+ # cpuctExplorationLog = 0.4
231
+ # fpuReductionMax = 0.2
232
+ # rootFpuReductionMax = 0.1
233
+ # fpuParentWeightByVisitedPolicy = true
234
+ # valueWeightExponent = 0.25
235
+ # rootEndingBonusPoints = 0.5
236
+ # rootPruneUselessMoves = true
237
+ # subtreeValueBiasFactor = 0.45
238
+ # subtreeValueBiasWeightExponent = 0.85
239
+ # useGraphSearch = true
240
+ # rootPolicyOptimism = 0.2
241
+ # policyOptimism = 1.0
242
+
243
+ # nodeTableShardsPowerOfTwo = 16
244
+ # numVirtualLossesPerThread = 1
katrain/kataGO2/msvcp140.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:003da4807acdc912e67edba49be574daa5238bb7acff871d8666d16f8072ff89
3
+ size 579920
katrain/kataGO2/msvcp140_1.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a61901a4d719a3e1cc4fa8f629218571330331e8dde2ef1f05c34845b180928e
3
+ size 35664
katrain/kataGO2/msvcp140_2.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3d15cfe238ac1863bbe65501f05d561162f28032b80f2c8d9a1fc7b22f8445a2
3
+ size 197488
katrain/kataGO2/msvcp140_atomic_wait.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0fcf613254644c2ea451a693d7737741b8041f11decb8feffd3b34e00220620a
3
+ size 50032
katrain/kataGO2/msvcp140_codecvt_ids.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a714b498ab7b4b0508e69f66ca15196df605844d4d6d5e43969a5f1fd7d7e9e4
3
+ size 31600
katrain/kataGO2/vcruntime140.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a8f950b4357ec12cfccddc9094cca56a3d5244b95e09ea6e9a746489f2d58736
3
+ size 109392
katrain/kataGO2/vcruntime140_1.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e4b533a94e02c574780e4b333fcf0889f65ed00d39e32c0fbbda2116f185873f
3
+ size 49520
katrain/models2/kata1-b28c512nbt-s10544735488-d5229296520.bin.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:87a9a8cefad1bbdcda9b63089ff03d88fefff692d78217daab9d32ec9bb7a301
3
+ size 271439386
readme.txt CHANGED
@@ -26,26 +26,32 @@ katrain\katrain\core\engine.py
26
 
27
  # 默认配置文件
28
  C:/Users/i/.katrain/config.json
29
- {
30
- "engine": {
31
- "katago": ""katrain/KataGo2/katago.exe"",
32
- "altcommand": "",
33
- "model": "katrain/models2/kata1-b28c512nbt-s10544735488-d5229296520.bin.gz",
34
- "humanlike_model": "",
35
- "config": "katrain/KataGo2/analysis_config.cfg",
36
- "max_visits": 500,
37
- "fast_visits": 25,
38
- "max_time": 8.0,
39
- "wide_root_noise": 0.04,
40
- "_enable_ownership": true
41
- },
42
- "contribute": {
43
- "katago": "",
44
- "config": "katrain/KataGo2/contribute_config.cfg",
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  # 改成这样
47
 
48
 
 
 
49
  katrain\katrain\core\engine.py
50
  class KataGoEngine(BaseEngine):
51
  model = find_package_resource(config["model"])
 
26
 
27
  # 默认配置文件
28
  C:/Users/i/.katrain/config.json
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
+
31
+ # 先删掉 C:/Users/i/.katrain/config.json
32
+ vi katrain\katrain\config.json
33
+ {
34
+ "engine": {
35
+ "katago": "katrain/KataGo2/katago.exe",
36
+ "altcommand": "",
37
+ "model": "katrain/models2/kata1-b28c512nbt-s10544735488-d5229296520.bin.gz",
38
+ "humanlike_model": "",
39
+ "config": "katrain/KataGo2/analysis_config.cfg",
40
+ "max_visits": 500,
41
+ "fast_visits": 25,
42
+ "max_time": 8.0,
43
+ "wide_root_noise": 0.04,
44
+ "_enable_ownership": true
45
+ },
46
+ "contribute": {
47
+ "katago": "",
48
+ "config": "katrain/KataGo2/contribute_config.cfg",
49
+
50
  # 改成这样
51
 
52
 
53
+
54
+
55
  katrain\katrain\core\engine.py
56
  class KataGoEngine(BaseEngine):
57
  model = find_package_resource(config["model"])