Skip to content

Commit

Permalink
Merge with 1.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lightvector committed Jun 21, 2020
2 parents 81e1cf0 + b809236 commit f68be47
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 13 deletions.
13 changes: 13 additions & 0 deletions cpp/command/gtp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,10 @@ int MainCmds::gtp(int argc, const char* const* argv) {

//Defaults to 7.5 komi, gtp will generally override this
Rules initialRules = Setup::loadSingleRulesExceptForKomi(cfg);
logger.write("Using " + initialRules.toStringNoKomiMaybeNice() + " rules initially, unless GTP/GUI overrides this");
if(startupPrintMessageToStderr && !loggingToStderr) {
cerr << "Using " + initialRules.toStringNoKomiMaybeNice() + " rules initially, unless GTP/GUI overrides this" << endl;
}

SearchParams initialParams = Setup::loadSingleParams(cfg);
logger.write("Using " + Global::intToString(initialParams.numThreads) + " CPU thread(s) for search");
Expand Down Expand Up @@ -1604,6 +1608,9 @@ int MainCmds::gtp(int argc, const char* const* argv) {
responseIsError = true;
response = error;
}
logger.write("Changed rules to " + newRules.toStringNoKomiMaybeNice());
if(!loggingToStderr)
cerr << "Changed rules to " + newRules.toStringNoKomiMaybeNice() << endl;
}
}

Expand Down Expand Up @@ -1631,6 +1638,9 @@ int MainCmds::gtp(int argc, const char* const* argv) {
responseIsError = true;
response = error;
}
logger.write("Changed rules to " + newRules.toStringNoKomiMaybeNice());
if(!loggingToStderr)
cerr << "Changed rules to " + newRules.toStringNoKomiMaybeNice() << endl;
}
}
}
Expand Down Expand Up @@ -1672,6 +1682,9 @@ int MainCmds::gtp(int argc, const char* const* argv) {
responseIsError = true;
response = error;
}
logger.write("Changed rules to " + newRules.toStringNoKomiMaybeNice());
if(!loggingToStderr)
cerr << "Changed rules to " + newRules.toStringNoKomiMaybeNice() << endl;
}
}

Expand Down
2 changes: 0 additions & 2 deletions cpp/configs/analysis_example.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ nnMaxBatchSize = 64

# Other General 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 = 23
# Size of mutex pool for nnCache is 2 ** this
Expand Down
4 changes: 3 additions & 1 deletion cpp/core/config_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ void ConfigParser::initialize(const string& fname) {
ifstream in(fname);
if(!in.is_open())
throw IOError("Could not open config file: " + fname);
initializeInternal(in);
fileName = fname;
initializeInternal(in);
initialized = true;
}

Expand Down Expand Up @@ -88,6 +88,8 @@ void ConfigParser::initializeInternal(istream& in) {

string key = Global::trim(line.substr(0,pos));
string value = Global::trim(line.substr(pos+1));
if(keyValues.find(key) != keyValues.end())
throw IOError("Key '" + key + "' + was specified multiple times in " + fileName + ", you probably didn't mean to do this, please delete one of them");
keyValues[key] = value;
}
contents = contentStream.str();
Expand Down
4 changes: 2 additions & 2 deletions cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ int main(int argc, const char* argv[]) {


string Version::getKataGoVersion() {
return string("1.4.4");
return string("1.4.5");
}

string Version::getKataGoVersionForHelp() {
return string("KataGo v1.4.4");
return string("KataGo v1.4.5");
}

string Version::getKataGoVersionFullInfo() {
Expand Down
3 changes: 2 additions & 1 deletion cpp/tests/results/gtp/basic.txt.log
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
: GTP Engine starting...
: KataGo v1.4.4
: KataGo v1.4.5
: Using TrompTaylor rules initially, unless GTP/GUI overrides this
: Using 1 CPU thread(s) for search
: nnRandSeed0 = forTesting
: After dedups: nnModelFile0 = tests/models/g170-b6c96-s175395328-d26788732.bin.gz useFP16 false useNHWC false
Expand Down
3 changes: 2 additions & 1 deletion cpp/tests/results/gtp/basic.txt.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
KataGo v1.4.4
KataGo v1.4.5
Using TrompTaylor rules initially, unless GTP/GUI overrides this
Loaded config configs/gtp_example.cfg and/or command-line and query overrides
Loaded model tests/models/g170-b6c96-s175395328-d26788732.bin.gz
Model name: g170-b6c96-s175395328-d26788732
Expand Down
3 changes: 2 additions & 1 deletion cpp/tests/results/gtp/handicap.txt.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
KataGo v1.4.4
KataGo v1.4.5
Using TrompTaylor rules initially, unless GTP/GUI overrides this
Loaded config configs/gtp_example.cfg and/or command-line and query overrides
Loaded model tests/models/g170-b6c96-s175395328-d26788732.bin.gz
Model name: g170-b6c96-s175395328-d26788732
Expand Down
6 changes: 5 additions & 1 deletion cpp/tests/results/gtp/printsgf.txt.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
KataGo v1.4.4
KataGo v1.4.5
Using TrompTaylor rules initially, unless GTP/GUI overrides this
Loaded config configs/gtp_example.cfg and/or command-line and query overrides
Loaded model tests/models/g170-b6c96-s175395328-d26788732.bin.gz
Model name: g170-b6c96-s175395328-d26788732
GTP ready, beginning main protocol loop
Changed rules to Japanese
Changed rules to Chinese
Changed rules to koSIMPLEscoreAREAtaxSEKIsui0whbN
7 changes: 6 additions & 1 deletion cpp/tests/results/gtp/rules.txt.log
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
: GTP Engine starting...
: KataGo v1.4.4
: KataGo v1.4.5
: Using TrompTaylor rules initially, unless GTP/GUI overrides this
: Using 1 CPU thread(s) for search
: nnRandSeed0 = forTesting
: After dedups: nnModelFile0 = tests/models/g170-b6c96-s175395328-d26788732.bin.gz useFP16 false useNHWC false
Expand All @@ -14,18 +15,22 @@
: Controller: kata-get-rules
: = {"hasButton":false,"ko":"POSITIONAL","scoring":"AREA","suicide":true,"tax":"NONE","whiteHandicapBonus":"0"}
: Controller: kata-set-rules japanese
: Changed rules to Japanese
: =
: Controller: kata-get-rules
: = {"hasButton":false,"ko":"SIMPLE","scoring":"TERRITORY","suicide":false,"tax":"SEKI","whiteHandicapBonus":"0"}
: Controller: kata-set-rules chinese
: Changed rules to Chinese
: =
: Controller: kata-get-rules
: = {"hasButton":false,"ko":"SIMPLE","scoring":"AREA","suicide":false,"tax":"NONE","whiteHandicapBonus":"N"}
: Controller: kgs-rules chinese
: Changed rules to Chinese-OGS
: =
: Controller: kata-get-rules
: = {"hasButton":false,"ko":"POSITIONAL","scoring":"AREA","suicide":false,"tax":"NONE","whiteHandicapBonus":"N"}
: Controller: kgs-rules new_zealand
: Changed rules to NewZealand
: =
: Controller: kata-get-rules
: = {"hasButton":false,"ko":"SITUATIONAL","scoring":"AREA","suicide":true,"tax":"NONE","whiteHandicapBonus":"0"}
Expand Down
7 changes: 6 additions & 1 deletion cpp/tests/results/gtp/rules.txt.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
KataGo v1.4.4
KataGo v1.4.5
Using TrompTaylor rules initially, unless GTP/GUI overrides this
Loaded config configs/gtp_example.cfg and/or command-line and query overrides
Loaded model tests/models/g170-b6c96-s175395328-d26788732.bin.gz
Model name: g170-b6c96-s175395328-d26788732
GTP ready, beginning main protocol loop
Changed rules to Japanese
Changed rules to Chinese
Changed rules to Chinese-OGS
Changed rules to NewZealand
3 changes: 2 additions & 1 deletion cpp/tests/results/gtp/time.txt.log
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
: GTP Engine starting...
: KataGo v1.4.4
: KataGo v1.4.5
: Using TrompTaylor rules initially, unless GTP/GUI overrides this
: Using 1 CPU thread(s) for search
: nnRandSeed0 = forTesting
: After dedups: nnModelFile0 = tests/models/g170-b6c96-s175395328-d26788732.bin.gz useFP16 false useNHWC false
Expand Down
3 changes: 2 additions & 1 deletion cpp/tests/results/gtp/time.txt.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
KataGo v1.4.4
KataGo v1.4.5
Using TrompTaylor rules initially, unless GTP/GUI overrides this
Loaded config configs/gtp_example.cfg and/or command-line and query overrides
Loaded model tests/models/g170-b6c96-s175395328-d26788732.bin.gz
Model name: g170-b6c96-s175395328-d26788732
Expand Down

0 comments on commit f68be47

Please sign in to comment.