bob wrote:Evert wrote:If there is only one legal move, the GUI could just make it and not bother the engine. In fact, it wouldn't even have to start the clock.
Once the GUI makes a game decision, it is no longer a GUI. That "I" in GUI has a very distinct meaning, it is supposed to simply serve as an interface between the user and the engine, using a graphical board to display/accept moves. The GUI has no business playing moves from book, doing book learning, making instant moves, handling/offering draws and such. Those are decisions that affect the game and they are things which only the engine should handle. It is the one actually playing the game, not the GUI.
Yeah, thats something I've always hated about UCI. The way I see it, an "engine" should be a complete game-playing program, capable of playing all phases of the game, from first move to endgame, without decision-making assistance from the GUI.
It just seems wrong to me to put any of the game-playing logic on the GUI side, the way UCI does. It may be convenient for commercial vendors whose offering consists of several proprietary engine backends bundled with a common front-end, but I think its a lousy choice for everybody else.
The reasons for dividing "engine" and "GUI" into two separate programs, should be:
(1) so the same GUI can be re-used with different engines,
(2) so that the engine code is more portable between different platforms, and
(3) so engine authors can focus on making their program play chess without having to also become GUI programmers, or to re-implement all of the work already done by the authors of existing GUIs.
Users should be able to take any engine(s) from different authors and plug them into a standard-compliant GUI and they should just work, and the engine's game-playing ability should not depend on GUI-provided books or tablebases. Imagine playing an engine tournament where several of the engines are using the same GUI and receiving the same assistance from the same books, etc.
GUIs should be purely about the presentation of the game to a human player or observer, and communicating moves or instructions from the human user to the engine(s). The engines should do all of the game-playing, including managing their time and choosing their own moves. If users want to use the same books or tablebases with different engines, GUIs should accomodate that by telling the engine where to find those books or tablebases--but not by reading the book itself and spoon-feeding moves to the engine.
...not that the xboard protocol is any shining gem either, but at least it gets the engine/GUI division right. It would be nice if everybody had standardized on one protocol, and if xboard had been that protocol I could live with that. But UCI is quite popular with engine developers, so we're stuck with both protocols for the forseeable future. And I guess with adapters like Polyglot and UCI2WB around, its not a big deal... I suppose users are able to use almost any engine with the GUI of their choice.