The attachment represents my first suggested update to your Abstract.
I'm not familiar with tracking card from multiple decks. That said ...
I do have an issue with the following structures.
Move_With_Position = Struct {
GamePosition pos_before_move;
Move move;
}
Solution = {
Move_With_Position moves[1..NUM_MOVES];
GamePosition final_position;
}
To me, Move_With_Position is extraneous, and Solution should be:
Solution = {
GamePosition initial_position;
int moves_used;
Move moves[1..moves_used];
GamePosition final_position;
}
Carrying along GamePosition at every move is extraneous information because each move should accurately identify a change to the table. If not, then the definition of Move is incomplete. If someone wishes to discuss a specific set of moves, then recreating the GamePosition associated with those moves might be necessary, or not.
Moving on to the following structure:
Move = Struct {
Source_Or_Dest_Id source;
Source_Or_Dest_Id dest;
int num_cards; # Where appropriate;
Card source_card; # Optional
Card dest_card; # Optional
bool implicit; # Whether this move is done implicitly by an automove.
}
There is a big difference between a Horne automove and a WKR automove when replaying a FreeCell solution through existing game players. I need more information ...
int automove = { 0, Horne, WKR, ... }; # Whether this move is done implicitly by an automove.
should replace ...
bool implicit; # Whether this move is done implicitly by an automove.
In addition, I once wrote that one must be careful in mixing Horne and WKR automoves. I don't think this message sequence is the proper place for that discussion, though.
Regards, Danny
> ---------------------
>
> Abstract -- range indexing updated
> --------
>
> This is a proposal for a universal format for encoding solitaire solutions.
> It grew out of a discussion on the fc-solve-discuss mailing list based on
> some people's frustration with the so-called "standard notation" for
> notating Freecell.
>
> This standard is written in a pseudo-BNF / pseudo-C-struct format, which
> will be encoding agnostic and can later be encoded in XML, JSON or a more
> human-readable format (though conversions to this format will be explicitly
> specified.).
>
> Format:
> -------
>
> Rank = {Integer: from 0 to MAX_RANK } (MAX_RANK is normally 13 for French
> playing card, but is specified at the header).
>
> Suit = One of {'H','C','D','S' }
>
> Deck = {Integer: from 1 to NUM_DECKS }
>
> Card = {
> bool is_empty;
> bool is_hidden;
> Rank rank;
> Suit suit;
> Deck deck; # Optional
> }
>
> Column = {
> int len;
> Card cards[1..len];
> }
>
> Foundation_Id = { Deck deck, Suit suit }
>
> Foundations = {
> Map : from Foundation_Id to Rank.
> # For all decks and suits
> }
>
> Freecells = {
> Array of NUM_FREECELLS cards that can be empty.
> }
>
> GamePosition = {
> Foundations foundations;
> Freecells freecells;
>
> Column [1..NUM_COLUMNS];
> }
>
> Column_Idx = {Integer: from 1 to NUM_COLUMNS }
> Freecell_Idx = {Integer: from 1 to NUM_FREECELLS }
>
> Source_Or_Dest_Id = union {
> Column_Idx col;
> OR
> Freecell_Idx freecell;
> OR
> Foundation_Id foundation;
> }
>
> Move = Struct {
> Source_Or_Dest_Id source;
> Source_Or_Dest_Id dest;
> int num_cards; # Where appropriate;
> Card source_card; # Optional
> Card dest_card; # Optional
> bool implicit; # Whether this move is done implicitly by an automove.
> }
>
> Move_With_Position = Struct {
> GamePosition pos_before_move;
> Move move;
> }
>
> Solution = {
> Move_With_Position moves[1..NUM_MOVES];
> GamePosition final_position;
> }
>
>
>
> Header = {
> int NUM_DECKS;
> int NUM_MOVES;
> int NUM_COLUMNS;
> int MAX_RANK;
> String variant; # such as "freecell", "bakers_dozen", "bakers_game", etc.
> enum sequences_are_built_by {
> RANK, SUIT, ALTERNATE_COLOR
> }
> enum empty_stacks_filled_by {
> KINGS_ONLY, NONE, ANY_CARD
> }
> enum sequence_move {
> LIMITED, UNLIMITED
> }
> }
>
> Total = {
> Header header;
> Solution solution;
> }
>
> --
Received on Fri Dec 07 2012 - 18:21:02 IST