Steve Maughan wrote: ↑Tue Aug 05, 2025 9:41 pm
With respect, you're trying to solve a problem that doesn't really exist. From a human perspective, sending the start position (or FEN) and all moves seems wasteful. But UCI is a stateless protocol, where the engine is not expected to remember anything (although it can choose to retain history tables etc). In practice the verbose communication has zero impact on playing strength. A decent engine can play a whole game with 1 second + 0.05 second increments without the verbose communication playing a significant role.
— Steve
I concur with you. I tried to measure the time spent to decipher the position command using gprof or perf (under Linux) with the same ultrabullet time control you mention (1 + 0.05 sec), I got less than 0.1% of the time spent to interpret the position command. So pretty much negligible.
The command is also very simple to implement. Less than 10 lines of code in C for example:
Ok. Convinced.
One more thing: I noticed (testing with Stockfish) If you enter somewhere an illegal move in the command, it just stops there.
Does that mean we parse each move and check if it is actually inside our movelist? Thus meaning with every position+fen+moves command we need to generate the moves foreach move?
Yes I think you are right.
Parsing the fen is fast. Making the moves (and checking them) is more expensive.
I did some measurements with 15 moves. Bigger ones I still need to make.
It took around 12 microseconds.
Speaking of that: is there some online tool which makes a fen-string with moves from a PGN-game?
ericlangedijk wrote: ↑Thu Aug 28, 2025 11:43 am
Now for repetition detection...
For that I believe it is needed, when a game is going on, the complete movelist is sent each and every move isn't it?
ericlangedijk wrote: ↑Thu Aug 28, 2025 11:43 am
Now for repetition detection...
For that I believe it is needed, when a game is going on, the complete movelist is sent each and every move isn't it?
The complete list is sent but for repetition detection your engine only needs to store the moves beginning after the last irreversible move which keeps this list inside a 50-moves buffer.