Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: UCI (=universal chess interface)

Author: Tim Mann

Date: 13:01:39 11/30/00

Go up one level in this thread


I wrote:
>>sometimes an engine will tend to make the same move in
>>a certain position repeatedly unless it *knows* the move has been made
>>before, in which case the engine makes a different move and may end up
>>eventually winning.
>
>I don't understand, so I will try to explain the way we did it.

Sorry, I only said that because I wasn't certain whether you really always send
the complete game history with the position command.  Since in fact you do, this
is not a problem.

> The engine
> never claims a draw, it just has to repeat the moves, if one move is leading  > to a draw by 3rd repetition, the GUI will claim the draw before executing
> the move.

That sounds OK, though it does mean the GUI has to be smart enough to know there
has been a repetition.  (xboard/winboard currently isn't.)  It also means the
engine can't strategically decide not to claim the draw (which is legal, but
probably never really a good idea).  That's something a human player might do
when his opponent is in severe time pressure, but it seems a bit
unsportsmanlike, so probably no engine authors would really want to do it.

>>What should the engine do if the GUI sends it an illegal move in a
>>position command?  What about an illegal position (several kings, etc.)?
>
>This should not happen as the GUI has to take care of it.

I see.  It's another case where the GUI has to be smart: it must not allow an
illegal position or move.  This can get a bit tricky, since an engine's idea of
a legal position can vary a bit.  The user might want to put in a puzzle
position that could not be reached in an actual game; in some cases this might
violate an assumption inside the engine.  For instance, the engine might "know"
that there can be no more than 9 white queens on the board, or no more than 16
white pieces, etc.  Some engines crash or otherwise object when you exceed such
limits because they have fixed-size internal data structures that overflow.

xboard/winboard also makes some attempt to work with chess variants for which it
doesn't fully understand the rules -- the user can turn off Test Legality in the
GUI and let the engine say whether each move is legal or not.  This can't always
succeed, but sometimes it works OK.

> Are you interested in supporting UCI engines in Winboard?

Maybe in a future rewrite.  The UCI protocol has enough differences in
fundamental assumptions that I think it would difficult to support in the
current code base -- especially since I would of course have to continue to
support the existing xboard/winboard protocol too.  The current code base is
pretty ugly inside and is definitely not designed to plug in additional
protocols.  Support for the current protocol and its assumptions is spread all
over the code.





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.