Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Daoqi #6

Open
wants to merge 62 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
2cf860e
Automate training sequentially
gcao Feb 23, 2020
06f636f
Add all my local changes
gcao Mar 8, 2020
843cb18
Change gatekeeper config
gcao Mar 14, 2020
de2356d
Update gatekeeper config
gcao Mar 15, 2020
eb9ea8a
Try to split work on two servers, skip gatekeeper
gcao Mar 15, 2020
2b564ce
Merge branch 'cao/master' of github.com:gcao/KataGo into cao/master
gcao Mar 15, 2020
5fc3d80
Experiment with running selfplay-shuffle on one machine, train-gateke…
gcao Mar 16, 2020
9b3f215
Fix train-sequentially.sh
gcao Mar 16, 2020
79de895
Self play: 64 games, gatekeeper: 16 games, train-sequentially all in one
gcao Mar 17, 2020
794c834
Fix train-sequentially.sh
gcao Mar 17, 2020
b9be829
Fix train-sequentially.sh
gcao Mar 17, 2020
9814a4b
Fix train-sequentially.sh
gcao Mar 18, 2020
fdd3415
Daoqi support in python (WIP)
gcao Apr 5, 2020
9f1a9bf
Daoqi support in python (WIP)
gcao Apr 5, 2020
58b6535
VS Code launch configurations
gcao Apr 26, 2020
9275b46
Daoqi support in python model
gcao Apr 26, 2020
f1eb8b6
Daoqi support in python model
gcao Apr 26, 2020
7501d44
Daoqi support in python model
gcao Apr 28, 2020
9e707df
Daoqi support in python model
gcao Apr 28, 2020
4d7fe55
Daoqi support in python model
gcao Apr 28, 2020
7e5de68
Merge branch 'master' into cao/master
gcao Apr 29, 2020
ae5f838
Daoqi support for cpp module
gcao May 1, 2020
b8d2097
Daoqi support for cpp module
gcao May 1, 2020
4592f18
Daoqi support for cpp module
gcao May 1, 2020
6e7f082
Daoqi support for cpp module
gcao May 1, 2020
deb06e0
Daoqi support for cpp module
gcao Jun 1, 2020
0950615
Daoqi support for cpp module
gcao Jun 1, 2020
c20948a
Merge branch 'master' into cao/master
gcao Jun 2, 2020
ac74c6a
Merge branch 'cao/master' into cao/cpp/daoqi
gcao Jun 2, 2020
c0c7f9b
Merge pull request #1 from gcao/cao/python/daoqi
gcao Jun 8, 2022
d3d7528
Merge pull request #3 from gcao/cao/cpp/daoqi
gcao Jun 8, 2022
944a61b
Merge pull request #2 from gcao/cao/python/daoqi2
gcao Jun 8, 2022
f25c363
Minor changes
gcao Jun 9, 2022
b15675a
Merge remote-tracking branch 'upstream/master' into cao/temp
gcao Jun 10, 2022
dd5fa7c
Undo minor changes
gcao Jun 10, 2022
c41cb38
Undo minor changes
gcao Jun 10, 2022
3aaf37c
Undo minor changes
gcao Jun 10, 2022
12371bf
Daoqi support for board.cpp and searchhealpers.cpp
gcao Jun 11, 2022
c7f1ec9
Daoqi support for board.cpp and searchhealpers.cpp
gcao Jun 11, 2022
645ff09
cpp: Daoqi support
gcao Jun 11, 2022
0e29ff6
Daoqi support for board.cpp and searchhealpers.cpp
gcao Jun 11, 2022
9573abe
Daoqi support for board.cpp and searchhealpers.cpp
gcao Jun 11, 2022
79da42f
Daoqi support for board.cpp and searchhealpers.cpp
gcao Jun 11, 2022
9fa6be2
Daoqi support for board.cpp and searchhealpers.cpp
gcao Jun 12, 2022
fb14b82
Daoqi support for board.cpp and searchhealpers.cpp
gcao Jun 12, 2022
303abe4
Daoqi support for board.cpp and searchhealpers.cpp
gcao Jun 12, 2022
fcd31d5
Daoqi support for board.cpp and searchhealpers.cpp
gcao Jun 12, 2022
ec2b913
Daoqi support for board.cpp and searchhealpers.cpp
gcao Jun 12, 2022
3f5bf8b
Daoqi support for board.cpp and searchhealpers.cpp
gcao Jun 13, 2022
1e52888
Comment out tests that do not adhere to Daoqi rules
gcao Jun 15, 2022
f79e1a6
Daoqi: opencl changes
gcao Jul 10, 2022
2c38af1
Selfplay and gatekeeper config
gcao Jul 13, 2022
5547e6f
Config file changes
gcao Sep 5, 2022
c302b09
Config file changes
gcao Sep 5, 2022
1a66f4e
Config file changes
gcao Sep 15, 2022
beb4720
Config file changes
gcao Sep 15, 2022
2689062
Save configs
gcao Oct 18, 2022
4cfc9b4
Save configs
gcao Oct 20, 2022
f03a775
Add games per cycle to selfplay config, minor changes to configs
gcao Nov 21, 2022
07ff60a
Fixed sgf that is invaid under daoqi rule
gcao Nov 23, 2022
730c875
Update gtp config based on benchmark result
gcao Nov 23, 2022
77f8971
match.rb: a Ruby script to set up matches between models
gcao Apr 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -21,7 +21,7 @@ cpp/main
cpp/maincuda
cpp/mainopencl
cpp/katago
cpp/configs
# cpp/configs
cpp/evalsgf
cpp/runmatch.sh
cpp/runmatchauto.sh
Expand Down
100 changes: 100 additions & 0 deletions cpp/configs/gatekeeper1.cfg
@@ -0,0 +1,100 @@

# Logs------------------------------------------------------------------------------------

logSearchInfo = false
logMoves = false
logGamesEvery = 10
logToStdout = true

# Fancy game selfplay settings--------------------------------------------------------------------

# startPosesProb = 0.0 # Play this proportion of games starting from SGF positions
# startPosesFromSgfDir = DIRECTORYPATH # Load SGFs from this dir
# startPosesLoadProb = 1.0 # Only load each position from each SGF with this chance (save memory)
# startPosesTurnWeightLambda = 0 # 0 = equal weight 0.01 = decrease probability by 1% per turn -0.01 = increase probability by 1% per turn.

# Match-----------------------------------------------------------------------------------

numGameThreads = 50
maxMovesPerGame = 1600
numGamesPerGating = 50

allowResignation = true
resignThreshold = -0.95
resignConsecTurns = 5

# Disabled, since we're not using any root noise and such
# Could have a slight weirdness on rootEndingBonusPoints, but shouldn't be a big deal.
# clearBotBeforeSearch = true

# Rules------------------------------------------------------------------------------------

koRules = POSITIONAL
scoringRules = AREA,TERRITORY
taxRules = NONE
multiStoneSuicideLegals = false
hasButtons = false

bSizes = 19
bSizeRelProbs = 30
allowRectangleProb = 0.00 # Play game on rectangular board with this probability

komiAuto = True # Automatically adjust komi to what the neural nets think are fair
#komiMean = 7.5 # Specify explicit komi
handicapProb = 0.0 # Probability of handicap game
handicapCompensateKomiProb = 1.0 # Probability of compensating komi to fair during handicap game
# numExtraBlackFixed = 3 # When playing handicap games, always use exactly this many extra black moves

# Search limits-----------------------------------------------------------------------------------
maxVisits = 600
numSearchThreads = 6

# GPU Settings-------------------------------------------------------------------------------

nnMaxBatchSize = 128
nnCacheSizePowerOfTwo = 21
nnMutexPoolSizePowerOfTwo = 15
numNNServerThreadsPerModel = 1
nnRandomize = true

# CUDA GPU settings--------------------------------------
# cudaDeviceToUse = 0 #use device 0 for all server threads (numNNServerThreadsPerModel) unless otherwise specified per-model or per-thread-per-model
# cudaDeviceToUseModel0 = 3 #use device 3 for model 0 for all threads unless otherwise specified per-thread for this model
# cudaDeviceToUseModel1 = 2 #use device 2 for model 1 for all threads unless otherwise specified per-thread for this model
# cudaDeviceToUseModel0Thread0 = 3 #use device 3 for model 0, server thread 0
# cudaDeviceToUseModel0Thread1 = 2 #use device 2 for model 0, server thread 1

cudaUseFP16 = auto
cudaUseNHWC = auto

# Root move selection and biases------------------------------------------------------------------------------

chosenMoveTemperatureEarly = 0.5
chosenMoveTemperatureHalflife = 19
chosenMoveTemperature = 0.2
chosenMoveSubtract = 0
chosenMovePrune = 1

useLcbForSelection = true
lcbStdevs = 5.0
minVisitPropForLCB = 0.15

# Internal params------------------------------------------------------------------------------

winLossUtilityFactor = 1.0
staticScoreUtilityFactor = 0.00
dynamicScoreUtilityFactor = 0.25
dynamicScoreCenterZeroWeight = 0.25
dynamicScoreCenterScale = 0.50
noResultUtilityForWhite = 0.0
drawEquivalentWinsForWhite = 0.5

rootEndingBonusPoints = 0.5
rootPruneUselessMoves = true

cpuctExploration = 1.1
cpuctExplorationLog = 0.0
fpuReductionMax = 0.2
rootFpuReductionMax = 0.1

numVirtualLossesPerThread = 1
37 changes: 17 additions & 20 deletions cpp/configs/gtp_example.cfg
Expand Up @@ -89,30 +89,31 @@ logToStderr = false
# Some other legal values are: "chinese", "japanese", "korean", "aga", "chinese-ogs", "new-zealand".
# KataGo does not claim to exactly match any particular human ruleset, but KataGo will try to behave
# as closely as possible given the rules it has implemented.
rules = tromp-taylor
# rules = tromp-taylor
rule = chinese

# Use the below instead to specify an arbitrary combination of individual rules.

# koRule = SIMPLE # Simple ko rules (triple ko = no result)
# koRule = POSITIONAL # Positional superko
koRule = POSITIONAL # Positional superko
# koRule = SITUATIONAL # Situational superko

# scoringRule = AREA # Area scoring
scoringRule = AREA # Area scoring
# scoringRule = TERRITORY # Territory scoring (uses a sort of special computer-friendly territory ruleset)

# taxRule = NONE # All surrounded empty points are scored
taxRule = NONE # All surrounded empty points are scored
# taxRule = SEKI # Eyes in seki do NOT count as points
# taxRule = ALL # All groups are taxed up to 2 points for the two eyes needed to live

# multiStoneSuicideLegal = true # Is multiple-stone suicide legal? (Single-stone suicide is always illegal).
multiStoneSuicideLegal = false # Is multiple-stone suicide legal? (Single-stone suicide is always illegal).

# hasButton = false # Set to true when area scoring to award 0.5 points to the first pass.
hasButton = false # Set to true when area scoring to award 0.5 points to the first pass.

# friendlyPassOk = true # Set to true except for computer rulesets that requires capturing all stones before passing.

# whiteHandicapBonus = 0 # In handicap games, give white no compensation for black's handicap stones (Tromp-taylor, NZ, JP)
# whiteHandicapBonus = N-1 # In handicap games, give white N-1 points for black's handicap stones (AGA)
# whiteHandicapBonus = N # In handicap games, give white N points for black's handicap stones (Chinese)
whiteHandicapBonus = N # In handicap games, give white N points for black's handicap stones (Chinese)

# Uncomment and change to adjust what board size KataGo uses upon startup by default if GTP doesn't specify.
# defaultBoardSize = 19
Expand All @@ -126,7 +127,7 @@ rules = tromp-taylor
# Resignation occurs if for at least resignConsecTurns in a row,
# the winLossUtility (which is on a [-1,1] scale) is below resignThreshold.
allowResignation = true
resignThreshold = -0.90
resignThreshold = -0.95
resignConsecTurns = 3
# Uncomment to make katago not resign close games, behind by fewer than this many points
# resignMinScoreDifference = 10
Expand Down Expand Up @@ -202,15 +203,15 @@ resignConsecTurns = 3
# faster than the specified max if GTP tells it that it is playing under a clock as well in the current game.

# If provided, limit maximum number of root visits per search to this much. (With tree reuse, visits do count earlier search)
maxVisits = 500
maxVisits = 600
# If provided, limit maximum number of new playouts per search to this much. (With tree reuse, playouts do not count earlier search)
# maxPlayouts = 300
# If provided, cap search time at this many seconds.
# maxTime = 10

# Ponder on the opponent's turn?
ponderingEnabled = false
maxTimePondering = 60 # Maximum time to ponder, in seconds. Comment out to make unlimited.
# maxTimePondering = 60 # Maximum time to ponder, in seconds. Comment out to make unlimited.
# Note: you can set "maxVisitsPondering" or "maxPlayoutsPondering" too.

# Approx number of seconds to buffer for lag for GTP time controls - will move a bit faster assuming there is this much lag per move.
Expand All @@ -223,26 +224,26 @@ numSearchThreads = 6
searchFactorAfterOnePass = 0.50
searchFactorAfterTwoPass = 0.25
# Play a little faster if super-winning, for friendliness
searchFactorWhenWinning = 0.40
searchFactorWhenWinningThreshold = 0.95
# searchFactorWhenWinning = 0.40
# searchFactorWhenWinningThreshold = 0.95

# GPU Settings-------------------------------------------------------------------------------

# Maximum number of positions to send to a single GPU at once.
# The default value here is roughly equal to numSearchThreads, but you can specify it manually
# if you are running out of memory, or if you are using multiple GPUs that expect to split
# up the work.
# nnMaxBatchSize = <integer>
# nnMaxBatchSize = 128

# Cache up to (2 ** this) many neural net evaluations in case of transpositions in the tree.
# Uncomment and edit to change if you want to adjust a major component of KataGo's RAM usage.
# nnCacheSizePowerOfTwo = 20
nnCacheSizePowerOfTwo = 21

# Size of mutex pool for nnCache is (2 ** this).
# nnMutexPoolSizePowerOfTwo = 16
nnMutexPoolSizePowerOfTwo = 16

# Randomize board orientation when running neural net evals? Uncomment and set to false to disable.
# nnRandomize = true
nnRandomize = true
# If provided, force usage of a specific seed for nnRandomize instead of randomizing.
# nnRandSeed = abcdefg

Expand Down Expand Up @@ -462,7 +463,3 @@ searchFactorWhenWinningThreshold = 0.95
# avoidSgf2PatternLambda = ...
# avoidSgf2PatternAllowedNames = ...
# avoidSgf2PatternMinTurnNumber = ...