I second the motion! -Gary Campbell
From: dannyjones183
Sent: Friday, December 07, 2012 10:44 AM
To: fc-solve-discuss_at_yahoogroups.com
Subject: Re: Request for Comments: spec for the new solution notation standard
To me, using pseudo-C forces a constraint that isn't natural. I think all of your {0..N-1} statements should be {1..N}. That way, I would have a clearer idea what move "m" from column "col" to freecell "fc" using deck "j" actually means. I don't care if my input/output modules have to do a little extra work. Better them than me!
--- In mailto:fc-solve-discuss%40yahoogroups.com, Shlomi Fish <shlomif_at_...> wrote:
>
> Hi all,
>
> in order to get the issue of creating a new standard notation for Freecell and
> similar variants of Solitaire, I have started working on a new specification
> here:
>
<snip>
> ---------------------
>
> Abstract
> --------
>
> 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 0 to NUM_DECKS - 1 }
>
> Card = {
> bool is_empty;
> bool is_hidden;
> Rank rank;
> Suit suit;
> Deck deck; # Optional
> }
>
> Column = {
> int len;
> Card cards[0 .. len-1];
> }
>
> 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 x NUM_COLUMNS;
> }
>
> Column_Idx = {Integer: from 0 to NUM_COLUMNS-1 }
> Freecell_Idx = {Integer: from 0 to NUM_FREECELLS-1 }
>
> 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[0 .. NUM_MOVES - 1];
> 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 - 11:02:15 IST