Skip to content

Commit be7b3b2

Browse files
committed
Changed version from 3.0.0 to 3.5.0 and fixed a bug where there were no space after "uci author ".
This will be the last commit before building and releasing Loki 3.5.0 Bench: 12092330
1 parent 95992cd commit be7b3b2

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

Loki/uci.cpp

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22

33
int UCI::num_threads = THREADS_DEFAULT_NUM;
44

5+
6+
/*
7+
8+
print_info is just a helper method to run when given "uci"
9+
10+
*/
11+
void UCI::print_info() {
12+
std::cout << "id name " << EngineInfo[NAME] << " " << EngineInfo[VERSION] << std::endl;
13+
std::cout << "id author " << EngineInfo[AUTHOR] << std::endl;
14+
15+
// Step 3C.1. Output all ajustible options for Loki.
16+
std::cout << "option name Hash type spin default " << TT_DEFAULT_SIZE << " min " << TT_MIN_SIZE << " max " << TT_MAX_SIZE << std::endl;
17+
std::cout << "option name Threads type spin default " << THREADS_DEFAULT_NUM << " min " << THREADS_MIN_NUM << " max " << THREADS_MAX_NUM << std::endl;
18+
std::cout << "uciok" << std::endl;
19+
}
20+
521
/*
622
723
UCI_loop is the main function for handling communication with the GUI.
@@ -44,13 +60,7 @@ void UCI::loop() {
4460
// Step 3C. If we are given a "uci" command, we should output all uci parameters and info of Loki.
4561
else if (input.find(std::string("uci")) != std::string::npos) {
4662

47-
std::cout << "id name " << EngineInfo[NAME] << " " << EngineInfo[VERSION] << std::endl;
48-
std::cout << "id author" << EngineInfo[AUTHOR] << std::endl;
49-
50-
// Step 3C.1. Output all ajustible options for Loki.
51-
std::cout << "option name Hash type spin default " << TT_DEFAULT_SIZE << " min " << TT_MIN_SIZE << " max " << TT_MAX_SIZE << std::endl;
52-
std::cout << "option name Threads type spin default " << THREADS_DEFAULT_NUM << " min " << THREADS_MIN_NUM << " max " << THREADS_MAX_NUM << std::endl;
53-
std::cout << "uciok" << std::endl;
63+
print_info();
5464

5565
continue;
5666

Loki/uci.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ enum InfoParameters :int { NAME = 0, VERSION = 1, AUTHOR = 2 };
1212

1313
static std::map<InfoParameters, std::string> EngineInfo {
1414
{NAME, "Loki"},
15-
{ VERSION, "3.0.0" },
15+
{ VERSION, "3.5.0" },
1616
{ AUTHOR, "Niels Abildskov" }
1717
};
1818

@@ -25,6 +25,8 @@ namespace UCI {
2525
// Main method of the UCI implementation. Responsible for listening for all input
2626
void loop();
2727

28+
void print_info();
29+
2830
// Method for parsing the "position" command
2931
void parse_position(std::string setup, GameState_t* pos);
3032

0 commit comments

Comments
 (0)