5

I've made a small program that takes a list of moves in ICCF notation and translates them to the following:

  • SAN
  • FAN
  • LAN
  • MAN
  • RAN
  • CRAN
  • Smith
  • Descriptive
  • Coordinate
  • ICCF

For example, a starting move of 2133 (Nc3 in SAN):

SAN  FAN  LAN     MAN  RAN     CRAN  Smith  Descriptive  Coord  ICCF  Comments
Nc3  ♘c3  Nb1-c3  Nc3  Nb1-c3  Nc3   b1c3   QN1N-QB3     B1-C3  2133

Unfortunately, I'm having some difficulty understanding a few of the rules of the various notation formats (especially Descriptive - as you can see, it doesn't currently omit the unambiguous ranks/files because I haven't implemented the check for unambiguous destination ranks/files yet... so it's possibly a bit too descriptive). For example, checks (e.g. +) are added to the end of a move, but promotions (e.g. Q) are also added to the end of a move. What if both happen at the same time? For that particular situation, I'm pretty sure the check is listed after the promotion indicator, but I'm even more sure that there are other situations I'm not even thinking of.

What I'm hoping for (and haven't been able to find with a few Google searches, as I don't even know what search terms would produce it if it existed) is a sample game with moves that create these uncommon notations, so that I can input them into my program as a kind of test suite, see what it produces, and check the results. Alternatively, a simple list of these situations (e.g. "a pawn that captures a piece into a promotion, for a check") would be good too.

If, once I've done that, I can't tell if the program's output is even correct, I'll ask a separate question about it.

  • To know if the result is correct, run a game through a converter, and then convert it back to the original format. The resulting game should be identical. Of course this means you'll have to write a converter to go the other way, too. But it would be the easiest way to check the converters because then you could suck in any game you could find, and there are tens of thousands. – Tony Ennis Jan 11 '16 at 18:03
1

Chessbase 6 light version, free if you can find it, has an option to view the notation in descriptive notation.
http://forums.ubi.com/showthread.php/499956-How-to-Convert-Descriptive-to-Algebraic-Forums may be a useful link.

The promotion does go before the check. There is no check before the promotion. Some people put an "=" before the promotion.

An interesting game to try to convert would be one with multiply Queens. This gives a promotion and ambiguity. You should also get a game with Queenside castling. When I test my move generator, I setup a semi-random position to test each position. To test your output, I agree with Tony Ennis, convert it to algebraic and play through the game. If all else fails, post them online and ask for someone to check the result.

Descriptive notation lesson: The first character is the piece being moved, pawns are not considered a pieces except for when they are capturing. The second character is "-" for a normal move or "x" for captures; if a Pawn captures, use the piece symbol, "PxP." The third character is the square where it lands. The files are named after the piece's home square. The third character is the rank counting from the side which made the move. "e4" is written as "P-K4" if White played the move else "P-K5."

Note: The old style did not include a rank if it is the first.

Ambiguity is settled by an expanded description. The first method is to try to expand the destination square. That is if you move a Bishop to "N5", if both Bishop can reach "N5", the square is expanded to either "QN5" or "KN5." If two pieces can reach the same square, the piece is expanded by the original side it started on. That is if both Knights can go to "Q2," you prefix the piece with its starting side, e.g. "QN-Q2." If a promotion occurred, you have to use long notation, "QN5-N6."

Castling was "castles" with the expanded form being "castlesQ." In modern times, people adopt the algebraic form.

  • Warning considering ambiguity: With 3 Q, it can happen you must specify the complete starting field. (E.g. Qd4-e5, with a Qd6 and Qf4 present) – Hauke Reddmann Aug 28 '16 at 20:12
-1

For sample games, just write a program which generates a sequence of games each composed solely of randomly selected moves. A file with a few million random PGN games should be sufficient to cover all cases of interest.

  • Random data is helpful in testing, but it's not a substitute for thoughtful test design. Further, with random moves, how do you propose to check that the result is correct? – Pete Becker Jan 11 '16 at 17:23
  • I think there is some merit to using random moves, or scavenging large numbers of real games and using those. But certainly the corner cases must be considered and added to the testing database. – Tony Ennis Jan 11 '16 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.