1 00:00:00,208 --> 00:00:06,792 >> Thanks. Hi everyone. May name is Elie and today we are going to talk to you about new game 2 00:00:06,792 --> 00:00:12,792 hearthstone. This is a (inaudible) work and does not present our way point of view. 3 00:00:18,083 --> 00:00:22,500 If you are looking for a new job we are hiring so if you are interested come talk to me after 4 00:00:22,500 --> 00:00:28,500 the talk. With that out of the way, let's get started. Hearthstone is a digital 5 00:00:33,167 --> 00:00:39,167 collectible card game developed earlier this year. It is based on War of Warcraft and 6 00:00:43,792 --> 00:00:50,708 (inaudible). Everything is too interesting sometimes and consequences that happens. For 7 00:00:50,708 --> 00:00:55,750 us, at some point during the last few months we started to be more and more interested in how 8 00:00:55,750 --> 00:01:00,333 the game is structured, how we can understand better (inaudible) rather than playing 9 00:01:00,333 --> 00:01:04,542 it (inaudible). I remember June I think I played only up to Level 5 and probably like 100 10 00:01:04,542 --> 00:01:10,542 (inaudible). Which is a huge down from I use to play. If you haven't tried it you should. It 11 00:01:17,917 --> 00:01:23,917 is available on your computer, Mac and PS and on Mobile edition. Looking at this it's 12 00:01:31,750 --> 00:01:36,083 also was a very good excuse for me because I finally talked my wife to come on stage with me. 13 00:01:36,083 --> 00:01:42,083 That's something I want for a long time. So please be nice to her. (Applause) So what are we 14 00:01:49,208 --> 00:01:55,208 talking about today? We're going to talk about game complexity. How to have about 500 cards now 15 00:01:57,667 --> 00:02:05,583 and (inaudible). The question is, can we use (inaudible) can we find things which makes us 16 00:02:05,583 --> 00:02:12,708 given an edge. That's what this talk is about. We wrote about our research in Blizzard. I know 17 00:02:12,708 --> 00:02:16,458 some of them are in this room but we didn't get any response so I think they're fine with it. 18 00:02:22,208 --> 00:02:27,708 So while we wanted to talk to you. First thing we want to tell you about how to find 19 00:02:27,708 --> 00:02:31,958 undervalued cards. So each card has a value and the question is, are they better bang for the 20 00:02:31,958 --> 00:02:36,958 buck than others. The second thing we wanted to tell you and the thing we really keep under 21 00:02:36,958 --> 00:02:44,250 wraps and the surprise is Def Con is can you predict what you're going to play? Yes it's 22 00:02:44,250 --> 00:02:50,458 possible. We're going show you how. We also wanted to tell you about how to predict the game 23 00:02:50,458 --> 00:02:56,083 outcome. It's interesting. Except we don't have time. 45 minutes is too short. So 24 00:02:56,083 --> 00:03:03,958 we'll write about it. Of course we wanted to tell you about the alien invasion. No, wait. Not 25 00:03:03,958 --> 00:03:09,958 this one. How many of you play can you please raise your hands. How many of you reach legend? No 26 00:03:12,958 --> 00:03:18,958 one. Sorry. Legend for those (inaudible) what a normal game looks like. It is a board game. 27 00:03:22,125 --> 00:03:28,125 Turn by turn. Two player. Each person is represented as a hero which is inspired by world of 28 00:03:31,708 --> 00:03:38,792 Warcraft characters. You are at the bottom. Here I'm playing the (inaudible) hero and (inaudible) 29 00:03:38,792 --> 00:03:44,792 which is a solo player only hero. The game ends when one of the two heroes reach zero. 30 00:03:48,083 --> 00:03:54,083 (Inaudible) it is on the right side of it. You use decks. And cards for each limit is a limit. 31 00:03:59,792 --> 00:04:05,792 You can use only 30. Not 29 or 31. Just 30. Each card has to show (inaudible). So every turn 32 00:04:09,083 --> 00:04:14,167 you draw a card and the card goes into your hand. This is my hand. And you can see one of the 33 00:04:14,167 --> 00:04:19,875 cards highlighted in green. It means I have to ask mana to play. The mana is the resource 34 00:04:19,875 --> 00:04:24,875 we use to play cards. You also have a ‑‑ your friend also has a hand. You only see the back of 35 00:04:24,875 --> 00:04:30,875 it. Those who are curious know they do not know the card ahead of time. So (inaudible) on the 36 00:04:34,667 --> 00:04:40,667 right side you go from one of the first turn as to turn ten. After turn ten it should 37 00:04:46,417 --> 00:04:51,125 replenish but do not increase. So the maximum amount of mana you can have at the given time 38 00:04:51,125 --> 00:04:57,125 is ten. So card can be a weapon (inaudible) which you play immediately. It can also be 39 00:05:00,542 --> 00:05:07,125 minions or creatures. You can have up to seven on the Board for each player. You open it at 40 00:05:07,125 --> 00:05:10,667 the top. Here you can see for instance I am playing (inaudible) and my opponent has 41 00:05:10,667 --> 00:05:16,792 three minion. So you see what hearthstone looks like when you play it. It's obviously designed 42 00:05:16,792 --> 00:05:22,792 to play on a tablet. Because we designed like this. And they simplify the law compared to 43 00:05:25,500 --> 00:05:33,500 magic because you don't have to deal with land. It's very simple and very easy for people to get 44 00:05:33,500 --> 00:05:39,500 in and get their first card which is how they make money. (Inaudible). Here is a quick 45 00:05:43,833 --> 00:05:49,833 video of me playing hearthstone just to show you the game. You can see this is my turn. Bring a 46 00:05:52,042 --> 00:05:57,750 new card into game. I draw a game which goes to my hand. I play another card and I take 47 00:05:57,750 --> 00:06:05,500 another turn. Then my opponent has a secret (inaudible) turn. This is what a turn looks like. 48 00:06:05,500 --> 00:06:10,125 On the video it is awesome because the guy plays me fast. You have up to 90 seconds so 49 00:06:10,125 --> 00:06:16,125 sometimes you have to wait and drink coffee. So some people play two games at once. What 50 00:06:18,792 --> 00:06:24,542 makes the game so interesting? Everything is a card. If you look at all the game structure 51 00:06:24,542 --> 00:06:30,625 the hero is a card. Everything is a card. The card is the thing we're going to look at in depth. 52 00:06:30,625 --> 00:06:36,625 So a card has a minion. (Inaudible). The first one is a mana. You play the card from 53 00:06:39,792 --> 00:06:45,792 zero to ten. And then you have basic attributes in this card which is (inaudible). Four here. 54 00:06:48,875 --> 00:06:54,792 So that's a card and this is a very boring card. Nothing special about this card. What 55 00:06:54,792 --> 00:07:00,417 makes the game fun is there a lot of card which have a lot of interesting effects. Three of my 56 00:07:00,417 --> 00:07:06,417 favorite cards. (Inaudible). What's very interesting is you can play as intended or very 57 00:07:09,500 --> 00:07:16,625 special combo and that's basically how you win the game. So one of the fun aspects of the 58 00:07:16,625 --> 00:07:22,708 game. Now that we know cards the question is, is there a better card or card which are better 59 00:07:22,708 --> 00:07:29,958 bang for the bucks than others? How do we find those? I know it's early in the morning and 60 00:07:29,958 --> 00:07:35,500 the head hurts but bar with me please. We're going to start with the basic assumption of how 61 00:07:35,500 --> 00:07:40,083 we're going to (inaudible) them. The first thing is the mana card is professional to the 62 00:07:40,083 --> 00:07:46,083 (inaudible). Which mean if you play one card it's less powerful than a three mana card. If you 63 00:07:50,500 --> 00:07:56,500 had them everyone would play the most powerful and overrun people. It is a bit unbalanced 64 00:07:58,625 --> 00:08:04,625 but not so much. Two is the power of the card roughly increase which means a two mana 65 00:08:06,708 --> 00:08:12,708 card is twice as (inaudible) as one. (Inaudible). It was means the highest card was (inaudible) 66 00:08:18,500 --> 00:08:24,500 and would have no chance of success. (Indiscernible). Card effects have a constant. It 67 00:08:31,958 --> 00:08:37,958 means given (inaudible) or any effect have the same price regardless of the card. There is 68 00:08:48,125 --> 00:08:54,542 no secret. All of this is a card. Which brings us to the fourth one which is having a 69 00:08:54,542 --> 00:09:00,292 card has value. Remember you only get one card each turn. So even holding a card has some 70 00:09:00,292 --> 00:09:06,375 value which, of course, is interesting value of the card. Finally, we believe there is no 71 00:09:06,375 --> 00:09:12,375 secret. We believe it has no hidden factor and what you have in the card is exactly what the 72 00:09:15,333 --> 00:09:20,917 value of the card should be. So if we were (inaudible) you would get the value of the card. The 73 00:09:20,917 --> 00:09:24,792 question is how you sum them is another question we're going to explore but there is nothing 74 00:09:24,792 --> 00:09:32,458 secret bit and you can actually look at it. That's where we start. As I said the mana is a 75 00:09:32,458 --> 00:09:40,417 price and price is equal to the (inaudible) and the value. There is nothing else on the card so 76 00:09:40,417 --> 00:09:48,125 we the exact price of mana is exactly the sum of those attributes. You put it into a 77 00:09:48,125 --> 00:09:54,125 (inaudible) function. You say for attack which is A is the attack position which is the 78 00:09:57,417 --> 00:10:03,500 base point. How much mana cards have one attack. Plus five (inaudible) where etch is the 79 00:10:03,500 --> 00:10:10,417 question. Which is the base point. How much one count in mana plus I which is interesting 80 00:10:10,417 --> 00:10:16,417 value of the card which is how much mana does it cost to even hold the card. With that you can 81 00:10:22,167 --> 00:10:29,792 without looking at it you can compare it to (inaudible). Very common card is the (inaudible). 82 00:10:29,792 --> 00:10:36,875 We can also put in a question. Interesting value. We want to convert it to our (inaudible). 83 00:10:36,875 --> 00:10:41,917 So same thing. We're going to be very, very high‑tech. We're going to go back and forth and 84 00:10:41,917 --> 00:10:48,750 we're going to just divide by six. Yes that's really hard I know. (Laughter) Then give you 85 00:10:48,750 --> 00:10:55,208 one mana point. So for one mana point you get one attack. One to 16 counts and interesting value 86 00:10:55,208 --> 00:11:01,792 of the card. On the other hand, we're going to divide by four. By doing this you say one point 87 00:11:01,792 --> 00:11:08,375 what you get is one attack and 1.25 (inaudible) for interesting value. Here you can image as we 88 00:11:08,375 --> 00:11:14,375 see one of them gets better bang for the bucks. Gets more points than the (inaudible). And that's 89 00:11:17,833 --> 00:11:22,750 the kind of imbalance we're going to look for. Let me give you a more interesting example. 90 00:11:22,750 --> 00:11:28,958 Fire ball. My most hated card. It's very simple thing. For those who don't know what a fire 91 00:11:28,958 --> 00:11:34,958 ball is it is a big ball of fire that can pulverize you and you die. So, basically, this one is 92 00:11:37,583 --> 00:11:43,583 very simple. You pay four mana and you blast the guy. So very simple. One mana is 1.5. All 93 00:11:49,000 --> 00:11:54,417 right. We already know fire ball is great. How about we make a giant fire ball. It's called a 94 00:11:54,417 --> 00:12:00,917 (inaudible). Bigger. Stronger. Meaner. The fire blast is basically ten mana. For ten mana 95 00:12:00,917 --> 00:12:08,875 you get ten damage. Well okay. But then might be bigger but the bang for ‑‑ the value is not 96 00:12:08,875 --> 00:12:14,875 that great. You get one mana, one damage. If you have ten mana you can play two fire 97 00:12:18,208 --> 00:12:26,083 ball‑and‑a‑half for the price of one. So the value of the fire blast is less interesting than 98 00:12:26,083 --> 00:12:31,792 the fireball. What's interesting is this is a new version of the fire ball. Earlier in the year, 99 00:12:31,792 --> 00:12:38,250 we had a premier version which use to cost eight mana. Where at that time the mana cost was even 100 00:12:38,250 --> 00:12:44,250 lower than the fireball. Where basically for the adjusted value we get 1.25 damage for one mana. 101 00:12:46,417 --> 00:12:53,167 So something is not right here, right. Let's compare the two. If you take ten damage you think 102 00:12:53,167 --> 00:12:59,500 the fireball should do four damage not six. And you're, like, well okay but the fireball 103 00:12:59,500 --> 00:13:04,875 is properly priced. You should do six damage for four. Well in this case a power blast should 104 00:13:04,875 --> 00:13:11,833 be (inaudible) damage not ten. Give me back my fire blast. Even if you look at the (inaudible) 105 00:13:11,833 --> 00:13:17,833 you can see there are some decisions which are ‑‑ of course we don't have all the 106 00:13:20,375 --> 00:13:26,375 (inaudible) and this is based on tactical secret analysis. Complexity is the basic whole 107 00:13:30,250 --> 00:13:36,250 idea of finding the value card. How do we count that to hundreds of cards. We're able to do 130 108 00:13:39,625 --> 00:13:47,083 cards because attribute is a bit complicated so you have to cross deck. A bunch of decks you have 109 00:13:47,083 --> 00:13:53,083 to process. We did 130. How we do that. We model the card as we did before. Then we use those 110 00:14:00,042 --> 00:14:06,042 cards and reverse (inaudible) using linear algebra. Don't worry it's not as bad as it 111 00:14:08,500 --> 00:14:15,167 sounds. And use (inaudible) for the real value. The last step is where you say here is my real 112 00:14:15,167 --> 00:14:23,083 value. Here is my face value: You get a negative and you find another value card. That's as 113 00:14:23,083 --> 00:14:29,083 simple as this. Not that bad. So let me show you on a very simple card how it looks like. Then 114 00:14:33,500 --> 00:14:39,500 when we that I will show you. Let's take three cards which have charge. Charge is you put 115 00:14:39,500 --> 00:14:45,375 the card and the cards can attack as soon as it come into play. We have four. We have the 116 00:14:45,375 --> 00:14:52,583 (inaudible) and the commander. We're going to show two more cards which have different 117 00:14:52,583 --> 00:14:59,250 shares. The reason why they the commander is the middle is because it has both attributes. 118 00:14:59,250 --> 00:15:03,125 One of the ideas of having linear algebra you can commute coefficient. That's why we can 119 00:15:03,125 --> 00:15:09,833 convert cards because it is very complicated. So we do as we did today. We put them into an 120 00:15:09,833 --> 00:15:15,833 equation. So we have four attacks. We have a charge partition which is ‑‑ partition 121 00:15:23,375 --> 00:15:29,375 plus the intrinsic value of the card. Then we're going to reverse the attribute partition. 122 00:15:34,375 --> 00:15:39,417 To do that we put them into a matrix which is basically a table. And we put them like 123 00:15:39,417 --> 00:15:46,167 this. You say well performer gets four attacks, three counts, one charge, zero shield and one 124 00:15:46,167 --> 00:15:50,750 (inaudible). Then I do the same for the rocket EER. Here you can see it has one and one. Then you 125 00:15:50,750 --> 00:15:56,750 add the two other cards which has (inaudible). Then you have one line of (inaudible) which is 126 00:16:03,417 --> 00:16:09,417 the lead square and boom you get partition. And the partition are one attack, the A, minus one for 127 00:16:18,042 --> 00:16:23,833 (inaudible), two for charge, and one for (inaudible). Dude that doesn't make any sense. Yes you 128 00:16:23,833 --> 00:16:30,292 are right. It is because you only have five cards. Five cards is not a good partition because 129 00:16:30,292 --> 00:16:36,292 there is too much instability. So now how do you find the real price? Well now we're going to 130 00:16:41,375 --> 00:16:47,375 be back to kindergarten where you learn how to add stuff. Basically what you do is you say 131 00:16:50,292 --> 00:16:56,292 it's four times one plus two times minus one plus one plus one. And the price is six. So 132 00:16:59,208 --> 00:17:03,958 the real value according to our computation is six. The card is fair. There's nothing different 133 00:17:03,958 --> 00:17:09,958 between the face value and the real value so you are, like, not interested. Let's try again. 134 00:17:18,125 --> 00:17:23,500 It's game. A lot of people said the formula isn't the value. Let me ‑‑ let's try again. So it's 135 00:17:23,500 --> 00:17:28,167 one attack, one count, one (inaudible), one shield plus the value of the card. So it's one 136 00:17:28,167 --> 00:17:33,417 times one, plus one times one minus one plus one. Now it's two. Wait. Two? No. The card is 137 00:17:33,417 --> 00:17:38,958 one right? You are right. That is why it is an undervalued card and should cost twice. Even with 138 00:17:38,958 --> 00:17:44,750 our partitions you can always see this card is clearly undervalued. That's basically 139 00:17:44,750 --> 00:17:50,750 the idea we have is it always works. So I did post that online and we got a lot of good 140 00:17:53,292 --> 00:18:00,375 feedback about it. A lot of good comments. Thank you anyone who pointed out. The most important 141 00:18:00,375 --> 00:18:05,208 one was, hey dude you should take into card dependency. That's actually true. Thanks to 142 00:18:05,208 --> 00:18:11,875 you. The charge would be basically a factor of the attack. And mode of the attack. 143 00:18:11,875 --> 00:18:18,875 So now we now use attack time and charge. Same thing for wind free. Now we know it's to the 144 00:18:18,875 --> 00:18:25,292 attack of the card. One where we have a large feedback. The question is about shield should 145 00:18:25,292 --> 00:18:31,375 be. It is a coefficient and related to half. Related to attack. Difficult. If you have 146 00:18:31,375 --> 00:18:37,500 idea, let me know. The thing is up. So that's a comment from someone on the blog which 147 00:18:37,500 --> 00:18:42,250 actually wrote me a long post. Actually cards have a budget. And the budget is two times the 148 00:18:42,250 --> 00:18:50,083 mana plus one. I have no idea how we come up with the idea. It is absolutely reasonable and 149 00:18:50,083 --> 00:18:54,458 when you do it the partitions look way better, it is true. I just didn't know how this guy 150 00:18:54,458 --> 00:19:02,250 get it. But thanks. So after writing code and de‑bugging and de‑bugging and de‑bugging you 151 00:19:02,250 --> 00:19:08,667 have something and voila. You get your coefficients. So these are the coefficients. You can 152 00:19:08,667 --> 00:19:14,667 see the most valued coefficient is ‑‑ I'm sorry. I must mention because we use a budget idea 153 00:19:17,750 --> 00:19:23,708 that I've been proposed now two partition points is roughly one mana point. Basically you are 154 00:19:23,708 --> 00:19:29,708 trying a minion got you five to add to the card. The damage cost you 1.5 mana per point. Joint 155 00:19:34,000 --> 00:19:39,875 card ‑‑ a single card cost you roughly 1.5 mana. Then the shield is pretty expensive one 156 00:19:39,875 --> 00:19:46,417 mana. We also have negative coefficient which is basically decrease the price of the card 157 00:19:46,417 --> 00:19:52,750 as you expect. Having your joint card is the highest one followed by these cards discard. And then 158 00:19:52,750 --> 00:19:58,750 we have overload which is (inaudible) you pay another price. All this is perfectly 159 00:20:01,000 --> 00:20:07,000 fine. We're really happy. We have this guy. We did something which was very clever which was 160 00:20:10,250 --> 00:20:17,208 the single target and multiple target the coefficient is different. I am going to show 161 00:20:17,208 --> 00:20:23,208 you why. Keep in mind that we tried. So one way to neutralize what looked like as a result is 162 00:20:27,833 --> 00:20:33,833 you have a ‑‑ can put on the graph where X is how much these are the face value and the Y is 163 00:20:39,417 --> 00:20:45,583 how much the card is worth. So on the left triangle, the unvalued the cards are in green 164 00:20:45,583 --> 00:20:52,750 and the overpriced cards on the right. Of course because the averaged priced, card is under 165 00:20:52,750 --> 00:20:58,750 value and over value you know that is interacted to the ones which are closer to the lines of 166 00:21:01,417 --> 00:21:06,875 fair price. What's interesting is the people who are out here outlier. And there is quite a 167 00:21:06,875 --> 00:21:13,083 few. The reason why we have a lot of low value cards is because when we model cards our 168 00:21:13,083 --> 00:21:18,542 card which have a shared ability are mainly lower value. Not because they the algorithm 169 00:21:18,542 --> 00:21:22,958 favors one over the other just because when we did model, you can see on the side, model them 170 00:21:22,958 --> 00:21:29,000 on the left side of the graph. Highest cards usually have special ability which is not 171 00:21:29,000 --> 00:21:36,333 captured by this model. Which another one for a special ability. So no more blah, blah. 172 00:21:36,333 --> 00:21:42,333 What is the result? Well one of the most under value card is Soulfire. We do believe it 173 00:21:44,417 --> 00:21:51,250 actually should be at least one mana. Light's Justice is also undervalued. This one a lot of 174 00:21:51,250 --> 00:21:58,417 people pointed out that they did use fro attacks for one mana which is somewhat of a kill if 175 00:21:58,417 --> 00:22:06,000 you think about it. Not surprising the Mortal Coil or shield are not perfectly and 176 00:22:06,000 --> 00:22:12,917 Argent Squire and there is also Explosive Trap and somehow it actually gives you something 177 00:22:12,917 --> 00:22:17,417 which seems reasonable to most people. The one which is a bizarre is Sacrificial Pact, 178 00:22:17,417 --> 00:22:23,417 probably a bug in the code. We also have high valued cards. The one which is most powerful is 179 00:22:27,917 --> 00:22:33,917 fire which I believe it's probably seven mana or six. So somehow the algorithm gives you 180 00:22:36,458 --> 00:22:42,542 reasonable results so we believe we're on the right track. If you want to look at it full detail, 181 00:22:42,542 --> 00:22:48,417 all the partitions, all the card ranks they're on my website. You can just go there and we keep 182 00:22:48,417 --> 00:22:54,417 updating it. And show how to make it better and we say let us know. How do you take it to the 183 00:22:56,833 --> 00:23:02,167 next level? So far we have only used cards the question is how to make it better. It's really 184 00:23:02,167 --> 00:23:08,167 difficult. At least without extra data. And this extra data is how people play the game. 185 00:23:10,833 --> 00:23:15,875 Most of all the cards depend on the state of the game. We don't have insight about it unless you 186 00:23:15,875 --> 00:23:21,875 have a lot of replay. Of course Hearthstone being very, very new we don't have that. So for 187 00:23:26,042 --> 00:23:33,792 us we get our hand on the hundred games played between May and June. We'd like to thank our 188 00:23:33,792 --> 00:23:39,333 friends for that. Thank you very much. We really hope that it will give Blizzard will give to 189 00:23:39,333 --> 00:23:45,333 us and allow us to do our own analysis. I don't want to do too much but I think we're going to 190 00:23:48,125 --> 00:23:55,583 look at things ‑‑ there is no reason to hide anything. (inaudible). With this data you 191 00:23:55,583 --> 00:24:02,500 can do interesting stuff. The first one is you can price a card which has unique effect. To 192 00:24:02,500 --> 00:24:08,500 get started. The Twilight Drake is a card which is a 41 for four mana and has special effects 193 00:24:11,250 --> 00:24:17,458 when it comes into play it give a battle cry, it will give one half one additional half for 194 00:24:17,458 --> 00:24:23,417 each card you have in your hand. Obviously the value of the card depends on how many cards you 195 00:24:23,417 --> 00:24:29,708 have when you played it. So you can build a model, say if I have one card in my hand then you 196 00:24:29,708 --> 00:24:37,375 have one extra hand and then it's one ‑‑ the real value is 1.3 mana. If I have two it's 1.9 197 00:24:37,375 --> 00:24:44,833 up to nine. You have a maximum of ten cards. The maximum is nine so it's 5.9. The question 198 00:24:44,833 --> 00:24:51,167 is now you are at this table you need to use replay data to be able to know how people played 199 00:24:51,167 --> 00:24:58,375 it. Are many playing it with eight cards in their hands, four, two cards? You do it and 200 00:24:58,375 --> 00:25:03,875 this thing is ‑‑ it draws a exact graph. What you see is the following. In the red on the 201 00:25:03,875 --> 00:25:10,917 left side you see when people play it with less than up to four cards and the card becomes 202 00:25:10,917 --> 00:25:16,042 undervalued. Basically if you play with four cards you get three mana values on your card. 203 00:25:16,042 --> 00:25:22,333 If you play with five cards you have a 2.6 value. With six you have a 2.2 value. This is a 204 00:25:22,333 --> 00:25:28,333 first one where if you play it with seven or eight you get the value of your cards. The average 205 00:25:30,500 --> 00:25:36,458 real value of the card you take the averaged, is 3.7 which is right next to what is the face 206 00:25:36,458 --> 00:25:44,083 value. So based on that we do think the price is fair. Basically exactly what it is. 207 00:25:44,083 --> 00:25:48,750 It's also interesting to show that looking at this we get the same conclusion a blizzard so we 208 00:25:48,750 --> 00:25:52,958 think we have something which is very similar to what they have. They have way better data and 209 00:25:52,958 --> 00:25:58,750 better insight. Let's look at another card which is one of my favorite cards, Edwin VanCleef. 210 00:25:58,750 --> 00:26:05,042 What it does is it will gain two for each time you play a card before it during the game. All 211 00:26:05,042 --> 00:26:10,958 you have to do is look at the replay and how many cards were played during the turn before it 212 00:26:10,958 --> 00:26:16,958 to get its value. And for reasonable number of cards played before I know you can go 213 00:26:16,958 --> 00:26:22,958 way (inaudible) for reasonable number if you have two it's 1.09. If you have 6‑six you 214 00:26:29,792 --> 00:26:35,792 begin to get value out of it. And when you play five or six cards the value is just 215 00:26:40,792 --> 00:26:44,958 outrageous. If you play very, very different points. As you can see it is not at the time 216 00:26:44,958 --> 00:26:50,958 undervalued. It is. Two cards before it ‑‑ I'm sorry three cards. No two cards before it 217 00:26:53,958 --> 00:26:59,958 then you get five mana worth of your cards. And for four cards before you get to seven worth 218 00:27:02,083 --> 00:27:08,083 the cards and so forth. So the average is 8.1. So the average value VanCleef is 8.1. So as you 219 00:27:13,208 --> 00:27:19,458 claim this VanCleef is undervalued and I believe the value is between five and seven. 220 00:27:19,458 --> 00:27:25,458 I believe it should not be eight, should not be nine. But three in my opinion is way too. 221 00:27:27,458 --> 00:27:33,458 It is not according to the (inaudible). People play four for Chris but otherwise would 222 00:27:36,292 --> 00:27:42,292 give you a 6‑six or 8‑eight. So this is one of the cards which is the most undervalued. Last 223 00:27:47,042 --> 00:27:54,208 one. We go to a question about how you deal with (inaudible). So card which has (inaudible) 224 00:27:54,208 --> 00:28:00,208 affect is one of the simplest ones. What it actually do is it does damage of the minion. So 225 00:28:02,417 --> 00:28:08,958 easy right. All you have to do is count how many minion you have on the Board then multiply 226 00:28:08,958 --> 00:28:14,958 by number of damage and voila right. I look at these numbers and there's something completely 227 00:28:17,875 --> 00:28:23,875 wrong here right. Two minion on your cards is already worth 13 points of mana. Well 228 00:28:28,333 --> 00:28:32,292 something is going wrong somewhere. It doesn't make any sense. What's wrong? It turns 229 00:28:32,292 --> 00:28:38,292 out because we use the broad damage. Remember I told you we tried to be clever and single 230 00:28:42,167 --> 00:28:47,458 targets versus multiple targets. This is what happens when you try to be too clever. Okay let's 231 00:28:47,458 --> 00:28:53,458 try again. Go back to single card. Way better. Now it makes more sense. That's how we used 232 00:28:56,000 --> 00:29:02,000 we should not use multi‑target versus single target. You should only use one board, not two. And 233 00:29:04,625 --> 00:29:08,500 it makes sense. Now the card becomes a good deal when you have three minions. Same thing 234 00:29:08,500 --> 00:29:14,500 you can see visually sometimes it's undervalued. Sometime it's overvalued. Most of the time 235 00:29:17,792 --> 00:29:23,292 it's between the two so the card is perfectly balanced. The lesson is don't try to be too 236 00:29:23,292 --> 00:29:27,875 smart. We also like this idea because actually looking at it helps us value it because we do 237 00:29:27,875 --> 00:29:33,875 make sense. And when something is strange we look at it helps us validate and we're going to 238 00:29:37,000 --> 00:29:43,000 tell you about how you can predict and will let you tell a little about that. >> Hello 239 00:29:54,333 --> 00:30:01,250 everybody. My name is Celine and I'm going to show you in game two. The tool is a web 240 00:30:01,250 --> 00:30:07,375 application written Titan. It runs on a small web server, called Flask. So you can just 241 00:30:07,375 --> 00:30:14,083 get a web page. Just to your game as you can see on the screen. Or you can use any 242 00:30:14,083 --> 00:30:20,083 devices with web browser such as a tablet. For this tool implements all the algorithms. 243 00:30:26,708 --> 00:30:32,708 So the main screen in our tool is a realtime dashboard. Use it to track again metrics, play 244 00:30:37,250 --> 00:30:42,708 cards, and predict the cards when you open and join your game. So the first box on top of 245 00:30:42,708 --> 00:30:48,708 the game metrics. So mana advantage is difference between how much mana you spend and how 246 00:30:51,958 --> 00:30:57,958 much mana you open and spend, At the page it is the difference between how many cards you drew 247 00:31:04,000 --> 00:31:09,917 and how many cards you open and drew. And the other advantage is the difference between how many 248 00:31:09,917 --> 00:31:15,875 cards you have in hand and how many cards you're opponent has in hand. So this metrics appears 249 00:31:15,875 --> 00:31:21,458 in green. If you have the advantage. And in orange if the advantage is for your opponent. 250 00:31:21,458 --> 00:31:27,458 In our study we found that those metrics are the most predictive of the game outcome. So we won't 251 00:31:29,500 --> 00:31:35,500 go into details today due to lack of time, but we will do a blog post later about it. 252 00:31:38,833 --> 00:31:44,833 Metrics you can see your deck. So you can see how many card of each type you have in your deck 253 00:31:55,958 --> 00:32:01,958 in the two columns. Two for total. Which one of them are on the Board in green. And P for 254 00:32:05,167 --> 00:32:07,167 played in red in the G Column. So below your deck there is a box that shows what cards your 255 00:32:07,167 --> 00:32:09,167 opponent played. Every time your opponent plays a card, it will appear in this box. Same with 256 00:32:09,167 --> 00:32:11,167 total card in your deck, T for Total in Column and played card in the P Column for played and 257 00:32:11,167 --> 00:32:13,167 how many are dead in the two columns, D for dead. So below your deck there is a third box 258 00:32:13,167 --> 00:32:15,167 that shows what cards your opponent played, overtime your opponent plays a card it will 259 00:32:15,167 --> 00:32:18,042 appear in this box. Same with the total card in the T column and the dead card in the P 260 00:32:18,042 --> 00:32:25,583 column and dead card in the T column. The last is the final box which will show you 261 00:32:25,583 --> 00:32:32,250 prediction of which card your opponent is going to play based on the previous cards he's 262 00:32:32,250 --> 00:32:39,792 played. So how did we manage to get the game data? We could use packet sniffing meeting to get 263 00:32:39,792 --> 00:32:46,458 the game data. It gives you the best data which is a violation of bus ops of service so we 264 00:32:46,458 --> 00:32:52,458 didn't use it. We could use OCR for good recognitions so it gives you a good data. But it 265 00:32:55,167 --> 00:33:01,167 costs a lot of CPUs and is not very reliable. So we ruled it out. So we ended up using the 266 00:33:04,042 --> 00:33:08,333 Debug log. So you can put your game in debit mode. It is a simple method to get awesome 267 00:33:08,333 --> 00:33:14,333 data. But it has some limitations. Like game data you can see your opponent, play and 268 00:33:17,458 --> 00:33:23,458 rank or which card attack which card and there's updates. So (inaudible) system as good as 269 00:33:27,542 --> 00:33:33,542 the one in (inaudible). So now you will see it in action in a short video. So this is the left 270 00:33:40,792 --> 00:33:46,792 side of the game. I am playing against him. So I show my card and you will see he starts with 271 00:33:53,708 --> 00:34:01,208 an extra card in his hand because he has to draw and that advantage. I am picking up a 272 00:34:01,208 --> 00:34:05,917 card. So we have the same number of cards as you can see on the dashboard. There's no more 273 00:34:05,917 --> 00:34:11,917 advantage for Elie. Now I'm playing Argent Squire. So you can see the card will appear in 274 00:34:16,583 --> 00:34:22,583 green in my deck. And I have spent one mana point. Now as the game evolves, the changes and 275 00:34:26,958 --> 00:34:34,208 the prediction appears at the bottom. You can collect your data to get more room for your 276 00:34:34,208 --> 00:34:40,208 (inaudible). And now I'm going to play advisory. And let's get a closer look. In the 277 00:34:42,708 --> 00:34:48,708 prediction. So yes it's work. (Applause) He tries to kill me with (inaudible). (Laughter) It 278 00:34:58,042 --> 00:35:04,042 saves me. In addition to the (inaudible) you can also see the (inaudible) in the screen. It 279 00:35:14,000 --> 00:35:20,000 allows you to see what happened turn by turn during the game. So our tool will be available next 280 00:35:24,625 --> 00:35:29,625 week on github. So we currently need help with how to improve points using OCR, currently 281 00:35:29,625 --> 00:35:35,625 using text file. Need someone to display the game history, macquest, the Windows packaging 282 00:35:39,250 --> 00:35:45,250 and (inaudible). If you want more info don't be afraid to talk to us after the 283 00:35:50,708 --> 00:35:58,208 presentation. Thanks. Back to you now. (Applause) >> All right. Before you get all your 284 00:35:58,208 --> 00:36:05,875 hopes too high, and tell you about how black magic is done. Just a word of disclaimer. 285 00:36:05,875 --> 00:36:10,958 Because Naxramas has been released (inaudible) so some shifting, the prediction are not 286 00:36:10,958 --> 00:36:18,542 accurate. As I said we don't have access to a lot of games. So it takes us awhile to build a 287 00:36:18,542 --> 00:36:25,458 model, so expect it to not to perform well for the next few weeks. That being said, it will 288 00:36:25,458 --> 00:36:31,625 catch up as soon as the number of cards has been released and tabulated. Probably next season. 289 00:36:31,625 --> 00:36:37,792 Which is August. End of August. It's very simple. We model card affinity which is which card 290 00:36:37,792 --> 00:36:42,917 plays with each other then we have an evaluation function which will return one of the 291 00:36:42,917 --> 00:36:49,917 most affinity to be played based on previous cards played by your opponent. Then we have a tool. 292 00:36:49,917 --> 00:36:55,917 The tool goes through a bunch of replay. Then learn from those played (inaudible). Then we have 293 00:36:58,167 --> 00:37:04,208 this tool in the game which has the algorithm and shows the card that has been played and tells 294 00:37:04,208 --> 00:37:11,042 me the most likely card to be played. That's basically what it looks like. We're going to see 295 00:37:11,042 --> 00:37:17,500 each and that will be the last part of the talk. As I said, Hearthstone have about 296 00:37:17,500 --> 00:37:23,667 500 yards. If we were to look at all the card combinations it would be almost impossible. We 297 00:37:23,667 --> 00:37:29,667 would have an impossible number of combinations. So we expose the fact that in practice cards 298 00:37:32,542 --> 00:37:38,167 really work well together and some cards do not work well together. You have the combo and 299 00:37:38,167 --> 00:37:43,333 the combo is (inaudible) plus force of nature which is one. It's likely you have the other. 300 00:37:43,333 --> 00:37:49,333 On the other hand, you do not have force of nature. Does it make any sense this is not what 301 00:37:49,333 --> 00:37:55,333 you need to model? We model after things like this. We use simple system, you can see which 302 00:37:57,375 --> 00:38:02,958 is called end run. Here is the simple versions which is called bigrams which is modeling pair 303 00:38:02,958 --> 00:38:08,208 cards. What we look at is we look at the replay as the sequence of cards which has been 304 00:38:08,208 --> 00:38:13,500 played by all opponents regardless of the turn and say the (inaudible) has been played 305 00:38:13,500 --> 00:38:19,542 then the day played the task master. That's one bigram. We recall the infinity between the 306 00:38:19,542 --> 00:38:24,875 two. We say if you played the armor with me then you are likely to play the task master. 307 00:38:24,875 --> 00:38:30,500 We look at second part of the stream, well the task master is followed by accolades of pain so 308 00:38:30,500 --> 00:38:36,375 we call there is an affinity between those two cards. That being said we know the cards are 309 00:38:36,375 --> 00:38:42,375 random. Right. You get one card random so to model that we use what we call unordered engram. 310 00:38:44,750 --> 00:38:50,750 Where we say (inaudible). If you play sometimes armor (inaudible) later you are likely to play 311 00:39:01,000 --> 00:39:07,000 task master. You are likely to play (inaudible). We also try (inaudible). Turns out the best 312 00:39:09,208 --> 00:39:15,208 model is in this one which is (inaudible). How do we value the cards? Very simple again. Daily 313 00:39:18,625 --> 00:39:24,625 poison and shift which are two cards. Then we say what is the affinity of those cards? For 314 00:39:28,042 --> 00:39:32,583 daily poison we know that that Fan of Knight and then blade 250 times. So we look at those. For 315 00:39:32,583 --> 00:39:38,583 sure we know that Fairy has been 400 times and you played (inaudible). So we combine them 316 00:39:45,833 --> 00:39:52,500 and again very simple (inaudible). We say how many times those appear you get the 317 00:39:52,500 --> 00:39:59,917 ranking. The ranking is on top because it's 250 plus 400 one followed by the 500. And then 318 00:39:59,917 --> 00:40:04,792 you put the card wherever you want and say this is my separation because I only want 319 00:40:04,792 --> 00:40:10,792 two. That's how it works. It turns out more complicated it won't work. This one works 320 00:40:14,833 --> 00:40:20,417 really well. How did we do? We took 50,000 replays and we did by class because each card has 321 00:40:20,417 --> 00:40:24,625 some unique cards and we did one track. And we run the code, first we write the code then we 322 00:40:24,625 --> 00:40:30,625 run the code. Then we ran. Actually the algorithm basically (inaudible) was in less than 323 00:40:38,958 --> 00:40:44,958 three minutes. Then victory. I was actually shocked at how good the thing was. By turn three, 324 00:40:49,042 --> 00:40:53,792 the highest prediction had a 97 percent chance to be played. Which mean that's out of 100 325 00:40:53,792 --> 00:41:00,500 games, the first prediction returned after three will be played. Sometime in the future 326 00:41:00,500 --> 00:41:06,542 we don't know if it is the next card but it will be played. If you want to look at it deeper, 327 00:41:06,542 --> 00:41:12,000 this is a curve of the average prediction of the algorithm for ten predictions, turn by turn. 328 00:41:12,000 --> 00:41:16,542 You can see actually why. Because you get more and more information. The more cards that 329 00:41:16,542 --> 00:41:23,792 have been played the more we can look at the affinity so the accuracy increased and then it 330 00:41:23,792 --> 00:41:27,917 starts to decrease after turn eight because there's less cards in the deck of your opponent. So 331 00:41:27,917 --> 00:41:35,833 the balance is somewhat between times four and times eight. If you look at the ranking 332 00:41:35,833 --> 00:41:41,833 functions. The ranking functions do work. The green represents our best prediction. The orange 333 00:41:44,792 --> 00:41:51,458 represents our lowest prediction which is number ten. You can clearly see that the best one 334 00:41:51,458 --> 00:41:58,250 actually extremely good up in the high 90s starting in at three whereas the lowest one is 335 00:41:58,250 --> 00:42:02,375 barely above 20. And they are converging because the algorithm makes less and less mistakes but 336 00:42:02,375 --> 00:42:08,375 there is also less and less room for error. So the last I wanted to tell you guys hindsight we 337 00:42:11,833 --> 00:42:17,083 should have two hours and 45 minutes. We didn't know where we were going when we applied 338 00:42:17,083 --> 00:42:23,167 for the talk. So we wanted to tell you about predicting the outcome. We also are looking 339 00:42:23,167 --> 00:42:29,167 into optimizing that deck for mana. Because we know mana is the key factor to win. And by 340 00:42:31,917 --> 00:42:39,167 popular request we're looking at proper requests and comparing deck of time. Why is winning 341 00:42:39,167 --> 00:42:46,333 versus control, how it's work. What are the parameters and stuff. I think we are looking 342 00:42:46,333 --> 00:42:52,333 forward to do is share ideas of things you would like us to do. We'd like to finish by giving a 343 00:42:55,542 --> 00:43:01,667 shout out to a lot of people who gave us feedback. We love to do it! We read comment that's 344 00:43:01,667 --> 00:43:09,250 people post to us. It's really important to help us get better. But that being said, big thank 345 00:43:09,250 --> 00:43:14,583 you to you people. I would like to thank Neal and Zac which spent a lot of time helping us 346 00:43:14,583 --> 00:43:21,125 prepare and gave us inside with feedback. And our anonymous friend who gives us replays. 347 00:43:21,125 --> 00:43:27,125 Thanks a lot. (Applause)