give up / propose draw

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
hgm
Posts: 28464
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: give up / propose draw

Post by hgm »

The problem is that engine authors won't implement any changes if there is no GUI in the world that would support such changes. It would be quite pointless. They want their engines to run on GUIs like ChessBase and Shredder, and these are not interested in modifying their software. They are commercial, and it would mean extra work that does not provide any extra income.

Note that the most versatile addition to UCI was proposed by me, and is actually implemented in Win/XBoard (through Polyglot): UCI engines can send a command

info string xboard XXX

which should be taken by the GUI to mean the same as XXX would mean in WB protocol. This makes UCI upward compatible with WB protocol in one blow! 8-)

People could use this to send 'resign' or 'offer draw'.

Btw, with some creative use of the protocol UCI engines can actually resign or claim draws. Just have them send 'bestmove 0000' to indicate their refusal to play on, and let the reported score (-mate, 0 or +mate) decide if they claimed a loss, draw or win.
kbhearn
Posts: 411
Joined: Thu Dec 30, 2010 4:48 am

Re: give up / propose draw

Post by kbhearn »

hgm wrote:Btw, with some creative use of the protocol UCI engines can actually resign or claim draws. Just have them send 'bestmove 0000' to indicate their refusal to play on, and let the reported score (-mate, 0 or +mate) decide if they claimed a loss, draw or win.
And how is that going to act in any existing gui? :) furthermore, while the engine should be responsible for offering to resign it still ought to communicate 'best' moves for the remainder of the game as the user may want to refuse the resignation (say for instance said user is trying to practice finishing out a won endgame that they blew - the engine might choose to resign too early for their taste)
User avatar
hgm
Posts: 28464
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: give up / propose draw

Post by hgm »

The nice thing about Chess is that no one can refuse your resignation. It is your ultimate unalienable right!

How the GUIs respond is their problem. UCI2WB would handle it correctly, I think. I believe UCI philosophy (although not really documented anywhere, but an almost universal superstition amongst UCI users) is that GUIs should never set the engine thinking in a game state where it could claim game end (like in a position where it is checkmated or stalemated).

Draw offers are a more serious problem. They can be refused, so you cannot play null move. Serious protocols based on UCI (such as the mentioned USI and UCCI) usually allows you to send the offer together with the move (as FIDE regulations would also require), like "bestmove e2e4 draw".

If a user doesn't want the engine to resign, he should tell it that through an engine-defined option. WinBoard engines usually have their resign behavior as a configurable option.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: give up / propose draw

Post by bob »

Ferdy wrote:
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.
You are kidding, I assume? There is no "resign" option?

What a protocol.

Chess is a well-defined game. Offering draws, accepting draws, and resigning are all a part of the game.
flok

Re: give up / propose draw

Post by flok »

hgm wrote:Serious protocols based on UCI (such as the mentioned USI and UCCI) usually allows you to send the offer together with the move (as FIDE regulations would also require), like "bestmove e2e4 draw".
Do you know where USI is documented? My instance of google could not find it.

Also: does the uci-mode of xboard (-fUCI) support usi?
User avatar
hgm
Posts: 28464
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: give up / propose draw

Post by hgm »

http://www.glaurungchess.com/shogi/usi.html

The -fUSI option of XBoard supports USI through an adapter. Normally XBoard would be configured to use UCI2WB as adapter in this case. (The persistent-settings file ~/.xboard would contain the option

-uxiAdapter {uci2wb -%variant "%fcp" "%fd"}

When UCI2WB is installed on the system this would make both the -fUSI and -fUCCI option work, through the kludge of having the first character of the variant name supply the required -s (USI) or -x (UCCI) flag.)
flok

Re: give up / propose draw

Post by flok »

Unfortunately the domain expired.
mar
Posts: 2675
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: give up / propose draw

Post by mar »

bob wrote:You are kidding, I assume? There is no "resign" option?

What a protocol.
I assume it's you who's kidding, resigning prematurely won't give you any elo (the opponent can still crash).

Moreover, isn't it Crafty who violates xboard protocol and reports scores from white's POV just to make GUI programmer's lives easier? :D (and adjudication as well?)
User avatar
hgm
Posts: 28464
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: give up / propose draw

Post by hgm »

Oops! I still got it, but apparently from my browser's cache. Now that I pressed the refresh button I lost that too... So if the domain doesn't come back, I guess we lost the USI specs.

Unfortunately the only source for UCCI that I know is this. :shock:
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: give up / propose draw

Post by Evert »

archive.org has it archived, so it can still be viewed there. I may also have saved a copy of it somewhere. In any event, I have my unified UCI/USI/UCCI document as well, but that's of course not a primary source.