Skip to content

Commit

Permalink
v2.7, inclusive players, tech stats
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenpham committed Jul 22, 2019
1 parent 29f8a1f commit 89abf3b
Show file tree
Hide file tree
Showing 18 changed files with 517 additions and 362 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@
Overview
-----------

Banksia (a name of an Australian native wildflowers) is an open source tournament manager for chess engines, written in C++11. It can be compiled and run on some popular platforms such as Windows, MacOS, Linux.
Banksia (the name after an Australian native wildflowers) is an open source tournament manager for chess engines, written in C++11. It can be compiled and run on some popular platforms such as Windows, MacOS, Linux.

The project is an attempt to fulfil my dream about a chess tournament manager: small, fast, portable, easy to use, easy to integrate to other systems, resumable, able to automatically generate all configurations, files which are needed for tournaments. Basically from nothing, a user can configure automatically within few minutes then he can start running a total new tournament.
The project is an attempt to fulfil my dream about a chess tournament manager: small, fast, portable, easy to use, easy to integrate to other systems, resumable, able to automatically generate all configurations, files which are needed for tournaments.

About design: To manage engines, games and the complicated events / relationships between them, the app uses a timer with few c++ callback functions. I believe it is one of the simplest way thus the code is not hard for programmers to follow, understand, maintain and modify.
Basically from nothing, a user can configure automatically within few minutes then he can start running a total new tournament.

About design: To manage engines, games and the complicated events / relationships between them, the app uses a timer with few c++ callback functions. I believe it is one of the simplest methods. The code is not hard for programmers to follow, understand, maintain and modify.

![Demo](banksia.jpg)
*(Banksia)*

Some features
-----------
- Command line interface (cli)
- Small, fast
- Simple and short (in terms of design and implementation)
- Support UCI and Winboard protocols
- Support opening book formats edp, pgn, bin (Polyglot)
- Support opening book formats: edp, pgn, bin (Polyglot)
- Tournament: concurrency, round robin, knockout, ponderable, resumable
- Controlled mainly by 2 JSON files (one for configurations of engines, one for tournament management). That is very flexible, easy way to setup and change
- Can auto generate all necessary JSON files
Expand Down Expand Up @@ -81,7 +84,6 @@ When working, the app may display some information into screen as well as saving
- engine input / output log
- game pgn file


Bellow is the screen of a tournament between 3 chess engines:

![Demo](demo.png)
Expand Down Expand Up @@ -155,6 +157,7 @@ Working

History
--------
- 22 July 2019: v2.7, inclusive players (for playing in all matches, given sides), more info for tournament stats
- 20 July 2019: v2.6, more info and more ways to control logs, improve engine managements
- 16 July 2019: v2.5, multiple ways to select openings: new for each match, same for a pair, one for all matches; override options for central controlling; match statistics LOS & error margin
- 14 July 2019: v2.2, knockout tournament and resumable the last tournament
Expand All @@ -168,7 +171,7 @@ History
Terms of use
---------------

All codes and data in the folder 3rdparty are 3rd party libraries, copyrighted and released under their terms of use. Banksia code and data is released under the GPLv3+ license.
All codes and data in the folder 3rdparty are 3rd party libraries, copyrighted by them and under their terms of use. Banksia code and data are released under the GPLv3+ license.


Credits
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
</CommandLineArgument>
<CommandLineArgument
argument = "-v off"
isEnabled = "YES">
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "-d /Users/nguyenpham/workspace/BanksiaMatch/engines"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/base/comm.h"
timestampString = "585303695.216666"
timestampString = "585457981.972983"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "98"
Expand All @@ -184,7 +184,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/game/wbengine.cpp"
timestampString = "585303695.216942"
timestampString = "585457981.973033"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "406"
Expand All @@ -200,7 +200,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/game/wbengine.cpp"
timestampString = "585303695.216979"
timestampString = "585457981.973069"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "433"
Expand All @@ -216,7 +216,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/game/wbengine.cpp"
timestampString = "585303695.21701"
timestampString = "585457981.9730999"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "444"
Expand All @@ -232,7 +232,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/game/wbengine.cpp"
timestampString = "585303695.2170399"
timestampString = "585457981.973129"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "457"
Expand All @@ -248,7 +248,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/game/wbengine.cpp"
timestampString = "585303695.21707"
timestampString = "585457981.97316"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "407"
Expand All @@ -264,11 +264,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/chess/chess.cpp"
timestampString = "585303695.2171"
timestampString = "585457981.9731899"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1218"
endingLineNumber = "1218"
startingLineNumber = "1214"
endingLineNumber = "1214"
landmarkName = "ChessBoard::toMoveListString(MoveNotation notation, int itemPerLine, bool moveCounter, bool computingInfo)"
landmarkType = "7">
</BreakpointContent>
Expand All @@ -280,11 +280,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/chess/chess.cpp"
timestampString = "585303695.217132"
timestampString = "585457981.9732291"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1116"
endingLineNumber = "1116"
startingLineNumber = "1113"
endingLineNumber = "1113"
landmarkName = "ChessBoard::checkMake(int from, int dest, PieceType promotion)"
landmarkType = "7">
</BreakpointContent>
Expand All @@ -296,11 +296,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/chess/chess.cpp"
timestampString = "585303695.21716"
timestampString = "585457981.973266"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1117"
endingLineNumber = "1117"
startingLineNumber = "1114"
endingLineNumber = "1114"
landmarkName = "ChessBoard::checkMake(int from, int dest, PieceType promotion)"
landmarkType = "7">
</BreakpointContent>
Expand All @@ -312,7 +312,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/game/wbengine.cpp"
timestampString = "585303695.217189"
timestampString = "585457981.973303"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "412"
Expand Down Expand Up @@ -360,11 +360,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/chess/chess.cpp"
timestampString = "585303695.217652"
timestampString = "585457981.973366"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1349"
endingLineNumber = "1349"
startingLineNumber = "1348"
endingLineNumber = "1348"
landmarkName = "ChessBoard::fromSanString(const std::string&amp; str)"
landmarkType = "7">
</BreakpointContent>
Expand All @@ -376,11 +376,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/chess/chess.cpp"
timestampString = "585303695.217685"
timestampString = "585457981.973405"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1369"
endingLineNumber = "1369"
startingLineNumber = "1367"
endingLineNumber = "1367"
landmarkName = "ChessBoard::fromSanString(const std::string&amp; str)"
landmarkType = "7">
</BreakpointContent>
Expand All @@ -392,7 +392,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/main.cpp"
timestampString = "585303695.217718"
timestampString = "585457981.973442"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "48"
Expand All @@ -408,11 +408,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/game/tourmng.h"
timestampString = "585303695.217957"
timestampString = "585457981.9737051"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "106"
endingLineNumber = "106"
startingLineNumber = "116"
endingLineNumber = "116"
landmarkName = "Elo(int wins, int draws, int losses)"
landmarkType = "7">
</BreakpointContent>
Expand Down Expand Up @@ -488,11 +488,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/chess/chess.cpp"
timestampString = "585303695.218907"
timestampString = "585457981.973816"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1417"
endingLineNumber = "1417"
startingLineNumber = "1414"
endingLineNumber = "1414"
landmarkName = "ChessBoard::fromSanMoveList(const std::string&amp; str)"
landmarkType = "7">
</BreakpointContent>
Expand Down Expand Up @@ -600,7 +600,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/game/uciengine.cpp"
timestampString = "585303695.2201639"
timestampString = "585457981.973986"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "445"
Expand All @@ -616,7 +616,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/game/uciengine.cpp"
timestampString = "585303695.2202049"
timestampString = "585457981.974021"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "446"
Expand All @@ -632,11 +632,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/game/uciengine.cpp"
timestampString = "585303695.220241"
timestampString = "585457981.974051"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "461"
endingLineNumber = "461"
startingLineNumber = "468"
endingLineNumber = "468"
landmarkName = "UciEngine::parseInfo(const std::string&amp; line)"
landmarkType = "7">
</BreakpointContent>
Expand All @@ -648,11 +648,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/game/uciengine.cpp"
timestampString = "585303695.220275"
timestampString = "585457981.974079"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "454"
endingLineNumber = "454"
startingLineNumber = "461"
endingLineNumber = "461"
landmarkName = "UciEngine::parseInfo(const std::string&amp; line)"
landmarkType = "7">
</BreakpointContent>
Expand All @@ -664,11 +664,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/game/tourmng.cpp"
timestampString = "585303695.220311"
timestampString = "585457981.974108"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "429"
endingLineNumber = "429"
startingLineNumber = "471"
endingLineNumber = "471"
landmarkName = "TourMng::parseJsonAfterLoading(Json::Value&amp; d)"
landmarkType = "7">
</BreakpointContent>
Expand All @@ -680,7 +680,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/game/uciengine.cpp"
timestampString = "585303695.220562"
timestampString = "585457981.9741499"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "62"
Expand All @@ -696,7 +696,7 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../src/game/uciengine.cpp"
timestampString = "585303695.220596"
timestampString = "585457981.974178"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "57"
Expand Down
52 changes: 4 additions & 48 deletions src/base/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,53 +193,6 @@ namespace banksia {
}
};

class MoveList {
public:
static const int MaxMoveNumber = 250;

MoveFull list[MaxMoveNumber];
int end;

MoveList() {
reset();
}

void reset() {
end = 0;
}

bool isEmpty() const {
return end == 0;
}

bool isFull() const {
return end >= MaxMoveNumber - 2;
}

void add(const MoveFull& move) {
list[end] = move;
end++;
}

void add(Piece piece, int from, int dest, PieceType promotion = PieceType::empty) {
list[end].set(piece, from, dest, promotion);
end++;
}

bool isValid() const {
return end >= 0 && end < MaxMoveNumber;
}

std::string toString() const {
std::ostringstream stringStream;

for (int i = 0; i < end; i++) {
stringStream << i + 1 << ") " << list[i].toString() << " ";
}
return stringStream.str();
}
};

class Hist {
public:
MoveFull move;
Expand All @@ -248,9 +201,12 @@ namespace banksia {
int8_t castleRights[2];
u64 hashKey;
int quietCnt;
std::string moveString, comment;

// for statistic
i64 nodes = 0;
int score = 0, depth = 0;
double elapsed = 0;
std::string moveString, comment;

void set(const MoveFull& _move) {
move = _move;
Expand Down
Loading

0 comments on commit 89abf3b

Please sign in to comment.