Zangdar - petit sorcier deviendra grand

Discussion of chess software programming and technical issues.

Moderator: Ras

Carbec
Posts: 160
Joined: Thu Jan 20, 2022 9:42 am
Location: France
Full name: Philippe Chevalier

Zangdar - petit sorcier deviendra grand

Post by Carbec »

Hi,

Finally, my little program came to life.
https://github.com/Carbecq/Zangdar

It seems to play honestly. So I am evaluating it against TSCP. I asked some information about , I got this script :
cutechess-cli.exe ^
-srand %RANDOM% ^
-engine cmd=blunder-7.6.0.exe ^
-engine cmd=blunder-7.5.0.exe ^
-openings file=C:%HOMEPATH%\2moves_v2a.pgn format=pgn order=random ^
-each tc=inf/10+0.1 option.Hash=16 proto=uci ^
-games 2 -rounds 2000 -repeat 2 ^
-concurrency 8 ^
-ratinginterval 50 ^
-tournament gauntlet
It uses an opening book. Seems fine, as I noticed that when I do a match, games are sometimes rather identical, so they don't have a big value. But I don't have such a file, how could I have one ?

Thanks

Philippe
User avatar
algerbrex
Posts: 608
Joined: Sun May 30, 2021 5:03 am
Location: United States
Full name: Christian Dean

Re: Zangdar - petit sorcier deviendra grand

Post by algerbrex »

Hi Philippe,

I got that specific opening book from here: https://onedrive.live.com/?authkey=%21A ... 05&o=OneUp

Congratulations on getting your engine up and running.

It looks like your engine might play around the level of Blunder 5.0.0, so you might find it helpful as a sparing partner: https://github.com/algerbrex/blunder/re ... tag/v5.0.0
Carbec
Posts: 160
Joined: Thu Jan 20, 2022 9:42 am
Location: France
Full name: Philippe Chevalier

Re: Zangdar - petit sorcier deviendra grand

Post by Carbec »

well, i have problems.
I downloaded cute-chess, created a bat file, but it didn't worked. I have this message :
.\tournoi.bat

T:\Echecs\Programmation\Zangdar\tournoi>.\cutechess-cli.exe -srand 14168 -engine cmd=Zangdar_34.exe -engine cmd=tscp181.exe -openings file=2moves_v2a.pgn format=pgn order=random -each tc=10+1 proto=uci -games 2 -rounds 50 -concurrency 4 -ratinginterval 50 -tournament gauntlet
Indexing opening suite...
Warning: Engine UciEngine(1): Chess protocol was not started in time
Warning: Engine UciEngine(2): Chess protocol was not started in time
Terminating process of engine UciEngine(1)
Terminating process of engine UciEngine(2)
Finished game 3 (Zangdar 0.34 vs UciEngine): * {No result}
Score of UciEngine vs UciEngine: 0 - 0 - 0 [nan] 0
Finished game 4 (UciEngine vs Zangdar 0.34): * {No result}
Score of UciEngine vs UciEngine: 0 - 0 - 0 [nan] 0
Warning: Engine UciEngine(5): Chess protocol was not started in time
Warning: Engine UciEngine(6): Chess protocol was not started in time
Terminating process of engine UciEngine(5)
Terminating process of engine UciEngine(6)
But, If I use the graphical cute-chess, I can do a match.

If anyone have an idea ?

Thanks

Philippe
User avatar
Roland Chastain
Posts: 673
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Zangdar - petit sorcier deviendra grand

Post by Roland Chastain »

Carbec wrote: Sat Jan 29, 2022 7:53 pm I downloaded cute-chess, created a bat file, but it didn't worked. I have this message :
Hello. The protocol for TSCP is xboard.

Code: Select all

-engine name="TSCP" cmd="tscp181.exe" proto="xboard"
:wink:
Qui trop embrasse mal étreint.
User avatar
Roland Chastain
Posts: 673
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Zangdar - petit sorcier deviendra grand

Post by Roland Chastain »

I don't want to tell you what you have to do, but why don't you share the source code?

Linux users (as I am) could try to compile your engine for Linux and test it.
Qui trop embrasse mal étreint.
Carbec
Posts: 160
Joined: Thu Jan 20, 2022 9:42 am
Location: France
Full name: Philippe Chevalier

Re: Zangdar - petit sorcier deviendra grand

Post by Carbec »

Hi,

About TSCP, i indeed thought that the protocol was perhaps the problem. But modifying the protocol didn't change anything :

Code: Select all

T:\Echecs\Programmation\Zangdar\tournoi>.\cutechess-cli.exe -srand 4173 -engine cmd=Zangdar_34.exe proto=uci -engine cmd=TSCP_181b.exe proto=xboard -openings file=2moves_v2a.pgn format=pgn order=random -each tc=40/60+1 -games 2 -rounds 50 -concurrency 4 -ratinginterval 50 -tournament gauntlet
Indexing opening suite...
Started game 2 ofWarning: XboardEngine does not support the setboard command, using the edit command now
 100 (XboardEngine vs Zangdar 0.34)
Started game 1 of 100 (Zangdar 0.34 vs XboardEngine)
Warning: XboardEngine does not support the setboard command, using the edit command now
SWarning: XboardEngine does not support the setboard command, using the edit command now
tWarning: XboardEngine does not support the setboard command, using the edit command now
arted game 3 of 100 (Zangdar 0.34 vs XboardEngine)
Started game 4 of 100 (XboardEngine vs Zangdar 0.34)
Finished game 4 (XboardEngine vs Zangdar 0.34): 0-1 {White makes an illegal move: e2e4}
Score of Zangdar 0.34 vs XboardEngine: 1 - 0 - 0  [1.000] 1
StaWarning: XboardEngine does not support the setboard command, using the edit command now
rted game 5 of 100 (Zangdar 0.34 vs XboardEngine)
Finished game 5 (Zangdar 0.34 vs XboardEngine): 1-0 {Black makes an illegal move: e2e4}
Score of Zangdar 0.34 vs XboardEngine: 2 - 0 - 0  [1.000] 2
SWarning: XboardEngine does not support the setboard command, using the edit command now
tarted game 6 of 100 (XboardEngine vs Zangdar 0.34)
Finished game 6 (XboardEngine vs Zangdar 0.34): * {No result}
Score of Zangdar 0.34 vs XboardEngine: 2 - 0 - 0  [1.000] 2
Finished game 2 (XboardEngine vs Zangdar 0.34): * {No result}
Score of Zangdar 0.34 vs XboardEngine: 2 - 0 - 0  [1.000] 2
Finished game 1 (Zangdar 0.34 vs XboardEngine): * {No result}
Score of Zangdar 0.34 vs XboardEngine: 2 - 0 - 0  [1.000] 2
Finished game 3 (Zangdar 0.34 vs XboardEngine): * {No result}
Score of Zangdar 0.34 vs XboardEngine: 2 - 0 - 0  [1.000] 2
...      Zangdar 0.34 playing White: 1 - 0 - 0  [1.000] 1
...      Zangdar 0.34 playing Black: 1 - 0 - 0  [1.000] 1
...      White vs Black: 1 - 1 - 0  [0.500] 2
Elo difference: inf +/- nan, LOS: 92.1 %, DrawRatio: 0.0 %
Finished match
Thanks to Algebrex, I could to a match against Blunder 5. Here are the results :

Code: Select all

Score of Zangdar 0.34 vs Blunder 5.0.0: 34 - 48 - 18  [0.430] 100
...      Zangdar 0.34 playing White: 18 - 23 - 9  [0.450] 50
...      Zangdar 0.34 playing Black: 16 - 25 - 9  [0.410] 50
...      White vs Black: 43 - 39 - 18  [0.520] 100
Elo difference: -49.0 +/- 62.8, LOS: 6.1 %, DrawRatio: 18.0 %
I don't know what to think about the elo, but Im rather satisfied )
Do you know if the games are saved somewhere ? I saw that Zangdar played an illegal move , and I would like to know what happened.

I plan to make public the source. I am now cleaning it. Its just a working program, lots of lines commented out, some parts are just useless. Even for me, its not good. I was too eager to advance ).

Another thing, I begin to be very tired of being disconnected every minute. Sometimes, I can't even (re)logging. How that is it possible ?

Thanks

Philippe
Carbec
Posts: 160
Joined: Thu Jan 20, 2022 9:42 am
Location: France
Full name: Philippe Chevalier

Re: Zangdar - petit sorcier deviendra grand

Post by Carbec »

Hi,

I put the files on Github.

Philippe
Carbec
Posts: 160
Joined: Thu Jan 20, 2022 9:42 am
Location: France
Full name: Philippe Chevalier

Re: Zangdar - petit sorcier deviendra grand

Post by Carbec »

Hi,

I have a strange problem, i got 2 games in a match which ended by "illegal move"; but without saying which move.
How can I progress ? Is there an option that gives more information ?

Thanks

Philippe
User avatar
lithander
Posts: 912
Joined: Sun Dec 27, 2020 2:40 am
Location: Bremen, Germany
Full name: Thomas Jahn

Re: Zangdar - petit sorcier deviendra grand

Post by lithander »

To debug I suggest you set the concurrency to 1 (no games played in parallel) and add the "-debug" option. You'll get a very detailed log of what's going on. At least with uci you can just copy and paste the commands that were fed to your engine and reproduce most issues easily.

Also I'd suggest you add the "-pgnout log.pgn" option. Cute chess will then write a PGN for each game that has been played. This can be used together with concurrency > 1 with no problems. All games go into the same log.

Last tip: Consider using faster time controls. I use something like tc=5+0.3 which is a game that starts with 5 seconds on the clock and 300ms increment.
Minimal Chess (simple, open source, C#) - Youtube & Github
Leorik (competitive, in active development, C#) - Github & Lichess
User avatar
Roland Chastain
Posts: 673
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Zangdar - petit sorcier deviendra grand

Post by Roland Chastain »

I tried to compile under Linux with this command:

Code: Select all

gcc -o zangdar *.cpp
I get many "undefined reference" errors.

Code: Select all

/usr/bin/ld: /tmp/ccS9xrk6.o: in function `__static_initialization_and_destruction_0(int, int)':
Attack.cpp:(.text+0x58f): undefined reference to `std::allocator<char>::allocator()'
/usr/bin/ld: Attack.cpp:(.text+0x5a8): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
/usr/bin/ld: Attack.cpp:(.text+0x5b7): undefined reference to `std::allocator<char>::~allocator()'
...
Qui trop embrasse mal étreint.