Show HN: HearthSim, an AI and game simulator for Hearthstone Heroes of Warcraft
github.com
github.com
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).
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.
*(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)
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 :)
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
Offtopic but that reminded me of those decade-old Slashdot posts with the sudden cutoff mid-sentence followed by 'Connection dropped' modem messages.
- 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.
In shorter words, there are a few types of luck you could work with: luck of the deck, luck of the draw, etc.
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.
BTW, if you haven't tried it yet, Hearthstone is a great CCG with a very fair progression system and very good polish/balance.
Curious if you already tried automating it.
So the card that does the damage has to do the removal check for the minions? Talk about duplication of code. Wouldn't something like this be better:
engine.dealDamage(1).to(Category.EnemyMinions);
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.
1. https://github.com/Mischanix/soot/blob/master/src/soot/cards...
Some examples: http://www.reddit.com/r/hearthstone/comments/24tvce/unwritte...
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.
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.
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.
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.
It was much greater before the extra card and coin was added.
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)
> Ben: It's about three percent better to go first over second.
The 51% was mentioned is in a previous Blizzcon QA
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!
User dtech already found the source for me (: -> https://news.ycombinator.com/item?id=8020232
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.
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.
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.
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.
Hopefully I can grok your work and maybe I can contribute!
[1] https://www.defcon.org/html/defcon-22/dc-22-speakers.html#Bu...
Isn't there some kind of copyright or terms-of-service violation involved in publishing this?