Re: On-line engine blitz tournament September

Discussion of chess software programming and technical issues.

Moderator: Ras

Joost Buijs
Posts: 1726
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: On-line engine blitz tournament September

Post by Joost Buijs »

flok wrote: ↑Fri Oct 02, 2026 8:40 am
Works perfectly with jshriver's adapter.
Folkert, thanks for the info!

Each time we encounter incompatibilities they will be fixed. I still have a copy of ChessPartner somewhere in a backup, so I will test that one locally.
User avatar
jshriver
Posts: 1412
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: On-line engine blitz tournament September

Post by jshriver »

flok wrote: ↑Fri Oct 02, 2026 8:40 am Works perfectly with jshriver's adapter.
I've done some updates and pushed a new release v2.1.5 which now includes a GUI. I've tested it and have not had any issues, but feel free to let me know if there are any. Be mindful of the new config changes. GUI: "Yes" to enable it. Tested it in Linux and Windows and both worked well, I dont have access to a Mac.

https://github.com/jshriver/icsdrone-rs

Cheers!
-Josh

Image
User avatar
flok
Posts: 630
Joined: Tue Jul 03, 2018 10:19 am
Full name: Folkert van Heusden

Re: On-line engine blitz tournament September

Post by flok »

jshriver wrote: ↑Mon Oct 05, 2026 12:25 am
flok wrote: ↑Fri Oct 02, 2026 8:40 am Works perfectly with jshriver's adapter.
I've done some updates and pushed a new release v2.1.5 which now includes a GUI. I've tested it and have not had any issues, but feel free to let me know if there are any. Be mindful of the new config changes. GUI: "Yes" to enable it. Tested it in Linux and Windows and both worked well, I dont have access to a Mac.

https://github.com/jshriver/icsdrone-rs
Looks pretty! I love it!
Suggestion(!): mark moves in the movelist maybe with a different color or so if they're from the openingbook.
Connecting with gui mode takes slightly longer than in the tui, is that correct?

Oh and a resign button for painful positions like this would be cool :-)

Image

Noticed a strange error:

Image

and here the score is negative but the graph looks positive:

Image

And maybe include the score and time used in the pgn?

Like:

Code: Select all

10. Qc2 {+0.59/9 0.271s, n=642321} O-O {-0.87/11 0.276s, n=665731}
It takes a bit for the openingbook to load (1.7 GB), that is visible in the tui but not in gui - in the gui it looks like it is connecting to the peer but taking long.

Last suggestions: filter the empty "fics%" lines in the gui and add a timestamp (milliseconds) in the logging window.
Bart Weststrate
Posts: 88
Joined: Fri Mar 18, 2016 3:34 pm

Re: On-line engine blitz tournament September

Post by Bart Weststrate »

jshriver wrote: ↑Mon Oct 05, 2026 12:25 am
flok wrote: ↑Fri Oct 02, 2026 8:40 am Works perfectly with jshriver's adapter.
I've done some updates and pushed a new release v2.1.5 which now includes a GUI. I've tested it and have not had any issues, but feel free to let me know if there are any. Be mindful of the new config changes. GUI: "Yes" to enable it. Tested it in Linux and Windows and both worked well, I dont have access to a Mac.

https://github.com/jshriver/icsdrone-rs

Cheers!
-Josh

Image
Joshua there is a "bug" that breaks the uci covention: is sends fens in stead of [position startpos] move move move... so the engine never can detect a draw by repeating position. Remember that a uci engine is stateless where a winboard engine is not.

According to Claude:

Bug: engine never sees real game history, breaks its own repetition detection/avoidance

Every turn, the bot sends the engine only the current position as a bare FEN, with no move list: self.engine.set_position(&fen, &[]).await?; in app.rs's handle_style12.

A FEN has no memory of earlier positions. UCI engines detect threefold repetition using the move list given via position fen <X> moves <m1> <m2> ... — that's how they build their own Zobrist-key history. Since the bot always sends an empty move list, the engine has no idea it has seen any of the game's earlier positions; every turn looks like move one of a brand-new search.

Observed symptom: a rated blitz game where White (our engine) had a kibitzed advantage of roughly +1.00 pawn, then shuffled a knight/rook/queen and let the game end in an avoidable threefold-repetition draw (full PGN included in the file). This isn't the engine "choosing" a draw — each turn it independently re-derived the same shuffling move with zero awareness the position had already occurred, because it was never told.

Root cause: the code's own comment calls this deliberate — "simpler than the original's incremental SendMovesToComputer/SendBoardToComputer bookkeeping." That simplification is the bug; the original's incremental tracking is what gave the engine real history to reason about.

Suggested fix: track real UCI moves since game start (or since joining mid-game) and send position fen <base_fen> moves <m1> ... <mN> every turn instead of a bare current FEN, watching for FICS takebacks (truncate/overwrite, don't append). pgn.rs's record_move already has this exact truncate-and-resync pattern for SavePGN, just keyed on SAN — same approach applies. One wrinkle: style12's last_move_verbose field isn't UCI notation and needs translating (promotions need the piece suffix; castling needs the king squares reconstructed since style12 gives no squares for O-O/O-O-O).

---
For what it's worth, I already applied this exact fix to our local build, so your bot plays correctly now — this report is just to get it fixed upstream too.
Bart Weststrate
Posts: 88
Joined: Fri Mar 18, 2016 3:34 pm

Re: On-line engine blitz tournament September

Post by Bart Weststrate »

It also has no active pondering... It seems it doesn't send go pondering... and ponderhit...

Is seems that there is work to do. :D
jdart
Posts: 4445
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: On-line engine blitz tournament September

Post by jdart »

Not having game history would not only break repetition detection, but also 50-move draw detection.
Bart Weststrate
Posts: 88
Joined: Fri Mar 18, 2016 3:34 pm

Re: On-line engine blitz tournament September

Post by Bart Weststrate »

jdart wrote: ↑Wed Oct 07, 2026 8:04 pm Not having game history would not only break repetition detection, but also 50-move draw detection.
I think that a winboard engine needs only the move. But a uci engine is stateless so needs everything from the beginning. So this is "strange" for a drone version adapted for uci engines. I gave up on it because in this state it is to problematic.

With due respect to all the good work but it needs imho a good uci convention auditing.
User avatar
jshriver
Posts: 1412
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: On-line engine blitz tournament September

Post by jshriver »

Bart Weststrate wrote: ↑Wed Oct 07, 2026 8:48 pm
jdart wrote: ↑Wed Oct 07, 2026 8:04 pm Not having game history would not only break repetition detection, but also 50-move draw detection.
I think that a winboard engine needs only the move. But a uci engine is stateless so needs everything from the beginning. So this is "strange" for a drone version adapted for uci engines. I gave up on it because in this state it is to problematic.

With due respect to all the good work but it needs imho a good uci convention auditing.
Thanks for the info, I will do my best to get those issues fixed before this months tournament . Will update when it has been fixed and tested. Cheers, always open to constructive criticism.

-Josh
User avatar
jshriver
Posts: 1412
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: On-line engine blitz tournament September

Post by jshriver »

I've released v2.2.1 with all the fixes and changes Bart recommended. Thanks for testing, it was very helpful. Please give it a try. Added timeseal v1 in the last release but here are the current changes.

Engine play
Repetition fix: the engine used to be sent only the current position, so it couldn't see earlier positions and would shuffle into threefold-repetition draws. It now gets the full move history every turn. Takebacks and joining a game midway are handled.
Pondering: with "Ponder": "true", the engine thinks on the opponent's time about the reply it expects. If the opponent plays that move, the engine keeps what it found; if not, it stops and searches the real position.
Engine book detection: moves from the engine's own book (OwnBook) are now recognized, and the GUI and PGN mark them as book moves.

Saved games (SavePGN)
Clock times: every move gets the clock left after it ([%clk 0:04:58]), which Lichess, ChessBase and SCID show as a clock.
Engine notes: the bot's moves get score/depth and the time taken, e.g. {+0.35/18 2.1s}, or {book} for book moves.

GUI
Book loading: the status bar shows the opening book loading, with its size and how long the load took.
Console: bare fics% prompt lines are hidden, and every line gets a timestamp to the millisecond.
Score chart: now uses the bot's side, matching the engine panel, with a "+ = us ahead" caption.
Resign button: appears during a game and asks for confirmation before resigning.
Book moves: highlighted on the light-square blue in the Moves panel.
Fullscreen: pressing F outside the input line toggles it.
WSL2: the window falls back to X11 when the Wayland connection is missing, and if the window can't open at all, it says why in the terminal instead of exiting silently.

Terminal
FICS style 1 board: black pieces marked *, the board drawn from the bot's side, and the move number, last move, clocks and strengths down the right side. The plain and colored versions both use it.


Image

Image
User avatar
jshriver
Posts: 1412
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: On-line engine blitz tournament September

Post by jshriver »

Found another promotion bug, fixed it and added a keepalive/re-connect feature.

v2.2.5 should be stable and bug free for the long run now.
https://github.com/jshriver/icsdrone-rs ... tag/v2.2.5

Any requests or bug reports are gladly welcome. Hope to be in this months tournament.