Introduction to Best Grouping of Cards in Online Rummy

Anurag Garg
Gameskraft
Published in
6 min readApr 16, 2024

Written by Anurag Garg, Div Jain

The first fundamental Rummy skill that we cover is Best Grouping of Cards. It is an essential skill and lays the foundation on which players’ other core skills-based decision gets influenced.

In this post, we introduce the concept of Best Grouping; discuss why it is such an essential skill; and also show what makes it a challenging problem, both for players and from an algorithmic perspective.

What is Best Grouping in Online Rummy?

In Online Rummy, “Best Grouping” refers to the strategic arrangement of cards in a player’s hand to optimize the chances of forming valid melds. The objective could be to either minimize the points in the hand or arrive at an arrangement that leads to a valid declaration. The players could also group cards and form melds considering optimal Drop, Discard, and Pick actions. Here are examples illustrating how Best Grouping a set of 13 cards could help with Points minimization and valid declaration respectively.

Points Minimization Example (with 8 as a joker):

Valid Declaration Example (with 8 as a joker):

Why is Best Grouping important?

Best Grouping is essential in Online Rummy because it enhances players’ ability to identify valid declarations, make informed decisions when picking from the open deck, and avoid discarding critical cards. Here are some of the examples where a player can miss on a rewarding opportunity by not doing Best Grouping:

  • Doing best grouping of the hand below can help identify a valid declaration hand:
Player Grouping (with 8 as a joker)
Best Grouping (with 8 as a joker) leading to a valid declaration
  • In the example below, the player could form another Pure Sequence (2♠, 3♠, 4♠, 5♠) by picking the card from Open Deck and be in a position to make a valid declaration. Since the best grouping isn’t done, the Open Deck card doesn’t seem to improve the hand; hence, the player may pick the card from the Closed Deck.
Player Grouping (with 8 as Joker and 2♠ as the Open Deck Card)
Best Grouping of Player’s Hand (with 8 as Joker)
Best Grouping if the Player picks 2♠ from the Open Deck and discards J♥
  • Similarly from the example above, it is possible that the player may end up discarding 5♠, resulting in breaking a Pure Sequence (3♠, 4♠, 5♠). This can happen because the cards are not in Best Grouping formation and hence discarding 5♠ may seem like one of the viable strategies to a player.

How does it relate to Players’ overall performance?

The quantitative analysis of the Best Grouping rate to the Win Rate (Fig. 1) shows that players who have a high Missed Best Grouping rate have a lower median Win Rate while the players who score lower on this metric have a higher median Win Rate.

Fig. 1 shows how players’ Win Rate changes with the change in Missed Best Grouping Rate (Source of data: Gameskraft’s Online Rummy platforms)

Why is doing Best Grouping challenging?

Best grouping in Online Rummy is complex due to the vast number of possible permutations and combinations that can exist within a hand. Since each card could become part of multiple potential melds, the sheer variability makes it challenging to identify the optimal arrangement. In the hand example below (13 cards), there are about 16 different melds that could be formed, and then 5 different grouping combinations (as per Rummy rules) that could be formed by arranging those melds.

Best Grouping also becomes a challenge as the number of Joker cards in the player’s hand increases. Fig. 2 below shows how players miss the best grouping more often as the number of jokers in their hand increases. Identifying the right combination leading to either minimum points and/or a valid declaration in real-time is what makes it a challenging task for both players and any algorithm-based system.

Fig. 2 shows User Best Grouping hands vs the number of Jokers (Source of data: Gameskraft’s Online Rummy platforms)

While in this blog, we laid the groundwork by introducing the concept of Best Grouping in Online Rummy, in the next blog, we explore various algorithmic strategies for solving the above problem and also discuss their pros and cons.

Terminology used:

  1. Card: Representation with a Rank (1–13) and a suit (◆, ♠, ♣, ♥).
  2. Joker Card: A special card that can be used by the player to replace any card in their hand.
  3. Pure Sequence (PS): A combination of 3–5 cards such that they have consecutive ranks and the same suit. e.g. (3♠, 4♠, 5♠) is a Pure Sequence of length 3. It has 3 cards with consecutive ranks (3, 4, 5) and the same suit (♠).
  4. Impure Sequence/Sequence (IS or Seq): A combination of 3–5 cards such that they have consecutive ranks and the same suit with one or more cards as joker cards. e.g. (7♠, 5◆, 9♠, 10♠) is an Impure Sequence of length 4 with 5◆ being used as the joker card.
  5. Set: A combination of 3 or 4 cards such that they have the same rank but different suits. e.g. (7◆, 7♠, 7♣, 7♥) is a Set of 4 cards with the rank as 7 and 4 different suits.
  6. Invalid: Any combination of cards that don’t belong to any of the above combinations (PS, IS, Set) is considered Invalid.
  7. Meld: Any combination of kind PS, IS, Set, or Invalid is considered a Meld.
  8. Valid Declaration: A grouping that has no Invalid melds and has 2 Sequences at least one of which is a PS. The rest of the melds can be any meld (PS, IS, Set).
  9. Open Deck: refers to a pile of face-up cards placed on the table, from which players can draw cards during their turns. This deck is visible to all players, allowing them to make informed decisions based on the cards available. This is also sometimes referred to as the Discard Pile.
  10. Closed Deck: is a pile of face-down cards remaining after the cards have been dealt to players. These cards are generally arranged in a random order which is not known to the players. So they draw cards from this deck without knowing their identities.

This post is part of a 9-part blog series delving into the art and science of skillful play and defining what Skill means in Online Rummy.

  • Part 1 — Introduction to Best Grouping Cards in Online Rummy
  • Part 2 — Cracking the Code: Algorithmic Approaches to Determine Best Grouping in Online Rummy
  • Part 3 — Decision Science in Action: To Drop or Not to Drop in Online Rummy — Coming Soon
  • Part 4 — Data-Driven Insights: Picking from the Open Deck in Online Rummy — Coming Soon
  • Part 5 — Analyzing Patterns: Optimal Discard Strategies in Online Rummy — Coming Soon
  • Part 6 — Leveling up: Mastering Best Grouping Techniques in Online Rummy — Coming Soon
  • Part 7 — Empowering Players: Enhancing Hand Dropping Skills in Online Rummy — Coming Soon
  • Part 8 — Elevating Gameplay: Mastering the Art of Picking from the Open Deck in Online Rummy — Coming Soon
  • Part 9 — Refining Strategy: Improving Optimal Discarding in Online Rummy — Coming Soon

--

--

Anurag Garg
Gameskraft

All things Tech, Engineering, Data Science, and Mountaineering