FEEN?

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

cyril
Posts: 5
Joined: Mon Sep 02, 2013 6:46 pm

Re: FEEN?

Post by cyril »

hgm wrote:
cyril wrote:The goal of this format is to describe a particular board position of a two-players cross-board and cross-style chess game.
WinBoard has done that for years using UFEN. Which is much more compact, better readable and backward compatible to ordinary FEN.
I would like to read the UFEN spec. I'm not sure UFEN allow to:
  • describe positions of seven dimensions,
  • represent states such as "captured pieces", "castling availability", "en passant", and other ones which might be necessary for any other existing or future chess games,
  • infer the style of a piece from its name.
hgm wrote:
cyril wrote:As well as FEN use algebraic notation's piece naming, in FEEN, piece naming come from PCN. The reason is that, inside chess variants, there's a lot of different pieces which sometime have the same name and the same abbreviation. As we could imagine, without a style prefix, collisions may occur.
You say the goal of FEEN is to describe a position. But from this it turns out that in fact the goal is much more ambitious: you want the FEEN to explain the rules of the game as well.
No, the rules are still independent.
hgm wrote:Otherwise there would be no need to distinguish a FIDE Pawn from a Shogi Pawn from a Xiangqi Pawn from a Capablanca Pawn from a Janus Pawn from a Suicide Pawn, when it is the only kind of Pawn occurring in its game...
The reason why we need to distinguish a FIDE Pawn from a Shogi Pawn from a Xiangqi Pawn from a Capablanca Pawn from a Janus Pawn from a Suicide Pawn is that: rules apply differently depending on style. For example, a Western Pawn can remove pieces from boards while a Shogi one can capture them.
hgm wrote:I gave up the idea that piece types should be encoded the same in FEN (or SAN) in every variant by a universal symbol pretty quickly.
I think a same piece should have the same name, regardless the context.
hgm wrote:Never forget the maximum-flexibility-minimum-usefulness principle!
Yes. I also like the consistency principle.
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: FEEN?

Post by hgm »

cyril wrote:I would like to read the UFEN spec. I'm not sure UFEN allow to:
  • describe positions of seven dimensions,
  • represent states such as "captured pieces", "castling availability", "en passant", and other ones which might be necessary for any other existing or future chess games,
  • infer the style of a piece from its name.
Well, I pretty much explained it completely (for those acquainted with the FEN standard) in a posting above. I did not address multiple dimensions (as WinBoard does not support these), but I would simply indicate this by multiple slashes. So ranks are separated by a single slash, planes by a double slash, etc.

Captured pieces (or in general pieces 'in hand', as in some variants such as Seirawan and Superchess you already start with pieces in hand) are dealt with (as this is needed for Crazyhouse and Shogi), castling rights (and virginity in general, as in Seirawan Chess it is also essential to know if pieces other than K or R have moved before) is done in a way that can handle non-trivial cases such as Chess960, e.p. is extended to handle Berolina Chess and other transient rights such as in Chu Shogi (Wikipedia rules).

Wanting something to work for 'any existing or future Chess variant' is one of the worst violations of the 'maxium-flexibility-minimum-usefulness' principle I have seen so far. :lol:

'Style' is a concept invented by you. As far as I am concerned there are no styles, just different piece types. Requiring unique piece naming requires long piece names, and down the drain your system goes... As it did not seem to serve any practical purpose at all, I abandoned that idea very quickly.
No, the rules are still independent.
Explain me then why a Shogi Rook is different from a FIDE Rook or a Xiangqi Rook. As far as I am concerned they are all Rooks (i.e. orthogonal sliders). Having a different notation for them is totally redundant.
The reason why we need to distinguish a FIDE Pawn from a Shogi Pawn from a Xiangqi Pawn from a Capablanca Pawn from a Janus Pawn from a Suicide Pawn is that: rules apply differently depending on style.
Ah, so you do want the rules to be encoded in the notation. Glad you admit it now.
For example, a Western Pawn can remove pieces from boards while a Shogi one can capture them.
Not sure how 'removing pieces from boards' is different from 'capturing them', so I have really no idea what you want to say here.
I think a same piece should have the same name, regardless the context.
Well that is your right, but I beg to differ. Of necessity your stance leads to long and cumbersome naming, and thus a system that no on in his right mind would want to use.
cyril
Posts: 5
Joined: Mon Sep 02, 2013 6:46 pm

Re: FEEN?

Post by cyril »

hgm wrote:Wanting something to work for 'any existing or future Chess variant' is one of the worst violations of the 'maxium-flexibility-minimum-usefulness' principle I have seen so far. :lol:
And it would be impossible. What FEEN provides is an options field which allows to represent states, as I said.
hgm wrote:'Style' is a concept invented by you. As far as I am concerned there are no styles, just different piece types. Requiring unique piece naming requires long piece names, and down the drain your system goes...
I think we all agree that it is possible to group chess pieces in sets such as Western, Xiangqi, Shogi, etc. No matter what name is used.
hgm wrote:As it did not seem to serve any practical purpose at all, I abandoned that idea very quickly.
Yes, right now this is quite unusual.
hgm wrote:
cyril wrote:No, the rules are still independent.
Explain me then why a Shogi Rook is different from a FIDE Rook or a Xiangqi Rook. As far as I am concerned they are all Rooks (i.e. orthogonal sliders). Having a different notation for them is totally redundant.
Your example is interesting. However, I would answer with an other example, if you agree. So let's consider a Shogi Knight, a Western Knight and a Xiangqi Knight on a board. They are all Knights. But having a different notation for them is totally essential.
hgm wrote:
cyril wrote:The reason why we need to distinguish a FIDE Pawn from a Shogi Pawn from a Xiangqi Pawn from a Capablanca Pawn from a Janus Pawn from a Suicide Pawn is that: rules apply differently depending on style.
Ah, so you do want the rules to be encoded in the notation. Glad you admit it now.
No. The rules are outside of FEEN. In the chess engine for instance. Thus, they can generate possible moves from a FEEN position, remaining aware of Shogi Knight, Western Knight and Xiangqi Knight's possibilities.

In other words, rules may be different depending on styles and pieces' abbreviation, are they. So the naming that FEEN uses allows engines to be able to generate every possible moves by identifying pieces (considering also position and state).
hgm wrote:
cyril wrote:For example, a Western Pawn can remove pieces from boards while a Shogi one can capture them.
Not sure how 'removing pieces from boards' is different from 'capturing them', so I have really no idea what you want to say here.
In FEEN, the meaning is that: removed pieces are no longer in the FEEN, while captured ones are in the "options" field.
hgm wrote:
cyril wrote:I think a same piece should have the same name, regardless the context.
Well that is your right, but I beg to differ. Of necessity your stance leads to long and cumbersome naming, and thus a system that no on in his right mind would want to use.
We talked about this. Regrettably, that's the price that has to be paid.
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: FEEN?

Post by hgm »

cyril wrote:I think we all agree that it is possible to group chess pieces in sets such as Western, Xiangqi, Shogi, etc. No matter what name is used.
No, I don't agree with that at all. IMO there is no difference whatsoever between a Rook in Chess, Xiangqi, Shatranj, Chu Shogi (as a promoted Gold), Makruk. Arguably even the Rook in Shogi is the same piece (promotion being a property of the board, rather than the piece). So the Rook cannot be 'grouped' with any of these games. Introducing Rooks of all kind of different styles is completely artificial.
Yes, right now this is quite unusual.
Note that 'unusual' is not the same as 'useless'...
Your example is interesting. However, I would answer with an other example, if you agree. So let's consider a Shogi Knight, a Western Knight and a Xiangqi Knight on a board. They are all Knights. But having a different notation for them is totally essential.
Well, the piece in Xiangqi is usually called a Horse and indicated by the letter H in the FEN standard of the World Xiangqi Federation. You nicely dodge the original question by a diversion to pieces that do indeed move different. But even there I don't see anything 'essential' in not allowing both of them to be encoded by the same letter N. You seem to have a very strange defenition of 'essential'. Essential is in fact that all 14 piece types that could be used together in the same Shogi position are encoded by different IDs, and that people would understand which letter is used for which Shogi piece. Once that is accomplished, everything else is in fact totally redundant as far as encoding Shogi positions is concerned.

Again you seem to consider it essential that it should be unambiguously implied from the position notation how the pieces present in the position move (i.e. rules of the game).
No. The rules are outside of FEEN. In the chess engine for instance. Thus, they can generate possible moves from a FEEN position, remaining aware of Shogi Knight, Western Knight and Xiangqi Knight's possibilities.
Well, that is exactly why I called it 'a half-hearted attempt'. You somehow want the FEEN to tell the engine a Horse moves different from a Knight, but you still don't tell it exactly how it moves.
In other words, rules may be different depending on styles and pieces' abbreviation, are they. So the naming that FEEN uses allows engines to be able to generate every possible moves by identifying pieces (considering also position and state).
Well, I don't think it is helpful to do this by grouping pieces in 'styles'. Going that road you will quickly discover that there are in fact far more 'styles' than there are piece types, because every combination of piece types gives a new variant, which would force you to introduce a new 'style' in the name of that variant, and get yet an other (imagined) flavor of the piece types that are in fact identical to the same piece type in other variants.
In FEEN, the meaning is that: removed pieces are no longer in the FEEN, while captured ones are in the "options" field.
Ah, I see. But it is completely arbitrary to assign this as a property to the Pawn. You could just as well consider it a property of the pieces that are captured. In fact I would not do either; it is both a highly unnatural attempt to describe rules of the game in general (i.e. dropping of captured pieces) to individual pieces. Which drives up the complexity of describing the piece properties enormously, while hardly simplifying anything else.

With quirks like that you needlessly drive up the complexity of representation to a level that I consider absurd.
cyril
Posts: 5
Joined: Mon Sep 02, 2013 6:46 pm

Re: FEEN?

Post by cyril »

hgm wrote:
cyril wrote:I think we all agree that it is possible to group chess pieces in sets such as Western, Xiangqi, Shogi, etc. No matter what name is used.
No, I don't agree with that at all.
So logically, you think it is impossible to group chess pieces in sets such as Western, Xiangqi, Shogi, etc. But it is what FEEN do.
hgm wrote:IMO there is no difference whatsoever between a Rook in Chess, Xiangqi, Shatranj, Chu Shogi (as a promoted Gold), Makruk. Arguably even the Rook in Shogi is the same piece (promotion being a property of the board, rather than the piece). So the Rook cannot be 'grouped' with any of these games. Introducing Rooks of all kind of different styles is completely artificial.
I understand your point. Again, I agree with your Rook case. But I would disagree in the case of Knight where it's different in Shogi and Western, as I said. And this difference would be a property of the piece, rather than the board. So Knights can be 'grouped' by style with any of these games. Introducing Knights of all kind of different styles is a precaution that prevents from name collisions and possible differences.

In FEEN, there is no special case. Even if maybe the Rook's actions are the same in every chess styles, it would be too complicated to handle collisions of other pieces, like Knight where it's not true. So to solve this, we just have to use longer names. It is obvious that a single letter can not be a good solution without invoking the number of pieces inside Taikyoku Shogi. In FEEN, to do so, the naming convention is "style:abbr". This is a proposal. There are of course other way to extend the names of pieces.
hgm wrote:Note that 'unusual' is not the same as 'useless'...
BTW I think this conversation starts to become useless.
hgm wrote:Well, the piece in Xiangqi is usually called a Horse and indicated by the letter H in the FEN standard of the World Xiangqi Federation.
Thanks for this fix.
hgm wrote:
cyril wrote:No. The rules are outside of FEEN. In the chess engine for instance. Thus, they can generate possible moves from a FEEN position, remaining aware of Shogi Knight, Western Knight and Xiangqi Knight's possibilities.
Well, that is exactly why I called it 'a half-hearted attempt'. You somehow want the FEEN to tell the engine a Horse moves different from a Knight, but you still don't tell it exactly how it moves.
No, again, I don't want the FEEN to tell the engine a Horse moves different from a Knight. Please read the spec. The FEEN just provide: the style, the abbreviation, the position and, if any, the state of each piece, and also the board structure. The job of the engine is to find possible moves. To do so, the engine must know the rules for moving pieces which are present in the position.

Of course, FEEN don't tell to the engine how position's pieces must move. In the same way that FEN don't tell to the engine how position's pieces must move too.
hgm wrote:Well, I don't think it is helpful to do this by grouping pieces in 'styles'. Going that road you will quickly discover that there are in fact far more 'styles' than there are piece types, because every combination of piece types gives a new variant, which would force you to introduce a new 'style' in the name of that variant, and get yet an other (imagined) flavor of the piece types that are in fact identical to the same piece type in other variants.
This argument is pretty much the same as before.
cyril wrote:
hgm wrote:In FEEN, the meaning is that: removed pieces are no longer in the FEEN, while captured ones are in the "options" field.
Ah, I see. But it is completely arbitrary to assign this as a property to the Pawn.
I don't understand your answer about the Pawn. I just explained the difference between 'removing pieces from boards' and 'capturing them', so you can have an idea about what I said previously.
hgm wrote:You could just as well consider it a property of the pieces that are captured. In fact I would not do either; it is both a highly unnatural attempt to describe rules of the game in general (i.e. dropping of captured pieces) to individual pieces. Which drives up the complexity of describing the piece properties enormously, while hardly simplifying anything else.

With quirks like that you needlessly drive up the complexity of representation to a level that I consider absurd.
So you will not have to use it.
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: FEEN?

Post by hgm »

cyril wrote:So logically, you think it is impossible to group chess pieces in sets such as Western, Xiangqi, Shogi, etc. But it is what FEEN do.
No, it is not. What FEEN do is multiply the number of piece types by first attaching multiple styles to the same piece (e.g. Rook), and imagine that this makes them different. Then they group the pieces by these styles that they first labeled them with. It is an entirely self-inflicted exercise.
hgm wrote:I understand your point. Again, I agree with your Rook case. But I would disagree in the case of Knight where it's different in Shogi and Western, as I said. And this difference would be a property of the piece, rather than the board.
Agreed. It is a different piece, and that they are both called 'Knight' is in fact a Western artifact, as in Japanese they are not called Knight at all, by 'Honorable Horse'. The use of the letter N for it is a western invention in the framework of PSN ('Portable Shogi Notation'), which is completely unknown in Japan (i.e. by 99.99% of all Shogi players). In any Japanese notation the piece is of course represented by a kanji (and not the kanji for 'horse', which is reserved for the Dragon Horse!), not by the letter N.
So Knights can be 'grouped' by style with any of these games. Introducing Knights of all kind of different styles is a precaution that prevents from name collisions and possible differences.
This is again debatable. Normally the 'forward narow Knight' (fN in Betza notation) is referred to as the Shogi Knight. That does not mean that that Knight occurs in only one variant, though. It also occurs in Dai Shogi and Sho Shogi, for instance. And the FIDE Queen occurs in Chu Shogi (and does NOT promote there!). So you cannot say whether an fN should be grouped with style Shogi or Dai, and whether Q should be grouped with style western or (chu)shogi.
In FEEN, there is no special case. Even if maybe the Rook's actions are the same in every chess styles, it would be too complicated to handle collisions of other pieces, like Knight where it's not true. So to solve this, we just have to use longer names. It is obvious that a single letter can not be a good solution without invoking the number of pieces inside Taikyoku Shogi. In FEEN, to do so, the naming convention is "style:abbr". This is a proposal. There are of course other way to extend the names of pieces.
I consider that already a large drawback (independent of the question whether it serves any purpose). The necessary solution for the 'Taikyoku problem' (longer names) would solve ambiguous naming of pieces across variants as a side effect. You could simply use HH (Honarable Horse) for fN, H for nN (the Xiangqi Horse in Betza notation) and N for the FIDE Knight. No reason at all to prefix universally occurring pieces such as the Rook with a multitude of styles, or call it FC (Flying Chariot) in Chu Shogi. A simple R would do in all cases.
No, again, I don't want the FEEN to tell the engine a Horse moves different from a Knight.
Then there should be no objection to represent them by the same ID in cases where they do not both appear in the same variant. The only difference is that they move differently.
This argument is pretty much the same as before.
I don't think so. The number of styles that would be needed never came up before. Previous arguments where only about whether it would be necessary to 'pay a price' if it would buy you know value. Not about why that price would have to be so incredibly high. In FEEN you have 'solved' the problem of having to use a few hundred unique piece IDs by the need to introduce and standardize thousands of new names for styles.
cyril wrote:I don't understand your answer about the Pawn. I just explained the difference between 'removing pieces from boards' and 'capturing them', so you can have an idea about what I said previously.
If I understood you correctly, you argue that FIDE-Chess Pawns are different from Crazyhouse Pawns, just because what they capture would be 'removed' in FIDE Chess, and go to the hand in Crazyhouse. You might as well argue that a Persian Pawn in Spartan Chess needs a different notation from a Pawn in FIDE, because the latter could capture a Queen, while the former could only capture a Warlord instead. (But of course you probably would.)
So you will not have to use it.
I thought that was obvious from the outset. When I wrote that "no one in his right mind would want to use it", I kind of tacitly included myself in that group. ;) I was asked by Gerd for my opinion on FEEN, however. Which I gave: with FEEN you pay an (IMO enormous) price for solving a 'problem' that no one in practice has. I cannot imagine that any developer of Chess(-variant) software would ever consider to use FEEN for any purpose at all, in view of the already existing alternatives. FEEN purely qualifies as expressionistic art.

No amount of arguing from you could change my mind on that, so in that sense this discussion is indeed useless. You set yourself a goal (unique representation of piece types) that has no parallel in any need in the real world of Chess programming, and have chosen a solution that I do not even consider the best for that (introducing 'styles') by an extremely large margin. Which is all fine if it is just art for arts sake.