Replying to myself. This is the third in a series of four posts on ChestUCI:
- Installing ChestUCI on Windows
- Testing WinChest.exe on the command line
- Testing ChestUCI.exe on the command line
- Running ChestUCI.exe in a GUI
Part 3. Testing ChestUCI.exe on the command lineLike WinChest.exe, ChestUCI.exe is also a command line program. Once again we will peek at the relevant files in the distribution.
- ChestUCI.exe - An interpreter, by Franz Huber, that translates UCI commands into something WinChest.exe can understand, and translates output back the other way. It is closed source.
- ChestUCI.ini - Parameters file controlling how the ChestUCI.exe "engine" operates.
- ChestUCI.epd - We looked at this one in the part 2 post.
- Deutsch.txt - German help file for ChestUCI.exe. It is more detailed than the English help file.
- English.txt - English help file for ChestUCI.exe.
- First open ChestUCI.ini in a plain-text editor such as Notepad. Later you can look in Deutsch.txt or English.txt for what all those parameters do. For now, change the line "SearchDepth = 10" to "SearchDepth = 2" (similar to using " -z 2 " in WinChest.exe), then save and close the file.
HashSize = 64
DefenderMoves = false
ProblemType = Mate
SearchDepth = 2 <<== changing this line from "10" to "2"
AllSolutions = true
FullMovelist = true
CompleteDuals = false
UseDatabase = true
SearchMode = Normal
ChecksOnly = 0
ThreatDepth = 0
ThreatRange = 3
KingSquares = 0
PieceLimit = 0
MaxMoves = 0
SearchOrder = KPX
RetroOptions = 7
EgtbCache = 16
EgtbPath =
ShowAnalysis = true
ShowProgress = true
ShowStatistics = false
EngineMode = UCI
ExpertOptions = -rS
AutoClipboard = true
AutoLogfile = false
AutoSolution = false
TextViewer =
CpuInfo =
German = true
- Once again, open a cmd.exe instance in the ChestUCI installation folder. Then type the following command, followed by {Enter}.
.\ChestUCI.exe /INI:1
Let's break that down:
- .\ : look in the current folder
- ChestUCI.exe : program to execute
- /INI:1 : read from ChestUCI.ini at startup, but don't write any changes to it
If at this point the command prompt does
absolutely nothing, then congratulations, it's working! More precisely, it's waiting for you to enter UCI commands. We are going to send the following eight commands, each one on a line by itself, each one followed by {Enter}. It should be possible to paste into the command window. If you can't paste: (a) click the little control icon in the top left corner of the cmd.exe window; (b) click Properties; (c) find the Quick Edit checkbox; (d) check that; (e) click OK.
- uci
- position fen 5K2/8/2qk4/2nPp3/3r4/6B1/B7/3R4 w - e6
- go
- position fen 2brrb2/8/p7/7Q/1p1kpPp1/1P1pN1K1/3P4/8 w - -
- go
- position fen 1K3RQ1/ppn3p1/r3N1pq/2pN4/2b1kPB1/b5r1/8/2BR4 w - -
- go
- quit
And here is the output from the commands.
uci
id name ChestUCI Ver.5.2
id author Franz Huber
option name HashSize type spin default 64 min -1 max 2048
option name DefenderMoves type check default false
option name ProblemType type combo default Mate╖ var Mate╖ var Stalemate var SelfMate var SelfStalemate var HelpMate var HelpStalemate
option name SearchDepth type spin default 2 min 0 max 126
option name AllSolutions type check default true
option name FullMovelist type check default true
option name CompleteDuals type check default false
option name UseDatabase type check default true
option name SearchMode type combo default Normal var Normal var Special var Automatic var AutoTurbo var RetroAnalysis var ParameterAnalysis var DatabaseAnalysis var EgtbAnalysis
option name ChecksOnly type spin default 0 min -1 max 31
option name ThreatDepth type spin default 0 min -125 max 125
option name ThreatRange type string default 3
option name KingSquares type spin default 0 min -9 max 9
option name PieceLimit type spin default 0 min -16 max 16
option name MaxMoves type spin default 0 min -222 max 222
option name SearchOrder type combo default KPX var KPX var KXP var PKX var PXK var XKP var XPK var only_CR var only_CRK
option name RetroOptions type spin default 7 min 0 max 7
option name EgtbCache type spin default 16 min 1 max 1024
option name EgtbPath type string default
option name ShowAnalysis type check default true
option name ShowProgress type check default true
option name ShowStatistics type check default false
option name EngineMode type combo default UCI var UCI var Chest var Expert
option name ExpertOptions type string default -rS
option name Show Options type button
option name AutoClipboard type check default true
option name AutoLogfile type check default false
option name Show Logfile type button
option name AutoSolution type check default false
option name Show Solution type button
option name TextViewer type string default
option name CpuInfo type string default
option name German type check default true
uciok
position fen 5K2/8/2qk4/2nPp3/3r4/6B1/B7/3R4 w - e6
go
info string FEN: 5K2/8/2qk4/2nPp3/3r4/6B1/B7/3R4 w - e6 (5+5)
info string Stellungs-Analyse: C0/R0/K3/P4/X32 W:5/24
info string Problem in Datenbank gefunden: #1; ep; 00:00;
info string Suche nach Matt in 2 ... (Hash=64MB)
info depth 1 currmovenumber 1 currmove d5e6
info depth 1 time 0 score mate 1 pv d5e6
info depth 1 seldepth 1 currmovenumber 24 currmove d5e6 hashfull 0 nodes 1 nps 0
info string Suche abgeschlossen ... (Zeit=0.00s)
info string Matt in 1 gefunden ! (1 L÷sung in 00:00)
info depth 1 seldepth 1 time 0 score mate 1 multipv 1 pv d5e6
bestmove d5e6
position fen 2brrb2/8/p7/7Q/1p1kpPp1/1P1pN1K1/3P4/8 w - -
go
info string FEN: 2brrb2/8/p7/7Q/1p1kpPp1/1P1pN1K1/3P4/8 w - - (6+10)
info string Stellungs-Analyse: C0/R0/K1/P5/X16 W:4/31
info string Problem in Datenbank gefunden: #2; 00:00;
info string Suche nach Matt in 2 ... (Hash=64MB)
info depth 2 currmovenumber 17 currmove h5a5
info depth 2 time 0 score mate 2 pv h5a5
info depth 2 seldepth 2 currmovenumber 31 currmove g3h2 hashfull 0 nodes 103 nps 0
info string Suche abgeschlossen ... (Zeit=0.00s)
info string Matt in 2 gefunden ! (1 L÷sung in 00:00)
info depth 2 seldepth 2 time 0 score mate 2 multipv 1 pv h5a5 f8e7 a5e5
bestmove h5a5
position fen 1K3RQ1/ppn3p1/r3N1pq/2pN4/2b1kPB1/b5r1/8/2BR4 w - -
go
info string FEN: 1K3RQ1/ppn3p1/r3N1pq/2pN4/2b1kPB1/b5r1/8/2BR4 w - - (9+12)
info string Stellungs-Analyse: C0/R0/K1/P8/X42 W:9/43
info string Problem in Datenbank gefunden: #3; 00:00;
info string Suche nach Matt in 2 ... (Hash=64MB)
info depth 2 seldepth 2 currmovenumber 43 currmove b8c7 hashfull 0 nodes 106 nps 0
info string Suche abgeschlossen ... (Zeit=0.00s)
info string Kein Matt in 2 gefunden ! (00:00)
bestmove
quit
Since the last FEN was a mate in 3, and we set SearchDepth to 2, WinChest.exe did not send any output. ChestUCI.exe "translated" the lack of output into the line "info string Kein Matt in 2 gefunden ! (00:00)".
If you look up the UCI Chess Engine Protocol, see
https://www.shredderchess.com/download/div/uci.zip , you might think something like the following UCI command would work:
setoption name SearchDepth value 2But I couldn't get it to work. No matter what UCI commands I sent, I couldn't change any settings from what was in the ChestUCI.ini file. More on that in Part 4.