It has the same structure as UCI; I just separated commands into smaller pieces for easier parsing (I was short on time). So Scan's answer here has the same properties as UCI's "bestmove". On the GUI side, UCI "position" + "go" becomes Hub "pos" + multiple "move"s + "level" + "go" (or "ponder"). The information is the same, but each command has a single purpose.BertTuyt wrote:The first thing I want to work on is to process the move message (after the go).
Scan replies with a standard notion move ( such as 31-26) followed by (at least I assumed, didn't go into details) the first expected counter move.
Actually, Scan's moves are not ambiguous. I guess it uses what you call "capture notation" here: from x to x cap x cap ... (without any space). I slightly favoured it over from x cap x cap ... x to which feels less natural for a computer.In GUIDE the move format is from to { Captures [capture-1] [capture[2] ... }
If there is no capture the output is (as an example) 31 26 00.
As the engine exactly knows what move including all the captured pieces, this format also also solves the ambiguous move problem.
It is also true that in 99.99% most likely only from and to is sufficient.
One can also solve the ambiguous problem by an capture notation (including turns or captured pieces) as also is used in pdn.
Regarding spaces, look at any programming language other than the oldest Fortrans, and you won't see them in basic tokens such as number literals very often. My view is that GUIDE forces the programmer to use imperative (stateful) style for parsing moves. I prefer to split lines into space-separated tokens that I handle with dedicated functions. For the same reason, Scan's "FEN" is the same as GUIDE's except that there is no space between the side to move and the piece placement. I would understand if everybody saw this as nitpicking though; programming languages are another hobby of mine.
I see two levels. Scan agrees with the "send all captured pieces" principle. The second level is representation; I picked something closer to the standard notation, but it doesn't look very important.My question , is there a specific preference we can standardise, so I can include this in the Damage GUI?