How does it bloat code? To require coordinate notation bloats code, since an engine ought to use SAN to display moves and PVs to the player. Now we need a second block of code to output in a second format. That seems more like code bloat than using SAN does..michiguel wrote:+1000hgm wrote:SAN is utterly unsuitable as move format for in a comminication protocol, and should be outlawed. The fact that you are allowed to send moves as SAN is the biggest mistake of XBoard protocol. This is one thing where UCI got it right...
Including SAN in the xboard protocol was a blunder of gigantic proportions. It bloated software for no reason whatsoever. It was a magnet for bugs and GUI tantrums. Some GUI refused to correctly managed the "+" (check), since it required extra code that could potential slow down the process. This made some engines hang, since technically they were sending "illegal" moves (a check without a "+"). It is good for human communication, but for computers it is not.
Even though Gaviota's SAN input/output is correct, when I set Gaviota to use "e2e4" format by default, many of the headaches went away. The other option would have been to accept "non-standard" SAN and make the code even more bloated.
Miguel
As far as SAN goes, one CAN write a SAN parser that does not require the check (+) indicator. I did the same for castling since even ChessBase can't manage O-O (oh-oh) as opposed to o-o (lowercase oh-oh) or 0-0 (zero-zero). Software engineering says improper input should not cause crashes or misbehavior when possible, so accepting all of those is reasonable.
"slowing down" is pretty much irrelevant. So you add a few nanoseconds. Who can measure that?
