give up / propose draw

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

flok

give up / propose draw

Post by flok »

Hi,

Is it possible for a chess engine to propose a draw and/or give up when using the UCI protocol?
If so: how?
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: give up / propose draw

Post by Ferdy »

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?
Propose a draw is not, but give up is possible, just send an illegal move like
bestmove a1e8 and hope the gui will flag you of illegal move (often the case) and get a loss.
flok

Re: give up / propose draw

Post by flok »

Hmmm, a bit clumsy.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: give up / propose draw

Post by Ferdy »

flok wrote:Hmmm, a bit clumsy.
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.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: give up / propose draw

Post by Ferdy »

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?
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.
In this case the gui had sent stop command because you have already exceeded the time allocation.
flok

Re: give up / propose draw

Post by flok »

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").
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: give up / propose draw

Post by hgm »

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

Post by JoshPettus »

As such I enjoy this bit of irony on the chessprograming wiki
It has, by-in-large, replaced the older Chess Engine Communication Protocol (WinBoard/XBoard).
There really isn't a single UCI project that people can contribute and maintain, is there?

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

Post by flok »

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...
I can't find the USI and UCCI specs?
flok

Re: give up / propose draw

Post by flok »

JoshPettus wrote:As such I enjoy this bit of irony on the chessprograming wiki
It has, by-in-large, replaced the older Chess Engine Communication Protocol (WinBoard/XBoard).
There really isn't a single UCI project that people can contribute and maintain, is there?

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.)
I'm more than willing to do so.
Question is though: are others willing to send the changes they've implemented to me?