Gwent Math & Probability #1: Initial Hand

Table of Contents

This article is a study of probabilities associated with the initial hand of cards in a game of Gwent: The Witcher Card Game. By ‘initial hand’ we mean 10 cards out of 25 drawn at the very start of the game. First mulligan phase is not included here, but would be studied later in another article. Obviously most of deckbuilding considerations and meaningful probabilities are associated with the next and later phases of the game.

 

Nevertheless, no card drawing study could be complete without starting from the initial draws. There is indeed a lot of questions to be asked. Check out the table of contents above to see what we investigate.

1.The number of possible different initial hands

In the initial draws phase, n=10 cards out of N=25 cards in the deck are drawn (decks bigger than 25 cards are not used in practice and we would refrain from considering those). In this section we will try to find how many initial hands are possible for various assumptions. Let’s start from the most general case, where all cards are distinguishable (like in a highlander deck, playing Radeyah or Shupe).

1.1. Distinguishable cards

The problem is relatively simple. A set of N=25 distingushable cards is equivalent to a set of numbers from 1 to 25: s=[1,2,…25]. These numbers could be put in n=10 slots in various ways.

 

While the readers more proficent in probability may know the answer already, let’s try to arrive at the result step by step.

 

Just as 3 people could be ordered in a row in 3! ways, 25 cards could be ordered in 25 slots in 25! ways (number of permutations). Only 10 slots make a hand though, so we put a separation bar between 10th and 11th slot.

 

Now we have to recognise that each permutation of the cards in the 10-slots world on the left side of the bar leads to the exact same hand – order in which you draw cards is unimportant. Similarily, every permutation of 15 cards on the right side does not impact the hand in any way. So 10!*15! permutations in fact describe a single hand. Dividing total 25! number by 10!*15! we arrive at the number of distinctive hands. It is combination of N-elements on n-slots.

Result: there are exactly 3268760 initial hands possible for 25 cards highlander (no duplicates) deck. It is a very big number obviously, but far below computational limits; computers could easily handle and operate on all possible hand combinations. Simulations are not needed, all results could be exact.

1.2. Including bronze pairs

In practice decks could play (0-8) pairs of identical bronze cards. For example Saber’s SK Witchers deck plays 6 pairs of bronzes. We will use this deck as a reference throughout the article!

 

The presence of bronze pairs effectively reduces the space of distinguishable hands. Let’s try to find out how the first pair will impact the total number of distinguishable hands.

 

The chance to draw one card from the pair is equal to (10/25) = (2/5). Assuming the card is in hand, there is (9/24)=(3/8) probability to find another one. Only hands with one card from the pair are indistinguishable, so (2/5)*(5/8). As any of the two could be in hand, we multiply by 2, and finally arrive at 50% probability of finding exactly one card from the pair in hand. 

 

So indistingushable pairs of hands make up for 50% of the space. It means 25% of combinations is obsolete. Mulitplying 3268760 by 3/4 gives exact final result: 2451570. Keeping multiplying by (3/4) would not give exact results for more pairs due to certain correlations, but still are decent estimates.

Consequently, SK Witchers deck has 578547 distinctive hands.

1.3. Distinctive provision sets

Provision cost is a rough estimate of card value. Our workshop deck could be described by following list of provisions: [12,12,10,10,10,10,10,8,7,7,6,5,5,5,5,5,5,5,4,4,4,4,4,4,4]. How many distinctive hands could be made from such list? I do not pretend to do exact math here (let me know if you see the mathematical solution!). Brute force computation gives 1136 various ways, which is about 500 times less than the number of distincitve hands in general. These combinations are not equally probable; there are various muliplicities associated with each one.

2. Total provision

By total provision value we simply mean a sum of provision costs of all card in the hand. It is easy to see that average provision value of hand must be equal to (provision cap*10/25). Let’s see the detailed distribution for our workshop deck.

The shape is almost an ideal Gaussian. There is only a slight assymetry: high-end tail is longer than low-end. Getting hand weaker than average is 0.8% more probable than getting hand above average.

 

Let’s say the hands of same quality are grouped in bands of 6 provision width and central one is placed around average value. This way we obtain a bar plot, where percentages have more practical meaning (TLG naming covention is used).

Playing SK Witchers deck in 1/3 of games we get normal, ‘statistical’ hand, where each card is worth 6.6 provision on average. Initial hands distinctive in power (‘Absolute Ass’, ‘Dogshit’, ‘OP’, ‘Broken’) would happen in no more than 20% of games.

 

Detailed distribution in such analysis would depend on many factors, the most important being polarization of the deck. The impact of polarization would be studied later in the article.

3. Number of golds and completeness of packages

Operating in ‘total’ or ‘average’ hand provision is not what players most often do, as it requires some effort to calculate, let alone remember the numbers after the game. Easier to use criterion of hand quality is the number of golds drawn.

 

 

Let’s treat all the golds in the deck as one package and assume a card becomes ‘gold’ when its cost exceeds 7 provision. This way ‘Berengar’ and ‘Maxii’ (6 and 5 provision respectively) in SK Witchers deck would not be treated as real golds. Consequently, we include 10 golds in package in our exemplary deck.

Obviously average number of golds is equal to 10*(10/25) = 4. Notice how well percentages in this graph match ‘quality of hand (provision)’ data. 6 provision bin width was not used accidentally – it very well aproximates difference between average gold and bronze provision cost.

 

There is ~0.1% chance to miss all the golds in the initial hand. Such situation should happen to you no more than once per season on average 😉 Let’s aim for the best though. How probable is it to get full gold hand, 10/10? If you think about it, the answer should be known already. Only one combination wins, so the odds are 1/3268760 (if you ever hit full gold hand after initial draws with a meta deck, do not hesitate to send me a printscreen and i will paste it below!) In most players careers such event would never happen, but occurs on ladder handful of times during season (number of matches is greater than 3 millions).

Wait, I did not tell you how it was done, did I? Not the brute force this time. I used the so called ‘hypergeometric probabilities’ for N=25 set of elements, K=10 package size and n=10 number of draws. Results are analytical and very flexible. Using hypergeometric tables you could find the probabilities of drawing k cards from K elements package in a variety of problems. I did one such table for the initial hand below – feel free to use it if curious about Poison, Crimes, etc. The last row are exact probabilities depicted on the bar chart above (numbers are rounded to 0.1).

4. Power disparity

Not only our, but also opponent’s hand is a matter of great interest. What is the common difference in power of initial hands when two players start a game of Gwent? Let’s check, once again for SK Witchers deck from both sides.

Nothing remarkable to see yet, so let’s collect data into 6 provision bins once again.

In 43% of cases, there is no real difference in hand quality between players right after initial draws. In 33% the difference is small, like 1-2 golds. In 16.5% the difference is considerable, and in almost 7% serious. Subsequent mulligan and drawing phases should reduce the disparity – we will see how the picture evolves in next articles.

5. Polarization impact

Polarization is a very important concept in Gwent. Highly polarized decks are the ones playing few, but very expensive golds and many lowest provision cost bronzes. Analogously, weakly polarized decks plays few 4p bronzes and many cards from the middle region of provision values: 5-9.

 

To analyze polarization impact qualitatively we have to introduce some strict measure. In this article it would be variance of provision list divided by variance of maximally polarized list with the same provision cap. The parameter would change from around 0 to 1, where 1 means fully polarized deck, and 0 a deck with identical provision cost of all cards. For example polarization of SK Witchers deck is equal to 0.635.

 

We are ready now to see how polarization impacts variance in hand quality. We will use identical criteria and naming as before to describe hand quality. All data is shown in the graph below.

The more polarized is the deck, the less stable are initial draws. The risk of lowroll and the opportunity of highroll gradually increases, while being non-existent below certain polarization level (e.g. ‘Broken’ and ‘Absolute Ass’ possibilities activate only about 0.6 polarization level)

6. Case Studies

The main part of the study is finished, so let’s now dive into some fancy applications of the knowledge gained. The first study was suggested to me on Twitter – how often does classical Lippy deck have forced bricks?. The second one is a little detour to a new (and not too clever) game: TurboGwent. The study of drawing AA (as suggested by TemerianSpecimen) waits for the next chapter of Math&Probs, as R1 mulligan phase will be necessary.

6.1. Bricks in Lippy (wojtech5000)

One of the few really valuable questions to be answered by initial hand probabilities: ‘How probable is it to get forced bricks in hand after initial draws?’. Having bricks or unplayable cards often means being unable to contest R1.

 

There are few examples of decks playing lots of bricks, the most persistent being probably classical Lippy Cerys.

 

For the sake of initial hand study, let’s assume there are 5 bricks (classical+Morkvarg), as the presence of discarding options would require some mulligan analysis. hen we could simply use hypergeometric table, but this time more is bad. We have K=5 brick packet; at least 3 bricks disarms our hand on red, and at least 4 on blue. 

 

Blue: 5.9% (1) + 0.5%(2) = 6.4% (any)

 

Red: 23.7%(1) + 5.9% (2) + 0.5%(3) = 30.1% (any)

 

Average: 18.25%

 

The impact of coin is huge for forced bricks! While being red-coin deck, Lippy gets at least one forced brick 30% of the time when going second!

 

If you build decks yourself, take special attention to not include 6 or more cards unplayable in R1 whenever contensting first round is necessary for the general gameplan!

6.2. TurboGwent

What would happen if game of Gwent ended right after initial draws? Well, I know such a game would not be too intellectually appealing, but anyway… How would you build your deck? Would your chances be always like a random 50% coinflip, or you could maybe bend the odds in your favor somehow? Try to think about it yourself before moving on…

 

Obviously the mean difference in points between any two decks of the same provision cap and number of cards would be equal to 0. But now let’s imagine a situation in which you bet 1$ in a lottery for 100$ prize, against 1/100 odds. Let’s say you play according to such rules 100 times. Your average net income is equal to 0, but your ‘winrate’ in lottery is only 1%.

 

What if you can achieve similar effect in Gwent: winning by 1 point 99% of time and losing by 100 in 1% of duels? Without knowing opponent’s build, the only way seems to be playing low-polarised deck and taking advantage of slight assymetry of Gaussian distribution for more polarized builds.

In the picture above, we ‘play’ the leftmost, least polarized deck against the rest one by one. Some variance could be seen – it is possible to craft decks countering each other a bit even in the same polarization range. Winrate around 50.5% on average is achievable against more polarized decks. OK, we’ve done our best for this juicy 0.5% 😉

 

While the topic seems pretty abstract, it has some practical consequences. Beating highly polarized decks in R1 just because of smoother provision curve is not really possible on average. Other factors are more important.

Closure

Thanks for reading!

 

The next chapter of Gwent Math&Probs will be devoted to R1 mulligans and resulting hands. The predicted deadline for this study is the end of the first week in the next Gwent season. Stay tuned! If you have any questions or suggestions (what would you like to see computed?), do not hesitate to contact me on my Discord or Twitter.

Written by:

 

lerio2

One Response

Comments