Cleaner? what's clean about sending all the moves since the beginning of the game?sje wrote:Why not? Although UCI has some problems, it's cleaner and less demanding overall than the xboard protocol.glorfindel wrote:There will probably never be such a time.sje wrote:But Crafty uses Xboard, not UCI. Maybe it's time for a UCI Crafty.
Miguel
Symbolic has different command processors for UCI, xboard, and console (interactive). The default is "console", but this can be overridden by a command line option. The three command namespaces are entirely separate.
Each command processor is implemented as a class, and the three command processor classes share the same base classes so there's a minimum of duplicated code. Each is also implemented as a thread that's driven by an event munching run loop. A separate thread object of the WatchTask class handles input polling, input text processing, and signals by sending the appropriate events to the command processor thread. (The WatchTask thread also handles nested command file input and all text output.)
At start-up time, the selected command processor instantiates an object of the MetaSearch class. This object is the interface to the search and takes care of all move selection work thus keeping a lot of code out of the command processors.
It would be relatively easy to add a new command processor class should a new protocol be developed and deployed.