Clarification of uci option UCI_AnalyseMode

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
Ferdy
Posts: 4110
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Clarification of uci option UCI_AnalyseMode

Post by Ferdy » Sat Mar 03, 2012 12:12 pm

Example
option name UCI_AnalyseMode type check default false

According to "Description of the universal chess interface (UCI) April 2006"

Code: Select all

* <id> = UCI_AnalyseMode, type check
		   The engine wants to behave differently when analysing or playing a game.
		   For example when playing it can use some kind of learning.
		   This is set to false if the engine is playing a game, otherwise it is true.
So this can be used for analysing or playing a game. Second sentence says that it can be
used for learning when playing, but the last sentence implies that this is set to false when
playing a game so what is the point of 2nd sentence?

Does it mean that when user set this to true and play a game, the gui will set it to false?
What then is the specific purpose of this option if we have already go infinite command useful for analysing?

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

Re: Clarification of uci option UCI_AnalyseMode

Post by hgm » Sat Mar 03, 2012 12:30 pm

I think the GUI sets it to false while playing a game, and to true when the user is analysing. So the engine would have to do learning when the option is set to false, and refrain from it (or probing an own book) when the option is set to true.

Ferdy
Posts: 4110
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Clarification of uci option UCI_AnalyseMode

Post by Ferdy » Sat Mar 03, 2012 2:47 pm

So this is just basically equivalent to analyze command in winboard.
I was confused by the wording in

Code: Select all

For example when playing it can use some kind of learning. 
where it surely disabled this option when in game mode anyway.

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

Re: Clarification of uci option UCI_AnalyseMode

Post by hgm » Sat Mar 03, 2012 4:27 pm

Not really. The "go infinite" command is the equivalent of "analyze". I am not sure why UCI engines are supposed to be not smart enough that "go infinite" means they are now in analyze mode, and should behave accordingly, but instead an extra option is needed to tell it that. Perhaps it was designed to allow GUIs to play games through "go infinite" + "stop" commands, deciding itself when the engine ha thought long enough (or let the user decide that).

Something similar exists for pondering. To actually ponder you have to send "go ponder", but there also is an option Ponder to alter the behavor of the engine when searching in a ponder-on game. It cannot remember it is playing a ponder-on game after a ponder miss, because then the protocol would not be stateless. Therefore it needs to be reminded through an extra option to set the statelessness state. Or something like that....

Ferdy
Posts: 4110
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Clarification of uci option UCI_AnalyseMode

Post by Ferdy » Sun Mar 04, 2012 4:02 am

hgm wrote:Not really. The "go infinite" command is the equivalent of "analyze". I am not sure why UCI engines are supposed to be not smart enough that "go infinite" means they are now in analyze mode, and should behave accordingly, but instead an extra option is needed to tell it that. Perhaps it was designed to allow GUIs to play games through "go infinite" + "stop" commands, deciding itself when the engine ha thought long enough (or let the user decide that).

Something similar exists for pondering. To actually ponder you have to send "go ponder", but there also is an option Ponder to alter the behavor of the engine when searching in a ponder-on game. It cannot remember it is playing a ponder-on game after a ponder miss, because then the protocol would not be stateless. Therefore it needs to be reminded through an extra option to set the statelessness state. Or something like that....
The "go infinite" command is the equivalent of "analyze". I am not sure why UCI engines are supposed to be not smart enough that "go infinite" means they are now in analyze mode,
I guess go infinite is not equivalent to analyze mode because of this.

Code: Select all

// if the engine supports the "UCI_AnalyseMode" option and the next search is supposed to
// be an analysis, the GUI should set "UCI_AnalyseMode" to true if it is currently
// set to false with this engine
setoption name UCI_AnalyseMode value true

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

Re: Clarification of uci option UCI_AnalyseMode

Post by hgm » Sun Mar 04, 2012 6:50 am

I guess WB "analyze" is equivalent to UCI "setoption UCI_AnalyzeMode" + "go infinite", then (for engines that support the option). I should perhap take account of that in UCI2WB. Currently I just translate "analyze" to "go infinite".

Post Reply