# Example config for C++ (non-python) gtp bot # SEE NOTES ABOUT PERFORMANCE AND MEMORY USAGE IN gtp_example.cfg # Logs------------------------------------------------------------------------------------ # Where to output log? logFile = gtp.log # Controls the number of moves after the first move in a variation. # analysisPVLen = 15 # Report winrates for analysis as (BLACK|WHITE|SIDETOMOVE). reportAnalysisWinratesAs = BLACK # Bot behavior--------------------------------------------------------------------------------------- # Handicap ------------- # Assume that if black makes many moves in a row right at the start of the game, then the game is a handicap game. # This is necessary on some servers and for some GUIs and also when initializing from many SGF files, which may # set up a handicap games using repeated GTP "play" commands for black rather than GTP "place_free_handicap" commands. # However, it may also lead to incorrect undersanding of komi if whiteBonusPerHandicapStone = 1 and a server does NOT # have such a practice. # Defaults to true! Uncomment and set to false to disable this behavior. # assumeMultipleStartingBlackMovesAreHandicap = true # Passing and cleanup ------------- # Make the bot never assume that its pass will end the game, even if passing would end and "win" under Tromp-Taylor rules. # Usually this is a good idea when using it for analysis or playing on servers where scoring may be implemented non-tromp-taylorly. # Defaults to true! Uncomment and set to false to disable this. conservativePass = true # When using territory scoring, self-play games continue beyond two passes with special cleanup # rules that may be confusing for human players. This option prevents the special cleanup phases from being # reachable when using the bot for GTP play. # Defaults to true! Uncomment and set to false if you want KataGo to be able to enter special cleanup. # For example, if you are testing it against itself, or against another bot that has precisely implemented the rules # documented at https://lightvector.github.io/KataGo/rules.html # preventCleanupPhase = true # Search limits----------------------------------------------------------------------------------- # By default, if NOT specified in an individual request, limit maximum number of root visits per search to this much maxVisits = 500 # If provided, cap search time at this many seconds # maxTime = 60 # Number of threads to use in each search in parallel for any SINGLE position. # NOTE: Analysis engine can specify number of POSITIONS to be able to search in parallel via command line argument # so this number does not necessarily need to be larger than 1, although you can still set it larger if you prefer # to analyze fewer positions in parallel but spend more threads on each position. # Generally, having more threads on a single position will worsen the quality of search slightly, holding fixed the # number of visits, and thread contention will reduce efficiency, so cross-position parallelization is preferable # to numSearchThreads, but numSearchThreads is preferable if you want to reduce latency, and have individual # searches complete faster by doing fewer of them at a time. numSearchThreads = 6 # GPU Settings------------------------------------------------------------------------------- # Maximum number of positions to send to GPU at once. nnMaxBatchSize = 64 # Cache up to 2 ** this many neural net evaluations in case of transpositions in the tree. nnCacheSizePowerOfTwo = 19 # Size of mutex pool for nnCache is 2 ** this nnMutexPoolSizePowerOfTwo = 16 # Randomize board orientation when running neural net evals? nnRandomize = true # TO USE MULTIPLE GPUS: # Set this to the number of GPUs you have and/or would like to use... # AND if it is more than 1, uncomment the appropriate CUDA or OpenCL section below. # numNNServerThreadsPerModel = 1 # CUDA GPU settings-------------------------------------- # These only apply when using the CUDA version of KataGo. # IF USING ONE GPU: optionally uncomment and change this if the GPU you want to use turns out to be not device 0 # cudaDeviceToUse = 0 # IF USING TWO GPUS: Uncomment these two lines (AND set numNNServerThreadsPerModel above): # cudaDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0 # cudaDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1 # IF USING THREE GPUS: Uncomment these three lines (AND set numNNServerThreadsPerModel above): # cudaDeviceToUseThread0 = 0 # change this if the first GPU you want to use turns out to be not device 0 # cudaDeviceToUseThread1 = 1 # change this if the second GPU you want to use turns out to be not device 1 # cudaDeviceToUseThread2 = 2 # change this if the third GPU you want to use turns out to be not device 2 # You can probably guess the pattern if you have four, five, etc. GPUs. # KataGo will automatically use FP16 or not based on the compute capability of your NVIDIA GPU. If you # want to try to force a particular behavior though you can uncomment these lines and change them # to "true" or "false". E.g. it's using FP16 but on your card that's giving an error, or it's not using # FP16 but you think it should. # cudaUseFP16 = auto # cudaUseNHWC = auto # OpenCL GPU settings-------------------------------------- # These only apply when using the OpenCL version of KataGo. # Uncomment to tune OpenCL for every board size separately, rather than only the largest possible size # openclReTunePerBoardSize = true # IF USING ONE GPU: optionally uncomment and change this if the best device to use is guessed incorrectly. # The default behavior tries to guess the 'best' GPU or device on your system to use, usually it will be a good guess. # openclDeviceToUse = 0 # IF USING TWO GPUS: Uncomment these two lines and replace X and Y with the device ids of the devices you want to use. # It might NOT be 0 and 1, some computers will have many OpenCL devices. You can see what the devices are when # KataGo starts up - it should print or log all the devices it finds. # (AND also set numNNServerThreadsPerModel above) # openclDeviceToUseThread0 = X # openclDeviceToUseThread1 = Y # 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. # It might NOT be 0 and 1 and 2, some computers will have many OpenCL devices. You can see what the devices are when # KataGo starts up - it should print or log all the devices it finds. # (AND also set numNNServerThreadsPerModel above) # openclDeviceToUseThread0 = X # openclDeviceToUseThread1 = Y # openclDeviceToUseThread2 = Z # You can probably guess the pattern if you have four, five, etc. GPUs. # Root move selection and biases------------------------------------------------------------------------------ # Uncomment and edit any of the below values to change them from their default. # Not all of these parameters are applicable to analysis, some are only used for actual play # Temperature for the early game, randomize between chosen moves with this temperature # chosenMoveTemperatureEarly = 0.5 # Decay temperature for the early game by 0.5 every this many moves, scaled with board size. # chosenMoveTemperatureHalflife = 19 # At the end of search after the early game, randomize between chosen moves with this temperature # chosenMoveTemperature = 0.10 # Subtract this many visits from each move prior to applying chosenMoveTemperature # (unless all moves have too few visits) to downweight unlikely moves # chosenMoveSubtract = 0 # The same as chosenMoveSubtract but only prunes moves that fall below the threshold, does not affect moves above # chosenMovePrune = 1 # Number of symmetries to sample (WITH replacement) and average at the root # rootNumSymmetriesToSample = 1 # Using LCB for move selection? # useLcbForSelection = true # How many stdevs a move needs to be better than another for LCB selection # lcbStdevs = 5.0 # Only use LCB override when a move has this proportion of visits as the top move # minVisitPropForLCB = 0.15 # Internal params------------------------------------------------------------------------------ # Uncomment and edit any of the below values to change them from their default. # Scales the utility of winning/losing # winLossUtilityFactor = 1.0 # Scales the utility for trying to maximize score # staticScoreUtilityFactor = 0.10 # dynamicScoreUtilityFactor = 0.30 # Adjust dynamic score center this proportion of the way towards zero, capped at a reasonable amount. # dynamicScoreCenterZeroWeight = 0.20 # dynamicScoreCenterScale = 0.75 # The utility of getting a "no result" due to triple ko or other long cycle in non-superko rulesets (-1 to 1) # noResultUtilityForWhite = 0.0 # The number of wins that a draw counts as, for white. (0 to 1) # drawEquivalentWinsForWhite = 0.5 # Exploration constant for mcts # cpuctExploration = 0.9 # cpuctExplorationLog = 0.4 # FPU reduction constant for mcts # fpuReductionMax = 0.2 # rootFpuReductionMax = 0.1 # Use parent average value for fpu base point instead of point value net estimate # fpuUseParentAverage = true # Amount to apply a downweighting of children with very bad values relative to good ones # valueWeightExponent = 0.5 # Slight incentive for the bot to behave human-like with regard to passing at the end, filling the dame, # not wasting time playing in its own territory, etc, and not play moves that are equivalent in terms of # points but a bit more unfriendly to humans. # rootEndingBonusPoints = 0.5 # Make the bot prune useless moves that are just prolonging the game to avoid losing yet # rootPruneUselessMoves = true # How big to make the mutex pool for search synchronization # mutexPoolSize = 8192 # How many virtual losses to add when a thread descends through a node # numVirtualLossesPerThread = 1