usemillisec type check default true

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

usemillisec type check default true

Postby tvt2020 » 26 Apr 2012, 18:31

I'm looking for a work around to indicate to Winboard that this ucci Xiangqi engine use "usemillisec type check default true". Looking at the debugging file, the engine reply was padded with extra info from previous line (# from engine: -2012- usemillisec type check default true).




recognized 'xiangqi' (-1) as variant xiangqi
recognized 'xiangqi' (-1) as variant xiangqi
WinBoard master-20120423 + bgc0121-4u
Reset(1, 0) from gameMode 0
recognized 'xiangqi' (-1) as variant xiangqi
GameEnds(0, (null), 2)
shuffleOpenings = 0
StartChildProcess (dir=".") UCCI2WB -noini "C:\engines\bugcchess\bgc0121-4u.exe"
nice engine proc to 10
2153 >first : xboard
protover 2
2168 <first : UCCI2WB by Morning Yellow and H.G.Muller
3292 <first : # to engine : ucci
3338 <first : # from engine: 2012-01-21-ÃÎÖÐÏÍÆ壬¸ÐлÄúµÄʹÓã¡£¡0
3370 <first : # from engine: id name--2012-01-21-21-ÃÎÖÐÏÍÆå!r qfx 0.1a-12-01-21
3370 <first : # from engine: 2-01-21-21-ÃÎÖÐÏÍÆå!r 0.1a-12-01-21
3370 <first : # from engine: ÎÖÐÏÍÆå!r qingfengxia...
3370 <first : # from engine: ÖйúÏóÆ嶥¼¶ÒýÇæ-2012- usemillisec type check default true
3370 <first : # from engine: 2012 qing-feng-xia-
3370 <first : # from engine: -2012- usemillisec type check default true
3370 <first : # from engine: ucciok
3370 <first : feature myname=" (UCCI2WB)"
3370 >first : accepted myname
3370 <first :
3370 <first : feature variants="xiangqi" setboard=1 debug=1 reuse=0 memory=1
3370 >first : accepted variants
3370 >first : accepted setboard
3370 >first : accepted debug
3370 >first : accepted reuse
3370 >first : accepted memory
3370 <first : feature usermove=1 sigint=0 sigterm=0 colors=0 done=1
3370 >first : accepted usermove
3370 >first : accepted sigint
3370 >first : accepted sigterm
3370 >first : accepted colors
3370 >first : accepted done
3385 >first : memory 68
3385 >first : new
random
3385 >first : variant xiangqi
3385 >first : st 25
3385 >first : post
3385 >first : hard
3385 >first : easy
Impossible move , type = 0
3401 <first : # to engine : setoption newgame
nps: w=-1, b=-1
nps: w=-1, b=-1
5273 >first : time 2500
5273 >first : otim 2500
book hit = (NULL)
5273 >first : usermove 5273 >first : b0c2
5288 <first : # to engine : position fen rnbakabnr/9/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/9/RNBAKABNR w - - 0 1 moves b0c2
5288 <first : # to engine : go time 24 movestogo 1
5288 <first : go time 24 movestogo 1
5304 <first : # from engine: UseConfigFile = true
5476 <first : # from engine: 2012-01-21-ÃÎÖÐÏÍÆ壬¸ÐлÄúµÄʹÓã¡£¡1
5476 <first : # from engine: 2012-01-21-ÃÎÖÐÏÍÆ壬¸ÐлÄúµÄʹÓã¡£¡2
5476 <first : # from engine: 2012-01-21-ÃÎÖÐÏÍÆ壬¸ÐлÄúµÄʹÓã¡£¡3
5491 <first : # from engine: total move number 43
5507 <first : # from engine: info depth 2 score -78 time 203 nodes 1232 nps 6068 pv b9c7 h0g2
5507 <first : 2 -78 20 1232 b9c7 h0g2
5585 <first : # from engine: info nodes 2664 nps 9480 time 281 hashfull 0
5585 <first : # from engine: bestmove b9c7 ponder h0g2
5585 <first : move b9c7
silence
5725 <first : # from engine: ggggg1=0
5725 <first : # from engine: ggggg2=0
5725 <first : # from engine: ggggg3=0
5725 <first : # from engine: ggggg4=0
5725 <first : # from engine: ggggg5=0
5725 <first : # from engine: split nodes = 38
5725 <first : # from engine: total nodes = 46
5725 <first : # from engine: fhf nodes = 46
5725 <first : # from engine: fhf = 100%
5725 <first : # from engine: TTMove : 19.5652%
5725 <first : # from engine: GoodCapture : 0%
5725 <first : # from engine: Killers : 39.1304%
5725 <first : # from engine: DiscChecks : 0%
5725 <first : # from engine: QuietMove : 39.1304%
5725 <first : # from engine: BadCapture : 0%
5725 <first : # from engine: Evasions : 0%
7145 >first : time 2500
7145 >first : otim 2344
book hit = (NULL)
7145 >first : usermove 7145 >first : h2e2
7160 <first : # to engine : position fen rnbakabnr/9/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/9/RNBAKABNR w - - 0 1 moves b0c2 b9c7 h2e2
7160 <first : # to engine : go time 24 movestogo 1
7160 <first : go time 24 movestogo 1
7176 <first : # from engine: UseConfigFile = true
7176 <first : # from engine: total move number 40
7176 <first : # from engine: info depth 2 score -13 time 0 nodes 692 nps 0 pv h9g7 i0i1
7176 <first : 2 -13 0 692 h9g7 i0i1
7176 <first : # from engine: info depth 3 score 15 time 0 nodes 1624 nps 0 pv h9g7 i0i1 a9a8
7176 <first : 3 15 0 1624 h9g7 i0i1 a9a8
7176 <first : # from engine: info depth 4 score -13 time 0 nodes 3120 nps 0 pv h9g7 i0i1 a9a8 a0a1
7176 <first : 4 -13 0 3120 h9g7 i0i1 a9a8 a0a1
7176 <first : # from engine: info depth 5 score 4 time 0 nodes 7068 nps 0 pv h9g7 h0g2 a9a8 i0h0 i9h9
7176 <first : 5 4 0 7068 h9g7 h0g2 a9a8 i0h0 i9h9
7176 <first : # from engine: info depth 6 score -25 time 0 nodes 11576 nps 0 pv h9g7 h0g2 a9a8 i0h0 i9h9 a0a1
7176 <first : 6 -25 0 11576 h9g7 h0g2 a9a8 i0h0 i9h9 a0a1
7301 <first : # from engine: info nodes 20332 nps 162656 time 125 hashfull 0
7301 <first : # from engine: bestmove h9g7 ponder h0g2
7301 <first : move h9g7
silence
tvt2020
 
Posts: 48
Joined: 22 Jul 2010, 17:52

Re: usemillisec type check default true

Postby H.G.Muller » 26 Apr 2012, 18:48

The output from the engine looks very strange. Does it really look this way when you run the engine directly from the command prompt (and typing "ucci" to it)? Or does UCCI2WB somehow gets confused by the Chinese encoding, so that it overlooks linefeeds?

If I believe the UCCI2WB output, the negine sends the usemillisec option, as well as its name, twice. In both cases prefixed with garbage. While in fact there should have been "option" in front of the "usemillisec", if I understand UCCI syntax correctly.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: usemillisec type check default true

Postby tvt2020 » 26 Apr 2012, 23:29

I got the same result when running it directly from command line. And I don't have the correct Windows to see how it looks in Chinese.


2012-01-21-├╬╓╨╧═╞σú¼╕╨╨╗─·╡─╩╣╙├úíúí0
ucci
id name--2012-01-21-21-├╬╓╨╧═╞σ!r qfx 0.1a-12-01-21
2-01-21-21-├╬╓╨╧═╞σ!r 0.1a-12-01-21
╬╓╨╧═╞σ!r qingfengxia...
╓╨╣·╧≤╞σ╢Ñ╝╢╥²╟µ-2012- usemillisec type check default true
2012 qing-feng-xia-
-2012- usemillisec type check default true
ucciok
tvt2020
 
Posts: 48
Joined: 22 Jul 2010, 17:52

Re: usemillisec type check default true

Postby tvt2020 » 27 Apr 2012, 05:04

I can view Chinese characters encoding, thanks for Windows XP mode CN. The bad news, still the same output from engine.

2012-01-21-梦中贤棋,感谢您的使用!!0
ucci
id name--2012-01-21-21-梦中贤棋!r qfx 0.1a-12-01-21
2-01-21-21-梦中贤棋!r 0.1a-12-01-21
沃邢推?r qingfengxia...
中国象棋顶级引擎-2012- usemillisec type check default true
2012 qing-feng-xia-
-2012- usemillisec type check default true
ucciok
tvt2020
 
Posts: 48
Joined: 22 Jul 2010, 17:52

Re: usemillisec type check default true

Postby H.G.Muller » 27 Apr 2012, 09:06

Well, it looks like the engine is severely broken, then. This is not valid UCCI. I don't know if the Chinese makes any sense, but even if it would, it would not make sense that it prints the usemillisec option twice, or that it prints '2012' so many times. And that it leaves out the 'option' keyword from it, to replace it by -2012- is definitely a UCCI violation.

Now there are tools that can be used to work around such defects. In particular Odd Gunnar Malin's 'InBetween' adapter can be very useful. I have hardly ever used it, though, so I forgot exacty how to use it. (But it comes with a README file that explains it well.) It worked somewhat like this: you run it in stead of the engine, and it looks in a file in its directory (inbetween.ini?) to see where the real engine is, and how it should interfere with the communiation in either direction. You can specify that by including lines in an engine-to-gui and a gui-to-engine section, which look like

stringA := stringB

where any occurrence of stringA in the communication stream would then be relaced by stringB before it is passed on. In this case it seems enough to have

-2012- := option

in the engine to GUI section. InBetween would then have to be put between UCI2WB and the engine, by writing as engine line in WinBoard's engine list

"UCI2WB InBetween"

(Assuming you put InBetween.exe in the same folder as WinBoard and UCI2WB.exe). It could be that you can specify the name of the ini file used by InBetween on its command line, which would be useful when you want to use it for several engines, which need different fixes. In that case you would have to write something like

'UCI2WB "InBetween qfx.ini"'

where qfx.ini would then contain the instructions to InBetween for starting up bgc0121-4u.exe, and which substitutions to make for it. It seems the engine also does not report it has a Hash option. Which probably means it will disobey the WinBoard hash-table-size settings.

It would be better to ask the engine author to fix it, though. BugCChess was originally written by Liuzy, who actually provided the simplified-Chinese translation for WinBoard for the strings that were not yet in 4.2.7 (which was translated by Morning Yellow). He put the Hash and usemillisec option in BugCChess at my request, (after complaining that UCCI2WB sent it the time in seconds) because it seems that other UCCI interfaces completely ignore any options the engine sends. This in turn has inspired lazy engine authors to not send the options at all, even when they expect the GUI to set them! (Apparently these do not have an "Engine Settings" dialog like WinBoard.) This is also a clear UCCI protocol violation, and the only way I can imagine they would get away with it, is if the user somehow has to indicate for each engine separately whether is should use millisec or not. (Or perhaps they simply do not work for engines that do not use millisec). But when other interfaces ignore the UCCI options anyway, I can imagine it doesn't get noticed easily when the engine is broken in this respect.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: usemillisec type check default true

Postby tvt2020 » 28 Apr 2012, 03:20

H.G.
Thank you for your advice, the engine works fine now. The inBetween.ini content below for those whose interest.

[InBetween]
CommandLine := C:\engines\bugcchess\bgc0121-4u\bgc0121-4u.exe
;Log := logfile.log
[Client2Server]
[Server2Client]
;I used the the engine first output line for translation
2012-01-21-0 := option usemillisec type check default true
tvt2020
 
Posts: 48
Joined: 22 Jul 2010, 17:52

Re: usemillisec type check default true

Postby H.G.Muller » 28 Apr 2012, 08:05

It could be benificial to also 'sneak in' a hash option, by replacing some other line the engine sends by

option Hash type spin default 64 min 4 max 512

to make UCCI2WB transmit the WinBoard hash setting to the engine. I cannot imagine that BugCChess would not use a hash table. You could figure out the default size by looking in the task manager, but I don't think it really matters much, because UCCI2WB probably sends a 'setoption Hash' command even when you try to set the hash size to the value it already had.

Unfortunately the name of the options does not seem to be standardized in UCCI either: from looking at the UCCI2WB code I see that it tests for 'Hash' as well as 'hashsize', so you would have to try both, and look in the task manager if BugCChess reacts to any of them.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: usemillisec type check default true

Postby tvt2020 » 28 Apr 2012, 19:13

The Bugcchess engine has it own configuration set file, called "bgc.ini", where you specify both hash and threads size.

File name bgc.ini

UseConfigFile = true
Threads = 2
Hash = 512
Clear Hash = false
Ponder = false
Draw = false
Random = false
OwnBook = false
OwnBook When Analyse = false
MultiPV = 1
tvt2020
 
Posts: 48
Joined: 22 Jul 2010, 17:52

Re: usemillisec type check default true

Postby H.G.Muller » 28 Apr 2012, 21:03

Ah, OK. How hopelessly obsolete. All that could have been in the Engine-Settings dialog, if the engine had been UCCI-compliant. Of course the ini file could still be used for interfaces that do not support options, and be read first to determine the default values of the reported UCCI options.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL


Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 18 guests

cron