That´s:
Who says if any move results in check or checkmate: GUI or engine?
I guess GUI, I´m right?
The engine could "know" it for itself, but who must say if it is or not must be the GUI, I´m right?
Who says if is check or checkmate: GUI or engine?
Moderator: Ras
-
Luis Babboni
- Posts: 464
- Joined: Sat Feb 28, 2015 4:37 pm
- Location: Argentina
-
Luis Babboni
- Posts: 464
- Joined: Sat Feb 28, 2015 4:37 pm
- Location: Argentina
Re: Who says if is check or checkmate: GUI or engine?
For example for promotions it must be the engine who needs to communicate to GUI:
"bestmove b7b8Q"
But what about if b7b8Q is check?
The engine must says:
"bestmove b7b8Q+"
or just:
"bestmove b7b8Q"
and the GUI see its check and adds the "+" for moves display?
"bestmove b7b8Q"
But what about if b7b8Q is check?
The engine must says:
"bestmove b7b8Q+"
or just:
"bestmove b7b8Q"
and the GUI see its check and adds the "+" for moves display?
-
op12no2
- Posts: 566
- Joined: Tue Feb 04, 2014 12:25 pm
- Location: Gower, Wales
- Full name: Colin Jenkins
Re: Who says if is check or checkmate: GUI or engine?
Hi Luis,
For UCI you just send the move back, no +.
For UCI you just send the move back, no +.
-
Luis Babboni
- Posts: 464
- Joined: Sat Feb 28, 2015 4:37 pm
- Location: Argentina
Re: Who says if is check or checkmate: GUI or engine?
LOL... just now thinking in it I understood why mate is "#" and not "++"...
it is needed one byte less (or at least the same cantity, 1, than for just check) , I´m right?
it is needed one byte less (or at least the same cantity, 1, than for just check) , I´m right?
Last edited by Luis Babboni on Tue Mar 17, 2015 1:38 pm, edited 1 time in total.
-
Luis Babboni
- Posts: 464
- Joined: Sat Feb 28, 2015 4:37 pm
- Location: Argentina
Re: Who says if is check or checkmate: GUI or engine?
Thanks!op12no2 wrote:Hi Luis,
For UCI you just send the move back, no +.
-
lucasart
- Posts: 3243
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: Who says if is check or checkmate: GUI or engine?
did you read the UCI spec ? or shall I google it for you ?Luis Babboni wrote:For example for promotions it must be the engine who needs to communicate to GUI:
"bestmove b7b8Q"
But what about if b7b8Q is check?
The engine must says:
"bestmove b7b8Q+"
or just:
"bestmove b7b8Q"
and the GUI see its check and adds the "+" for moves display?
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
-
Evert
- Posts: 2929
- Joined: Sat Jan 22, 2011 12:42 am
- Location: NL
Re: Who says if is check or checkmate: GUI or engine?
Well, clearly, the engine needs to tell the GUI what it wants to promote to.Luis Babboni wrote:For example for promotions it must be the engine who needs to communicate to GUI:
"bestmove b7b8Q"
You need to send the piece letter in lower case though.
What about it?But what about if b7b8Q is check?
In UCI protocol, it is assumed that the GUI understands the rules of the game and handles cosmetic fluff like adding "+" for checking moves.The engine must says:
"bestmove b7b8Q+"
or just:
"bestmove b7b8Q"
and the GUI see its check and adds the "+" for moves display?
-
Evert
- Posts: 2929
- Joined: Sat Jan 22, 2011 12:42 am
- Location: NL
Re: Who says if is check or checkmate: GUI or engine?
No.Luis Babboni wrote:LOL... just now thinking in it I understood why mate is "#" and not "++"...
it is needed one byte less (or at least the same cantity, 1, than for just check) , I´m right?
-
Luis Babboni
- Posts: 464
- Joined: Sat Feb 28, 2015 4:37 pm
- Location: Argentina
-
hgm
- Posts: 28515
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Who says if is check or checkmate: GUI or engine?
Note that the UCI move format is specified in lower case, (so b7b8q), also for the promotion piece, and I have never seen an engine do that differently. UCI only specifies that option names are case insensitive, it doesn't say this for moves.Luis Babboni wrote:For example for promotions it must be the engine who needs to communicate to GUI:
"bestmove b7b8Q"
But what about if b7b8Q is check?
The engine must says:
"bestmove b7b8Q+"
or just:
"bestmove b7b8Q"
and the GUI see its check and adds the "+" for moves display?
The UCI specs do not guarantee the engine will never be presented with a position where it is checkmated. So it can depend on the GUI or the GUI settings whether it detects the mate, or possible other game-end conditions. (Like surviving on the central squares in King of the Hill.) The obvious solution when presented with a position where you have no legal moves would be to print "bestmove 0000", and indicate with the score whether this is because you won, lost or because it is a draw.