Gaming Stats Part 3: Hearthstone

It’s already time for winter break!  I wish you all happy holidays!  Here is my last blog for the semester: part three of the Gaming Stats blog.  Hearthstone is a card strategy game which is, as Blizzard says, “deceptively simple”. For previous gaming stats blogs, see part 1 for Maplestory and part 2 for Dota2.

Part 3:

Hearthstone is a card game released in 2014 where players collect monster and spell cards to be played in several game modes.   It is free-to-play but players can also choose to pay to obtain card packs or to access content, instead of using the in-game gold.

New players begin with basic cards, and as they win Ranked/Casual games and complete quests, they receive in-game gold to purchase card packs or to pay for access to Arena and Solo Adventures (which have unique card rewards).  Tavern Brawls also offer a way to clear quests or get card packs.  This blog will talk about the Ranked/Casual Play and Arena modes.

The goal of each game is to defeat the opponent by reducing their health to zero.  Each player initially has 30 health points.  Before the game starts, players choose a hero to impersonate and each hero has its own “hero power”.

It is a turn-based game: within each turn, one player draws a card from their deck, plays cards from their hand and/or uses their hero power.   Each card costs mana to play.  Using one’s hero power burns 2 mana.  Mana replenishes at the start of every turn. Games always start with 1 mana for each player, which increases by one at the start of the player’s next turn until players each have 10 mana to use.  This means that the game strategy is dynamic with the number of turns, as low mana limits gameplay in the early game.  Another dimension to keep in mind is that in the event that players run out of cards in their deck, they lose health every turn that their deck is empty; meaning that drawing too many cards or extending the game too long is dangerous.

RNG

Also known as Random Number Generator, it is not surprising for RNG to be used in a card game model — but it is the main source of frustration of many Hearthstone players.   Here are some interesting questions to examine:

In the game, there is RNG in every draw of a card.  How do I optimize my deck’s mana curve to always have something to play every turn?

It is difficult to find out the best distribution of mana costs for all situations; after all, a perfect mana curve may not be necessary because sometimes using hero power (for 2 mana) derives more value than playing cards, some minions can change the mana cost of cards, and drawing/discovering extra cards can increase the chance of having something to play every turn.   Yet, there have been attempts to estimate the optimal mana curve.

Capture

Check out this Mana Curve Analysis Tool in its beta version from Reddit’s chippydip, which is a simple model of a player’s card advantage throughout a game given their deck’s mana curve and a scale to weigh in the importance of hero power in the deck’s strategy.  I say simple model, because it simply assumes that players will always favor playing their most mana-costly cards before less costly ones, and always favor using hero power when mana is left after playing cards, which often is not the case in real games.

shujinRedditHypergeometric

Source: Excel sheet from HearthMath 

The above shows the probability of at least one copy of a card with x copies in a deck (x-axis) being drawn by turn y (y-axis).  For instance, the probability of drawing your only legendary in an Arena deck by turn 7, when at an earlier turn you drew 2 cards in addition to the usual start-of-turn draw, is 30% according to the table.  The model is based on the hypergeometric distribution which simulates card draws without replacement.  Of course, this disregards probabilities of drawing the card from mulligan, which would complicate the statistics. An empirical optimization model with an actual, large enough sample of games would be even better as it might implicitly take into account all game conditions.

How many card packs do I need to open to be sure to get at least one legendary card?

As of The Grand Tournament expansion, there are 500 craftable cards obtainable in packs, of which 73 are legendary.  According to studies, the chance of a legendary card is about 1%.  Hence, the probability of getting at least 1 legendary in a card pack is 1-(1-0.01)^5 = 5%.  For a probability of 100% (more precisely 99.96%) of getting at least 1 legendary, we would need about 800 cards.  In other words, 160 packs need to be opened to be certain to get at least one legendary.

Are decks better off without RNG cards?

RNG cards are those that have additional randomized effects, such as Knife Juggler, Mad Bomber or Ragnaros.

File:Mad Bomber(80).pngFile:Ragnaros the Firelord(503).png

The above cards can be viewed as “random damage” cards.  The value derived from these cards are largely situational.   These cards may ignore taunts to attack enemy heroes directly, poke divine shields and potentially clear enemy minions without attacking and sacrificing themselves.  But since the effect is random, sometimes unintended targets turn around the game for the worst.

jgko5xv

Source: Math Analysis: Mad Bomber and Arcane Missiles on Reddit

Want to calculate the probability of a Mad Bomber hitting a particular minion?  Assuming that the probability of any character being hit is equal, each hit is independent from previous hits, and that all minions have at least 3 health, we can use a Bernoulli process, where the Bernoulli random variable is a value indicating that the target minion has been hit (or not), and p is the probability of the target being hit, which is the reciprocal of the number of possible targets (at least 2 for the two heroes in a game).  The table above by shujin from Reddit summarizes these probabilities nicely.  An interesting case would be to consider 1-HP or 2-HP minions; that would involve taking into account the possibility that a low-HP minion dies (and therefore the number of targets and odds change) mid-bombing.

But what about the value derived from cards that summon random minions or that add random spells to your hand?  Check out an awesome resource at HearthstoneTopDecks for some analysis of the cards obtained/summoned from RNG cards.  Here are 2 examples.

With a Piloted Shredder, the average Attack stat obtained from the random summon is 1.98, and the average Health stat is 2.44.  Thus, effectively, for 4 mana, a player is on average benefiting from 6 Attack damage and 6 Health on the board.  Moreover, the chance of obtaining a Deathrattle minion is 11.4%, a Taunt minion 6.8% and a Charge 3.4%, which is non-negligible! Compared with other 4-drops, this card is definitely one of the strongest of the game.

For the above card, the Attack average of the random minion is 3.5 and the Health average is 4.04 with the highest probability attributed to 3-mana minions (which would cost 0 due to Unstable Portal’s effect).  Moreover, the probability of getting a Battlecry minion is 34.3%, and ~9% for Deathrattle, Summon other minions, and Taunt minions.  Unstable Portal can turn around a game especially when players get strong/Legendary minions randomly, especially for 3 mana less.  The average stats — a 3 Attack/4 Health minion basically for 2 mana — are pretty good compared to other 2-drops.  However, the risk element makes the Unstable Portal less valuable than, say a Piloted Shredder which is already a definite 4 Attack/3 Health on the board, so Unstable Portal would be more valuable in a deck where there are spell synergies with other card.

Play Mode

CaptureAs of the latest League of Explorers adventure release, according to GosuGamers‘ data on competitive tournaments, Druids, Paladins and Warriors are the most popular heroes played.  That may be important in Play Mode as HS players often imitate tournament decks, and therefore knowing the trends can help draft counters in constructing decks.  Surprisingly, some heroes in competitive play have win rates that are significantly different from 50%. Admittedly, it might just be a matter of sampling error for Rogues and Shamans (although the low popularity may just indicate how difficult these heroes are to bring to victory on average).   However, Warlocks show surprisingly high win rates.  GosuGamers also show the win rates of heroes against each of the other hero classes, which give an indication of the best and worst hero match-ups.  Looking more closely at the Warlock wins reveals more details about their high win rate.  While unsurprisingly, Warlocks fared badly against Druids and Hunters (~40% win rates), they have a 88% win rate against Shamans, 67% against Mage, and ~60% win rates against Priests, Paladins and Rogues.

Arena Mode

The Arena mode does not depend on players’ collected cards; players select one out of three completely random cards until a deck is constructed, then play this deck against other players in the Arena. Thus, rather than devising combo synergies, arena decks are also based on cards with solid stats in general.  This is reflected by the arena pick rates as shown below, where Piloted Shredders, Harvest Golems and Yetis dominate.

Untitled

Source: ArenaValue (October 2015)

The extremely high pick rates indicate that knowledge of the most often picked cards can lead to better preventive decisions in-game as opponents’ decks are very likely to have one of the above cards in their decks.

The above source also lists hero popularity statistics, which show an overwhelming preference for Mage and Paladin (~20%), with Hunter, Warlock and Warrior being the least picked heroes (<8%).

Untitled3

Source: ArenaValue (October 2015)

Arena is an attractive mode because of the potential to obtain very generous rewards.  In addition to one pack of cards which is always given no matter the number of wins in an Arena run, additional rewards can also be obtained from a random reward pool which increases with the number of wins.  The specifics can be found at the HS Wiki.  In general, at 4 wins, players have a chance of recovering their 150 gold investment in Arena access; through 40-60 gold and a card pack (worth 100 gold) as rewards. To be guaranteed to receive a “refund” of 150 gold + an additional pack rewarded, 7 Arena wins are the minimum.  This is reflected by the above chart showing the average rewards from 80,513 Arena games.

There is no denying the usefulness of knowing the stats in a card game.  Hearthstone is no exception.  However, different players have different play styles and risk profiles, and therefore they may want to know their own stats to make better informed decisions in constructing decks and choosing heroes.  For fervent players wishing to automatically track their own wins & losses, game duration, opponent’s name, cards already played and cards left in the deck in the middle of a game, there are screen/image recognition trackers out there such as HearthStats and HearthstoneTracker that already have many adherents.

1 Comment

Leave a comment