Wild21 on ICC with Winboard?

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

Wild21 on ICC with Winboard?

Postby JVMerlino » 27 Aug 2013, 03:21

I apologize if this topic has been discussed before, but I couldn't find it anywhere. Is there any way to get an engine to play wild20 or wild21 on ICS? These are both "variants" that start from a position, presumably via a "setboard" command. However, every time I try to play one of those accounts (usually to test a KBBvK ending, for example), my engine does not receive the FEN. No idea if this is an issue with ICS or my engine or Winboard. Help! :)

Many thanks in advance,
jm
JVMerlino
 
Posts: 17
Joined: 23 Feb 2010, 20:35

Re: Wild21 on ICC with Winboard?

Postby H.G.Muller » 27 Aug 2013, 06:15

This sounds like something is broken in WinBoard. ICS send a full board position on every move, and IIRC for the first board of a game WinBoard is supposed to compare it with the standard setup to see if it should send the position to the engine, or if it can set the engine thinking right away.

I will give it a look. Do you happen to have a debug file from such a faulty game start?
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Wild21 on ICC with Winboard?

Postby JVMerlino » 27 Aug 2013, 16:04

H.G.Muller wrote:This sounds like something is broken in WinBoard. ICS send a full board position on every move, and IIRC for the first board of a game WinBoard is supposed to compare it with the standard setup to see if it should send the position to the engine, or if it can set the engine thinking right away.

I will give it a look. Do you happen to have a debug file from such a faulty game start?


Hi H.G.,

I do not have a Winboard debug file. But I do have one of Myrddin's log files from an attempt to play a KBBvK ending and no "setboard" is being received. Here it is. Note that I manually forced the resignation to end the game.

======================
waiting for input
> Received xboard
Handling Command xboard
waiting for input
> Received protover 2
Handling Command protover
< Finished protover
waiting for input
> Received new
Handling Command new
< Finished new
waiting for input
> Received post
Handling Command post
< Finished post
waiting for input
> Received hard
Handling Command hard
< Finished hard
waiting for input
> Received accepted done
Handling Command accepted
< accepted not supported
waiting for input
> Received accepted setboard
Handling Command accepted
< accepted not supported
waiting for input
> Received accepted playother
Handling Command accepted
< accepted not supported
waiting for input
> Received accepted draw
Handling Command accepted
< accepted not supported
waiting for input
> Received accepted sigint
Handling Command accepted
< accepted not supported
waiting for input
> Received accepted sigterm
Handling Command accepted
< accepted not supported
waiting for input
> Received accepted reuse
Handling Command accepted
< accepted not supported
waiting for input
> Received accepted analyze
Handling Command accepted
< accepted not supported
waiting for input
> Received rejected variants
Handling Command rejected
< rejected not supported
waiting for input
> Received accepted myname
Handling Command accepted
< accepted not supported
waiting for input
> Received accepted done
Handling Command accepted
< accepted not supported
waiting for input
> Received variant normal
Handling Command variant
< variant not supported
waiting for input
> Received level 0 1 0
Handling Command level
< Finished level, nFischerInc = 0, nLevelMoves = 0
waiting for input
> Received computer
Handling Command computer
< Finished computer
waiting for input
> Received name KBBk
Handling Command name
< name not supported
waiting for input
> Received rating 2585 1600
Handling Command rating
< rating not supported
waiting for input
> Received time 6000
Handling Command time
< Finished time -- nThinkTime = 966, nGameMove = 0
waiting for input
> Received otim 5900
Handling Command otim
< otim not supported
waiting for input
> Received a5c7
Handling Command a5c7
In move handling with a5c7
We just got a move -- nSideToMove = 0, nEngineMode == 0, nEngineCommand = 0
< Illegal move/command:a5c7
waiting for input
> Received result 1-0 {MyrddinComp resigns}
Handling Command result
< Finished result
waiting for input
> Received quit
Handling Command quit
======================

I'll try to create a Winboard debug file in a few minutes.

Many thanks,
jm
JVMerlino
 
Posts: 17
Joined: 23 Feb 2010, 20:35

Re: Wild21 on ICC with Winboard?

Postby JVMerlino » 27 Aug 2013, 16:11

Ok, here's a Winboard debug file:

============================
WinBoard 4.4.2b + myrddin.exe
Reset(1, 0) from gameMode 0
recognized 'normal' (-1) as variant normal
GameEnds(0, (null), 2)
shuffleOpenings = 0
StartChildProcess (dir="c:\winboard-4.4.2\winboard") myrddin.exe hash=256 logfile=1
580 >first : xboard
protover 2
700 <first :
700 <first : #--------------------------------#
700 <first : # Myrddin 0.86-64 - (12/21/12) #
710 <first : # Copyright 2012 - John Merlino #
710 <first : # 64-bit version #
710 <first : # All Rights Reserved #
710 <first : #--------------------------------#
710 <first :
710 <first : feature done=0
710 >first : accepted done
710 <first :
710 <first : > feature done=0
710 <first : feature setboard=1 playother=1 draw=1
710 >first : accepted setboard
710 >first : accepted playother
710 >first : accepted draw
710 <first : feature sigint=0 sigterm=0 reuse=0 analyze=1
710 >first : accepted sigint
710 >first : accepted sigterm
710 >first : accepted reuse
710 >first : accepted analyze
710 <first : feature variants=normal,wild21
710 >first : rejected variants
710 <first : feature myname="Myrddin 0.86-64"
710 >first : accepted myname
710 <first : feature done=1
710 >first : accepted done
720 >first : new
720 >first : post
720 >first : hard
<ICS: Welcome to the INTERNET CHESS CLUB\015\012\015\012web: www.chessclub.com email: icc@chessclub.com\015\012phone: 1-412-521-5553\015\012\015\012login:
ics input 0, castling = 7 0 4 7 0 4
ics_type 1
ics_type 1
>ICS: ;\012
>ICS: ; commands for logging into ICC\012
>ICS: ;\012
>ICS: MyrddinComp\012
>ICS: gleep?\012
>ICS: seek 5 0 r f\012
>ICS: seek 3 0 r f\012
>ICS: seek 2 12 r f\012
>ICS: resume\012
>ICS: \012
<ICS: Invalid username\015\012login:
ics input 0, castling = 7 0 4 7 0 4
<ICS: Invalid username\015\012login:
ics input 0, castling = 7 0 4 7 0 4
<ICS: Invalid username\015\012login:
ics input 0, castling = 7 0 4 7 0 4
<ICS: \015\012"MyrddinComp" is a registered name. If it is yours, type the password.\015\012If not, just hit return to try another name.\015\012\015\012password: \377\373\001
ics input 0, castling = 7 0 4 7 0 4

<WILL ECHO >DO ECHO <ICS: \377\374\001\015\012** The use of chess-playing programs is not allowed unless you **\015\012** have a (C) label ("help computers") or are logged on as an **\015\012** anonymous user, e.g. anon1234 ("help anonymous"). ** \015\012\015\012Internet Chess Club Events: More details: "http://www.chessclub.com/activities/events.html".\015\012 Times are EST; add 5 hours for GMT.\015\012_____________________________________________________________________\015\012***************************************************************************************\015\012*** Don't miss ICC Chess.FM videos! ***\015\012*** GOTW, Attack with LarryC, Sharpen your chess Sense with Watson, Learn How ***\015\012*** to win with GM Boris, Ronen Har-Zvi's opening series, Game Of the Day for ***\015\012*** the major events, Dan Heisman new series... ***\015\012*** ...and much more at http://www.chess.fm ***\015\012*** The best way to learn chess online! ***\015\012***************************************************************************************\015\012\015\012For a list of events, click here:\015\012\015\012http://www.chessclub.com/activities/events.html\015\012 ____________________________________________________________________ \015\012\015\012\015\012aics%
ics input 0, castling = 7 0 4 7 0 4

<WILL ECHO
<WONT ECHO >DONT ECHO ics_type 1
ics_type 1
>ICS: /set-quietly interface WinBoard 4.4.2b + myrddin.exe\015\012/set-quietly style 12\015\012
>ICS: set width 110\015\012
<ICS: Your ad is #121\015\012MyrddinComp(C) (2585) seeking blitz 5 0 rated f ("play 121" to respond)\015\012(ad sent to 757 players, of whom 750 are eligible)\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
silence
silence
silence
<ICS: Your ad is #42\015\012MyrddinComp(C) (2585) seeking blitz 3 0 rated f ("play 42" to respond)\015\012(ad sent to 758 players, of whom 751 are eligible)\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
silence
silence
silence
<ICS: \015\012jdimpo1 (1046) seeking bullet 2 0 rated m ("play 137" to respond)\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
silence
silence
silence
<ICS: Your ad is #168\015\012MyrddinComp(C) (2585) seeking blitz 2 12 rated f ("play 168" to respond)\015\012(ad sent to 762 players, of whom 755 are eligible)\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
silence
silence
silence
<ICS: \015\012sharky (1681) seeking bullet 1 0 rated m ("play 197" to respond)\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
silence
silence
silence
<ICS: \015\012dw1176 (1796) seeking blitz 3 0 rated 1600-3000 f ("play 200" to respond)\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
silence
silence
silence
<ICS: You have no adjourned games.\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
<ICS: \377\374\001aics%
ics input 0, castling = 7 0 4 7 0 4

<WONT ECHO <ICS: aics%
ics input 0, castling = 7 0 4 7 0 4
<ICS: width set to 110.\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
<ICS: \015\012talquale (1645) seeking blitz 3 1 rated 1600-9999 m f ("play 211" to respond)\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
silence
silence
silence
<ICS: \015\012edgardavidstyle (1220) seeking blitz 1 3 rated 1000-9999 ("play 231" to respond)\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
silence
silence
silence
<ICS: \015\012BulletC(C) (1349) seeking bullet 2 1 rated 0-2100 m f ("play 244" to respond)\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
silence
silence
silence
<ICS: \015\012KorMax (1783) seeking blitz 3 0 rated 1700-9999 f ("play 16" to respond)\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
silence
silence
silence
>ICS: match kbbk w20 1 0 u\015\012
<ICS: Issuing: MyrddinComp (2585) KBBk (1600) unrated wild(20) Loadgame 1 0\015\012KBBk is in the computer list.\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
<ICS: You have been added to KBBk's simul list.\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
<ICS: \015\012Creating: MyrddinComp (2585) KBBk (1600) unrated wild(20) Loadgame 1 0\015\012\007KBBk accepts your challenge.\015\012"Seeking" ad #42 removed.\015\012"Seeking" ad #121 removed.\015\012"Seeking" ad #168 removed.\015\012{Game 521 (MyrddinComp vs. KBBk) Creating unrated wild(20) match.} *\015\012\015\012<12> rnbqkbnr pppppppp -------- -------- -------- -------- PPPPPPPP RNBQKBNR W -1 1 1 1 1 0 521 MyrddinComp KBBk 1 1 0 39 39 60 60 1 none (0:00) none 0\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
Ratings from 'Creating:' MyrddinComp 2585, KBBk 1600
recognized 'unrated wild(20) match.' (20) as variant normal
Switch board from normal to normal
shuffleOpenings = 0
Parsing board: rnbqkbnr pppppppp -------- -------- -------- -------- PPPPPPPP RNBQKBNR W -1 1 1 1 1 0 521 MyrddinComp KBBk 1 1 0 39 39 60 60 1 none (0:00) none 0

recognized 'ICS unrated wild(20) match' (20) as variant normal
ParseBoard says variant = 'ICS unrated wild(20) match'
recognized as normal
Remembered ratings: W 2585, B 1600
load 8x8 board
14052 >first : variant normal
14052 >first : level 0 1 0
14052 >first : computer
14052 >first : name KBBk
14052 >first : rating 2585 1600
14052 >first : black
time odds: 1 1
14052 >first : time 6000
14052 >first : otim 6000
14052 >first : white
book hit = (NULL)
14052 >first : go
nps: w=-1, b=-1
Display title 'MyrddinComp (39) vs. KBBk (39) {1 0 normal}, gameInfo.variant = 1'
silence
14072 <first :
14072 <first : move d2d4
machine move 0, castling = 7 0 4 7 0 4
move to parse: d2d4
>ICS: d2d4\015\012
move: d2d4
, parse: d4 (
)
silence
14163 <first : tellics kibitz book move:move d2d4
>ICS: kibitz book move:move d2d4
>ICS: \015\012
<ICS: \015\012<12> rnbqkbnr pppppppp -------- -------- ---P---- -------- PPP-PPPP RNBQKBNR B 3 1 1 1 1 0 521 MyrddinComp KBBk -1 1 0 39 39 60 60 1 P/d2-d4 (0:00) d4 0\015\012aics%
ics input 1, castling = 7 0 4 7 0 4
Parsing board: rnbqkbnr pppppppp -------- -------- ---P---- -------- PPP-PPPP RNBQKBNR B 3 1 1 1 1 0 521 MyrddinComp KBBk -1 1 0 39 39 60 60 1 P/d2-d4 (0:00) d4 0

load 8x8 board
parseboard 1, castling = 7 0 4 7 0 4
accepted move d4 from ICS, parse it.
moveNum = 1
board = 0-8 x 8
move to parse: d4
Move parsed to 'd4 (0:00)'
nps: w=-1, b=-1
Display title 'MyrddinComp (39) vs. KBBk (39) {1 0 normal}, gameInfo.variant = 1'
<ICS: MyrddinComp(C) kibitzes: book move:move d2d4\015\012(kibitzed to 2 people)\015\012aics%
ics input 1, castling = 7 0 4 7 0 4
silence
silence
silence
<ICS: \015\012KBBk(C) kibitzes: Hello, I'm a robot. "say hint" when you want a hint, or "takeback 2" if you want to try a\015\012\ different move.\015\012aics%
ics input 1, castling = 7 0 4 7 0 4
silence
silence
silence
<ICS: \015\012Game 521: KBBk does loadfen 2B5/8/5B2/1k6/8/8/2K5/8 w - - 0 0.\015\012\007\015\012<12> --B----- -------- -----B-- -k------ -------- -------- --K----- -------- W -1 0 0 0 0 0 521 MyrddinComp KBBk 1 1 0 6 0 59 60 1 none (0:00) none 0\015\012aics%
ics input 1, castling = 7 0 4 7 0 4
Parsing board: --B----- -------- -----B-- -k------ -------- -------- --K----- -------- W -1 0 0 0 0 0 521 MyrddinComp KBBk 1 1 0 6 0 59 60 1 none (0:00) none 0

load 8x8 board
nps: w=-1, b=-1
Display title 'MyrddinComp (6) vs. KBBk (0) {1 0 normal}, gameInfo.variant = 1'
silence
<ICS: \015\012KBBk(C) kibitzes: White can mate in 15 moves.\015\012aics%
ics input 0, castling = -1 -1 4 -1 -1 4
silence
silence
silence
<ICS: \015\012KBBk(C) kibitzes: White can mate in 16 moves.\015\012aics%
ics input 0, castling = -1 -1 4 -1 -1 4
silence
silence
silence
>ICS: resign\015\012
<ICS: {Game 521 (MyrddinComp vs. KBBk) MyrddinComp resigns} 0-1\015\012Game was not rated. No rating adjustment.\015\012aics%
ics input 0, castling = -1 -1 4 -1 -1 4
GameEnds(38, MyrddinComp resigns, 0)
20108 >first : result 0-1 {MyrddinComp resigns}
silence
20108 >first : quit
>ICS: seek 5 0 r f\015\012seek 3 0 r f\015\012seek 2 12 r f\015\012
>ICS: \015\012
StartChildProcess (dir="c:\winboard-4.4.2\winboard") myrddin.exe hash=256 logfile=1
20609 >first : xboard
protover 2
Reset(1, 1) from gameMode 11
recognized 'normal' (-1) as variant normal
GameEnds(0, (null), 2)
20609 >first : quit
shuffleOpenings = 0
StartChildProcess (dir="c:\winboard-4.4.2\winboard") myrddin.exe hash=256 logfile=1
21129 >first : xboard
protover 2
21129 >first : new
21129 >first : post
21129 >first : hard
<ICS: Your ad is #153\015\012MyrddinComp(C) (2585) seeking blitz 5 0 rated f ("play 153" to respond)\015\012(ad sent to 740 players, of whom 733 are eligible)\015\012aics% Your ad is #245\015\012MyrddinComp(C) (2585) seeking blitz 3 0 rated f ("play 245" to respond)\015\012(ad sent to 740 players, of whom 733 are eligible)\015\012aics% Your ad is #246\015\012MyrddinComp(C) (2585) seeking blitz 2 12 rated f ("play 246" to respond)\015\012(ad sent to 739 players, of whom 732 are eligible)\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
silence
silence
silence
silence
silence
silence
silence
silence
silence
21320 <first :
21320 <first : #--------------------------------#
21320 <first : # Myrddin 0.86-64 - (12/21/12) #
21320 <first : # Copyright 2012 - John Merlino #
21320 <first : # 64-bit version #
21320 <first : # All Rights Reserved #
21320 <first : #--------------------------------#
21320 <first :
21320 <first : feature done=0
21320 >first : accepted done
21320 <first :
21320 <first : > feature done=0
21320 <first : feature setboard=1 playother=1 draw=1
21320 >first : accepted setboard
21320 >first : accepted playother
21320 >first : accepted draw
21320 <first : feature sigint=0 sigterm=0 reuse=0 analyze=1
21320 >first : accepted sigint
21320 >first : accepted sigterm
21320 >first : accepted reuse
21320 >first : accepted analyze
21320 <first : feature variants=normal,wild21
21320 >first : rejected variants
21320 <first : feature myname="Myrddin 0.86-64"
21320 >first : accepted myname
21320 <first : feature done=1
21320 >first : accepted done
<ICS: jdimpo1 (1446) seeking wild(17) 5 0 rated m ("play 249" to respond)\015\012aics%
ics input 0, castling = 7 0 4 7 0 4
silence
silence
silence
>ICS: quit\015\012
<ICS: "Seeking" ad #153 removed.\015\012"Seeking" ad #245 removed.\015\012"Seeking" ad #246 removed.\015\012___________________________________________________________________\015\012 *** Goodbye! Thanks for visiting ICC! ***\015\012\015\012 If you have any questions or comments, please contact us at:\015\012\015\012 WEB: http://www.chessclub.com mail:\015\012 email: icc@chessclub.com ICC\015\012 phone: (412) 521-5553 (USA) 5820 Forbes Avenue, Suite 1\015\012 FAX: (412) 521-5575 Pittsburgh, PA 15217 USA\015\012____________________________________________________________________\015\012***************************************************************************************\015\012*** Don't miss ICC Chess.FM videos! ***\015\012*** GOTW, Attack with LarryC, Sharpen your chess Sense with Watson, Learn How ***\015\012*** to win with GM Boris, Ronen Har-Zvi's opening series, Game Of the Day for ***\015\012*** the major events, Dan Heisman new series... ***\015\012*** ...and much more at http://www.chess.fm ***\015\012*** The best way to learn chess online! ***\015\012***************************************************************************************\015\012\015\012Quit with quit command.\015\012
ics input 0, castling = 7 0 4 7 0 4
<ICS:
ics input 0, castling = 7 0 4 7 0 4
Exiting: Connection closed by ICS
silence
GameEnds(40, xboard exit, 2)
24383 >first : result * {xboard exit}
24383 >first : quit
============================

jm
JVMerlino
 
Posts: 17
Joined: 23 Feb 2010, 20:35

Re: Wild21 on ICC with Winboard?

Postby H.G.Muller » 27 Aug 2013, 19:42

Hmm, this looks quite weird. I wonder if it has always been like this, or whether there has been a recent change in protocol on ICC to handle such loaded games. The point is that it first sends a board with game number 521 with the normal opening position, and then suddenly changes it to a KBNK position, after printing a 'loaded FEN' message.

I don't think WinBoard is programmed to recognize that 'loaded FEN' message at all. It compares the first board of a game to the start position, but for later boards of a game I don't think it looks to the board at all. Just to the game number, and the move that comes with the game. So ICC sending the normal opening position with that same game number first will completely confuse it.

I will look into it.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Wild21 on ICC with Winboard?

Postby JVMerlino » 27 Aug 2013, 22:51

Excellent. Looking forward to your findings. Thanks, H.G.!
JVMerlino
 
Posts: 17
Joined: 23 Feb 2010, 20:35

Re: Wild21 on ICC with Winboard?

Postby H.G.Muller » 28 Aug 2013, 09:00

Well, an initial code inspection revealed that WinBoard was never intended to play such loadable variants in zippy mode. Wild 20 and 21 are recognized as VariantLoadable, but the name it prints for that variant is "normal" (hence the confusion in the debug output, where it says it recognized 'wild(20)' as 'normal'.

The routine ZippyHandleChallenge() explicitly tests for challenges in VariantNormal, and rejects them even before testing if the variant occurs in the -zippyVariants option specified by the user.

This routine is not invoked if you are not challenged, but issue the challenge yourself, however. (Which is the case here.) You can even issue challenges not in the -zippyVariants list, in such a case. This is why you could start a game with KBNk.

I can imagine why WinBoard does not support VariantLoadable in zippy mode; the ICS way to handle such games is rather sick. From the debug log you can see that initially the game starts as a normal Chess game from the standard opening position. Myrddin even played a (book) move in that game, d2d4, and the ICS accepted that move, and confirmed it by sending the position after it. But after that, the opponent apparently took action to change the game position by uploading a FEN, and the game continues (with the same game number, but back to move 0) from that position.

This would require WinBoard to abort the ongoing game with Myrddin, and start a new one conforming to the new position. Or, more elegantly, it should never have started the loadable game in reaction to the initial board, but in stead wait for the opponent to upload the FEN, and only start in reaction to the board it receives after that. This requires non-trivial changes in WinBoard, though, and it would also be a challenge to make it work on all ICS types it supports. (FICS might send completely different messages when it accepts the opponent FEN as ICC.) So I am afraid there will be no quick fix for this problem.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Wild21 on ICC with Winboard?

Postby JVMerlino » 28 Aug 2013, 16:44

Thanks very much for looking into this. I really appreciate it.

jm
JVMerlino
 
Posts: 17
Joined: 23 Feb 2010, 20:35

Re: Wild21 on ICC with Winboard?

Postby DuckStorm » 28 Aug 2013, 19:06

The reason Wild21 first creates a regular game and then does a loadfen/loadgame (and accompanying datagrams) afterwards is to make it match Wild20. Wild20 works by first starting a regular game, but then allowing either player to load the position of his or her choice prior to making their first move. This is really useful as it allows players to practice thematic openings, special endgames, etc.. There are lots of reasons why you'd want a (C) to be able to play unrated Wild20 (ICS won't let you play rated wild20 for obvious reasons).

The majority of engines are able to support a loadfen while in analysis mode. In fact WinBoard even allows it if you're in an examined Wild0 (normal chess), so WinBoard does seem capable of processing the loadfen instruction. However WinBoard for some reason has special logic in Zippy.c that specifically excludes Wild20 and Wild21 live games. And this cannot be changed without creating a custom build of WinBoard because the instruction is hard coded and not configurable like other variants are.

I'd be interested in creating a custom build where this instruction isn't included, to see how it does. I need to find the instructions on how to compile WinBoard on Windows? I imagine it's quite a bit trickier than compiling xboard given the dependencies on Windows compilers.

Cheers,
DuckStorm(*)
An Administrator at The Internet Chess Club
DuckStorm
 
Posts: 1
Joined: 28 Aug 2013, 17:45

Re: Wild21 on ICC with Winboard?

Postby H.G.Muller » 28 Aug 2013, 19:45

Thank you for your interest in this problem. Together we should be able to solve this.

I always compile WinBoard with gcc under cygwin, and the source tar ball comes with a makefile.gcc that makes this easy. (From the Cygwin prompt, you just issue the command 'make -f makefile.gcc'.)

But beware that the hardcoded zippy refusal to play VariantLoadable (= wild 20 & 21) was not involved in the problem experienced by John, (so that removing the lines will not solve it). As I mentioned above, these lines only prevent that the computer accepts a challenge. It does not prevent the computer (or more likely its operator) to issue such a challenge. Which is what John did.

The real problem is that WinBoard gets confused once the game starts. It allows the engine to play immediately from the initial board sent by ICC (before the loadfen). And it is not programmed to recognize that the position suddenly changes by the loadfen, and to inform the engine of such a change. So the engine continues to play the game from the standard opening position it already started, which very quickly leads to illegal moves in the loaded position. It is essential that this would be changed, or accepting a challenge would not lead to anything useful.

I think the best solution would be to let WinBoard simply ignore any board it gets in VariantLoadable until the loadfen is executed. The board ICC sends after the loadfen then can act / be treated as initial position of the game. In itself this is simple to do; it would not even require an extra flag in WinBoard, as we could simply change the current variant from VariantLoadable to VariantNormal on the loadfen, to make it receptive to boards again.

The only thing that requires some design is what to use as a trigger for resetting gameInfo.variant to VariantNormal. ICC sends a clear message for this, starting with the Game number, which WinBoard could be made to recognize. WinBoard is not an ICC-only interface, however, and the corresponding message on FICS (which presumably uses the bsetup command for this) should also be recognized.

The question, however, is if WinBoard should only allow the opponent in VariantLoadable to load the FEN (and wait passively for that), or that we also want it to be able to do that itself. If we want that, it would complicates matters. Especially if we want the engine to upload the position. Because then the engine would have to know the game started before the loadfen command, which requires completely different treatment.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Wild21 on ICC with Winboard?

Postby H.G.Muller » 28 Aug 2013, 20:54

OK, I uploaded a version where I disabled the test to reject VariantLoadable, and put in the other changes I proposed. It is at http://hgm.nubati.net/WinBoardICC.zip .

Feel free to test it. (I have not done so!)
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Wild21 on ICC with Winboard?

Postby H.G.Muller » 29 Aug 2013, 08:58

OK, I now had time to test it, and it did not work. Problem was that gameInfo.variant is only set when the first board is parsed, and upto then the variant is only encoded in the PGN Event tag (which says something like "ICS unrated wild(20) match"). So I added an extra flag now which is set in the Create message when this tag translates to VariantLoadable (which seems the case for wild 6, 20 and 21). Boards are ignored until the flag is cleared, which is done on reception of a "Game *: * does loadfen *" message from the ICS.

That seems to do it. I could play two zippy games against KBNk. Now hope it did not break something else. (Hmm, maybe I should restrict this to zippy mode. I guess a human playin one of these wilds would might not get notified his game has started until after he (or his opponent) uploaded the FEN. How is this supposed to work? Can they use WinBoard's Edit Position mode to upload the position, or should they just type the loadfen command in the console?)

Anyway, I uploaded the working version to the same link as above.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Wild21 on ICC with Winboard?

Postby JVMerlino » 05 Sep 2013, 03:55

I have confirmed that Myrddin can now play a wild20 game against KBBK on ICC. I will leave it to DuckStorm to try matching against Myrddin in a wild21 game, as that was his original request.

Thanks, H.G.!
jm
JVMerlino
 
Posts: 17
Joined: 23 Feb 2010, 20:35

Re: Wild21 on ICC with Winboard?

Postby H.G.Muller » 05 Sep 2013, 07:59

Well, I still don't consider this completely solved, so I am hesitant to include this patch in the main branch of WinBoard development. The problem is that these are asymmetric variants: one of the players loads the board position, the other just receives it. So far it is only solved when the non-zippy player loads the position. And the solution I have chosen in implementing it is in fact making it more difficult to solve the case where the zippy player would want to load the position. Because the engine is now not informed of the start of the game before the loading (by the opponent) takes place.

I am not sure how this should be logically solved. Perhaps WinBoard should be started with a -loadPositionFile, so that it could send the position described in that file (subject to the usual -loadPositionIndex, inclusive the auto-stepping convention) to the ICS as soon as the ICS creates the game, and only invoke the engine after the ICS has setup the board on WinBoard's instructions. But in this case you could not have the engine itself decide on the position (e.g. generate random KBNK positions if you wanted to make a KBNK bot yourself). Engines can send a starting position to the GUI through the (rather new) 'setup' command of WB protocol, but only in response to the 'variant' command. But this requires that WinBoard would start up the engine even before receiving the ICS loadfen confirmation at least to the point where it sends this 'variant' command, so that the engine has something to respond to.

The problem is that WinBoard cannot know whether it is dealing with an engine that passively awaits the opponent to pick a position, or one that wants to specify the position by itself. Perhaps a command-line argument should make WinBoard aware of that, but that is not a very elegant solution. It would be better if the engine told it that, through a feature command. (Perhaps as simple as merely specifying 'loadable' in its variants feature. I suppose 'loadable' on ICC always means variant normal, and that there are no such things as loadable suicide or atomic games.)
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Wild21 on ICC with Winboard?

Postby JVMerlino » 09 Jan 2014, 07:47

Hi H.G.,

Reopening this thread, as I've been contacted by somebody else (a friend of Duckstorm) who is also interested in this. As mentioned earlier, I am able to challenge one of the w20 bot accounts (such as KBBK) and Myrddin plays either side flawlessly. However, if a human challenges Myrddin, the human sees this message:

"MyrddinComp(C) tells you: This computer can't play wild(20) [normal], only wild21 MyrddinComp has declined your proposal for a match."

This is very strange because I have "wild=20" in my vars. So my question is whether the above message is coming from Winboard or from ICC.

Additionally, we're now only interested in wild 20 matches, because apparently ICC controls the set of positions that can be automatically loaded in a wild 21 game.

Many thanks,
jm
JVMerlino
 
Posts: 17
Joined: 23 Feb 2010, 20:35

Re: Wild21 on ICC with Winboard?

Postby H.G.Muller » 09 Jan 2014, 17:23

This message is indeed coming from WinBoard. It is printed either when the requested variant is not supported by the engine, as given per variants feature, or a variant that is not specified in the -zippyVariants option. According to the message 'wild(20)' is already recognized by WinBoard as variant 'normal', and presumably Myrddin plays that. So there might be something wrong with the way WinBoard tries to match the requested variant with the -zippyVariants string. What did you specify for this option?
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Wild21 on ICC with Winboard?

Postby JVMerlino » 09 Jan 2014, 17:49

I'm an idiot. My code used "feature variants=normal", but it should have used "variant". Classic case of RTFM.

Sorry for the hassles.... :(

jm
JVMerlino
 
Posts: 17
Joined: 23 Feb 2010, 20:35

Re: Wild21 on ICC with Winboard?

Postby H.G.Muller » 09 Jan 2014, 18:36

No, feature variants="normal" is correct. (Not sure if the quotes are manditory, but it definitely has to be plural.) Only what WB sends is variant xxx (but for xxx = normal it would not send it at all). What WinBoard does to check if the engine plays a variant is rather course: if strstr(enginevariantsfeaturestring, currentvariant) is non-NULL it assumes the variant will be played. Only the current development version does more strict checking.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Wild21 on ICC with Winboard?

Postby JVMerlino » 09 Jan 2014, 20:43

H.G.Muller wrote:No, feature variants="normal" is correct. (Not sure if the quotes are manditory, but it definitely has to be plural.) Only what WB sends is variant xxx (but for xxx = normal it would not send it at all). What WinBoard does to check if the engine plays a variant is rather course: if strstr(enginevariantsfeaturestring, currentvariant) is non-NULL it assumes the variant will be played. Only the current development version does more strict checking.


Ah, so I'm wrong again (about the documentation)! Then why would WB be sending this message to the opponent if I am using "feature variants=normal"? Is our assumption that w20 is "normal" incorrect? I noticed there's a "zippyvariants" option, but the default is "normal" so I haven't been using it explicitly.
JVMerlino
 
Posts: 17
Joined: 23 Feb 2010, 20:35

Re: Wild21 on ICC with Winboard?

Postby H.G.Muller » 09 Jan 2014, 23:21

Well, the responsible code in zippy.c seems to be this:

Code: Select all
void
ZippyHandleChallenge (char *srated, char *swild, char *sbase, char *sincrement, char *opponent)
{
    char buf[MSG_SIZ];
    int i=0;
    VariantClass variant;
    char *varname;

    variant = StringToVariant(swild);
    varname = VariantName(variant);

    /* [DM] If icsAnalyzeEngine active we don't accept automatic games */
    if (appData.icsActive && appData.icsEngineAnalyze) return;

    /* If desired, you can insert more code here to decline matches
       based on rated, variant, base, and increment, but it is
       easier to use the ICS formula feature instead. */

    if (variant == VariantLoadable) {
      snprintf(buf, MSG_SIZ,
    "%stell %s This computer can't play wild type %s\n%sdecline %s\n",
      ics_prefix, opponent, swild, ics_prefix, opponent);
   SendToICS(buf);
   return;
    }
    if (StrStr(appData.zippyVariants, varname) == NULL ||
              ((i=first.protocolVersion) != 1 && StrStr(first.variants, varname) == NULL) /* [HGM] zippyvar */
                                                          ) {
      snprintf(buf, MSG_SIZ,
    "%stell %s This computer can't play %s [%s], only %s\n%sdecline %s\n",
      ics_prefix, opponent, swild, varname,
                i ? first.variants : appData.zippyVariants,                               /* [HGM] zippyvar */
      ics_prefix, opponent);
   SendToICS(buf);
   return;
    }

You obviously get the error message from the second snprintf, so wild(20) was recognized as VariantNormal, not VariantLoadable, which would have aborted earlier. varname was printed, as "normal". So either appData.zippyVariants or first.variants must have not contained "normal". Unfortunately we cannot see which one of those it prints when it says "only normal". I guess the only solution is to figure out which of the two leads to the rejection, and then trace back how it could have received a wrong value.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Next

Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 26 guests