Blog

Learn About Our Meetup

4500+ Members

[P] Using Machine Learning to teach a bot how to win in Hearthstone Battlegrounds.

Hello everyone,

I’m really bored so I decided to make a Hearthstone Battlegrounds simulator in order to teach a bot the best strategies to win a game.

For those of you who don’t know, this game is an incomplete information RNG-based turn-based game where 8 players recruit minions to fight each other automatically.

On the recruiting phase there is a limited set of commands a player can do:

– Roll -> costs 1 gold and refreshes the shop

– Buy -> 3g to buy a minion

– Sell -> Sell a played minion for 1g

– Level Tavern Tier -> pay to get better tier minions

– Play -> play a minion on the board

– Buff -> Same as Play but usually sell the buffer minion right after

– Reorder -> Move a minion to a different position on the board

– Hero power -> Use special hero ability (Only for active abilities)

Of course, it’s a bit more complicated than that cause there are synergies, buffs, triples, etc.. But let’s start slowly.

I currently coded the game and 8 players playing each other. Each player has a “Brain” class that is now very simple: Greed to buy / level and roll last.

The brain is an interface which I inject to each of the players so that I can try different variations of Brains playing each other.

I want to try and write an algorithm that will randomly do a set of commands and “remember” it. after the game ends I want to evaluate the sets that yielded the most points (ie. max damage to the opponent and min damage taken) and save the commands tree so that is can be used in the next games.

Maybe something like a hash of the commands set (Roll -> Buy -> MinionBought -> MinionPlayed -> Level-up etc.) and the score.

The hope is that after many iterations the bot will get smarter and better.

If I talk nonsense it may be because I like expertise on the subject but I really would appreciate all the help and guidance I can get. Cause I have the idea but I don’t know where to begin.

submitted by /u/Diabler
[link] [comments]

Next Meetup

 

Days
:
Hours
:
Minutes
:
Seconds

 

Plug yourself into AI and don't miss a beat

 


Toronto AI is a social and collaborative hub to unite AI innovators of Toronto and surrounding areas. We explore AI technologies in digital art and music, healthcare, marketing, fintech, vr, robotics and more. Toronto AI was founded by Dave MacDonald and Patrick O'Mara.