'Pieces' PGN Tag?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Dirt
Posts: 2851
Joined: Wed Mar 08, 2006 10:01 pm
Location: Irvine, CA, USA

Re: 'Pieces' PGN Tag?

Post by Dirt »

stegemma wrote:For piece movement, you will always find in the future some new piece that you can't describe basing only on actual piece movement. The only way to do it would be to define a full scripting system to define the moving rules... but this is outside the scope of a PGN file.
Something like:
N(x,y)->N(x+1,y+2) | N(x+2,y+1) | N(x-2,y+1) | N(x+1),y-2) | N(x+2,y-1) | N(x-2,y-1) | N(x-1,y+1) | N(x-1,y-1)

I like that better.
User avatar
stegemma
Posts: 859
Joined: Mon Aug 10, 2009 10:05 pm
Location: Italy
Full name: Stefano Gemma

Re: 'Pieces' PGN Tag?

Post by stegemma »

Dirt wrote:
stegemma wrote:For piece movement, you will always find in the future some new piece that you can't describe basing only on actual piece movement. The only way to do it would be to define a full scripting system to define the moving rules... but this is outside the scope of a PGN file.
Something like:
N(x,y)->N(x+1,y+2) | N(x+2,y+1) | N(x-2,y+1) | N(x+1),y-2) | N(x+2,y-1) | N(x-2,y-1) | N(x-1,y+1) | N(x-1,y-1)

I like that better.
Or:

Code: Select all

N(x,y)->N(x+/-2,y+/-1) | N(x+/1,y+/-2)
Or

Code: Select all

N->any square of the same color at 2 squares of distance in any direction
Or

Code: Select all


N(x,y)->any (c,r) where (x-c)2 + (y-r)2 = 4

Or...

:)
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: 'Pieces' PGN Tag?

Post by JoshPettus »

@Greg, That just makes me want to go X=-1 Y=-1 ;)

Honestly though, to most of us who don't even know what a Ferz is, I don't see how the line even matters and can be freely ignored. Those that do, however would love HGM's interpretation.
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: 'Pieces' PGN Tag?

Post by hgm »

Code: Select all


N(x,y)->any (c,r) where (x-c)2 + (y-r)2 = 4

This is all so incredibly verbose. Would you also rally to abandon the FEN tag, and replace it by

Code: Select all

[StartPosition "In the upper-left corner, put a black Rook, then, horizontally next to it, put a black Knight..."]
because it is too hard for humans to understand a FEN? If not, why not?

The ONLY information-conveying character in your circular formula is the '4'. Well, Chess-variantists do indeed represent that piece by a single character, but prefer 'D' over '4'. 'D' is not anymore difficult to remember than '4'. Especially since they know that it stands for Dabbaba, and they of course know that Dabbabas make (0,2) jumps. To get that information from the '4', they would have to know how to calculate square roots... So in stead of 4 they use D, in stead of 5 they use N (for kNight), in stead of 1 they use W (for Wazir), etc. Much more easy to read, and incredibly more compact.

If a standard notation exists that is especially designed for the purpose, and widely used by people that need it, it is incredibly presumptuous to claim there is a better solution, when facing the problem for the first time.
Dirt wrote:Something like:
N(x,y)->N(x+1,y+2) | N(x+2,y+1) | N(x-2,y+1) | N(x+1),y-2) | N(x+2,y-1) | N(x-2,y-1) | N(x-1,y+1) | N(x-1,y-1)

I like that better.
In Betza notation, this would just be rhlNlF. This is in fact far more easy to read: I see at a glance that it is a piece that make some Knight jumps and some diagonal King steps, from the N and F capitals, skipping over the lower-case stuff. On slightly closer inspection I see that it has the right half of all N moves (rh) plus the left-most two, from the stuff in front of the N, and that it can only step diagonally to the left (lF). Before I knew that from your notation, I had to make a drawing!

I presume it is also not what you meant, since you used the letter N for this piece, which shows you how error-prone your system is. One would never make the mistake of writing rhlNlF when one meant N...
User avatar
stegemma
Posts: 859
Joined: Mon Aug 10, 2009 10:05 pm
Location: Italy
Full name: Stefano Gemma

Re: 'Pieces' PGN Tag?

Post by stegemma »

hgm wrote:

Code: Select all


N(x,y)->any (c,r) where (x-c)2 + (y-r)2 = 4

This is all so incredibly verbose. Would you also rally to abandon the FEN tag, and replace it by
...
Ops... of course i was just joking ;)

Your idea is not bad, but what seems so clear for somebody could seems some how obfuscated for someone else. Ok to represent pieces with a single letter that remember some already known piece but maybe there's a better way, maybe a little more verbose but still more clear.
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: 'Pieces' PGN Tag?

Post by hgm »

But the point is really that it is not 'my idea', but a standard system that is widely used in the world of Chess variants. And it did not become widely used because there wasn't anything else, because there was, and it was there earlier too. This system caught on because people that actually used it did like it better than anything else, for the past 15 years or so.

My idea is only that I want to put it in a PGN tag, to make it possible to describe many Chess variants that might have names no one has ever heard of.

That it might not appeal much to someone who has never seen it before is not a decisive factor. Try to imagine how a FEN would look to a draughts player that has never seen a Chess board + pieces, he would also think it is just gibberish. That doesn't mean we would want to part with them.
User avatar
stegemma
Posts: 859
Joined: Mon Aug 10, 2009 10:05 pm
Location: Italy
Full name: Stefano Gemma

Re: 'Pieces' PGN Tag?

Post by stegemma »

hgm wrote:But the point is really that it is not 'my idea', but a standard system that is widely used in the world of Chess variants. And it did not become widely used because there wasn't anything else, because there was, and it was there earlier too. This system caught on because people that actually used it did like it better than anything else, for the past 15 years or so.

My idea is only that I want to put it in a PGN tag, to make it possible to describe many Chess variants that might have names no one has ever heard of.

That it might not appeal much to someone who has never seen it before is not a decisive factor. Try to imagine how a FEN would look to a draughts player that has never seen a Chess board + pieces, he would also think it is just gibberish. That doesn't mean we would want to part with them.
Ok, if it is a standard de-facto, we can suppose that who wants to use this variants knows that standard, so it could be good to use it in the PGN files. The tag itself should be always together with the variant name tag, just for those who don't want to handle variants in its interfaces. If we don't do so, someone could use the tag to describe... standard chess and the viewer, seeing only the tag, could think that it is a variant.

So i have to change my mind and "vote" to approve this new tag but with and only with the variant name tag. Maybe the tag name, as said by other here, should be something like VariantPieces or similar. maybe VariantChessmen could be wrong, because this way you can describe even games that are not really chess.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: 'Pieces' PGN Tag?

Post by Evert »

hgm wrote:But the point is really that it is not 'my idea', but a standard system that is widely used in the world of Chess variants. And it did not become widely used because there wasn't anything else, because there was, and it was there earlier too. This system caught on because people that actually used it did like it better than anything else, for the past 15 years or so.
Betza notion produces an impressive amount of gibberish when describing anything even slightly complicated. I actually find it pretty awful for picturing how a piece moves, the only thing worse are all the alternatives that I've seen. :P

Well, not example diagrams. Those are awesome. For a human.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: 'Pieces' PGN Tag?

Post by Evert »

hgm wrote: I like 'VariantMen', I will use that instead of 'Pieces'.
Personally I like "Pieces" more, but I guess "VariantMen" is less ambiguous. Not that it matters much for me.
I don't really see the need for separate 'FEN' and 'VariantFEN' tags, however. Currently XBoard simply uses the 'FEN' tag to write FENs for variants, and it never causes any trouble. It would never make sense to include a FEN that would not belong to the current variant.
Indeed.
Perhaps you have an opinion on this, though: Apart from a list of standard variants, (e.g. xiangqi, shogi), XBoard also supports 'derivative variants', where the user has been tinkering with the board size, or introduced an extra unorthodox piece. E.g. Big Chess is Chess on a 16x16 board, and mini-Shogi is Shogi on a 5x5 board. Neither is a standard variant, but in the XB protocol 'variant' command XBoard indicates them as '16x16+0_normal' and '5x5+5_shogi'.

What would fit best in the spirit of PGN? Also use these names with prefixed 'board-size overrules' in the 'Variant' tag, or only mention the name of the parent variant there, and specify possibly deviating board parameters in separate tags (e.g. [Board "7x7"] and [HoldingsSize "6"])?
I think I'd go for "BoardSize" myself, or just do what XBoard does (I'd replace the "_" with " " though).
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: 'Pieces' PGN Tag?

Post by Evert »

sje wrote:I'd rather not see an explosion of PGN tag names, as this will only makes things more difficult and more confusing for those writing PGN scanners.
Shouldn't you just ignore tags you don't understand/can't parse?