# Rules

Tell me poker hands from lowest to the highest

In poker, hands are ranked from lowest to highest as follows:

1. **High Card** – No combination, just the highest card (e.g., Ace-high).
2. **One Pair** – Two cards of the same rank (e.g., 5♠ 5♦).
3. **Two Pair** – Two different pairs (e.g., 8♠ 8♦ 4♣ 4♠).
4. **Three of a Kind** – Three cards of the same rank (e.g., J♠ J♣ J♦).
5. **Straight** – Five consecutive cards of any suit (e.g., 6♠ 7♣ 8♦ 9♠ 10♥).
6. **Flush** – Five cards of the same suit, not in sequence (e.g., A♠ 10♠ 8♠ 5♠ 3♠).
7. **Full House** – Three of a kind plus a pair (e.g., K♠ K♣ K♦ 9♠ 9♣).
8. **Four of a Kind** – Four cards of the same rank (e.g., Q♠ Q♣ Q♦ Q♥).
9. **Straight Flush** – Five consecutive cards of the same suit (e.g., 5♠ 6♠ 7♠ 8♠ 9♠).
10. **Royal Flush** – The highest straight flush: A♠ K♠ Q♠ J♠ 10♠.

A Royal Flush is the best hand, while a High Card is the weakest.

***

Probability of Straight vs Straight Flush

The probabilities of getting a **Straight** and a **Straight Flush** in a standard 5-card poker hand (from a 52-card deck) are significantly different:

1. **Straight Probability**:
   * A straight consists of five consecutive ranks, but they can be of any suit.
   * There are **10 possible straights** (A-5, 2-6, ..., 10-A).
   * Each straight has **4⁵ (1,024) combinations** since each card in the straight can be one of 4 suits.
   * However, this count includes Straight Flushes, so we need to subtract them.
   * The probability of a straight (excluding straight flushes) is **4.62%** (or **1 in 21.7 hands**).
2. **Straight Flush Probability**:
   * A straight flush is a straight where all cards are of the same suit.
   * There are **10 possible straight flushes**, one for each consecutive sequence.
   * Each straight flush has exactly **4 ways** (one per suit).
   * This gives us **40 possible straight flush hands**.
   * The probability of a straight flush is **0.00139%** (or **1 in 72,193 hands**).

#### Comparison:

* A **Straight** is **about 3,330 times more common** than a **Straight Flush**.
* The **Royal Flush** (the highest straight flush) is even rarer, with a probability of **0.000154%** (or **1 in 649,740 hands**).

In summary, while straights are relatively frequent in poker, straight flushes are among the rarest hands you can get.

***

All hands probabilities

Here are the probabilities of all poker hands in a **5-card hand** from a standard **52-card deck**, ranked from most common to rarest:

| **Hand**            | **Combinations** | **Probability (%)** | **Odds (1 in X hands)** |
| ------------------- | ---------------- | ------------------- | ----------------------- |
| **High Card**       | 1,302,540        | 50.12%              | 1.99                    |
| **One Pair**        | 1,098,240        | 42.26%              | 2.37                    |
| **Two Pair**        | 123,552          | 4.75%               | 21.0                    |
| **Three of a Kind** | 54,912           | 2.11%               | 47.3                    |
| **Straight**        | 10,200           | 0.39%               | 255                     |
| **Flush**           | 5,108            | 0.20%               | 508                     |
| **Full House**      | 3,744            | 0.14%               | 693                     |
| **Four of a Kind**  | 624              | 0.024%              | 4,165                   |
| **Straight Flush**  | 40               | 0.00139%            | 72,193                  |
| **Royal Flush**     | 4                | 0.000154%           | 649,740                 |

#### Key Takeaways:

* **High Card and One Pair** dominate most hands.
* **Two Pair and Three of a Kind** occur much less often but still relatively frequently.
* **Straights and Flushes** are rare, while **Full House and Four of a Kind** are even harder to get.
* **Straight Flushes and Royal Flushes** are extremely rare, with a **Royal Flush appearing only once in 649,740 hands**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://csp.gitbook.io/poker/rules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
