Tag Archives: blizzard

Putting the simulator on the shelf – for now

Though I haven’t made any updates to Deck Simulator for Hearthstone in several months, I’ve decided a bit more formally that I am going to stop development for the time being.

As my first app on the Apple mobile app store, it’s been a great experience and I’ve learned so much. In around nine months I’ve managed to get over 600 downloads, and though that number may seem small I accept it as an honor, and want to think every single person who downloaded and used this app.

There are several reasons I’ve decided to halt development, one of the main ones being I stopped playing Hearthstone. I still believe it’s a great game, and with the recent introduction of the iPhone client I think Hearthstone’s golden age has yet to come.

For those who have used the app recently you probably realized that some cards were missing. Though I have done my best to integrate almost all of the cards from the original sets, the process of adding new cards is unfortunately very tedious and time consuming. It involves manually inputing the card information, modifying the engine where new gameplay mechanics are introduced, modifying the AI to properly accommodate the new elements, and then running extensive tests to see the cards are working and being played in a reasonable way by the AI. Of course with a pretty complex codebase new bugs crop up which need to be fixed before release. I had a great time doing this for the first few hundreds cards, but the magic wore off.

And to be honest, the relative lack of downloads was a factor, although given the plain visual design, awkward visual interface, and missing cards, I’m not surprised by the lack of popularity.

Nonetheless, I am not promising to never work on the project again. If somehow the Hearthstone bug bites me again, I may very well go back to updating things. If you want the project to be continued (by me or someone else), please like this article to show your support. Of course comments on this blog, or reviews on the app store are much appreciated.

Alternatively, if anyone is interesting in purchasing the source code please free to contact me (Email: decksimforhs at gmail.com). I am a supporter of open source but the only reason I hesitate to give it away is the amount of time spent in it, and (what I feel) is potential to make money.

If you’re reading this and were considering downloading the simulator, go ahead and try it. For all the missing cards I still feel there are a wealth of experiments you can perform to help your gameplay, especially for beginning or moderate players. And I don’t know any other tool that provides all the same features, especially the one which rates relative card value.

I started this project with the idea “Hey, wouldn’t making a hearthstone simulator be cool?”, and in that sense it was a major success, without a doubt.

As for a final reason I decided to halt HSSIM, I have decided on trying to develop my own games for iOS. You can see my latest game here (a puzzle game influenced by games such as Go and Othello):


The game’s blog is here, and I am also planning to write about mobile game development in general.


Detailed card statistics in the deck simulator

In addition to the 50-some cards I added to version 1.3 of Deck Simulator for Hearthstone, I also included a new feature where detailed statistics are tracked for each card and displayed in the “Game log” window at the end of the simulation, organized by deck.

I’ll give a few examples to explain what these statistics mean and how to interpret them:

  •  (Fireball): draw = 72%, play = 54%, att =  0%, died =  0%, dam = 3.268232

I think most of you already know “Fireball”, but just in case it’s a neutral spell that deals 6 damage to any minion or player for a cost of 4.

“draw” here represents the percentage of games in which a Fireball card was drawn. This includes even if the card is redrawn initially, or if the card is drawn and not used. Generally speaking, this number is a function of the number of the card in the deck (either 1 or 2) and how long the average game lasts. It doesn’t mean too much on its own, but is useful when combined with the other stats.

“play” here represents the percentage of games in which Fireball is played (cast). It must be less than or equal to the “draw” figure, since you can’t typically play a card without drawing it (except for a few special cases). If this figure is much lower than “draw”, then that usually means there wasn’t frequently enough mana to play the card or a good opportunity to play it.

“att”, “died” represent the number of times this card attacked or died in a game. It only applies for minions and is therefore 0% for spells like Fireball. “att” can be higher than “play” since a minion can attack several times a game if it stays alive or has windfury.

“dam” represents the total amount of damage this card dealt on average in all simulated games in the current run. For cards like spells you can sometimes figure this out from the other statistics (i.e. for this card we see that 6 x 0.54 = ~3.2), but for minions this number is a bit tricker since it includes damage both from battlecries, deathrattles, as well as attacking.

  • (Ragnaros the Firelord): draw = 71%, play = 52%, att =  0%, died = 21%, dam = 7.480020

Ragnaros, one of my most favorite cards, is a unique case since it is a minion but can’t attack, and so “att” statistic is 0%. However, since it does deal 8 damage at the end of your turn, the “dam” statistic is non-zero (around 7.5).

If you think about these statistics can you can draw some conclusions. For example, Ragnaros deals 8 at the end of each turn, yet it dealt around 7.5 on average. Putting this together with the fact that it was only played around half of games (52%), this implies that it dealt damage roughly twice per game, and was alive about two turns.

However, since it only died less than half of the time it was played (21% vs 52%), why didn’t it typically live more than two turns? Easy – this means that the game tended to end around two or three turns after Ragnaros was played, and I’m betting it was often in favor of the player who managed to play this great card.

  • (Elven Archer): draw = 64%, play = 63%, att = 38%, died = 58%, dam = 1.183317

In the case of Ragnaros, the card was played roughly 73% of the time (= 52%/71%) it was drawn, which is actually pretty high considering it costs 8. But if you look at Elven Archer (1 1/1 for cost of 1 with 1 damage during battlecry), it was played roughly 98% (= 63%/64%) of the time. This makes sense because it’s cost is so low.

With only a one in toughness, it died most of the time (58% / 64% = 90%) and only managed to deal 1.18 damage per game. This translates to 1.18 / 63% = 1.873 damage when it was played, and 1.0 of that is from the battlecry. However you shouldn’t jump to conclusions that this card was useless since it did so little damage-wise, because that would discount the preventative effect it might be having to kill enemy attackers or other minions that are part of dangerous combos.

You may be wondering why the draw rate is not higher than Ragnaros, the reason is because I have only one of this card in the deck (same as Ragnaros).


These stats take some time to understand but I’m hoping many people will find them useful or at least interesting. For starters you can use the damage stat to see which cards are pulling their own weight and which are slacking, and tweak your deck to improve your overall win rate. And if you get creative, the sky is the limit!

Detailed per-participant statistics in the HS deck simulator

One of the new features in Deck Simulator for Hearthstone 1.2 is the ability to look at statistics for individual participants on the ‘Simulation’ screen. This can be done by clicking on the participant’s name in the bottom table either during or after the simulation finishes.

If you click on one of these you’ll see a window which gives this type of information:

  • Details for ‘Evl. Planner (med) > R’s Paladin Deck 1’ [deck rating 1805]
    • 62 % [avg turns 10] VS Evl. Planner (med) > Evolved Paladin 205
    • 30 % [avg turns 9] VS Evl. Planner (med) > Evolved Paladin 215

I’ve bolded the important information in the above excerpt and will describe these below:

  • Win rate against a specific other participant, which is listed as “VS XXX” on the same line.
  • Average number of turns the game lasted before the game ended

The first of these is useful if you are running a simulation in ‘all play all’ mode because the percentage you get on the simulations screen is the average number of wins vs. all other participants, so clicking on that participant will give you information about which decks/players it is strong against and which is is weak against. Another way to check this is just run a ‘all play first’ mode in which the first listed participant plays each other.

The average number of turns the game lasted is interesting since some decks are designed to win after a long, drawn-out game and others to crush quickly, so you can use this number to get some feel for that.

One thing to keep in mind is that if you view the detailed stats while a simulation is in progress it will continue running (and update behind the window), but the window’s stats will not update in real time.

In the future I may add some more information here about each participant. If you have any suggestions, please let me know.

In my next post I’ll talk about the ‘deck rating’ which was mentioned in the above example.


Deck Simulator for Hearthstone V1.2 Released on Apple App Store!

I’m very happy to announce Deck Simulator for Hearthstone‘s 3rd version (1.2) is now available on the Apple App store!

For this release I decided to take a break from adding new cards and focus on adding a few features that will make the tool easier to use and more productive.

For example, I’ve added a very cool feature that allows you to evaluate to what extent each card in a deck is contributing to it’s overall strength, and also added a rating system for decks to easily compare them (HELO = Hearthstone ELO).

For full details of the release please see the app’s page here:


The app is currently completely free, with no ads, though will only be this way for a limited time.

I’ll be writing some more posts in the feature highlighting some of these new features and discussing how to use them.

Deck Simulator for Hearthstone: Practical usage example 1

The posts up to this point have mostly been about various features of the simulator, however there hasn’t been much talk about how to actually use it for a useful purpose.

In this post I’ll go over a practical example and give all the steps involved to help you understand how you can use the simulator to help your deck construction.

One of my decks contains a Ragnaros the Firelord card, and I have noticed many times that when I am able to play it I have a pretty good chance of winning. However, I’m not sure if this is really the case or if it’s my biased thinking. If Ragnaros is really not helping me as much as I think I could turn it to dust and use that dust to craft cards to buff up my decks.

Let’s use the simulator to see how much effect Ragnaros actually has on my win rate.

1) Download the app from the apple app store (iTunes)  and run it.

2) Click Edit Decks.

3) I included this specific deck in the database, it’s called “J’s mage deck”. Click on that deck and then on “Copy deck” on the top right side of the screen.

4) Click on the field next to “Rename deck:” (under the deck list) and change the name from “J’s Mage Deck (Copy 1)” to “J’s Mage Deck Var 1”

5) Do steps 3 and 4 again and create another copy called “J’s Mage Deck Var 2”

6) Click on “J’s Mage Deck Var 1” and then click on Ragnaros in the “Cards in Selected Deck” table. He’s near the bottom.

7) Now click on the right arrow (looks like a triangle pointing right) to remove the card.

8) Now find “Sunwalker” (4/5 Taunt, Divine shield for 6) card in the “Cards in database” list. It’s sorted by alphabetical order by default so scroll down to the S’s and you’ll find it easily.

9) Click on the left arrow (directly below the right one) to transfer the card to the deck.

10) Now do the same process for “J’s Mage Deck Var 2”, except this time choose “Goldshire Footman” (1/2 Taunt for 1)

11) Next click the black “Save” button on the bottom right to make sure both decks are saved in the database. Now even if you close the app or restart your device the decks will be saved.

12) Now leave the Edit Decks area by clicking Back (top left of the screen), and click on the “Simulate” button.

13) Click on “Evolved Planner (med)” on the left under “Players” and then “Evolved Paladin 215” on the right under “Decks”. This is one of the strongest combinations in the starting database and is used as a reference to judge the other deck’s strengths.

14) Now click the “Add to Simulation” button in the middle of the screen. This adds the combination of deck and AI player to the list of participants.

15) Now repeat the above steps for the following combinations:

(Note: You don’t need to click on “Evolved Planner (med)” each time since it should stay selected)

  • “Evolved Planned (med)” / “J’s Mage Deck”
  • “Evolved Planned (med)” / “J’s Mage Deck Var 1”
  • “Evolved Planned (med)” / “J’s Mage Deck Var 2”

16) Click on “All play all” under “simulation type” in the bottom left.

17) Set “Matches per pairing” to 100 (or something close) using the slider or clicking on the initial value (20) and using your virtual (or physical) keyboard.

18) Finally, click “Start simulation”!

19) Because of the planner AI type this simulation may take a little time. It depends on the device you have but it should be done in a few minutes at most. You can watch the game results updated live and guess how things will turn out.

20) Here are the results I got:

  • Evolved Planner (med) > Evolved Paladin 215    Wins 85.3%
  • Evolved Planner (med) > J’s Mage Deck    Wins 43.1%
  • Evolved Planner (med) > J’s Mage Deck  Var 1   Wins 35.9%
  • Evolved Planner (med) > J’s Mage Deck   Var 2   Wins 35.6%

Here is what we can determine from the results:

1) My original deck is significantly weaker than “Evolved Paladin 215”

2) Removing Ragnarok and replacing him with another card seems to reduce my win rate vs roughly 8%.

3) Whether I swap Ragnaros with Sunwalker or Goldshire Footman doesn’t make much difference. The 0.3% difference between those two decks isn’t statistically significant

Thinking about this, I think the results are reasonable. I wasn’t expecting a major increase in wins (30% or more), but rather something a bit smaller which matches with that the simulator computed.

Of course we could run more tests, like including more decks to see how the modified decks play against other decks, or even run the same simulation again to see how statistically accurate the results are. If we get results that are very different from the first time we could consider running the test again with a much greater number of matches (say 200 or 300) for a more accurate result. I did this and ended up with “79.2% 46.9% 41.9% and 32.0%” for the winning percentages, with the decks in the same order as above. This shows us that the Var 1 deck might actually be a little stronger than Var 2 (again this seems logical), but regardless both variation decks are significantly weaker than the original deck with Ragnaros.

I was curious so I ran the same simulation again, this time with 300 matches per pairing. I ended up with results very similar to my first run, which increases my trust in them: “85.5% 45.0% 35.6% 33.9%”. Ragnaros is giving around 9% increase in wins, and the two variation decks are pretty similar in strength (win rates are within 2%).

Although it may seem like there was many steps involved here, once you try the process yourself you’ll quickly get the hang of it, and be running simulations of your own in no time. And don’t forget that getting the most out of Deck Simulator for Hearthstone will take some effort – the program is really intended as a research tool more than anything else, and that implies a bit of trial-and-error.


Disclaimer: Hearthstone is a trademark or registered trademark of Blizzard Entertainment, Inc., in the U.S. and/or other countries. 


RNG, Hearthstone, and the simulator

The other day I was speaking with a friend and when I mentioned Hearthstone he immediately said “I don’t like Hearthstone very much because there is too much RNG”.

RNG, which stands for “Random Number Generation”, is defined by Hearthstone Wiki as “the unpredictable outcome of a situation featuring a significantly randomized element”. In other words, the more RNG there is, the more possibility that your win or loss was a result of random odds as opposed to purposeful strategy and good deck construction. Chess would be an example of a game with zero RNG since it’s completely non-random, and a slot machine would be an example of a game that is nearly 100% RNG. All card games that involve shuffling have RNG to a certain extent.

I would agree that there is a major element of randomness in Hearthstone. After all, every game you start with a hand that is random drawn from your 30-card deck, and many card effects have a major random element. For example, Arcane Missles, which deals 3 damage randomly split among characters. Or one of my favorite cards, Ragnaros the Firelord, which deals 8 damage to a random player or minion.

Surely, there are things which offset the randomness of the game, such as the redraw system, and a strategic player who calculates correctly can make choices where the outcome of random effects is most likely to benefit them – for example killing off certain minions and letting random effects take down the remaining ones.

Having said that, I would argue that the result of a single game between two decks in Hearthstone doesn’t say too much about either the strength of the decks or the ability of the players. I actually think in this case the number of turns before the game ended more accurately predicts how close the decks are in strength. The more turns the loser managed to stay alive, the closer the decks are.

The realization that Hearthstone contains a good amount of RNG is another thing that motivated me to create Deck Simulator for Hearthstone. Surely playing a handful of matches with a real opponent gives you some idea of the strengths of each deck and player, but what if you could to run 100, even 1000 games in a matter of seconds or minutes?

That is exactly what the simulator allows, and even if the AI players are not exactly ‘ideal’ in terms of playing the perfect move in all situations, as long as they play reasonably good moves the win/loss ratio between two decks should give a good indication of which deck is stronger.

As I mentioned in the last post, the number of games played between each to pairings during a simulation is determined by the “Matches per pairing” slider, which defaults to 20. The reason I set 20 as the default is I felt it was the lowest value that gave some a good estimate of the relative deck strengths. Any less than that and RNG takes over and the result isn’t too statistically meaningful.

The maximum matches per pairing which permitted in the simulator is 1000, which should give a very accurate idea of deck’s relative strengths. However, depending on the  AI players you have chosen and the speed of your device, this could take quite some time (an hour or more).

Therefore, effective use of the simulator requires picking a good number of matches per pairing. Here are my general recommendations:


20: Use this if you want a very, very rough estimation of the decks’ strengths

100: Use this for a rough estimate that carries more weight

200-300: A good middle ground for simulation accuracy vs wait time. This is the most you’ll need for most situations.

1000: Only needed when you really want to be sure the relative strengths of decks, such as when you decide to craft new cards to make a new deck or improve an old one. I recommend limiting the number of participants to 2 only a small handful to avoid long simulation wait times.


While there are several different ways to measure statistical reliability and I may add some of these in upcoming releases, there is a very simple way to check how accurate your results are. Do a full simulation run then take a screenshot to capture the top of the results table. Then re-run the simulation (via the green “Restart simulation” button on the top right part of the simulation screen) and take another snapshot. You can do the same thing again two or three more times if you like.

Then compare the results of each simulation run. The less number of matches you use, the more variation you will see between simulation results. If you see one run where a certain deck is #1 (highest on the results list) and another where it is #5, you know you need to increase your number of runs and try again. You should aim for a number of matches where the general ranking and order is mostly consistent, but the win ratios can be a few percentages different between simulation runs.

I’m curious to hear about your experiences using the simulator and what sorts of parameters and simulation types you’re using, so please feel free to comment to this post!

(Just for the record, I don’t think Hearthstone has too much RNG, but rather a reasonable amount of it given it is a card game)




(Featured image of Hearthstone card “Ragnaros the Fireload”, taken from Hearthstone wiki (http://hearthstone.gamepedia.com/Ragnaros_the_Firelord) but is trademarked and copyrighted by Blizzard Entertainment)

Hearthstone Simulator’s game modes

In version 1.0 of Deck Simulator for Hearthstone, there are four different simulation modes.  In this article I’ll give a description of each with some related information to help you use them more effectively.

All play first

In this mode,  each participant will be matched against the participant that is listed first in the participants table. For example if you have four participants A, B, C, and D, you will have the following matchups (or pairings):

A vs B, A vs C, A vs D

Each matchup will play a number games equal to the “Matches per pairing” setting on the Configure Simulation screen.

All play all

In this mode, each participant will be matched up against all other participants (except for itself). So continuing with the same example with 4 participants, the following matchups will be used:

A vs B, A vs C, A vs D, B vs C, B vs D, C vs D

You may have noticed that “B vs A” is not listed here – that is because when two participants play a game, the order of who goes first is randomly chosen, so “B vs A” represents the same thing as “A vs B”.

Just as in “All play first” mode, the “Matches per pairing” setting is used to decide the number of games per matchup or pairing.


This mode simulates a single elimination tournament. To keep things simple it requires a number of players that is a power of 2 (ex: 2, 4, 8, 16, etc.). Using the same 4 player example, there is two matchups created (for example A vs B and C vs D) and each is played “Matches per pairing” times. Then the winner of each of those sets of matches moves on to  the next round, so if A and D won the most matches, they would play each other (A vs D). Finally, the winner of that set of matches would be the total winner.

This is the only mode where the total number of games played by each participant is different, and that is why the number is listed on the simulation screen next to each participant. Furthermore, the ranking isn’t just based on wins since a participant could have a great win rate until a certain matchup where things went sour. Rather, the participants are ranked by the number of total matches played and then their win rate.


This is the simplest game type where two participants is required, no more or no less. The participants play each other a single time (“Matches per pairing” is not used).

The main reason for this match type is a detailed log of the entire game is shown on the simulation screen. If you want to see how the AIs are playing your decks you can follow the entire game via this.

(The reason a full log is not shown for other game types is that it would slow the game down too much.)


So how to choose what mode to use? Here is a quick guide:

1. When you are trying to test whether one or more decks can beat a specific deck, use “All play one” mode.

2. When you want a thorough analysis of how good a deck is vs a bunch of other decks, use “All play all” mode. Keep in mind the number of total games goes up (roughly) exponentially as you add more players, so using this mode for a large number of decks could take a long time, depending not he number of matches per pairing.

3. When you want to get a rough feeling for the ranking of a large number of decks, use “Tournament” mode.

4. When you want to see the play-by-play action to verify the AI or get some pointers for your own play, use “Single” mode.