SortingGame Rules

SortingGame is a game involving sorting algorithms and concepts related to them. Learning objectives of the game are recognizing the properties of the algorithms and understanding the related concepts, such as: stable, in-place and big-O notation.

General

  • Number of players: 2-6
  • Two decks of cards: Algorithm card deck (blue) and Special card deck (red)

The Deal

  • The dealer deals 5 cards to each player (3 algorithm cards and 2 special cards).

The Play

One round consists of two phases: special card phase and algorithm phase.

Special Card Phase

  • Each player can place one special card to the table on his/her turn.
  • There are 2 spots for criterion cards and 1 spot for "best/avg/worst case" -cards on the table. If the corresponding spots are full, player can cover some of the previously played cards with his/her card.
  • Player can choose not to play a special card.

Algorithm Card Phase

  • Each player places one algorithm card to the table. The algorithm should be valid for the active special cards on the table. For example, if the special cards are: "stable" and "Θ(N log N)", mergesort would be a valid algorithm card, but heapsort would not, because heapsort is not a stable algorithm. Moreover, insertion sort would not be valid algorithm card, because it's worst case time complexity is not Θ(N log N). By default, worst case time complexity is considered, but it can be changed by playing a corresponding card on special card phase.
  • The winner of the round is the player whose algorithm's asymptotical time complexity is the best. The winner collects all the cards played during the round and adds them to his or her victory stack. In case of a tie, the cards are divided evenly.
  • A player can decide not to play an algorithm card, but in that case he or she has to give one of his or her cards in the victory stack to the winner of the round. In addition, a player can discard one of the hand cards and replace it with a new card from the stack. If no-one plays an algorithm card, the round has no winner and all the cards on the table are given to the winner of the next round.
  • A player can also place down an algorithm that is not valid for the active special cards. Therefore, other players can question the algorithms played to the table. When an algorithm is questioned, the player who played it has to justify why it meets the requirements of the active special cards. If the algorithm is valid, the player who questioned it has to give one card from his or her victory stack to the player who played it. If the algorithm is invalid, the player who placed it has to give one card from his or her victory stack to the player who questioned it. If no one noticed the invalid algorithm, the player who placed it gets to draw two additional cards to his or her victory stack at the end of the round as a reward for the successful deception.
  • At the end of the round, every player draws new cards so that every player has 5 hand cards including at least 1 algorithm card and 1 special card.

End of the Game

  • The game ends when either algorithm stack or special card stack is empty. The last ongoing round is played to the end.
  • The winner is the player who has the most cards in the victory stack.

Extensions

SortingGame can be extended with the following extensions.

Extension 1 - Robbery Cards

  • Robbery cards are added to the special card deck
  • By using a robbery card, player can pick any card from the table that fits the description in the robbery card and place both cards to his or her victory stack. This can be done at any time during the game.
  • Robbery cards can be used to steal either algorithm or special cards. For example, you could steal a selection sort algorithm card with the following robbery card: "Amount of swaps is: O(N)".
  • After the robbery, games is continued normally.

Extension 2 - Do It Yourself

  • SortingGame can be extended by adding new algorithms and special cards.