HearthSim/SabberStone

Using Sabberstone for an UI project/bachelor's work...

Closed this issue · 2 comments

[I know that message like that probably doesn't belong here, but I wrote you an email, and I am not sure whether it arrived...]

Hi,
I am a student of Software engineering at Charles University in Prague and I am working on a software project themed on AI for Hearthstone. My goal is to develop some AIs, let them play against each other, and then evaluate which one are the "best". There has been a similar work at my school that used Fireplace (https://is.cuni.cz/webapps/zzp/detail/177312/23634918/?lang=en - it's written in Slovakian though :)), but since Fireplace seems really outdated now, I decided to try your simulator.

Is there any module in Sabberstone (or, are you planning to write one), where you can evaluate whole number of games with given decks (and strategies, maybe)? I know that there is a turn-based GUI, but I will probably need something for simulating of a big number of games automatically.
I can even implement something like that based on your project myself, but I haven't got inside Sabberstone that much yet... I would look on wiki, but there is not much info yet :)

Could you also please tell me more about API of SabberstoneCore, if needed?

Anyway, thanks for your reply and keep up the good work!

Hey! I'm not the developer of Sabberstone (That's @darkfriend77), so I dont know much about the inner workings, but i've been working with @darkfriend77 to connect SabberStone with Stove, so I think I can answer most of your questions about how to interface with it.

If you hit me up on Discord in HearthSim we can talk. I'm online most of the time (and from Belgium so same time zone).

But in short, if you take a look at Program.RandomGames() in SabberStoneCoreAI, that tells most of the story of how to interface with the simulator. The core game loop exists out of the simulator giving a list of all possible options the current player can do, using game.CurrentPlayer.Options().
These options are all specialisations of PlayerTask, and most are fairly explanatory. You have a ChooseTask for mulligan and discover, an EndTurnTask, A HeroAttackTask,..

It's also worth of note that each task in that list represents a single action, and not a group of actions. By this I mean that if you have a minion that has 4 possible targets to attack, there will be 4 seperate MinionAttackTasks in that list. Same goes for the mulligan, there isn't 1 ChooseTask, but there is one for each possible combinations of cards to mulligan.

Hi, thanks for your super-fast reply... The Program.RandomGames() in SabberStoneCoreAI is exactly what I needed for the beginning, thanks :)
I am on Discord as well, so thanks again, I will definitely contact you or darkfriend77 for some support when needed!