Gwent Concepts: The Mulligan 'Bug'

Note: This is an advanced Gwent Concepts article. You don’t necessarily need to know about Blacklist Bias to play Gwent, or even to be good at it! Nevertheless, I hope it is both interesting and informative.

This article follows on from Gwent Concepts: Mulligan and Blacklisting, so check that out if you haven't already done so!

---

Last time we looked at the mulligan, blacklisting, and how those mechanics impact a game of Gwent. Today we delve deeper, and consider how the mulligan algorithm affects the deck. It turns out that blacklisted cards (including those mulliganed away) tend to be closer to the top of the deck than one would expect. This blacklist bias is not some kind of 'mulligan bug', but rather a conscious design decision. Let's find out why it exists, and how you can use it to your advantage.

The Gwent Deck

Gwent is a game of few shuffle effects. "Shuffling" a card into your Gwent deck usually places it in a random position among the other cards, the order of which remains unchanged. Actions that would normally prompt you to shuffle in a physical card game (for example, after looking through your deck or performing a mulligan) do not randomise the order of your Gwent deck. In this article, we will consider how the mulligan alters the deck’s order. Because of the scarcity of shuffling (available only through Stefan Skellen, King Bran and Dandelion), this alteration usually impacts the entire game of Gwent.

The Mulligan Algorithm (Revisited)

  • Choose a card in your hand.
  • This card is blacklisted, meaning a card with the same name cannot be drawn for the remainder of this particular mulligan phase
  • The chosen card is placed in a random position in your deck. As far as we know, any position, including the top or bottom of your deck, is equally likely. The order of the other cards remains the same.
  • Draw the top non-blacklisted card of your deck
  • Repeat the process until all of your available mulligans are completed or you decide to end the mulligan.

In Depth: Sequencing Theory and Blacklist Bias

Steps 3 and 4 of the mulligan algorithm dictate that a blacklisted card is more likely to end up close to the top of your deck than a non-blacklisted one. This occurs because blacklisted cards are not taken out of your deck during the mulligan process. Instead, they remain in the deck, but are unable to be drawn. This causes them to rise up as cards are drawn from above them, or remain on top (without being drawn) if they started off there, making them more likely to be higher up in your deck. But, it's easier to understand this by looking at a simple example:

Example: Horsing Around

Suppose you have 9 cards left in your deck, and mulligan a single Roach. The Roach has 10 equally likely positions in your deck where it could end up.

  • If Roach lands on top of your deck, you will draw the second card in your deck to replace it (as Roach is blacklisted)
  • If Roach lands second from the top, then you will draw the top card to replace it, and Roach will once again be on top of your deck
  • If Roach lands anywhere else, it can not end up at the top of your deck after just one mulligan.


Thus, there is a 20% chance that Roach will be on top of your deck (compared with 10% chance for any of the remaining 8 cards to be on top).

Mulliganing more than one card at a time compounds the effect:

Example: A Base Case

Suppose you are playing a deck of 25 unique cards, and you mulligan 3 cards (say Geralt, Roach and Triss Merigold, in that order) at the start of the game. What is the probability that each of those cards will be on top of your deck after the mulligan?


To compare, the probability of drawing Geralt, Roach or Triss Merigold from the top of a shuffled deck is a combined 20%. Furthermore, suppose, like in the ‘Horsing Around’ example above, only Geralt was mulliganed. Then the probability of him being at the top of your deck would be 2/16=12.5%. So mulliganing more cards after him actually increased the chance of Geralt rising to the top.

Importantly, this is a lower bound. If we relax the assumption that mulliganed cards are unique, then the probability of drawing a copy of a mulliganed card would be even higher. Thus, if you are playing a 25 card deck and mulligan 3 cards at the start of the game the probability of one of them being on top of is always at least 46.7%.

The Math

  • 20.6%.
    • Geralt is the top card if he is mulliganed into position 1,2,3 or 4 in your deck (before the replacement card is drawn), AND after that neither Roach nor Triss are placed above Geralt in the deck. If this occurs, all cards above Geralt will be drawn during the mulligan process and he will end up being the top card.
    • The probability that Geralt is mulliganed into position 1/2/3/4 is 1/16=0.0625 for every position.
    • For each of the above positions, calculate the probability that neither Roach nor Triss are ever mulliganed above geralt. This is 0.88/0.88/0.82/0.71. Or rather:
      • 1-1/16-1*15/16^2=0.88
      • 1-1/16-1*15/16^2=0.88
      • 1-2/16-1*14/16^2=0.82
      • 1-3/16-2*13/16^2=0.71
    • Multiply the first probability by the second, and sum over all possible positions.
  • 15.4%
    • Roach is the top card of your deck if he is mulliganed into position 1,2 or 3 (before replacement) AND Geralt was not already in a position above it AND Triss is not placed in a position above it.
    • (1/16 * 1 * 15/16) + (1/16 * 14/16 * 15/16) + (1/16 * 13/16 * 14/16) = 0.154
  • 10.7%
    • Triss is the top card of your deck if she is mulliganed into position 1 or 2 (before replacement) AND Neither Geralt nor Roach were already in a position above her
    • (1/16 * 1) + (1/16 * [1-3/16-13/16 * 2/16]) = 0.107

 

Example: Foglet Fiasco

Suppose you are playing a deck that runs 3 Foglets, you draw one in your opening hand, get rid of it first and then mulligan two other cards (which I will assume to be unique, or rather, not blacklisting any cards other than themselves, for the purposes of this example). The probability that there is now a Foglet on top of your deck is 50.6%.

A more detailed explanation follows, but this probability is almost equivalent to the chance that there is at least one Foglet in the top 4 cards of your deck after the first Foglet is mulliganed, but before the replacement card is drawn. At this point there are 16 cards in your deck, and thus this probability equals to 60.7%. The top 3 non-blacklisted cards of your deck are drawn into your hand during the mulligan process, which in the situation described would push the Foglet to the top, unless one of the other mulliganed cards is placed on top of it (this is accounted for by the ~10% difference between the numbers).

As a point of comparison: the probability that one of 3 specific cards is on top of a shuffled deck of 15 is 20%, so the impact of the lack of shuffling at the end of the mulligan algorithm is rather significant.

It is worth noting that relaxing the assumption that the cards mulliganed second and third do not add any other cards in your deck to the blacklist would make the probability of a Foglet being on top slightly lower, depending on how many cards are blacklisted during those mulligans. In the ‘worst case’ scenario (your last two mulligans blacklist 3 cards each), the probability of a Foglet being on top drops by around 5%.

The Math

  • 60.7%:
    • This probability that there are no Foglets in the top 4 cards of a randomised 16 card deck is: 12C3/16C3 = 11/28. Thus, the probability that there is at least one Foglet in the top 4 cards is 1-11/28=17/28.
  • 50.6%:
    • A Foglet ends up being the top card of your deck if the topmost Foglet of your deck is in position 1,2,3 or 4 in your deck (after the first mulligan, but before the replacement card is drawn) AND Your second and third mulliganed cards are not placed above the Foglet.
    • The probability that the topmost Foglet in your deck is in position 1/2/3/4 is 0.1875/0.1625/0.1393/0.1179. (Calculated by considering the number of ways to arrange cards in your deck to satisfy the conditions outlined, divided by the total number of arrangements).
    • For each of those positions, the probability that your second or third mulligan lands above the topmost Foglet is exactly the same as with Geralt in the previous example, 0.88/0.88/0.82/0.71.
    • Multiply and sum to obtain the result.

To Summarise:

  • Blacklist Bias: Mulliganed cards are more likely to end up higher in your deck. This also applies to copies of mulliganed cards that started off in your deck.
  • Generally, the more mulligans are performed in a given sitting, the more likely it is that one of the blacklisted cards ends up on top of your deck.

Using This Information

It is even more important to conduct your thinning as early as possible, so that the quality of your draws at the start of rounds 2 and 3 is maximised. Likewise, draw effects are not as good as you would expect, as they are more likely to draw you cards that you have mulliganed away, which are usually the worst cards in your deck. This is another reason why draw effects should be combined with plentiful thinning in order to be effective. On the other hand, offensive draw effects, like Avallac'h and Albrich, are quite likely to undo your opponent's hopes, dreams and mulligans if they are running a lot of undesirable cards like Foglets and Crones.

Effects that “shuffle” (in reality, they “randomly place”) cards back into your deck, like Emissary and Thaler, can help clear up the blacklist blockage. It is important to note, however, that they are very much impacted by it too (i.e. an Emissary giving you the option between two bronzes you mulliganed). Complete deck shuffling (with Stefan Skellen, King Bran or Dandelion) is even better for this.

As we saw in the second example, the earlier you mulligan a card in the initial mulligan, the more likely it is to end up higher in your deck. This means:

  • Mulligan earlier: Cards that won’t affect your future draws, usually because you’re planning to thin them from your deck early. Examples: Foglet, Imperial Golem, Roach. However, as discussed in the previous article, it is also important to blacklist early.
  • Mulligan later: Cards that you want to draw least, such as ones that are ineffective in a specific matchup. Examples: Mardroeme, Lacerate, Blue Stripes Scout

The Mulligan 'Bug'!?

I’d like to reassure you that there is no mulligan bug. As far as we know, everything is working exactly as intended and any reports of always drawing back mulliganed cards are likely to be confirmation bias. As we saw, you are more likely to draw back blacklisted cards, but it is by no means a certainty. Of course, while each step in the mulligan algorithm makes reasonable sense, the resulting deck order at the end of it can seem rather unintuitive. But that is the way CDPR has decided to make it function, and the approach has its pros. The most important of these is that the mulligan algorithm allows for the cards that remain in your deck during the mulligan to sustain the same relative order, whilst simultaneously enabling the valuable blacklisting mechanics.

---

As always, questions, comments and feedback are always welcome! In particular, I would love to know your thoughts on the more math-heavy approach, and what other quantitative results you might be interested in. Also, I would like to give a shoutout to reddit user G_Helpmann who did a whole lot of science, discovered and proved sequencing theory, and made an awesome infographic about it!

About the author

Aych

Aych discovered his love of card games at the ripe old age of 11, as his Bulbasaurs were brutally massacred in the brilliant Pokemon TCG. The original Witcher was his gateway into the wonderfully time-consuming world of RPGs. And then... his two passions converged with the creation of Gwent! You can find him on Twitter and YouTube.
7

Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes