Algebraic Notation in Engine Output (Winboard/XBoard)

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

OliverBr
Posts: 725
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Algebraic Notation in Engine Output (Winboard/XBoard)

Post by OliverBr »

Hello together,

Winboard/XBoard standardly outputs move during analyzis in the same notation as the engine sends (Algebraic (Nf3) or simple (g1f3)).

This is different for UCI Engines, though: Here the moves from the engine are translated into algebraic notation (Nf3) no matter how the engines sent it.

1) What is translating? Xboard itself or the polyglot adapter? Because this would be a reason, why translating uci engines are being translated.
2) Can XB/WB translate it, too? If yes, how is this configurable?
3) What about other Chess-GUIs? Do they translate the moves for XB/WB engines, too?
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Algebraic Notation in Engine Output (Winboard/XBoard)

Post by hgm »

Polyglot translates PVs to SAN.

You can make WinBoard/XBoard translate PVs to SAN through the options -fSAN / -sSAN on the command line (or -fSAN added as additional GUI option on the engine's line in the Engine List). I see that the XBoard Load New Engine dialogs don't offer a text entry for 'Special GUI options', as WinBoard does.

For XBoard engines that already print the PV as SAN, using the option would just waste CPU time in the GUI.
OliverBr
Posts: 725
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: Algebraic Notation in Engine Output (Winboard/XBoard)

Post by OliverBr »

hgm wrote: Sun Sep 20, 2020 10:23 pm Polyglot translates PVs to SAN.

You can make WinBoard/XBoard translate PVs to SAN through the options -fSAN / -sSAN on the command line (or -fSAN added as additional GUI option on the engine's line in the Engine List). I see that the XBoard Load New Engine dialogs don't offer a text entry for 'Special GUI options', as WinBoard does.
Thank you! Works very well!
For XBoard engines that already print the PV as SAN, using the option would just waste CPU time in the GUI.
Yep, OlIThink 3 translated the PV itself, but since OliThink 4 I didn't implement it, because it is actually a little work and some code. Quite some engines don't translate it, including Ethereal.

Reading SAN is actually much easier and is implemented in 4 and 5, too.


EDIT: A little correction: It's working fine for the standard PV

Code: Select all

13	  0.00 	2.03M  	0:00.45	10. O-O Bxd3 11. cxd3 d4 12. Ng5 Qc7 13. Nf3 Qb6  
but not for the Ponder-PV:

Code: Select all

15	 -0.04 	2.30M  	0:00.54	(f5d3) c2d3 d5d4 f4e4 f8e7 d2f4 b6d8 b1d2 g6g5 f4g3 g8h6 d2c4 h6f5 a2a4 h7h5 f1e1
Is there something I can do about it? Perhaps the syntax?
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Algebraic Notation in Engine Output (Winboard/XBoard)

Post by hgm »

This should probably be considered an XBoard bug; I suppose it chokes on the parentheses around the first move, as I implemented it by first having the normal PGN parser act on the engine's PV, and then flush it as SAN. But in PGN the parentheses of course would delimit a recursive variation, which is to be ignored. It must treat the first move during ponder in a special way. I will look into it.
OliverBr
Posts: 725
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: Algebraic Notation in Engine Output (Winboard/XBoard)

Post by OliverBr »

hgm wrote: Mon Sep 21, 2020 8:27 am This should probably be considered an XBoard bug; I suppose it chokes on the parentheses around the first move, as I implemented it by first having the normal PGN parser act on the engine's PV, and then flush it as SAN. But in PGN the parentheses of course would delimit a recursive variation, which is to be ignored. It must treat the first move during ponder in a special way. I will look into it.
Thank you! I could change the syntax, too, if this was more convenient.
Chess Engine OliThink: http://brausch.org/home/chess
OliThink GitHub:https://github.com/olithink
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Algebraic Notation in Engine Output (Winboard/XBoard)

Post by hgm »

This should be fixed now. It was working in human-engine games, but it turned out that a PV of a pondering engine is handled by a different code section in TwoMachines mode (which is no doubt a legacy from the time there was no Engine Output window, and the only place to show PVs was above the board), and I had never put the call to the conversion routine in that section.

I also discovered it was not working for engines that give the ponder move as a Hint command, rather than in parentheses in front of the PV (as UCI2WB does...). This should be fixed too.

The updated source is in my on-line repository (v4.9.x branch).
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Algebraic Notation in Engine Output (Winboard/XBoard)

Post by Ras »

hgm wrote: Sat Oct 03, 2020 12:27 pmThe updated source is in my on-line repository (v4.9.x branch).
Btw., are you upstream for Xboard so that this will sooner or later land in Linux distros?
Rasmus Althoff
https://www.ct800.net
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Algebraic Notation in Engine Output (Winboard/XBoard)

Post by hgm »

Probably not, unless I push it to GNU savannah. But I forgot the password for that.
User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Algebraic Notation in Engine Output (Winboard/XBoard)

Post by Roland Chastain »

When I run Xboard, I have a message box saying "No default pieces installed! Select your own using '-pieceImageDirectory'.". (I compiled XBoard but didn't install it, because I have another version already installed and prefer for now to keep both.)

If I type

Code: Select all

./xboard -pieceImageDirectory ./themes/Mono
I have pieces on the chessboard, but I still get the warning.

I didn't expected that it would be so easy to compile XBoard!
Qui trop embrasse mal étreint.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Algebraic Notation in Engine Output (Winboard/XBoard)

Post by hgm »

Well, XBoard comes with a state-of-the-art build system. It is easy when you have all the development packages installed. Otherwise you get lots of complaints from the ./configure for missing packages.

I guess the message is a bit redundant when you already specified a -pieceImageDirectory. OTOH, not being able to find the default pieces still points to a defective install, and it does seem useful to warn the user for that. If you have another XBoard, it is a bit strange that it doesn't find the default pieces installed for that one. Probably the other one is from the official repo, so that it installes in /usr/ instead of /usr/local/ ?