Awesome.hgm wrote:No, this is another undocumented and 'unstable' feature, and will probably remain so until I am sure how to best handle it (i.e. what information exactly to put in it,and when to accept it). Currently the formats supported in WinBoard 4.5.x is
setup <FEN>
setup (<pieceToCharTable>) <FEN>
But the WinBoard Alien edition already supports the additional format
setup (<pieceToCharTable>) <BoardSize> <FEN>
where <BoardSize> is something like 10x8+7 to specify a 10x8 board with holdings for 7 pieces.
That immediately answers another question that occurred to me regarding alternate board sizes. Very good, I'll put this to use.
The only downside is that I'll have to reinstall xboard again (I'd just gone to 4.5.3 from an old alien version).
That opens up a can of works though: there is no way for me to test whether XBoard will accept these commands, right? Would it be an idea if I could send "feature alien" and get either "accepted alien" or "rejected alien" (the latter I would always get, of course)? I can then filter out variants that need to set the board size when running under older versions of xboard.
In fact, maybe you only want to accept "setup" when an engine sends "feature alien" and the current variant is "fairy"?
Speaking of which, is that properly documented somewhere? I have a copy of the Spartan-thread from a while back saved for reference.When the user started from a position setup by himself, the FEN part is ignored. (A bug I corrected only recently is that the pieceToCharTable in that case was also ignored.)
I guess it depends on whether the descriptions are sufficiently general. I looked at notation for describing piece moves when I started working on Sjaak and they all gave me a headache, so I ended up just writing my own (with things like "slide H,V" describing a rook and "hop H,V" describing a cannon capture). Of course, I have yet to implement loading game descriptions from an input file...I am still in doubt if it should also be made possible to transfer info on the rules, e.g. define how the pieces move. It could be useful to allow that, so that any variant can be played with legality-testing on (and give better SAN). But it might be better to create a separate command for that, like
piece <ID> <gait>
where ID is the single-letter code as defined in the pieceToCharTable, and <gait> is a representation of the moves that piece can make, like
piece A {1,1}* {1,2}
piece H {1,0;2,1}
piece P (1,0)m (1,1)c (1,-1)c (1,0;2,0)vm
piece C {1,0}m* {1,0}hc*
Interesting. What do I send to request that information?Note that the Alien edition defines other protocol extensions as well, all designed to allow total control of the GUI by engine. WB protocol was already pretty good at that, e.g. leaving the engine in charge of legality checking through proper use of the Illegal Move error message and result-claim commands. But some features, like marking the target squares of a move, where not possible without the GUI knowing the piece moves. To remedy that, we added commands that inform the engine when a user picks up a piece, puts it down again, or hovers it over a capture square (lift <square>, put <square> and hover <square>), enabling the engine to send highlight <colorFEN> commands to cause highlighting of the indicated squares. Nebiyu is the only engine currently using that.
