Tuesday, June 18, 2013

How to Play Sprouts with Playing Cards

It's not much fun to play sprouts with playing cards, but it is possible. Why would anyone want to do such a thing? Maybe it will be easier to analyze the game or more straightforward to implement it on a computer this way. Maybe you're fresh out of pens and paper.

To play a game with N initial spots, you'll need three identical decks of playing cards with at least 3N+1 distinct cards in each deck. This way each card will have exactly two identical "twins". (Actually, the cards are incidental; integers will suffice. This document is really about how to generate legal moves and update a position represented in Dan Hoey's boundary-list notation.) In the rules below, we'll assume you've combined the three decks into one large deck. You will also need a flat space for at least 2N+1 rows of cards. A large wooden table will do nicely. Each row will contain zero or more stacks of cards, and each stack will contain one or more cards.

To "cut" a stack of cards means the usual thing: remove one or more cards from the top of the stack (preserving order) and put them under the remaining cards in the stack. Here, the player may examine the stack and cut it in any place they choose.

To "play" a card, remove it from the deck and place it in the specified location.

Initial position and play

The initial position consists of N different cards, each in an isolated stack, all in the same row. Players take turns moving. There are two kinds of moves, joining moves and dividing moves. On his turn, a player must execute either a legal joining move or a legal dividing move, but not both in the same turn. Under the normal play convention, the last player wins. Under the misere play convention, the last player loses.

Joining moves

A joining move combines two stacks in the same row. If any step of the move is not possible, the move is illegal.
  1. Choose two different nonempty stacks A and B in the same row. Optionally, cut stack A. Optionally, cut stack B.
  2. If A has more than one card, then play a twin of the top card to the bottom of the stack.
  3. If B has more than one card, then play a twin of the top card to the bottom of the stack.
  4. From the deck, remove two identical cards that are not already on the table. Place one on top of A, and one on top of B.
  5. Place A on top of B.

Dividing moves

A dividing move divides a stack into two stacks, one of which is placed in a new row. One or more stacks from the original row may be moved to the new row. If any step of the move is not possible, the move is illegal.
  1. Choose a nonempty stack. Optionally, cut it.
  2. Play a twin of the top card to the bottom of the stack.
  3. Remove one or more cards -- but not all of them -- from the top of the stack and place them in a new row.
  4. If the original stack or the new stack has more than one card, then play a twin of the the bottom card of the new stack to the top of the original stack.
  5. From the deck, remove two identical cards that are not already on the table. Place one on top of the new stack, and one on top of the original stack.
  6. Optionally, move one or more stacks -- other than the original stack — from the original row to the new row.

Example game

Consider the following game of 5 moves (in WGOSA notation): 2+ 1(3)2 1(4)2 1(5)4 2(6)3 (see images below)

Here's how that game would be played with cards. To represent the position in text, we will use the following conventions: A stack of cards is written in order from top card to bottom, with a comma between each card. A semicolon separates each stack from adjacent stacks in the same row. A slash separates each row from its neighbors. (This is the notation used by Dan Hoey in his paper on sprouts notation.)

(2)initial position:
  • 1;2
(3)joining move:
  1. 1;2
  2. (skipped)
  3. (skipped)
  4. 1,3;2,3
  5. 1,3,2,3
(4)dividing move:
  1. 1,3,2,3
  2. 1,3,2,3,1
  3. 1,3,2/3,1
  4. 1,3,2/2,3,1
  5. 4,1,3,2/4,2,3,1
  6. (skipped)
(5)dividing move:
  1. 1,3,2,4/4,2,3,1
  2. 1,3,2,4,1/4,2,3,1
  3. 1,3,2,4/1/4,2,3,1
  4. 1,3,2,4/4,1/4,2,3,1
  5. 5,1,3,2,4/5,4,1/4,2,3,1
  6. (skipped)
(6)dividing move:
  1. 5,1,3,2,4/5,4,1/2,3,1,4
  2. 5,1,3,2,4/5,4,1/2,3,1,4,2
  3. 5,1,3,2,4/5,4,1/2,3/1,4,2
  4. 5,1,3,2,4/5,4,1/2,3/3,1,4,2
  5. 5,1,3,2,4/5,4,1/6,2,3/6,3,1,4,2
  6. (skipped)

Analogy with graph

We have represented a plane graph using rows of stacks of cards.
Playing card termGraph theory term
cardoccurrence of vertex in boundary
stackleft-hand walk of vertices on boundary
rowface, i.e. set of boundaries
tableplane graph, i.e. set of faces

Credits

Author: Josh Jordan
Initially published at http://www.wgosa.org/playingcardssprouts.htm

This document builds upon the sprouts notation system devised by Dan Hoey.

Followers

Contributors