Hint command in analysis mode
Posted: 26 Aug 2019, 19:55
I am in the process of adding a properly working analyze mode to my engine. The last release of my engine only supported the exit command while in analyze mode, and I wanted to add full support for all the commands laid out in the CECP protocol (https://www.gnu.org/software/xboard/engine-intf.html#12).
I was having an issue with the hint command, however. The hint command works fine when not in analyze mode. When I select Hint... from the menu in Analyze mode, Winboard displays a popup stating "No hint available", even though my engine is capable of displaying a hint while analyzing. I tried the -debug option in the startup dialog to generate a winboard.debug log file, and no hint command is sent by the GUI when Hint... is selected from the menu, and the GUI is in analyze mode. I was using Winboard 4.9.1, but the same thing occurs with older versions of Winboard. I also tried with a different engine (Tucano 7.07) to confirm that it's the GUI, and not my engine. I know it's the most minor of issues, since hints are rather redundant when you have the full analysis right there, but technically it is part of the protocol.
This is a sample winboard.debug file. I tried a hint after the PV at depth 9 was printed. For now, I am not doing anything with the "." command. I am also curious as to what Impossible move , type = 0 means in the log file.
I was having an issue with the hint command, however. The hint command works fine when not in analyze mode. When I select Hint... from the menu in Analyze mode, Winboard displays a popup stating "No hint available", even though my engine is capable of displaying a hint while analyzing. I tried the -debug option in the startup dialog to generate a winboard.debug log file, and no hint command is sent by the GUI when Hint... is selected from the menu, and the GUI is in analyze mode. I was using Winboard 4.9.1, but the same thing occurs with older versions of Winboard. I also tried with a different engine (Tucano 7.07) to confirm that it's the GUI, and not my engine. I know it's the most minor of issues, since hints are rather redundant when you have the full analysis right there, but technically it is part of the protocol.
This is a sample winboard.debug file. I tried a hint after the PV at depth 9 was printed. For now, I am not doing anything with the "." command. I am also curious as to what Impossible move , type = 0 means in the log file.
- Code: Select all
recognized 'normal' (-1) as variant normal
recognized 'normal' (-1) as variant normal
shuffleOpenings = 0
Version: WinBoard 4.9.1 + Tony's
Reset(1, 0) from gameMode 0
recognized 'normal' (-1) as variant normal
GameEnds(0, (null), 2)
shuffleOpenings = 0
StartChildProcess (dir=".") Tony's Chess
688 >first : xboard
protover 2
703 <first : Tony's Chess
703 <first : Version 0.04 r3
703 <first : 2019 Tony Mokonen
703 <first : Type help to display help
703 <first : feature done=0
703 >first : accepted done
703 <first : Moves left set to 30
703 <first : Overhead left set to 10
703 <first : Resign score value set to -1000
703 <first : Hash size set to 256 MB
703 <first : Invalid file name tonys.fbk
703 <first : feature ping=0
703 >first : accepted ping
703 <first : feature setboard=1
703 >first : accepted setboard
703 <first : feature playother=0
703 >first : accepted playother
703 <first : feature san=0
703 >first : accepted san
703 <first : feature usermove=0
703 >first : accepted usermove
703 <first : feature time=1
719 >first : accepted time
719 <first : feature draw=0
719 >first : accepted draw
719 <first : feature sigint=0
719 >first : accepted sigint
719 <first : feature sigterm=0
719 >first : accepted sigterm
719 <first : feature reuse=1
719 >first : accepted reuse
719 <first : feature analyze=1
719 >first : accepted analyze
719 <first : feature myname="TonysChess 0.04 beta r3"
719 >first : accepted myname
719 <first : feature variants="normal"
719 >first : accepted variants
719 <first : feature colors=0
719 >first : accepted colors
719 <first : feature ics=0
719 >first : accepted ics
719 <first : feature name=1
719 >first : accepted name
719 <first : feature pause=0
719 >first : accepted pause
719 <first : feature debug=0
719 >first : accepted debug
719 <first : feature memory=0
719 >first : accepted memory
719 <first : feature smp=0
719 >first : accepted smp
719 <first : feature egt=0
719 >first : rejected egt
719 <first : feature exclude=0
719 >first : accepted exclude
719 <first : feature setscore=0
719 >first : rejected setscore
719 <first : feature highlight=0
719 >first : accepted highlight
719 <first : feature option="Hash -spin 256 1 1024"
719 >first : accepted option
719 <first : feature option="Clear Hash -button"
719 >first : accepted option
719 <first : feature option="Moves Left -spin 30 1 100"
719 >first : accepted option
719 <first : feature option="Overhead -spin 10 0 10000"
719 >first : accepted option
719 <first : feature option="Resign Moves -spin 3 0 10"
719 >first : accepted option
719 <first : feature option="Resign Score -spin -1000 -5000 -1"
719 >first : accepted option
719 <first : feature done=1
719 >first : accepted done
766 >first : new
random
766 >first : level 40 5 0
766 >first : post
766 >first : hard
Impossible move , type = 0
4156 >first : force
4156 >first : analyze
Impossible move , type = 0
4156 <first : 1 9 0 1 a2a3
4156 <first : 1 16 0 5 c2c3
4156 <first : 1 35 0 8 d2d4
4156 <first : 1 36 0 19 g1f3
4172 <first : 2 0 0 41 g1f3 g8f6
4172 <first : 3 35 0 131 g1f3 g8f6 d2d4
4172 <first : 4 0 0 238 g1f3 g8f6 d2d4 d7d5
4172 <first : 5 33 0 1577 g1f3 g8f6 d2d4 d7d5 b1c3
4172 <first : 6 0 1 13999 g1f3 g8f6 d2d4 d7d5 b1c3 b8c6
4250 <first : 7 28 9 98443 g1f3 g8f6 d2d4 d7d5 b1c3 b8c6 c1e3
4531 <first : 8 0 38 442050 g1f3 d7d5 b1c3 g8f6
5141 <first : 8 9 99 1094911 e2e4 b8c6 d2d4 d7d5 e4d5 d8d5 g1f3 g8f6
6156 >first : .
6844 <first : 9 35 268 3128869 e2e4 e7e6 b1c3 d7d5 g1f3 d5d4 c3b5 g8f6 f1d3
12062 <first : 10 7 791 9472474 e2e4 e7e5 g1f3 g8f6 b1c3 f8d6 f1d3 b8c6 c3b5 d6c5
GameEnds(29, xboard exit, 2)
14202 >first : exit
14202 >first : quit