SMIRF-UCI 0.0.1 (new repository)

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

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

SMIRF-UCI 0.0.1 (new repository)

Post by Roland Chastain »

Hello everybody!

I had abandoned that project and deleted the GitHub repository, but I tested the engine today (in a FRC tournament with cutechess-cli), and it seems to work well, so I decided to recreate a repository: https://codeberg.org/rchastain/smirf-uci

It's an UCI interface for SMIRF chess engine. It is largely inspired by Smirfoglot, but supports FRC (what Smirfoglot doesn't do).

It even works on Linux, with wine. If someone is interested, here is the script I used to test the engine under Linux:

Code: Select all

/home/roland/Applications/cutechess-cli/cutechess-cli \
-variant fischerandom \
-rounds 8 \
-engine conf="Alouette 0.1.7" \
-engine proto=uci name="Smirf UCI 0.0.1 BC-176f" cmd="wine main.exe" dir="/home/roland/Documents/pascal/echecs/smirf-2301270955/uci-engine/BC-176f/" \
-engine proto=uci name="Smirf UCI 0.0.1 BC-178n" cmd="wine main.exe" dir="/home/roland/Documents/pascal/echecs/smirf-2301270955/uci-engine/BC-178n/" \
-engine proto=uci name="Smirf UCI 0.0.1 BC-180e" cmd="wine main.exe" dir="/home/roland/Documents/pascal/echecs/smirf-2301270955/uci-engine/BC-180e/" \
-pgnout tournoi.pgn \
-each tc=40/60 \
-wait 500 2>> tournoi.err | tee tournoi.log
There is an archive with binary here.
Qui trop embrasse mal étreint.
User avatar
Sylwy
Posts: 4567
Joined: Fri Apr 21, 2006 4:19 pm
Location: IASI - the historical capital of MOLDOVA
Full name: SilvianR

Re: SMIRF-UCI 0.0.1 (new repository)

Post by Sylwy »

It works quite well. A beautiful achievement. Thank you!
One observation: the UCI version moves too quickly (1-2 seconds, maximum 3 per move). Below is a comparison with an original version:

Image

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

Re: SMIRF-UCI 0.0.1 (new repository)

Post by Roland Chastain »

Sylwy wrote: Mon May 20, 2024 9:39 am It works quite well. A beautiful achievement. Thank you!
Thank you for the compliment.
Sylwy wrote: Mon May 20, 2024 9:39 am One observation: the UCI version moves too quickly (1-2 seconds, maximum 3 per move). Below is a comparison with an original version:
OK, I will check that.

I see on your screenshot that the original version (Smirfoglot I think) uses the BC-173g DLL. The UCI version uses BC-180e (but works also with two other versions that I included in the ZIP file).

I would be inteterested to try the BC-173g DLL. Would you mind sending it to me or making it available somewhere? I would also like to have your SMIRF logo. :wink:
Qui trop embrasse mal étreint.
User avatar
Sylwy
Posts: 4567
Joined: Fri Apr 21, 2006 4:19 pm
Location: IASI - the historical capital of MOLDOVA
Full name: SilvianR

Re: SMIRF-UCI 0.0.1 (new repository)

Post by Sylwy »

Roland Chastain wrote: Mon May 20, 2024 11:30 am
I see on your screenshot that the original version (Smirfoglot I think) uses the BC-173g DLL. The UCI version uses BC-180e (but works also with two other versions that I included in the ZIP file).

I would be inteterested to try the BC-173g DLL. Would you mind sending it to me or making it available somewhere? I would also like to have your SMIRF logo. :wink:
Already sent (see PM) !
User avatar
Roland Chastain
Posts: 657
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: SMIRF-UCI 0.0.1 (new repository)

Post by Roland Chastain »

Here is the part of the program that manages the time:

Code: Select all

              if BeginsWith('go', LCmd) then
              begin
                if IsGoCmd(LCmd, LWTime, LBTime, LWInc, LBinc) then // go wtime 60000 btime 60000 winc 1000 binc 1000
                begin
                  Assert(LSmirf.DoCmd('T', 'W', LWInc + LWTime div 50) <> '');
                  Assert(LSmirf.DoCmd('T', 'B', LBinc + LBTime div 50) <> '');
                  Assert(LSmirf.DoCmd('T', '#', 1) <> ''); // Time is for one move
                end else
                if IsGoCmd(LCmd, LWTime, LBTime, LMTG) then // go wtime 59559 btime 56064 movestogo 38
                begin
                  Assert(LSmirf.DoCmd('T', 'W', LWTime div LMTG) <> '');
                  Assert(LSmirf.DoCmd('T', 'B', LBTime div LMTG) <> '');
                  Assert(LSmirf.DoCmd('T', '#', 1) <> ''); // Time is for one move
                end else
                if IsGoCmd(LCmd, LWTime, LBTime) then // go wtime 600000 btime 600000
                begin
                  Assert(LSmirf.DoCmd('T', 'W', LWTime) <> '');
                  Assert(LSmirf.DoCmd('T', 'B', LBTime) <> '');
                  Assert(LSmirf.DoCmd('T', '#', 0) <> ''); // Time is for all moves
                end else
                if IsGoCmd(LCmd, LMTime) then // go movetime 500
                begin
                  Assert(LSmirf.DoCmd('T', 'W', LMTime) <> '');
                  Assert(LSmirf.DoCmd('T', 'B', LMTime) <> '');
                  Assert(LSmirf.DoCmd('T', '#', 1) <> ''); // Time is for one move
                end else
                  Assert(FALSE, 'Cannot parse go command');
I think to modifying the first part like this:

Code: Select all

                if IsGoCmd(LCmd, LWTime, LBTime, LWInc, LBinc) then // go wtime 60000 btime 60000 winc 1000 binc 1000
                begin
                  Assert(LSmirf.DoCmd('T', 'W', LWInc + LWTime) <> '');
                  Assert(LSmirf.DoCmd('T', 'B', LBinc + LBTime) <> '');
                  Assert(LSmirf.DoCmd('T', '#', 0) <> ''); // Time is for all moves
Qui trop embrasse mal étreint.
User avatar
Roland Chastain
Posts: 657
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

SMIRF-UCI 0.0.2

Post by Roland Chastain »

SMIRF-UCI 0.0.2 is available.
  • Better time management (I hope, see previous post)
  • 'go' command correctly parsed in any order (for compatibility with WinBoard)
  • Includes DLL version BC-173g-X
The DLL in the main directory is version BC-180e. To use the other versions, copy smirf.exe in the corresponding folder.
Qui trop embrasse mal étreint.