UCI exclude move

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

stevenaaus
Posts: 608
Joined: Wed Oct 13, 2010 9:44 am
Location: Australia

UCI exclude move

Post by stevenaaus »

Please don't tell me i have to use "searchmoves" if i want to exclude a single move from a UCI engine's analysis ? :oops:

Sorry if this has been raised before, but i really cant find it on the web , and for some reason TC's search dialog is also hopeless.
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: UCI exclude move

Post by lucasart »

stevenaaus wrote:Please don't tell me i have to use "searchmoves" if i want to exclude a single move from a UCI engine's analysis ? :oops:

Sorry if this has been raised before, but i really cant find it on the web , and for some reason TC's search dialog is also hopeless.
The answer is in the question: "searchmoves".

Why would you want the protocol to introduce such a redundancy only to satisfy a completely idiosyncratic use case?
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: UCI exclude move

Post by zullil »

lucasart wrote:
stevenaaus wrote:Please don't tell me i have to use "searchmoves" if i want to exclude a single move from a UCI engine's analysis ? :oops:

Sorry if this has been raised before, but i really cant find it on the web , and for some reason TC's search dialog is also hopeless.
The answer is in the question: "searchmoves".

Why would you want the protocol to introduce such a redundancy only to satisfy a completely idiosyncratic use case?
Allowing a modifier like "not" or ! after "searchmoves" and before the list of moves would be helpful.

For example:

Code: Select all

position startpos
go infinite searchmoves ! e2e4 d2d4
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: UCI exclude move

Post by hgm »

stevenaaus wrote:Please don't tell me i have to use "searchmoves" if i want to exclude a single move from a UCI engine's analysis ? :oops:
Unfortunately you have to...

Don't you love UCI? :wink:

In WB protocol, there are separate commands include and exclude, which can act on a single move or on all. So that there is no need for the GUI to know all legal moves when it wants to exclude the one the user indicates.
stevenaaus
Posts: 608
Joined: Wed Oct 13, 2010 9:44 am
Location: Australia

Re: UCI exclude move

Post by stevenaaus »

Ok, Cheers.

Seems a bit of an oversight to not include an "excludemoves" command. :x
stevenaaus
Posts: 608
Joined: Wed Oct 13, 2010 9:44 am
Location: Australia

Re: UCI exclude move

Post by stevenaaus »

Ok, in ScidvPC, i have UCI exclude working :). Seems good. It's a nice feature, though Scid has some ugly code involving adding/converting SAN/UCI moves.
I have a new red "minus" button, which on hover shows the excluded-moves as a tooltip.

But I cant find much reference for Xboard "exclude".
What would be a typical command sequence including "exclude"
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: UCI exclude move

Post by hgm »

In analysis mode, any change of the position (usermove, undo or new) clears the list of moves to exclude. Reception of exclude MOVE during analysis adds MOVE to that list, and include MOVE removes it from the list if it was in it. In principle this would start a new search in the current position with the new excluded-moves list determining which moves are skipped in the root.

To exclude multiple moves, the GUI just sends one exclude command for each move to exclude. This reflects how the user decides which moves to exclude: typically he plays such a move, or clicks a move in a list to exclude it, and these events generate sending of an exclude or include command (depending on the current state of the move, which the GUI is aware of).

XBoard also supports a meta-move 'tail', which stands for all moves not explicitly presented to the user in the UI. (In text form. Of course there never is any restriction on what moves the user can indicate by playing them on the board, other than that they should be legal.) Clicking on 'tail' to exclude the tail would lead to sending of a command exclude all followed by include commands for all moves that were explicitly shown to the user for clicking.

The protocol specs do not really limit the use of this command to analysis mode, but it is hard to imagine any other useful application, and XBoard currently does not use the commands outside analysis mode.

http://home.hccnet.nl/h.g.muller/engine-intf.html
Volker Annuss
Posts: 180
Joined: Mon Sep 03, 2007 9:15 am

Re: UCI exclude move

Post by Volker Annuss »

For a GUI it sufficient to implement searchmoves.

For testing my engines at the command line I implemented excludemoves. This is not part of the UCI standard but it is useful for testing.[/i]