In order to balance the game I am working on, I am planning to use a somewhat similar automated system (although its good to note, you can get a very interesting statistical analysis by ignoring the AI and just playing random cards/skills/whatever you are testing against each other). This of course works best if you are selecting two discrete subsets of one superset and playing with card variance (random decks, control decks with only one different card between them, etc).
Off topic: I've played Heathstone enough to appreciate it. It is a good game (I'd give it maybe 4.5 stars), but not perfect; my critiques:
- Chance of winning is based largely on luck - the same deck drawn two different ways can be almost a guaranteed win/fail, even if it is balanced.
- Card starvation is way too common of a problem. Could not count how many times I ended up exhausting the deck, even with plenty of cards to counter it. When you only have one card to play at a time, the game becomes rather dull.
- Classing leads to a certain lack of permutation and surprise - most decks have a few basic strategies.
- Cards outside of the class decks tend to be fairly generic feeling for the most part. Many cards feel a bit mundane compared to other CCGs.
- Free to play model hurts the game a bit - I don't mind paying money, but many aspects of the game feel too grindy (in order to get you to pay money).
Interesting criticisms, but I'd have to argue against most of your points here.
- You're right: card games inherently involve luck. But games like Hearthstone and MTG let you control your deck so that less luck is involved. And I would argue Hearthstone actually has the better model -- there's no way to get screwed out of mana or flooded with mana like in MTG.
- Card starvation exists, but is typically a problem with deck construction or gameplay rather than the game itself. Two ways about the problem in deck construction: more card draw, and bigger cards. Playing is more complicated, but consider keeping your options open rather than playing things immediately, since you can gain card advantage if you can 2-for-1. Consider the HandLock deck in which a warlock draws a huge hand to abuse abilities involving hand size. Rarely will their games go past 30 cards, and yet their hand is filled with options all the time.
- You are right, each class has but one or two competitive deck styles and are predictable. But knowing the meta is part of any card game, and I think as Hearthstone grows this will be better. Coming from MTG I found classes brought quite a variety of play styles (at least 9!), if somewhat unbalanced and artificial.
- Again you are right. This issue arises as a necessary consequence of classes. Blizzard has actively done this for balance. Cards outside class decks need to be generic or else they would make some decks too powerful in combos. For example I might want more spell power cards for my Druid deck but that would make Mage control decks unbelievably strong.
- This is a subjective point and your view is valid. IMHO their quest system is a pretty versatile option of getting gold. If you want you can play 2 games a day and earn 40 gold, or you can play 10 and earn 100, depending on the quest.
Good points :) The only thing I would make a note on is luck in card games: Some card games involve a lot more luck than others. One of my favorite iOS games, Orions, gives you a set of random cards (assuming you do a random match), and from there you play whatever cards you want (your full deck, basically, which is a random subset of about half the cards in the game). Of course, you have to build up enough mana to play a given card, and many increases by 1 each turn on its own. Its possible to be given a crappy deck, but even those matches you can play out more deterministically because you know what you've got to work with; also this is part of the fun - finding a creative path to victory with a deck that you are not used to (building decks can be fun in its own right, but I (personally) prefer being given a random set of cards - this makes each playthrough more unique and exciting).
In shorter words, there are a few types of luck you could work with: luck of the deck, luck of the draw, etc.
I agree with most of your comments, but I really think Heartstone is Free to Play done right (not to the extent of DOTA2 or Path of Exile, but almost).
After more than a hundred of hours on it, to date I haven't spent a dime of real money (I'll happily buy the single player expansion, though).
Just do daily quests in Ranking and spend the coins on Arena,which doesn’t depend at all on real money spent, and you'll get a lot of mileage (also considering that for an Arena run you get a pack of cards, so you'll get better at Ranking).
BTW, to the OP: thanks for ruining my plans for the weekend :)
The #1 reason I stopped playing the game is because I would do fairly well at the game, get matched with stronger opponents, and subsequently lose because I dont even have the full set of Mage cards while my opponent is pulling legendaries. That kind of a game just isnt fun for me and it happens over and over.
You get matched against people who are winning about as much as you are. The system looks at nothing else. This is the best and really only way to do matchmaking.
If you were kept separate from the rest of the decks how would that work?
(FWIW, my best deck doesn't is the one that doesn't have any legendaries in it anyway, and it got as high as rank 2, 4 stars.)
If you were isolated from decks with legendaries and had a seperate ladder, h
It's definitely a bit of an issue, but less of one than people tend to believe. There are many decks that people bring to Legend rank that cost very little in terms of dust.
To me Hearthstone didn't feel grindy at all compared to almost any other top IAP game available in App Store. I think Hearthstone hit a pretty good balance for freemium IAP model, I never felt that I had to pay to be able to play, unlike in most of the other freemium IAP games.
I agree that classing causes a bit too predicable deck strategies, MtG felt more balanced on this aspect.
What Hearthstone got right was the flow: they had to remove instants and introduce secrets and taunts, but with that they achieved an excellent flow for a turn-based card game.
I suspect that MtG's big advantage here is having a ton more cards. Hearthstone's meta is pretty straightforward because there are only a handful of cards to work with right now, but the upcoming Naxxramus mini-expansion should make things more interesting, and I'm looking forward to seeing what'll happen when they finally produce a full expansion.
How do you define straightforward? Magic has a lot of cards, but formats restrict* the pool of cards that can be used, and within each format's legal cards, the majority of them are unplayable.
*(in the colloquial sense of the word restrict, except in vintage (and trivially in commander/EDH/Australian Highlander/Chromandercore), where cards are restricted in the magic sense of the words restrict)
From what I understand though is magic still ton of cards compared to HS, HS has ~ 320, isn't that much smaller than Magic, even with restrictions? I think the meta will be a lot more interesting once they expand the pool, HS is still a very young game.
Are you working on a CCG? I'd be interested in seeing how an automated system's results would compare to the MtG model of balancing, which sounds pretty intense.
From what I understand, design makes and tests sets at a flat power level, development adjusts the power level and creates more cards, and future future league plays the new cards for months/years and makes more adjustments to balance before the cards go to print.
The game I am working on is called Voxel Quest (voxelquest.com). It is a roguelike, not a CCG, but many of the mechanics are inspired by CCG mechanics (Card Hunter is one other game that has taken CCG mechanics outside of its normal environment, although what I'm doing quite a bit different).
FYI - the way your comment is formatted caused text to be hidden in a horizontal scroll bar which wasn't visible on Chrome on OS X - took me a good minute to figure out what was going on.
Yep, I'm up to about 100 cards at this time, working on the basic cards first. Besides the cards, there needs to be more work on the AI modeling... currently, it won't handle any card with elements of randomness to it. I think I have an idea on how to treat it (without the AI cheating), so that implementation is coming up... soon.
Are you implementing each card by hand? I was going to make something like this and was just going to regex match all of the cards (from HearthPwn). It seemed like there were few enough variations to make something like that possible.
A lot of the cards are more or less automatically generated in the sense that they don't actually extend any functionality of the parent class. Variations in the special effects ("text" effects) are big enough that for those, I find implementing them one by one much easier.
I did this same thing in Clojure a while back as a way to introduce myself to the language. As you can see in the card definitions from that [1], I arrived at something close to your proposed idiom. All spells and battlecries are functions of the game state that usually end up being described as the composition of basic actions in hearthstone, e.g. (target [:type]) (damage-target n).
If I may, I would suggest thinking about things in a way very similar to how Magic: The Gathering does, which is as a "state-based effect" or "triggered effect". This models very well into programming as event handlers watching state-changes and acting appropriately.
For instance, the most common state-based effect in MTG is death from damage. This is perhaps even easier to model in Hearthstone, as damage is persistent. Simply register event handlers on minions which get called whenever the health of a minion changes; if it's <= 0, trigger death.
Death will then cause any "triggered effects" to fire, such as a deathrattle tigger. This is also easy; just a listener on the death event.
The event/listener paradigm is an interesting way of going about this, and I considered doing it that way at the beginning. But, after some thinking and experimenting, I found the "card use -> modify BoardState" way more straight forward, especially since it leads to a nice recursive tree structure for the game AI engine. The primary goal of this simulator is to do statistical analysis on deck performance, so I think it's a decent way of going about it. On the other hand, if my goal were to create an actual playable game clone, I probably would have taken the event/listener approach.
Some examples from personal experience:
Ongoing effects last until a player could act, not until the minion causing them leaves the battlefield. So if you trade your 2/3 harvest golem for your opponent's 6/2 stormwind commander, they both die, you get a 2/1 damaged golem, and your knife juggler throws a knife at your opponent's wisp, the wisp will take 1 damage, go down to 2/1, then lose the buff from stormwind commander (who died a long time ago!) and go down to 1/1.
If you have a young priestess and a 1/1 imp master, your imp master can kill itself and your young priestess can target your dead imp master with her buff. This will not bring the imp master back to life, you just miss out on your buff for the turn.
I was confused for a moment on what you meant, but I believe you were referring to the 'Stormwind Champion'.
In the future Naxx release, they will implement a queue to keep track of the timestamp that each creature enters the board. All effect that triggers/depletes from a 'mass death' will take place in the order of each card's timestamp, earliest first.
So for the 2nd example, it depends on which creature came into play first. If Young Priestess, then Imp Master doesn't lose health and you get a 1/1 imp. If Imp Master first, then Imp is spawned and gets buffed but the master dies.
I am not sure if this will fix young priestess thing - the issue is that the young priestess chooses its target before the imp master uses its ability, but uses its ability after the imp master does.
Most definitely... not. Well, since Harvest Golem is not yet implemented, the subtle nuances are beyond the scope anyways. It's something I will have to go through to get it right in due course.
Having said that, the focus (of my curiosity) is in AI modeling at a broader (higher?) level, so I think will be concentrating on that aspect for now.
HearthSim is a generic Hearthstone game simulator and AI, designed to run large numbers of simulated AI vs AI games in order to test and understand the values of various game mechanics and cards.
Then I read an article about The Coin on OP's blog: http://buddypanda.com/?p=65 and I don't think that the simulator is that useful. Maybe I'm too dumb to understand this, but my intuitive idea is that a card like The Coin gives you various advantages and no disadvantages, since it is an extra card that comes for free and gives you more flexibility. How come then, that the simulator says that the player actually wins more games without The Coin?
Hearthstone isn't mainly about random encounters between AI opponents, but to gain advantage in material over your opponent over the course of the game. Sometimes, 1hp, 1 card, 1 round is sufficient to decide over victory or defeat. If the simulator neglects hero abilities (as in The Coin article), my guess would be that it's not too accurate.
However, I thought that a simulator for Hearthstone would be a great idea. I think you're onto something here, but I'd like to see a few more use cases that match my intuition I gained from playing hundreds of games of Hearthstone.
> How come then, that the simulator says that the player actually wins more games without The Coin?
This isn't what the results say. The win rate for the player who goes first ("Player 0") rose from 41% to 61% when the player who goes second ("Player 1") was not given The Coin.
This is summarized in the text:
> The Coin basically makes what used to be a first player advantage into a first player disadvantage. Not bad for a single card!
As far as I'm aware, official stats from Blizzard is that the player going first is wins a higher % of the time than going second, despite the coin. I'll try and find the source.
I appreciate your point about coin being stronger in some decks than others - that doesn't change the fact that across _all_ of the games of hearthstone being played, if you go first you're more likely to win than if you go second.
And don't forget the further upside of going second, you get an extra card in your starting hand. I really do feel like going second is far superior to going first right now.
> Maybe I'm too dumb to understand this, but my intuitive idea is that a card like The Coin gives you various advantages and no disadvantages, since it is an extra card that comes for free and gives you more flexibility.
The Coin does indeed give you advantages with no downside. However, the reason why you get the coin has to do with the mechanics of Hearthstone. In the case where The Coin didn't exist, you would be at a severe disadvantage if you didn't go first.
In Hearthstone, since you can generally control where your minions attack, going first gives you tempo. If your opponent didn't have the coin, as the player going first you could permanently maintain your tempo and win with regularity (depending on what cards you draw). In card games it is important that tempo be something that can change in the course of the game in order to make things more fair.
IMO the Coin is a tricky thing. While you can argue that it balances the two player, the second player has the additional choice of when to use the Coin.
The first player has the advantage of going first. That is a given advantage, with no choice involved. It is harder to "waste" that advantage. The Coin, on the other hand, is much more linked to choice (when to use) and therefore, easily wasted. It is also an additional "thing" for the second player to think about when playing, while the first player doesn't have this burden.
Player 1 gets the coin, but the table is listing Player 0's win percentage. So when you give the coin to Player 1, Player 0's win percentage goes down. So yes, the coin is a massive advantage. In other words, the player wins more 20% games when the opponent doesn't get the coin, all else being equal.
If you want some real-world stats about going first vs. second, try the stats from Arena Mastery[1], which more or less match what Bilzzard has said anecdotally: with the second player getting the coin, going first is still a slight advantage.
In that article, he shows that giving the coin to p1 (the 2nd player, it's 0-based) gives a /disadvantage/ to p0 (the 1st player), so it is actually beneficial for the player who gets the coin.
That might be true. The advantage that The Coin gives you is highly dependent on the deck that you have. In that particular deck that I used in the simulations, the advantage is rather large. For a deck consisting of stronger (higher mana) cards, the advantage is much smaller. I think it's basically due to the fact that a 2-mana drop vs 1-mana drop is much stronger than a 7-mana drop vs a 6-mana drop.
Yes, sorry I was referring to his numbers in the simulator rather than in the actual game.
In the game it depends on the deck - for some decks, it's more useful than others, either due to particular mana curves, or to triggered effects (the coin counts as a spell, so can trigger cards like Gadgetzan Auctioneer or Wild Pyromancer)
Adding a 'pretty good' card to a deck means you might draw that card when you need a critical one. Even though 'The Coin' is good, it may not work (as well) with the rest of the cards. As you say, 1 card, 1 round can decide the game.
While this is true in the general case, The Coin is an extra card added to your hand at the beginning of the game and is never a part of your deck. It is purely beneficial.
It is. Additionally the person who gets the Coin also gets an extra card in their starting hand. You can "mulligan" this card, or swap it out of your starting hand for another draw. Although this might seem relatively trivial, having an extra chance to mulligan a card increases your chances significantly of getting a card that you want in a specific matchup.
Just curious: have you watched any of these games to see what kinds of mistakes the AI makes for various settings of the parameters in your scoring functions?
Also, I'd be interested in doing offline learning. For example, if you have some formal way to record the actions taken in a game, you could ask pro players to submit their games. Of course, this would require Blizzard to allow a replay mechanism like it does for starcraft. But it would make the AI design process much more interesting than exploring game trees (without perfect information) or greedily picking the best single move.
I have informally looked at what the AI does. Turns out, as far as I can see, the AI does a pretty good job... with a BIG CAVEAT. The decks that I have used so far consist solely of minions and one other special card, so there really isn't any "mistakes" the AI can make. The decks are just so simplistic at this point. As more interesting cards are implemented, I'm sure there will be situations where the AI will make interesting mistakes that we can learn from. It is something I'm really looking forward to exploring.
There's another pretty good one that I found a few days ago on github, I don't think it's the same as the one you're talking about, but it seems to be more complete than the OP's.
Seeing as it doesn't reproduce the functionality of the Hearthstone client or server in its entirety, I think it falls in the same category as fansites such as Hearthpwn. Blizzard could probably pursue a successful takedown, but I can't see a good reason to put resources there when there are things like WoW private servers that pose a legitimate business threat.
I think it's not a problem... This is not a playable clone of the game. It's purely for deck analysis, kind of like how SimulationCraft is a DPS simulation and analysis tool for World of Warcraft.
Simulation speed is of primary concern here (though javascript isn't too shabby)! I actually have a C++ version too, but I thought Java might be more accessible to more people...
I completely understand the need for speed, which is why I'm happy you picked something like Java. It's just with the popularity of Javascript on HN, I was worried that it would be yet another JS project.
HearthSim is designed purely as a AI vs AI game simulation tool. It's not a "playable" Hearthstone clone. In the examples on my blog, I usually run 40,000 simulated games per data point, and each set of 40,000 games usually takes a few hours to run on a relatively modern PC.
Off topic: I've played Heathstone enough to appreciate it. It is a good game (I'd give it maybe 4.5 stars), but not perfect; my critiques:
- Chance of winning is based largely on luck - the same deck drawn two different ways can be almost a guaranteed win/fail, even if it is balanced.
- Card starvation is way too common of a problem. Could not count how many times I ended up exhausting the deck, even with plenty of cards to counter it. When you only have one card to play at a time, the game becomes rather dull.
- Classing leads to a certain lack of permutation and surprise - most decks have a few basic strategies.
- Cards outside of the class decks tend to be fairly generic feeling for the most part. Many cards feel a bit mundane compared to other CCGs.
- Free to play model hurts the game a bit - I don't mind paying money, but many aspects of the game feel too grindy (in order to get you to pay money).