Banksia - Yet another Chess Tournament Manager

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
phhnguyen
Posts: 354
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Banksia - Yet another Chess Tournament Manager

Post by phhnguyen » Mon Jul 01, 2019 10:03 am

I have just released my new open source: Banksia - a Chess Tournament Manager for chess engines (it helps chess engines fighting each other)!

Some features:
- Command line interface (cli)
- Small, fast
- Simple and short (in term of design and implementation)
- Support chess engines with UCI protocol
- Tournament: concurrency, round robin, edp opening, ponderable
- Controlled mainly by 2 json files (one for configurations of engines, one for tournament management). That is very flexible, easy way to set up and change
- Controllable by the keyboard when games playing (type anything from the keyboard to display the help)
- Written in standard C++11 (can be easily compiled and run in many systems such as MacOS, Windows, Linux)
- Open source, MIT license

The project is here:

https://github.com/nguyenpham/Banksia

Because of being small, simple logic/design, "pure" standard C++11, using very little resource, free (MIT license) I hope it be easy to use and helpful and/or embedded in some projects.

However it is still in early stage, it should have many bugs and missing some functions, not comfortable for use. Please help me to test it (especially for large scale, longtime tournaments), find, fix bugs as well as improve it. Thanks.

/Pham
https://github.com/nguyenpham/Banksia
An open source C++11 chess tournament manager

User avatar
Roland Chastain
Posts: 190
Joined: Sat Jun 08, 2013 8:07 am
Location: France
Full name: Roland Chastain
Contact:

Re: Banksia - Yet another Chess Tournament Manager

Post by Roland Chastain » Mon Jul 01, 2019 5:23 pm

Hello! Interesting project.

I could compile it with Visual Studio 2017.

I made a quick test and here is what happened:

Code: Select all

C:\Roland\echecs\sources\banksia>banksia -jsonpath C:\Roland\echecs\sources\banksia\tour.json
Banksia, Chess Tournament Manager, by Nguyen Pham - version 0.01
type: roundrobin, time control: 40/3.5:0.5, #players: 3, #matches: 6, concurrency: 1, ponder: off, book: no
Game started 1 of 6 (Alouette-A 0.0.7 vs Alouette-B 0.0.7)
Assertion failed: board.isValid(), file c:\roland\echecs\sources\banksia\src\game\game.cpp, line 204
The problem comes after the move g2h1 on this position:


I didn't look into the source code, but I suspect that this has a relation with castling rights.

I attach all the files. :wink:
Attachments
test20190701.zip
(9.82 KiB) Downloaded 23 times

User avatar
phhnguyen
Posts: 354
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: Banksia - Yet another Chess Tournament Manager

Post by phhnguyen » Mon Jul 01, 2019 11:25 pm

Roland Chastain wrote:
Mon Jul 01, 2019 5:23 pm
I didn't look into the source code, but I suspect that this has a relation with castling rights.
Yes, it is a bug about clearing castling rights. The bug is fixed. Please help me to test again. Thank you a lot!
https://github.com/nguyenpham/Banksia
An open source C++11 chess tournament manager

User avatar
Roland Chastain
Posts: 190
Joined: Sat Jun 08, 2013 8:07 am
Location: France
Full name: Roland Chastain
Contact:

Re: Banksia - Yet another Chess Tournament Manager

Post by Roland Chastain » Tue Jul 02, 2019 6:50 am

OK, it works now.

Code: Select all

C:\Roland\echecs\sources\banksia>banksia -jsonpath C:\Roland\echecs\sources\banksia\tour.json
Banksia, Chess Tournament Manager, by Nguyen Pham - version 0.02
type: roundrobin, time control: 40/3.5:0.5, #players: 3, #matches: 6, concurrency: 1, ponder: off, book: no
Game started 1 of 6 (Alouette-A 0.0.7 vs Alouette-B 0.0.7)
Game completed 1 of 6 (Alouette-A 0.0.7 vs Alouette-B 0.0.7): 0-1 (mate)
Game started 2 of 6 (Alouette-B 0.0.7 vs Alouette-A 0.0.7)
Game completed 2 of 6 (Alouette-B 0.0.7 vs Alouette-A 0.0.7): 1/2-1/2 (stalemate)
Game started 3 of 6 (Alouette-A 0.0.7 vs Alouette-C 0.0.7)
Game completed 3 of 6 (Alouette-A 0.0.7 vs Alouette-C 0.0.7): 1/2-1/2 (stalemate)
Game started 4 of 6 (Alouette-C 0.0.7 vs Alouette-A 0.0.7)
Game completed 4 of 6 (Alouette-C 0.0.7 vs Alouette-A 0.0.7): 1-0 (mate)
Game started 5 of 6 (Alouette-B 0.0.7 vs Alouette-C 0.0.7)
Game completed 5 of 6 (Alouette-B 0.0.7 vs Alouette-C 0.0.7): 1-0 (mate)
Game started 6 of 6 (Alouette-C 0.0.7 vs Alouette-B 0.0.7)
Game completed 6 of 6 (Alouette-C 0.0.7 vs Alouette-B 0.0.7): 1/2-1/2 (stalemate)
----------------------------------
rank name games wins draws
Alouette-A 0.0.7        4       0.0%    50.0%
Alouette-C 0.0.7        4       25.0%   50.0%
Alouette-B 0.0.7        4       50.0%   50.0%

----------------------------------

User avatar
phhnguyen
Posts: 354
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: Banksia - Yet another Chess Tournament Manager

Post by phhnguyen » Wed Jul 03, 2019 12:05 pm

Roland Chastain wrote:
Tue Jul 02, 2019 6:50 am
OK, it works now.
Thanks Roland Chastain :)

I have updated the code to fix some bugs, improve interface and support opening books in pgn format (edp was supported).
https://github.com/nguyenpham/Banksia
An open source C++11 chess tournament manager

User avatar
Roland Chastain
Posts: 190
Joined: Sat Jun 08, 2013 8:07 am
Location: France
Full name: Roland Chastain
Contact:

Re: Banksia - Yet another Chess Tournament Manager

Post by Roland Chastain » Wed Jul 03, 2019 12:43 pm

phhnguyen wrote:
Wed Jul 03, 2019 12:05 pm
Thanks Roland Chastain :)

I have updated the code to fix some bugs, improve interface and support opening books in pgn format (edp was supported).
You're welcome. Unfortunately I cannot compile the new version. :?

Code: Select all

Erreur	C2039	'time_t' : n'est pas membre de 'std'	Banksia	c:\roland\echecs\sources\banksia\src\base\comm.h	149	
It's with Visual Studio 2017.

User avatar
phhnguyen
Posts: 354
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: Banksia - Yet another Chess Tournament Manager

Post by phhnguyen » Wed Jul 03, 2019 1:52 pm

Thanks! Just fixed it. Missing a declare of <ctime>. Not sure why in my system (Xcode + MacOS) it is fine to compile but not in Visual Studio + Windows.
https://github.com/nguyenpham/Banksia
An open source C++11 chess tournament manager

User avatar
Roland Chastain
Posts: 190
Joined: Sat Jun 08, 2013 8:07 am
Location: France
Full name: Roland Chastain
Contact:

Re: Banksia - Yet another Chess Tournament Manager

Post by Roland Chastain » Wed Jul 03, 2019 4:05 pm

phhnguyen wrote:
Wed Jul 03, 2019 1:52 pm
Thanks! Just fixed it. Missing a declare of <ctime>. Not sure why in my system (Xcode + MacOS) it is fine to compile but not in Visual Studio + Windows.
Thank you for the fix. It's OK now.

But, while we speak of compilation, I inform you that I tried without success to compile with g++ (MinGW). Maybe it is also just a missing declaration? Here is an abstract of g++ output:

Code: Select all

C:\Roland\echecs\sources\banksia\projects>g++ -std=c++11 -c ../src/3rdparty/json/*.cpp -O3 -DNDEBUG

C:\Roland\echecs\sources\banksia\projects>g++ -std=c++11 -c ../src/3rdparty/process/process.cpp ../src/3rdparty/process/process_win.cpp -O3 -DNDEBUG
In file included from ../src/3rdparty/process/process.cpp:1:0:
../src/3rdparty/process/process.hpp:118:8: error: 'mutex' in namespace 'std' does not name a type
   std::mutex close_mutex;
        ^~~~~
../src/3rdparty/process/process.hpp:124:8: error: 'thread' in namespace 'std' does not name a type
   std::thread stdout_thread, stderr_thread;
        ^~~~~~
There is also this. Maybe an encoding issue?

Code: Select all

In file included from ../src/game/configmng.cpp:26:0:
../src/game/configmng.h:107:53: error: stray '\303' in program
         bool updateOptionValue(const std::string& naÇYme, const std::string& val);
                                                     ^
../src/game/configmng.h:107:54: error: stray '\237' in program
         bool updateOptionValue(const std::string& naÇYme, const std::string& val);

User avatar
phhnguyen
Posts: 354
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: Banksia - Yet another Chess Tournament Manager

Post by phhnguyen » Thu Jul 04, 2019 12:52 am

Thank Roland!
Roland Chastain wrote:
Wed Jul 03, 2019 4:05 pm
But, while we speak of compilation, I inform you that I tried without success to compile with g++ (MinGW). Maybe it is also just a missing declaration? Here is an abstract of g++ output:

Code: Select all

C:\Roland\echecs\sources\banksia\projects>g++ -std=c++11 -c ../src/3rdparty/json/*.cpp -O3 -DNDEBUG

C:\Roland\echecs\sources\banksia\projects>g++ -std=c++11 -c ../src/3rdparty/process/process.cpp ../src/3rdparty/process/process_win.cpp -O3 -DNDEBUG
In file included from ../src/3rdparty/process/process.cpp:1:0:
../src/3rdparty/process/process.hpp:118:8: error: 'mutex' in namespace 'std' does not name a type
   std::mutex close_mutex;
        ^~~~~
../src/3rdparty/process/process.hpp:124:8: error: 'thread' in namespace 'std' does not name a type
   std::thread stdout_thread, stderr_thread;
        ^~~~~~
I don't know that issue nor solution. It is a 3rd party code. In my system (which I have just downloaded and installed MinGW yesterday) g++ can compile that code without any problem. All needed headers (<thread> and <mutex>) have been declared already in process.hpp.

Perhaps try to reinstall MinGW? Anyone knows and has a solution?
Roland Chastain wrote:
Wed Jul 03, 2019 4:05 pm
There is also this. Maybe an encoding issue?

Code: Select all

In file included from ../src/game/configmng.cpp:26:0:
../src/game/configmng.h:107:53: error: stray '\303' in program
         bool updateOptionValue(const std::string& naÇYme, const std::string& val);
                                                     ^
../src/game/configmng.h:107:54: error: stray '\237' in program
         bool updateOptionValue(const std::string& naÇYme, const std::string& val);
That is an interesting issue. I accidentally added a strange character into the middle of a variant name of a function (the name is not important since we may omit it too). All compilers I have tried before (g++, Xcode in MacOS and Visual Studio in Windows) did not care nor refuse to that extra character but g++ in MinGW :)
It is fixed.
Thanks again!
https://github.com/nguyenpham/Banksia
An open source C++11 chess tournament manager

User avatar
Roland Chastain
Posts: 190
Joined: Sat Jun 08, 2013 8:07 am
Location: France
Full name: Roland Chastain
Contact:

Re: Banksia - Yet another Chess Tournament Manager

Post by Roland Chastain » Thu Jul 04, 2019 1:45 am

phhnguyen wrote:
Thu Jul 04, 2019 12:52 am
Thank Roland!
You're welcome.

Ok, it isn't a problem, I will continue with Visual Studio. :wink:

Post Reply