Algebraic Notation in Engine Output (Winboard/XBoard)

Discussion of chess software programming and technical issues.

Moderators: Harvey Williamson, Dann Corbit, hgm

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
OliverBr
Posts: 655
Joined: Tue Dec 18, 2007 8:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch
Contact:

Algebraic Notation in Engine Output (Winboard/XBoard)

Post by OliverBr » Sun Sep 20, 2020 10:08 am

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: 25454
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

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

Post by hgm » Sun Sep 20, 2020 8: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.

For XBoard engines that already print the PV as SAN, using the option would just waste CPU time in the GUI.
Get rid of the shit: vote for SHID!

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

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

Post by OliverBr » Mon Sep 21, 2020 4:22 am

hgm wrote:
Sun Sep 20, 2020 8: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: 25454
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

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

Post by hgm » Mon Sep 21, 2020 6: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.
Get rid of the shit: vote for SHID!

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

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

Post by OliverBr » Mon Sep 21, 2020 7:44 am

hgm wrote:
Mon Sep 21, 2020 6: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: 25454
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

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

Post by hgm » Sat Oct 03, 2020 10:27 am

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).
Get rid of the shit: vote for SHID!

Ras
Posts: 1646
Joined: Tue Aug 30, 2016 6:19 pm
Full name: Rasmus Althoff
Contact:

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

Post by Ras » Sat Oct 03, 2020 5:16 pm

hgm wrote:
Sat Oct 03, 2020 10:27 am
The 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: 25454
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

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

Post by hgm » Sat Oct 03, 2020 9:54 pm

Probably not, unless I push it to GNU savannah. But I forgot the password for that.
Get rid of the shit: vote for SHID!

User avatar
Roland Chastain
Posts: 443
Joined: Sat Jun 08, 2013 8:07 am
Location: France
Full name: Roland Chastain
Contact:

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

Post by Roland Chastain » Sun Oct 04, 2020 1:14 am

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: 25454
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

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

Post by hgm » Sun Oct 04, 2020 9:25 am

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/ ?
Get rid of the shit: vote for SHID!

Post Reply