Author: Dieter Buerssner
Date: 13:45:03 06/12/05
Go up one level in this thread
On June 12, 2005 at 16:19:42, Andreas Guettinger wrote: >Hi Christopher, > >Sorry but I cannot reproduce that under xboard. >After setting the position and forcing crafty to move it simply plays the book >move e2e4. >And it is right, because it never accepted the illegal position, and just sticks >to the starting position, as can be seen in the debug logs. >Xboard then complains because e4 is not a legal move in this position. > >http://home.datacomm.ch/aguettinger/files/xboard.png > >56829 >first : setboard r4rk1/b7/8/8/8/8/B7/R3K2R w KQ - 0 1 >57114 <first : tellicsnoalias set 1 Crafty v19.19 (1 cpus) >57123 <first : pong 1 >57141 <first : ERROR side not on move is in check! This may not be the correct answer. Actually, there seems to no well defined answer. I think, one should blame the GUI first. The engine author could assume, that the engine has a contract with the GUI - the GUI is responsible for sending correct positions and moves. Otherwise, work will be doubled in general: engine and GUI do their checks, and both need time (although here, it will not use lots of time - For the UCI protocol, where you get many moves for each search, it can be a bit more). From the WB protocol: --- setboard FEN The setboard command is the new way to set up positions, beginning in protocol version 2. It is not used unless it has been selected with the feature command. Here FEN is a position in Forsythe-Edwards Notation, as defined in the PGN standard. Illegal positions: Note that either setboard or edit can be used to send an illegal position to the engine. The user can create any position with xboard's Edit Position command (even, say, an empty board, or a board with 64 white kings and no black ones). If your engine receives a position that it considers illegal, I suggest that you send the response "tellusererror Illegal position", and then respond to any attempted move with "Illegal move" until the next new, edit, or setboard command. --- For a console engine, things are a bit different again. Then, really the engine has to take care. Starting a search from an illegal position, that the engine cannot handle, should be considered a bug, then (when an engine can handle 10 queens of one side, it might want to accespt such a position). I think engine protocols should be clarified in this respect. An engine author might be too lazy (for good reason) to do all sort of error checks, and trust in his "contract" with the GUI. In the manual you might read: "While you are able to use the engine in console mode, this mode is not supported. The engine shall be used with an interface, that only sends legal moves and positions to the engine." In the WB protocol, the answer to illegal moves is defined better. IMHO, this does not help anything. Engine and GUI will get out of sync anyway. Best thing to do might be (for an engine that detects such things, and that works under a GUI) to just terminate. As Bob mentioned, for console mode, accepting a temporary illegal position might be acceptable. Starting a search with such a position - no. No - almost certainly, my engine will most probably not handle all this correctly, either. Regards, Dieter
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.