Moderator: Andres Valverde
About your point (1): don't UCI engines somehow complain if you feed them an illegal move, amongst the sequence of moves needed to setup the current position? If they do, I would simply relay that to the GUI. (Not that I plan to allow WB to feed them any illegal moves, of course.)
Usage of SAN is not default in XBoard protocol, and not even recommended.
But even if it would look 'amateurish', I am looking at this purely from a pragmatic point of view. I want to create the possibility to play my own (WB) Shogi engine against USI opponents, with the least possible amount of effort. The only requirement is that they play automatically from the initial position, and that I can record the correct game result.
Michel wrote:No. UCI engines just ignore silently everything which is not part of the protocol (including illegal moves).
I know but UCI pv's do not look very nice. For one thing they don't show the piece that's moving. Normally it is the GUI's job to translate these
into human readable PV's.
Well, then UCI engines do look amateurish by definition,
I must admit that my native WB Xiangqi engine HaQiKi D also does not do any form of legality checking, but blindly copies the from-square tot the to-square, (obliterating anything that might be n the latter, be it friend or foe).
I am slowly drifting towards the opinion that human-readability of the PV is only a poor-man's solution anyway: when I want to know what the engine is thinking about, I just have the GUI play it out for me on the board.
Michel wrote:Of course a UCI engine will (should) not crash when fed illegal moves. It will just ignore them.
It seems to me you are slowly drifting towards the UCI way of doing things...
What makes you say that?Surely the feature to step through the PV has nothing to do with the protocol used to transfer the PV between engine and GUI? Displaying positions is by definition a GUI task, which the engines should never be involved in.
IMO engines that do are simply abusing the freedom that WB protocol allows them.
H.G.Muller wrote:Don't worry, I am not trying to dump this on you. I just wanted some pointers that set me in the right direction for doing this.
About your point (1): don't UCI engines somehow complain if you feed them an illegal move, amongst the sequence of moves needed to setup the current position? If they do, I would simply relay that to the GUI. (Not that I plan to allow WB to feed them any illegal moves, of course.)
The other points do not worry me much. I guess Shogi engines typically do manage their own books in their own formats. I don't think USI suggested a standardiztion for books. Most variants would not have any opening theory at all anyway. And if all else fails, there is always the GUI book, which has the same format as any adapter book would have had. Usage of SAN is not default in XBoard protocol, and not even recommended. Result-claiming by engines could even be argued to be undesirable.
But even if it would look 'amateurish', I am looking at this purely from a pragmatic point of view. I want to create the possibility to play my own (WB) Shogi engine against USI opponents, with the least possible amount of effort. The only requirement is that they play automatically from the initial position, and that I can record the correct game result.
To the engine or GUI programmer: far from it.
Would it be correct to state that UCI engines actually do claim mates through the pv info line?
What is a UCI engine supposed to do if you feed it a position where it is checkmated, and set it thinking? Would it answer with info score mate 0 ...?
RobboLito VERSION k-m��
uci
id name RobboLito version ci
id author Yakov Petrovich Golyadkin, Igor Igorovoich Igoronov, Roberto Pescatore
id copyright Yakov Petrovich Golyadkin (all), 92th year from Revolution, PUBLICDOMAIN (workers)
id dedication To Vladimir Ilyich
option name TranspositionalTabularSizing (Zobrist) in MegaBytes. Note: Only dyadic powers suffice terminally! type spin min 1 max 16384 default 32
uciok
position startpos moves f2f3 e7e5 g2g4 d8h4
go
info time 0 nodes 0 nps 0 score mate 0 depth 0 seldepth 1 pv NULL
bestmove NULL
uci
id name Rybka 2.2n2 mp
id author Vasik Rajlich
option name Hash type spin min 2 max 4096 default 32
...
option name Emergency Time Buffer type combo default Medium var Small var Medium var Large
uciok
position startpos moves f2f3 e7e5 g2g4 d8h4
go
info depth 2
info depth 2 time 1 nodes 18 nps 18432
info depth 3
info depth 3 time 1 nodes 18 nps 18432
info depth 4
info depth 4 time 2 nodes 18 nps 9216
info depth 5
info depth 5 time 2 nodes 18 nps 9216
info depth 1 score cp 0 nodes 18 pv a1a1
info time 2 nodes 18 nps 576
bestmove a1a1
it usually is. But it is a pretty bad idea nevertheless, because is makes the protocol incapable of handling variants that the GUI does not know.
Btw, I looked at the UCI protocol specs, and it says somewhere: "A nullmove from the Engine to the GUI should be send as 0000." And wouldn't it seem logical that when you have no legal moves, (or for other reasons want to express a refusal to move), you would have to send a null move as bestmove? Why else would an engine ever want to send null moves to the GUI? PVs cannot contain null moves, can they?
Another question: If an engine does not provide a ponder move with its bestmove, and ponder is on... Should the GUI then set the engine pondering the position with the opponent to move?
Return to Winboard and related Topics
Users browsing this forum: No registered users and 14 guests