UCI "go" command and "btime"/"wtime

Discussion of chess software programming and technical issues.

Moderator: Ras

humble_programmer

UCI "go" command and "btime"/"wtime

Post by humble_programmer »

Is necessary to include BOTH player times when building a UCI "go" command, or is only the engine's remaining time needed? I am using the Apr-06 version of the UCI interface specs, and it is not particularly clear.

Cheers!
Humble Programmer
,,,^..^,,,
CRoberson
Posts: 2094
Joined: Mon Mar 13, 2006 2:31 am
Location: North Carolina, USA

Re: UCI "go" command and "btime"/"w

Post by CRoberson »

Both ChessPartner and Arena send both of the time and inc parameters.
User avatar
hgm
Posts: 28387
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: UCI "go" command and "btime"/"w

Post by hgm »

You would be wise to always include all when you are building a GUI, but accept it when they are absent when you are building an engine, if they can go by in anyway without the missing data, or if there is any reasonable assumption they could make to supply the missing data by themselves. (E.g. if the time you still have on your clock is missing, suppose it is the last time you did get, minus the time you spent on thinking about moves since then. I.e only use the input to reset your own cock when you get it, but keep yur own record just in case it is not.)
Edmund
Posts: 670
Joined: Mon Dec 03, 2007 3:01 pm
Location: Barcelona, Spain

Re: UCI "go" command and "btime"/"w

Post by Edmund »

Glass Chess Engine requires both times as it has the feature to think longer if itself has more time on the clock than the opponent.
User avatar
hgm
Posts: 28387
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: UCI "go" command and "btime"/"w

Post by hgm »

Indeed, Joker has this too. But it is not dependent at the GUI sending the information. Of course it will be more accurate when the GUI sends it. But you have to keep track of the time anyway, to know when it is time to stop thinking. You might as well use that to update your time lift.

WinBoard engines that are dependent on time and otim being sent should be conidered broken. The WB protocol specs gives no guarantee that these commands will be sent on every move (and in fact the engine can disable having them sent them at all).
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

Re: UCI "go" command and "btime"/"w

Post by Michel »

You would be wise to always include all when you are building a GUI, but accept it when they are absent when you are building an engine,
This is called Postel's principle "be liberal in what you accept but be conservative in what you send".
User avatar
hgm
Posts: 28387
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: UCI "go" command and "btime"/"w

Post by hgm »

Oh, I did not know it had a name! :lol: But I completely embrace it!
Richard Allbert
Posts: 794
Joined: Wed Jul 19, 2006 9:58 am

Re: UCI "go" command and "btime"/"w

Post by Richard Allbert »

:shock:

Uh-oh.......
User avatar
hgm
Posts: 28387
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: UCI "go" command and "btime"/"w

Post by hgm »

Guilty! :lol:

But don't worry, it works under WinBoard. As long as your engine doesn't end feature time=0 , WinBoard alwas sends time and otim. But there is no guarantee other GUIs will.
humble_programmer

Re: UCI "go" command and "btime"/"w

Post by humble_programmer »

Thank you, gentlemen, for your guidance and your wisdom.