UCI go command precedence

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
KLc
Posts: 36
Joined: Wed Jun 03, 2020 4:46 am
Full name: Kurt Lanc

UCI go command precedence

Post by KLc » Mon Feb 22, 2021 8:50 pm

Suppose I send (for whatever stupid reason) the following UCI go commands (with white to move):

Code: Select all

go movetime 5000 wtime 1000
and

Code: Select all

go wtime 1000 movetime 5000
What’s the thinking time then? I checked and it seems the first time has precedence. However, this is not documented in the protocol and I’m not sure if I observed a general or an exceptional feature.

Ras
Posts: 1763
Joined: Tue Aug 30, 2016 6:19 pm
Full name: Rasmus Althoff
Contact:

Re: UCI go command precedence

Post by Ras » Mon Feb 22, 2021 8:53 pm

KLc wrote:
Mon Feb 22, 2021 8:50 pm
What’s the thinking time then?
These are contradictory parameters for mutually exclusive game modes, so the engine can follow either of them, whatever it likes.
Last edited by Ras on Mon Feb 22, 2021 8:55 pm, edited 2 times in total.
Rasmus Althoff
https://www.ct800.net

KLc
Posts: 36
Joined: Wed Jun 03, 2020 4:46 am
Full name: Kurt Lanc

Re: UCI go command precedence

Post by KLc » Mon Feb 22, 2021 8:54 pm

Ras wrote:
Mon Feb 22, 2021 8:53 pm
KLc wrote:
Mon Feb 22, 2021 8:50 pm
What’s the thinking time then?
These are contradictory parameters for mutually exclusive game modes, so the engine can follow either of them, whatever it likes.
Thank you! Then it was just due to the parsing of the particular engine I tested I suppose. Good.

Ras
Posts: 1763
Joined: Tue Aug 30, 2016 6:19 pm
Full name: Rasmus Althoff
Contact:

Re: UCI go command precedence

Post by Ras » Mon Feb 22, 2021 8:56 pm

KLc wrote:
Mon Feb 22, 2021 8:54 pm
Thank you! Then it was just due to the parsing of the particular engine I tested I suppose. Good.
Yeah, my engine will follow the second one because that overwrites the time handling mode suggested by the first one.
Rasmus Althoff
https://www.ct800.net

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

Re: UCI go command precedence

Post by Ferdy » Mon Feb 22, 2021 9:40 pm

KLc wrote:
Mon Feb 22, 2021 8:50 pm
Suppose I send (for whatever stupid reason) the following UCI go commands (with white to move):

Code: Select all

go movetime 5000 wtime 1000
and

Code: Select all

go wtime 1000 movetime 5000
What’s the thinking time then? I checked and it seems the first time has precedence. However, this is not documented in the protocol and I’m not sure if I observed a general or an exceptional feature.
There is a quote from the specs,

Code: Select all

If one command is not sent its value should be interpreted as it would not influence the search.
Since both are specified, determine the one that is higher and use it.

go movetime 5000 wtime 1000

movetime 5000
That is 5s.

wtime 1000
White has 1s left on the clock.

So select go movetime 5000.

Post Reply