Polyglot workaround option issue

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Guenther
Posts: 4605
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Polyglot workaround option issue

Post by Guenther »

Until today I never realized that the workaround option PromoteWorkAround only seems to work for UCI2XBOARD,
but not for UCI2UCI, which Polyglot also does.
First I thought the Polyglot at HGMs repo was changed during the last years regarding that option, but the source says something else.

Code: Select all

[from option.c]

   // work-arounds

    { "UCIVersion",       "spin","1","2",       "2"         , NULL,0,NNB,  PG|XBOARD}, 
    { "CanPonder",        "check","1","2",      "false"     , NULL,0,NNB,  PG|XBOARD}, 
    { "SyncStop",         "check","1","2",      "false"     , NULL,0,NNB,  PG|XBOARD|XBSEL}, 
    { "Affinity",         "spin","0","0",       "FFFFFFFF"  , NULL,0,NNB,  PG|XBOARD}, 
    { "RepeatPV",         "check","0","0",      "true"      , NULL,0,NNB,  PG|XBOARD},
    { "PromoteWorkAround","check","0","0",      "false"     , NULL,0,NNB,  PG|XBOARD},
As CuteChess behaves the same as xboard with the missing promotion piece, will it be sufficient just to change the line into,

Code: Select all

     { "PromoteWorkAround","check","0","0",      "false"     , NULL,0,NNB,  PG|XBOARD|UCI}
or do I need to change more?

This are the logs that made me notice it.
Ofc I could still set such engines up as UCI2XBOARD (there are a a bunch more BTW), but IMHO it would better to make the code
for this working for relaying to XB and UCI now with Cutechess)

Code: Select all

1617274095.820 POLYGLOT Setting PolyGlot option "PromoteWorkAround=true"
1617274095.820 POLYGLOT *** Mainloop started ***
1617274095.820 GUI->Adapter: uci
1617274095.820 POLYGLOT *** Switching to UCI mode ***
1617274095.820 Adapter->GUI: id name NSVChess 0.14
1617274095.820 Adapter->GUI: id author Nicolas Velin
1617274095.820 Adapter->GUI: option name OwnBook type check default false
1617274095.820 Adapter->GUI: option name Ponder type check default false
1617274095.820 Adapter->GUI: option name Polyglot Log type check default true
1617274095.820 Adapter->GUI: option name Polyglot LogFile type string default NSVChess_014.log
1617274095.820 Adapter->GUI: option name Polyglot UseNice type check default false
1617274095.820 Adapter->GUI: option name Polyglot NiceValue type spin default 5 min 0 max 20
1617274095.820 Adapter->GUI: option name Polyglot Book type check default false
1617274095.820 Adapter->GUI: option name Polyglot BookFile type string default book.bin
1617274095.820 Adapter->GUI: option name Polyglot BookRandom type check default true
1617274095.820 Adapter->GUI: option name Polyglot BookDepth type spin default 256 min 0 max 256
1617274095.820 Adapter->GUI: option name Polyglot BookTreshold type spin default 5 min 0 max 1000
1617274095.820 Adapter->GUI: uciok
...
1617276392.192 Engine->Adapter: info depth 5 nodes 6883972 time 50062 nps 137508 score cp 1301 pv c7c8
1617276392.192 Adapter->GUI: info depth 5 nodes 6883972 time 50062 nps 137508 score cp 1301 pv c7c8
1617276392.192 Engine->Adapter: bestmove c7c8
1617276392.192 Adapter->GUI: bestmove c7c8

Code: Select all

[Event "Test@CuteCGdv"]
[Site "RWBC-CAPPUCCINO Win7U64 Q8200 2.33Ghz + Nvidia GT 710"]
[Date "2021.04.01"]
[Round "5"]
[White "NSVChess_014"]
[Black "Megalodon_032-64"]
...
22. Bxa8 {+5.10/5 5.33} Nb6 {+6.90/6 4.26}
{White makes an illegal move: c7c8}
0-1
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy