Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Tryng to add UCI functionality to Crafty

Author: Odd Gunnar Malin

Date: 02:24:32 05/27/04

Go up one level in this thread


On May 26, 2004 at 14:43:14, Robert Hyatt wrote:

>On May 26, 2004 at 09:17:46, AndrewFan wrote:
>
>>On May 25, 2004 at 20:47:11, Mike Byrne wrote:
>>
>>>The UCI specs say :
>>>
>>>* all command strings the engine receives will end with '\n',
>>>
>>>Yet,  Arena sends the double command "go movetime xxxx"  -> I'm just wondering
>>>why Arena insists on sending the go and movetime on one line - also - shouldn't
>>>the command "movetime" be sent before the "go" command" ?
>>>
>>>It also sends the command "position startpos moves e2e4 e7e5 g1f3 <etc>"
>>>
>>>So the startpos  == "setboard rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w
>>>KQkq"  I am not sure the  best way to get Crafty to read the moves in within the
>>>current Crafty commands.  Any suggestions
>>
>>I added UCI commands to my chess engine in 2 days.  Here's what I did:
>>
>>
>>1. Added a UCI command parser.
>>
>>2. If in UCI mode, call the UCI command processor, else call the Winboard/XBoard
>>processor for reading inputs.
>>
>>3. For each UCI command, map it to it's WB equivalent and use the winboard
>>processor to execute this mapped command.
>>
>>Simple.  Of course some UCI commands are not so simple to translate.
>>
>>
>>Andrew.
>
>
>It isn't so easy for me.  Crafty ponders automatically unless it is turned off.
>If it is turned off, it never ponders.  It decides which move to ponder by
>itself, and has code to do that pretty well.  UCI wants to handle everything.
>IE the engine is a small part of the whole "thing" while Crafty considers the
>engine to be _the_ whole thing.  IE it handles its own book, book learning,
>needs to know when/how a game ends, etc.  Crafty correctly claims draws, mates,
>resigns, and all of that.
>
>To disable all of that to work with UCI is simply not worth the effort, when the
>winboard protocol works just fine and has for years.
>
>IE at the root, I want to decide whether a position is a tablebase draw or not,
>and use my "swindle mode" if it is.  I can't do that in UCI.  There are too many
>things I can't do, or which I have to drastically change, to make it work.
>
>"If it ain't broke, don't fix it" is my motto here. :)

I agree that to play a normal game the Winboard approx is supperior if you isn't
the gui author too. A game of chess doesn't only means to find the best move,
you should also handle things like draw-offer/accept, resign, easy and
interesting bookhandling, and things like your swindle mode. To leave all this
up to the gui-author would make your engine 'polite' for some users and maybe
the opposite for other users. One sample: if you have a contemt factor set to
-0.25, how to get the gui to offer draw in a dead drawn endgame like KRkr?

With this said there is a (nice) plus too to the uci-protocol. Since it handle
an engine like a pure searcher with defined methods to report back div search
information, this allow (more easy) creative gui-authors to make interesting
analysis features.
Also with the latest version of the uci-protocol you get more information of who
the user are and what he wants. Eg. he can tell you that he want you to play at
a certain Eco level, you get his name and Elo too (like Winboard in ICC mode).
So on a lower level you can give the user a very interesting and personal game.

So I think it isn't a question of either Winboard or Uci, but:
Winboard or Uci? Yes, thanks!

Odd Gunnar





This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.