UCI PROTOCOL AND CB-GUI

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
User avatar
Desperado
Posts: 638
Joined: Mon Dec 15, 2008 10:45 am

UCI PROTOCOL AND CB-GUI

Post by Desperado » Mon Feb 09, 2009 9:29 am

Hi, at first a hello to everyone! (i am new here :-) )

i have some questions about uci-protocol and cb-gui, and i hope
you can help me with your experience.

- ucinewgame (supported or not, i cant receive...) ?
- ponder command (cb just sending position startpos + movelist) ?! that's right (instead of ponder command)?

- and is there a special command for the "Hashtabellen löschen"-button
(clear hashtable)-button, or is this button only for the native engines ?

thx

Edmund
Posts: 668
Joined: Mon Dec 03, 2007 2:01 pm
Location: Barcelona, Spain
Contact:

Re: UCI PROTOCOL AND CB-GUI

Post by Edmund » Mon Feb 09, 2009 11:46 am

Welcome to the board

at first, you might want to check the official UCI specification.

ucinewgame
I don't think its compulsory for the gui to send this command. Anyway, I was never quite sure what it is good for. It should tell the engine that the next request is from a different game. But at least in my engines it never made any difference.

ponder command
I am not quite sure about the ponder function in cb. But what you describe might be a workaround for engines not supporting pondering.
Officially the engine has to state that it supports it, when sending the available options:

Code: Select all

option name Ponder type check default true\n
clear hashtable
the engine has to state that it supports this command:

Code: Select all

option name Clear Hash type button\n
in case the button is pressed, the gui sends the following command:

Code: Select all

setoption name Clear Hash\n

User avatar
Desperado
Posts: 638
Joined: Mon Dec 15, 2008 10:45 am

Re: UCI PROTOCOL AND CB-GUI

Post by Desperado » Mon Feb 09, 2009 12:29 pm

thank you for reply.

of course i have red (oh my english , i mean informed about) the official uci-specification.
if it is to much to read, pls go to 3. (:-))

1. ponder
so the workaround solution for the ponder-command seems to be a nice
thing, if for example my engine wouldnt think it is it's turn...
So now it has to be handled in some way (no prob), but isnt the pnd-command there, so i must not handle this... :-)

2. ucinewgame

thats another thing which would be nice to be handled as standard.
of course each engine could live without, but many things like clear
statistics,hashtables and many other stuff could be handled in a much propper (and more easy) way i think. it is not so easy at it seems to recognize something like this as it seems.(when for example cb just sending go and position commands)

3. Clear Hash (The thing i totally wonder about)

the "type button" seems not be working, wether i explicit use or as it is mentioned in the specification implicit using it. (Arena-Gui it works!)

if your engine runs in cb-gui , and you push that button (for any reason),
are you sure the hashtable is really cleaned ?

Tord Romstad
Posts: 1808
Joined: Wed Mar 08, 2006 8:19 pm
Location: Oslo, Norway

Re: UCI PROTOCOL AND CB-GUI

Post by Tord Romstad » Mon Feb 09, 2009 1:10 pm

Codeman wrote: ponder command
I am not quite sure about the ponder function in cb. But what you describe might be a workaround for engines not supporting pondering.
Officially the engine has to state that it supports it, when sending the available options:

Code: Select all

option name Ponder type check default true\n
The "Ponder" option is not just there to inform the GUI that the engine supports pondering -- it is also there to let the GUI tell the engine that the current game is being played with pondering enabled. This is very important, as most engines manage time differently in games with ponder on. You'll probably want to allocate a little more time for every move when pondering is on, because you save some time every time you get a ponderhit.

Tord

User avatar
Desperado
Posts: 638
Joined: Mon Dec 15, 2008 10:45 am

Re: UCI PROTOCOL AND CB-GUI

Post by Desperado » Mon Feb 09, 2009 1:51 pm

You are right, that's the point.

CB-offline mode you can switch it on/off, but playing online there is nothing to switch, and cb-gui just sending lines...
So in my eyes it is very important to use uci-ptc with all its functions (commands).
There are good reasons for the commands, but cb seems to do what it likes to do.
So it is annoying that the programmer has to catch things, which already
(should be) are handled by the (uci-)protocol.

(But what to do, if cb doesnt support like it should be supported, at the moment i am happy that cb knows the word "uci" :-) )

Also thx for reply !

ps: (nice to meet the author of glaurung, impressive engine)

Aleks Peshkov
Posts: 882
Joined: Sun Nov 19, 2006 8:16 pm
Location: Russia

Re: UCI PROTOCOL AND CB-GUI

Post by Aleks Peshkov » Mon Feb 09, 2009 4:06 pm

There is no any "Clear Hash" button specification in current UCI standard.

Instead UCI recommends to clear hash when engine receives "ucinewgame" command. I do not have ChessBase, but I think it should work accordingly.

User avatar
Desperado
Posts: 638
Joined: Mon Dec 15, 2008 10:45 am

Re: UCI PROTOCOL AND CB-GUI

Post by Desperado » Mon Feb 09, 2009 6:03 pm

Hi Aleks,

basic example of original uci-protocol by SMK:

"option name Clear Hash type button\n"

That's enough specification for me :-).

The problem is that "TYPE BUTTON" isnt supported.
And of course you are right, it SHOULD work accordingly,but it doesnt.
(or i dont know why the arena gui creates a button and cb doesnt)

also i looked up all uci-engines-optionlists which i installed under cb.
None of them have included a "button option"...

thx for your interest.

ernest
Posts: 1892
Joined: Wed Mar 08, 2006 7:30 pm

Re: UCI PROTOCOL AND CB-GUI

Post by ernest » Mon Feb 09, 2009 11:22 pm

Desperado wrote:The problem is that "TYPE BUTTON" isnt supported.
In the ChessBase GUI the "Clear Hashtable" button is not in the "Engine parameters" window, but is always present.
I wonder how this works for Fruit, Toga for instance, which do not themselves have a Clear Hash button. (Rybka, Naum, Shredder, ..., do have a Clear Hash button, which can be seen in the "Engine Options" window of the ShredderClassic GUI)

User avatar
Desperado
Posts: 638
Joined: Mon Dec 15, 2008 10:45 am

Re: UCI PROTOCOL AND CB-GUI

Post by Desperado » Tue Feb 10, 2009 12:30 am

hi ernest,

nice to know that uci-rybka has an own clear-hash button (funny),
i never noticed it because in the cb-gui it isnt shown.(version2.3x)
any of the uci-engines(fruit,toga,glaurung...and a lot more) has a "simple" button under cb. (Engine-Parameter-Window)

And whats up with the "always present" button, does it send an uci-command (or like mentioned in previous post, it's just for the "native" engines) ?

ernest
Posts: 1892
Joined: Wed Mar 08, 2006 7:30 pm

Re: UCI PROTOCOL AND CB-GUI

Post by ernest » Tue Feb 10, 2009 6:22 pm

Desperado wrote:And whats up with the "always present" button, does it send an uci-command (or like mentioned in previous post, it's just for the "native" engines) ?
OK, I just tried with Fruit 2.3.1, which does not have its own Clear Hash button: the "always present" button of the Fritz/ChessBase GUI does NOT clear Fruit's hash.
Obviously, as you mentioned, it is:
for the "native" engines,
and for the UCI programs who have their own Clear Hash button (Rybka, Naum, Shredder, ...)

Post Reply