Skip to main content

Blog

Learn About Our Meetup

5000+ Members

MEETUPS

LEARN, CONNECT, SHARE

Join our meetup, learn, connect, share, and get to know your Toronto AI community. 

JOB POSTINGS

INDEED POSTINGS

Browse through the latest deep learning, ai, machine learning postings from Indeed for the GTA.

CONTACT

CONNECT WITH US

Are you looking to sponsor space, be a speaker, or volunteer, feel free to give us a shout.

[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]