Hi,
Is it possible for a chess engine to propose a draw and/or give up when using the UCI protocol?
If so: how?
give up / propose draw
Moderators: hgm, Dann Corbit, Harvey Williamson
-
Ferdy
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: give up / propose draw
Propose a draw is not, but give up is possible, just send an illegal move likeflok wrote:Hi,
Is it possible for a chess engine to propose a draw and/or give up when using the UCI protocol?
If so: how?
bestmove a1e8 and hope the gui will flag you of illegal move (often the case) and get a loss.
-
Ferdy
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: give up / propose draw
Another option is to send the worst move and hope the opponent will mate you early or when gui adjudication is on, the game will be terminated early.flok wrote:Hmmm, a bit clumsy.
-
Ferdy
- Posts: 4833
- Joined: Sun Aug 10, 2008 3:15 pm
- Location: Philippines
Re: give up / propose draw
Still another method of giving up is by time forfeit. After receiving go ... command, search without limit, don't return bestmove, until you receive a stop command, by then you can send your bestmove.flok wrote:Hi,
Is it possible for a chess engine to propose a draw and/or give up when using the UCI protocol?
If so: how?
In this case the gui had sent stop command because you have already exceeded the time allocation.
-
flok
Re: give up / propose draw
I would like to propose an extension to the UCI protocol:
- draw-proposal by engine
- engine give-up.
My idea is that the "bestmove" stays mostly the same but gets an extra keyword after the move being "draw-req" or "giveup-req".
The GUI can then decide to go with the request and indeed propose the draw or give up the game to the human or ignore this and just pick the move that should also be included in the bestmove-output.
To make sure it doesn't give incompatibilities these enhancements could be default-off and be switched on using a "setoption"-command (in response to two new options "UCI_AllowDraw" and "UCI_AllowGiveUp").
- draw-proposal by engine
- engine give-up.
My idea is that the "bestmove" stays mostly the same but gets an extra keyword after the move being "draw-req" or "giveup-req".
The GUI can then decide to go with the request and indeed propose the draw or give up the game to the human or ignore this and just pick the move that should also be included in the bestmove-output.
To make sure it doesn't give incompatibilities these enhancements could be default-off and be switched on using a "setoption"-command (in response to two new options "UCI_AllowDraw" and "UCI_AllowGiveUp").
-
hgm
- Posts: 27703
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: give up / propose draw
Well, it is very easy to propose improvementes for UCI, and most of the UCI dialects (e.g. USI, UCCI) have indeed added such features. But, unlike WB protocol, which evolves with the needs of the community, UCI is essentially a dead protocol, which stands immutable in the face of time with all its defects...
-
JoshPettus
- Posts: 730
- Joined: Fri Oct 19, 2012 2:23 am
Re: give up / propose draw
As such I enjoy this bit of irony on the chessprograming wiki
At least CECP has an opensource reference implementation and base in xboard.
Also upto date documentation. (Just as with so much else, huge thanks to Harm there.)
There really isn't a single UCI project that people can contribute and maintain, is there?It has, by-in-large, replaced the older Chess Engine Communication Protocol (WinBoard/XBoard).
At least CECP has an opensource reference implementation and base in xboard.
Also upto date documentation. (Just as with so much else, huge thanks to Harm there.)
-
flok
Re: give up / propose draw
I can't find the USI and UCCI specs?hgm wrote:Well, it is very easy to propose improvementes for UCI, and most of the UCI dialects (e.g. USI, UCCI) have indeed added such features. But, unlike WB protocol, which evolves with the needs of the community, UCI is essentially a dead protocol, which stands immutable in the face of time with all its defects...
-
flok
Re: give up / propose draw
I'm more than willing to do so.JoshPettus wrote:As such I enjoy this bit of irony on the chessprograming wikiThere really isn't a single UCI project that people can contribute and maintain, is there?It has, by-in-large, replaced the older Chess Engine Communication Protocol (WinBoard/XBoard).
At least CECP has an opensource reference implementation and base in xboard.
Also upto date documentation. (Just as with so much else, huge thanks to Harm there.)
Question is though: are others willing to send the changes they've implemented to me?