Final Position: #11
This game is amazing... No bad thing to talk about, I loved it.
Great job @[LOCM]aCat and @radekmie
- No Bugs
- Clear Rules and Statements (I didn't need to read the referee to understand things)
- Very good visual interface
- No complicated phisics
- The cards are balanced. At any card games, there are more powerful card than another, it make the choices more important. And card power is subjective, I think that Ward is better than Lethal in general.
- The red side advantage is not a problem, since we have mirror match with same seed.
Wood to Bronze
I always try to pass wood leagues ASAP. My strategy was get the lowest card at the draft and always summon and hit face (or guard), without any kind of simulation or evaluation, just do it...
First, I got the card list, and set a score for each card, manually. I play Hearsthone since its launch. So, with my experience I could build a decent card score list, and fit it to a mana curve.
I was the #1 for some days during bronze, because my draft was good at that time, and I had a decent eval function.
Here my problem started, a lot of people was building better AI than me. My manual tunning was not working very well.
I noticed that my simulation strategy was not good, so I change my simulation to a Monte Carlo if the command list is too big. If not, I eval all possible moves.
As my AI was not improving with manual changes, I tried to build a formula to score the cards at draft, and then auto evaluate all my magic number.
At this moment I had 95 magic number:
- 31 to evaluate the card
- 19 to evaluate the mana curve adaptation
- 45 to evaluate the board
I rent some server to play against myself thousands of times, with a genetic algo, to find the appropriate magic number.
Such a waste of time and money, I spend $30 in servers to try to eval this number, but it is too many number, and the result do not improve my gameplay. But I still got legend with this algo...
At this time, I had 2 codes, one for red side, and another for blue side, and all magic numbers was different for each side. But, at the end, I keep only the draft score different for each side.
Time to rebuild.
Mana curve adaptation was not working, so I removed it.
I corrected a bug that spend blue cards on the opponent face. Blue card only go face for lethal damage.
The formula to score the card at draft was not working, so I back to score it manually, I build a script to download all games from a player, and try to identify the pick priority using a true skill algo, and others stuffs. I started getting @MSmits draft priority, and then, I got the @euler draft priority, that works better for my eval function.
My eval function was very, very, very complex, and it was very confusing...
At this time, @blasterpoard wrote his eval function at the chat, without the magic number:
- HP = defence + (hasWard ? X1)
- DMG = max(attack, (hasLethal, X2)
- SCORE = X3 * HP + X4 * DMG + X5 * sqrt(HP*DMG)
Time to back to my genetic algorithm, I rewrite my eval, and rent more servers to find good number for this 5 parameters... And I found it.
All of this was at early days at the legend league, during the last five days, I was watching games, and tunning it manually, and then, I realize that top player have some kind of dynamic score for draft... So these days I was looking for a way to add this kind of behavior, and I did it, not trying to adapt to a mana curve, but trying to avoid extremes behaviors:
- If I have more than 4 cards that cost 7 or more mana, reduce 10% of the score for big cards
- If I have more than 8 spells, reduce 10% of the spells score
- If I have more than 12 minions that cost 2 or less, reduce 10% of score
- Each time that I pick a card, reduce 1% of this card score
- If there is too many lethals, increase the score of ward cards
- If I have less than 2 cards with draw, increase the score, if I have more than 4 decrease
- And some others smaller stuffs
At the final day, I had a 12 magic numbers at my eval function, so, I run the final GA to find better numbers, and after 100k games, I got it... I jump from #25 to #10 after it this tunning...
Curious things about my code:
- I did 700 submitions
- I eval my life as a negative score, because when you do damage to yourself you can buy more cards, and cards is better than life, if you will not die.
- If enemy creatures that left at the board deal all damage to my face, and the result is a final health of 4 or less, I apply a negative score, because there is a lot of cards that can do 4 damage to face, so, I have a great chance to be dead next turn...
- I have different patterns to evaluate the cards at my hand, at my board and at enemy board
- I play MC search for 70% of the time for my board moves, and the other 30% of the time, I play my best 5 scores as the enemy. For this, I keep the best score that clear the enemy board, and the others 3 best scores that do not is equal...
- When I implemented the runes behavior to check if I have lethal damage, my rank improved a lot. I track the opponent board, to check if he play some card that gives draw, and how many cards he will draw after my attacks, so, I can identify if he will be out of cards... At high rank, you can't lose a lethal damage.
What do not work for me
- Try to fit a mana curve
- A formula to evaluate the card at the draft
- A score to evaluate the card at the draft (For the draft, I use card order only)
- Different evaluation functions for each side (Red and Blue)
- Give my cards to opponent to eval the opponent turn
- Deep two evaluation (My java code can simulate only 10k actions, so, I even have performance to do it)
What I think that can be improved
- Draft: There is a lot of things that can be done. Mainly based on statistics
- Hard Coded some situations that eval think that is better, but it is not... Sometimes my AI exchange a lethal minion at a ward. Or buff a minion that will die to a lethal anyway...
- Have different eval function for each stage at the game (early, mid or late)
- Identify when you will be out of cards faster than your opponent and play more agressive
- Identify when your opponent will be out of cards faster than you, so, you can play more passive
- Deep 2 simulation... You should play different if you have green/red cards at your hand to next turn. For example, if you have some greens, it is important that you have more minions at board to buff one at next turn... If you dont have, you can play only one fat minion
- Predict enemy spells and what is the impact of each one...
This game is very addictive, and this T-Shirt cost me $100 dollars, the most expensive T-Shirt of my life!