Split multi-leg moves into two CECP move commands
[uci2wb.git] / README.txt
blobc70a0bfc19a72d620c0f7d4c14dadb6ba75e44e8
1                          UCI2WB relelease notes\r
2 \r
3 UCI2WB is an adapter for running USI (Shogi) engines under WinBoard.\r
4 Install USI2WB in WinBoard as if it was the engine, with one or two arguments\r
5 on its command line, to indicate the name of the real engine executable,\r
6 and (optionally) its working directory. \r
7 \r
8 E.g. when you have placed USI2WB.exe in a sub-folder 'Adapters' inside the WinBoard folder,\r
9 you could include the following line in winboard.ini amongst the firstChessPrograms:\r
11 "UCI2WB -s USI_ENGINE.exe ENGINE_FOLDER" /fd="./Adapters" /variant=shogi\r
13 UCI2WB was developed with gcc under Cygwin. It can also be used as a (dumb) UCI2WB adapter. \r
14 "Dumb" here means that the adapter does not know anything about the game state, \r
15 and just passes on the moves and position FENs as it receives them from engine or GUI. \r
16 As this can be done without any knowledge of the game rules, or even of the board size, \r
17 such a dumb adapter can in principle be used for any variant. To use it for UCI protocol\r
18 (both the Chess or Xiangqi dialects), use it without the -s flag (or with a -c flag).\r
19   As of version 2.0 UCI2WB also supports the UCCI protocol for Xiangqi, for which it was\r
20 made slightly less dumb: in UCCI mode it keeps track of the board position on a (Xiangqi)\r
21 board, so it can recognize capture moves, and send only the moves after it (with an\r
22 appropriate FEN to start them from).\r
23   The general syntax of the UCI2WB command is:\r
25 UCI2WB [debug] [-var VARIANTLIST] [-s|-c|-x] ENGINE.exe [ENGINEFOLDER]\r
27 Presence of the 'debug' argument causes UCI2WB to report everything it receives from the engine,\r
28 as well as the 'position' and 'go' commands sent to it, as debug output (prefixed with '#')\r
29 to the GUI. This has the same effect as switching the option 'UCI2WB debug output' on,\r
30 except that it forces the option to be on from the very beginning, so that the engine\r
31 startup will also be reported.\r
32   The '-var' option overrules the list of variants UCI2WB says it supports with the given list,\r
33 like 'feature variants="VARIANTLIST"'.\r
36 This package includes the source code. To compile on Windows under Cygwin, use the commands\r
38 windres --use-temp-file -O coff UCI2WB.rc -o rosetta.o\r
39 gcc -O2 -s -mno-cygwin UCI2WB.c rosetta.o -o UCI2WB.exe\r
41 To compile under Linux, use\r
43 gcc -O2 -s UCI2WB.c -lpthread -o UCI2WB\r
45 Have fun,\r
46 H.G.Muller\r
51 Change log:\r
53 12/6/2019 4.1\r
54 Fix loading of opening lines by having engine-thread by also queueing the\r
55 'usermove' command; without that the moves could overtake a 'new' command,\r
56 which would then clear the game once it got executed.\r
57 Fix name of last variant of UCI_Variant option, which had garbage appended.\r
58 Suppress setting UCI_Variant to 'chess' if engine does not support that.\r
59 Fix quitting during initialization handshake to avoid hanging engine procs.\r
60 Fix switching on of pondering when engine is idle.\r
62 8/12/2018 4.0\r
63 Complete redesign of the internal logic, to make interruption of thinking\r
64 actually work. The engine thread is made responsible for parsing the GUI\r
65 commands that require the engine to be idle. These commands are passed to\r
66 it from the GUI thread through an internal command queue. The engine thread\r
67 can peek in this queue when a search terminates and it enters the idle or\r
68 pondering state. It only goes reading the ponder output after all queued\r
69 commands are processed. This way the GUI thread is sensitive to input all\r
70 the time, and can instantly handle all commands by either processing those\r
71 that can be done during search, and queueing the others. In the latter case\r
72 it can abort an ongoing search to divert the attention of the engine thread\r
73 back to the command queue.\r
74  Other changes are:\r
75 Added option to force the engine to ponder in force mode (for OTB tournaments).\r
76 Produce a compliant error message for unknown commands.\r
77 Fix time increment in ponder-on games (which was subtracted rather than added).\r
78 Fix periodic updates, to include move and correct move counts.\r
79 Set UCCI newgame option after initial isready handshake rather than before it.\r
80 Suppress spurious sending of 'uxinewgame' in UCCI mode.\r
81 Suppress 'setup' command in the standard variants 'suicide' and 'losers'.\r
82 Add support for robbobases and Scorpio bitbases as EGT flavors.\r
83 Support extended UCI info-string-variant command that can set board size.\r
84 Assume engines with UCI_Chess960 option but no UCI_Variant play only Chess and\r
85 Chess960, and not xiangqi or shogi.\r
87 24/12/2016 3.0\r
88 Implement UCI_AnalyseMode option\r
89 Support egtpath command for Nalimov, Gaviota and Syzygy\r
90 Allow ?, quit, force and result commands to terminate thinking\r
91 Stop search during setoption commands, or buffer those until engine is done thinking\r
92 Explicitly report when engine dies, through GUI popup (tellusererror)\r
93 Make sure reporting of mated-in-0 score causes resign, even without PV\r
94 Fix eclipsing of -var option with engines that have UCI_Chess960 option\r
95 Fix empty default of string options\r
97 8/11/2016 2.3\r
98 Implement handling of 'UCI_Variant' option for variant announcement and selection\r
99 Pass 'info string variant' line as 'setup' command to allow engine-defined variants\r
100 Set 'UCI_Opponent' option in accordance with CECP 'name' and 'computer' commands\r
101 Fix option setting during analysis (MultiPV!)\r
103 22/11/2016 2.2\r
104 Use USI gameover command to relay game result\r
105 Handle USI win claims\r
106 Correct wtime/btime for byoyomi\r
108 7/11/2016 2.1\r
109 Make Linux version SIGTERM-proof\r
110 Recognize forward Pawn pushes as irreversible in UCCI\r
111 Block input from GUI during thinking\r
112 Use uxinewgame\r
113 Implement support for pre-standard UCI Chess960 engines ('Arena960 dialect')\r
114 Fix hash-size setting in UCCI\r
115 Combine name and version when engine gives them in separate 'id' commands\r
116 Fake time and node count for engines that do not report it\r
117 Add interactive options for byoyomi work-around\r
119 28/10/2014 2.0\r
120 Implement UCCI support\r
122 4/12/2012 1.10\r
123 Implement pause / resume commands\r
125 9/5/2012\r
126 Fix bug in converting shogi moves, introduced in v1.8\r
128 19/4/2012 1.9\r
129 Remove S-Chess move translation, to parallel change in UCI S-Chess 'standard'\r
130 Implement WB exclude feature\r
132 17/4/2012 1.8\r
133 Wait for uciok before processing GUI commands for setting options\r
134 Implement move translations required for variant seirawan\r
135 Make supported-variants string configurable from command line.\r
137 15/4/2012 v1.7\r
138 Take 30ms safety margin in translating st command to movetime\r
140 14/1/2011 v1.6\r
141 Replaced all polling by blocking synchronization (through pipes).\r
142 Implemented ping (using isready/readyok)\r
143 Made sending of debug info to GUI subject to option feature / command-line argument.\r
144 Fixed myname feature to handle names containing spaces.\r
146 14/10/2010\r
147 Port v1.5 to Linux\r
149 26/9/2010 v1.5\r
150 Add mini-Shogi ("variant 5x5+5_shogi") in USI mode; make coordinate translation board-size dependent.\r
151 Translate FEN in setboard to SFEN (does not fully work for holdings yet).\r
153 23/9/2010 v1.4\r
154 Translate USI engine PV to standard coordinates (no provision for deferred promotion yet).\r
156 ??/?/2010 v1.3\r
157 Add work-around for non-compliant USI engines that do not understand winc, binc, movestogo.\r
158 Send btime before wtime, to avoid crashing USI engines with flakey (Shogidogoro) USI support.\r
160 1/8/2010 v1.2\r
161 Suppress mate claim on mate-in-1 score in Xiangqi (cyclone dialect),\r
162 as some engines use this score when they reach repeats they would win if continued.\r
164 31/7/2010 v1.1\r
165 Add WB remove command\r
167 30/7/2010 v1.0\r
168 Allow spaces in option names.\r
169 Refactor StopPonder into separate subroutine.\r
170 Refactor LoadPos into separate subroutine.\r
171 Send stop-ponder commands on exit and force.\r
172 Added icon.\r
174 29/7/2010 v0.9\r
175 Fixed analysis, which was broken after refacoring (newline after 'go infinite')\r
177 27/7/2010 v0.8\r
178 Refactored sendng of go command into separate routine\r
179 Send times with 'go ponder'.\r
180 Measure time spend on own move, and correct time left for it (2% safety margin).\r
181 Do adjust time left for new session or move time.\r
183 26/7/2010 v0.7\r
184 Fix bug w.r.t. side to move on setboard.\r
185 Print version number with -v option.\r
187 25/7/2010 v0.6\r
188 Undo implemented.\r
189 Analyze mode implemented. Seems to work for Glaurung 2.2 and Cyclone 2.1.1.\r
190 Periodic updates still use fictitious total move count of 100.\r
192 18/7/2010 v0.5\r
193 Switching between USI and UCI is now done at run time nased on a -s flag argument\r
194 Recognize WB variant command\r
195 In Xiangqi the position keyword is omitted, and a FEN is sent even for the start pos\r
196 Recognize 'null' as best move\r
197 Recognize scores without cp\r
198 Corrrect thinking time to centi-sec\r
200 17/7/2010 v0.4:\r
201 Introduced  compiler switch that enables some macros for everything that is different\r
202 in USI compared to UCI.\r
203 Fixed pondering.\r
204 Fixed setboard (for UCI).\r
205 Added result claims on checkmate / stalemate (for engines that say 'bestmove (none)').\r
207 16/7/2010 v0.3:\r
208 This is the first version for which the basics seem to work.\r
209 It could play a game of Blunder against itself, ending in resign.\r
210 Options of all types should work now.\r
211 Only classical time control tested.\r
212 Pondering not tested. (Blunder does not give a ponder move?)\r
213 Setboard not tested. (Probably does not work due to FEN format discrepancy.)\r
214 No analyze mode yet.\r
215 No SMP yet.\r