Poker Card Values Average ratng: 3,8/5 7407 votes

Planning poker, also called Scrum poker, is a consensus-based, gamified technique for estimating, mostly used to estimate effort or relative size of development goals in software development.In planning poker, members of the group make estimates by playing numbered cards face-down to the table, instead of speaking them aloud. The aim of Texas hold'em is to make the best five-card poker hand at showdown. All the suits in poker have the same value. In some games, different suits can be assigned different values. Poker Hand Rankings Chart. Print out this free poker hand rankings chart – and always know the best winning poker hands. Poker hands are ranked in order from best to worst. Professional poker players demonstrate how to play poker and talks about the card values in Texas hold em. Transcript Rhett Butler: Hi Rick, we are here today to discuss texas hold em poker and the values of cards and what hand beats another hand. SMR Online is the only official price guide for PSA-certified collectibles and it is the most comprehensive price guide in the hobby. It includes over 400,000 prices for a host of different collectibles including, but not limited to: sports and non-sports trading cards, autographs, unopened packs, tickets, professional model bats and graded baseballs.

Planning poker, also called Scrum poker, is a consensus-based, gamified technique for estimating, mostly used to estimate effort or relative size of development goals in software development. In planning poker, members of the group make estimates by playing numbered cards face-down to the table, instead of speaking them aloud. The cards are revealed, and the estimates are then discussed. By hiding the figures in this way, the group can avoid the cognitive bias of anchoring, where the first number spoken aloud sets a precedent for subsequent estimates.

Poker Card Values

Planning poker is a variation of the Wideband delphi method. It is most commonly used in agile software development, in particular in Scrum and Extreme Programming.

The method was first defined and named by James Grenning in 2002[1] and later popularized by Mike Cohn in the book Agile Estimating and Planning,[2] whose company trade marked the term [3] and a digital online tool.[4]

Process[edit]

Rationale[edit]

The reason to use planning poker is to avoid the influence of the other participants. If a number is spoken, it can sound like a suggestion and influence the other participants' sizing. Planning poker should force people to think independently and propose their numbers simultaneously. This is accomplished by requiring that all participants show their card at the same time.

Equipment[edit]

Planning poker is based on a list of features to be delivered, several copies of a deck of cards and optionally, an egg timer that can be used to limit time spent in discussion of each item.

The feature list, often a list of user stories, describes some software that needs to be developed.

The cards in the deck have numbers on them. A typical deck has cards showing the Fibonacci sequence including a zero: 0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89; other decks use similar progressions with a fixed ratio between each value such as 1, 2, 4, 8, etc.

The reason for using the Fibonacci sequence instead of simply doubling each subsequent value is because estimating a task as exactly double the effort as another task is misleadingly precise. A task which is about twice as much effort as a 5, has to be evaluated as either a bit less than double (8) or a bit more than double (13).

Several commercially available decks use the sequence: 0, ½, 1, 2, 3, 5, 8, 13, 20, 40, 100, and optionally a ? (unsure), an infinity symbol (this task cannot be completed) and a coffee cup (I need a break, and I will make the rest of the team coffee). The reason for not exactly following the Fibonacci sequence after 13 is because someone once said to Mike Cohn 'You must be very certain to have estimated that task as 21 instead of 20.' Using numbers with only a single digit of precision (except for 13) indicates the uncertainty in the estimation. Some organizations[which?] use standard playing cards of Ace, 2, 3, 5, 8 and king. Where king means: 'this item is too big or too complicated to estimate'. 'Throwing a king' ends discussion of the item for the current sprint.

Smartphones allow developers to use mobile apps instead of physical card decks. When teams are not in the same geographical locations, collaborative software can be used as replacement for physical cards.

Procedure[edit]

At the estimation meeting, each estimator is given one deck of the cards. All decks have identical sets of cards in them.

The meeting proceeds as follows:

  • A Moderator, who will not play, chairs the meeting.
  • The Product Owner provides a short overview of one user story to be estimated. The team is given an opportunity to ask questions and discuss to clarify assumptions and risks. A summary of the discussion is recorded, e.g. by the Moderator.
  • Each individual lays a card face down representing their estimate for the story. Units used vary - they can be days duration, ideal days or story points. During discussion, numbers must not be mentioned at all in relation to feature size to avoid anchoring.
  • Everyone calls their cards simultaneously by turning them over.
  • People with high estimates and low estimates are given a soap box to offer their justification for their estimate and then discussion continues.
  • Repeat the estimation process until a consensus is reached. The developer who was likely to own the deliverable has a large portion of the 'consensus vote', although the Moderator can negotiate the consensus.
  • To ensure that discussion is structured; the Moderator or the Product Owner may at any point turn over the egg timer and when it runs out all discussion must cease and another round of poker is played. The structure in the conversation is re-introduced by the soap boxes.

The cards are numbered as they are to account for the fact that the longer an estimate is, the more uncertainty it contains. Thus, if a developer wants to play a 6 he is forced to reconsider and either work through that some of the perceived uncertainty does not exist and play a 5, or accept a conservative estimate accounting for the uncertainty and play an 8.

Benefits[edit]

A study by Moløkken-Østvold and Haugen[5] reported that planning poker provided accurate estimates of programming task completion time, although estimates by any individual developer who entered a task into the task tracker was just as accurate. Tasks discussed during planning poker rounds took longer to complete than those not discussed and included more code deletions, suggesting that planning poker caused more attention to code quality. Planning poker was considered by the study participants to be effective at facilitating team coordination and discussion of implementation strategies.

See also[edit]

  • Comparison of Scrum software, which generally has support for planning poker, either included or as an optional add-on.

References[edit]

  1. ^'Wingman Software Planning Poker - The Original Paper'. wingman-sw.com. Retrieved 5 July 2017.
  2. ^Mike Cohn (November 2005). 'Agile Estimating and Planning'. Mountain Goat Software. Retrieved 1 February 2008.
  3. ^'Planning poker - Trademark, Service Mark #3473287'. Trademark Status & Document Retrieval (TSDR). 15 January 2008. Retrieved 26 May 2014.
  4. ^Cohn, Mike. 'Planning Poker Cards: Effective Agile Planning and Estimation'. Mountain Goat Software. Mountain Goat Software. Retrieved 30 March 2016.
  5. ^K Moløkken-Østvold, NC Haugen (10–13 April 2007). 'Combining Estimates with Planning Poker—An Empirical Study'. 18th Australian Software Engineering Conference. IEEE: 349–58. doi:10.1109/ASWEC.2007.15. ISBN978-0-7695-2778-9. S2CID11429738.
  • Mike Cohn (2005). Agile Estimating and Planning (1 ed.). Prentice Hall PTR. ISBN978-0-13-147941-8.
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Planning_poker&oldid=1005870080'

Last Updated on January 1, 2018

I recently took a Hackerrank challenge for a job application that involved poker. I'm not a poker player, so I had a brief moment of panic as I read over the problem the description. In this article I want to do some reflection on how I approached the problem.

The hackerrank question asked me to write a program that would determine the best poker hand possible in five-card draw poker. We are given 10 cards, the first 5 are the current hand, and the second 5 are the next five cards in the deck. We assume that we can see the next five cards (they are not hidden). We want to exchange any n number of cards (where n <= 5) in our hand for the next n cards in the deck. For example, we can take out any combination of 2 cards from the hand we are given, but we must replace these two cards with the next two cards from the deck (we can't pick any two cards from the deck).

Suit and value make up the value of playing cards. For example, you can have a 3 of clubs. 3 is the value, clubs is the suit. We can represent this as 3C.

Suits

Clubs CSpades SHeart HDiamonds D

Value (Rank)

2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King, Ace

Hands

Here are the hands of poker

  1. Royal flush (the problem didn't ask me to consider Royal Flush)

    A, K, Q, J, 10, all the same suit.

  2. Straight flush

    Five cards in a sequence, all in the same suit. Ace can either come before 2 or come after King.

  3. Four of a kind

    All four cards of the same rank.

  4. Full house

    Three of a kind with a pair.

  5. Flush

    Any five cards of the same suit, but not in a sequence.

  6. Straight

    Five cards in a sequence, but not of the same suit.

  7. Three of a kind

    Three cards of the same rank.

  8. Two pair

    Two different pairs.

  9. Pair

    Two cards of the same rank.

  10. High Card

    When you haven't made any of the hands above, the highest card plays.In the example below, the jack plays as the highest card.

Values

Evaluating a hand of cards

A hand is five cards. The first thing I did was write out functions to evaluate if a group of 5 cards satisfies the conditions of one of the ten hands.

Poker Card Color Values

Here's a sample hand:

Card

To write functions, I reached for using 2 important python features: set and defaultdict.

Poker Card Values

Here's an example of a simple function to detect a flush, a hand with cards of all the same suit:

Checking a flush

This function creates a list of the suits in our hand, and then counts the unique elements in that list by making it a set. If the length of the set is 1, then all the cards in the hand must be of the same suit.

But wait, what if we have a straight flush? Also, a hand that satisfies a flush could also be described as a two pair hand. The problem asked me to find the highest possible hand for a given set of cards, so I tried to keep things simple by writing a check_hand() function that checks each hand starting from straight flush down to high card. As soon as a condition for a hand was satisfied, I returned a number that corresponded to the strength of the hand (1 for high card up to 10 for straight flush). The problem didn't include Royal flush, so I will not include that here.

Here's the check_hand function:

This function starts checking the most valuable hands. After it checks the second to lowest hand (pair), it returns a value of 1. This value of 1 corresponds to the 'highest card' hand. Since I'm not comparing the relative value of hands, it doesn't matter what the highest card is, so the number just represents the type of hand that is the strongest.

Other hands

Here are the all of the functions I used to detect hands:

defaultdict is a great built-in that is good to use when you don't know what elements will be in your dictionary, but you know what the initial values of any key that could be added should be. We don't need it here, but the alternative would be to write a very long dictionary where keys are the possible card values and the values of each key is 0.

It would certainly be cleaner and more efficient to write out the above functions into one large function, but I wanted to keep things simple as I was under time constraints.

The next step in the problem is to determine the best possible hand we can get given the hand we are dealt and the 5 cards on top of the deck. I decided to first solve this problem with brute force. Here was my logic for this part: use itertools to get all combinations of groups of 0, 1, 2, 3, 4 and 5 cards from my hand and add the first 5 - n cards from the deck so we get a five card deck. For each combination of cards we can run check_hand() and keep track of the highest rank hand, and then return that hand as the best hand. Here's the code I wrote for this part of the problem:

Lastly, I need to check each hand and print out the best hand possible. Here's the loop I wrote to do this:

This will accept one round of cards per line:

and it will output the following:

This was an interesting problem to deal with as the solution contained several parts that worked together. While solving the problem I aimed worked through to the end leaving some parts to come back to that I felt confident in solving. Instead of writing each function to check differnt hands at the beginning, I filled most of these functions with pass and moved on to write the next part that involves checking each different combination of cards. Recently having worked through python's itertools exercises on Hackerrank, the combinations functions was fresh in my mind.

Poker Card Values

While I was able to arrive at a solution that satisfied the test cases, I did not have time to think about the efficiency or Big O analysis of the problem.

There is obviously some refactoring that I could do to make things cleaner. With more time I would take an object oriented approach by making classes for cards and hands, and adding class methods to evaluate the hands.

For each round, we have to run check_hand() on each hand combination. Let's think about how many hands we have to evaluate:

Poker Hands Ranked

We have to consider combinations of cards formed by taking out groups of 0, 1, 2, 3, 4 and 5 cards and adding the next number of cards in the deck that bring the total card count to 5, which means we have to do 5C0 + 5C1 + 5C2 + 5C3 + 5C4 + 5C5 calls to check_hand(). So the sum of total calls is 1 + 5 + 10 + 10 + 5 + 1 = 32.

Poker Card Values Order

For each of these 32 calls that happen when we run play(), check_hands() runs through each of the check_ functions starting with the highest value hand. As soon as it finds a 'match', check_hands() returns a number value (hand_value) corresponding to straight flush, four of a kind, etc. This value is then compared with the highest value that has been previously found (best_hand) and replaces that value if the current hand's hand rank has a higher value.

Card Values In Poker

Values

I'm not sure if there is faster way to find the best hand than the brute force method I implemented.

Coments are closed
Scroll to top