Pondering in WB

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Pondering in WB

Postby Richard Allbert » 06 Sep 2009, 08:30

Hi All!

I've been working for months on a new engine - in c++ and pretty much totally OO - even the game itself isn't global :) - it's nearly ready for release, but I'm having a few headaches with pondering in the winboard protocol, and detecting a "ponderhit"

In the UCI protocol, this is easy to hack into the search - poll for input, if the input is "ponderhit" reset the clock and carry on. In Winboard, it's not clear for me in the protocol what the interruption command will be when pondering.

Looking at the winboard debugs, when the opponent makes a move and my engine is pondering, winboard always sends the "time xxxx" command, then "otim xxxx", then "usermove xxxx". This is the same for Arena.

Is this standard, always? If so, I can resolve this in the input detect part of the search and treat the three commands as for "ponderhit" in the UCI protcol.

If not, then there's a horrible redesign coming up - at the moment, I have a "Driver" class which has the "Input Handler" and "Searcher" classes inside it - I would need to move some of the input handling class into the searcher class etc etc..... :x :x

Thanks for any replies.

Richard

PS the new engine will be called jabba - it's played a few games on ICC under jabbaC username. It's weaker than Lime - skeleton Eval still, and pure AB search. But it's much more "self influenced" in design, and has been great fun to program. Release and Code to come when I get back from honeymoon in October
Richard Allbert
 
Posts: 105
Joined: 27 Sep 2004, 11:56
Location: Aschaffenburg, Germany

Re: Pondering in WB

Postby H.G.Muller » 06 Sep 2009, 19:39

The protocol specs offer no guarantee that the time and otim command are sent before every move. But in practice every GUI does it (I think).

I guess officially the signal to stop pondering is that it is your turn. E.g. when you receive a move. But it could also happen that you are pondering, and you receive a go because the user suddenly wants your engine to play the other color. In principle the user can also send you an easy command at any time, to tell you to stop pondering. You can also receive a draw offer during pondering. Some GUIs relay draw offers at any time. And when your engine has defined options, you could receive an option command to set that option at any time.

In Joker I interrupt pondering on every input. I then process the input, and when ponder is still on and it is not my turn when I am going to wait for the next command, I restart the ponder search. Because Joker has a pretty good hash table that usually picks up exactly where it was interrupted.
User avatar
H.G.Muller
 
Posts: 3132
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Pondering in WB

Postby Richard Allbert » 07 Sep 2009, 20:02

:D

Thanks for the reply. I've chosen the same route as you - there's very little loss by restarting the search.

Richard
Richard Allbert
 
Posts: 105
Joined: 27 Sep 2004, 11:56
Location: Aschaffenburg, Germany


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 4 guests