Small project about how to write a A.I. for Hearthstone using HsProtoSim.
Simple A.I. is using HsProtoSim, which I created for simulation purpose, currently there more less all basic cards implemented and some classics.
I changed my working focus concerning card implementation on the current meta game decks (http://metastats.net/), so it is more uptodate for ai use.
Need more human ressources ... feel free to contact me.
Example:
... create a Game ...
var game = new Game(new GameConfig
{
StartPlayer = 1,
Player1HeroClass = CardClass.SHAMAN,
Player2HeroClass = CardClass.SHAMAN,
FillDecks = true
});
... start ...
game.StartGame();
... play ...
for(var i = 0; i < turns; i++)
{
var options = game.Options(game.CurrentPlayer);
var option = options[rnd.Next(options.Count)];
game.Process(option);
}
Windows:
check-out the project
run Programm.cs
not uploaded right now ... comming soon ... (The test Example is using the Pirate Warrior Deck vs. Shaman Aggro Deck (Season 2017 Jan.))
new GameConfig
{
// if not set it will choose randomly
StartPlayer = 1,
// ... self-explaining
Player1Name = "FitzVonGerald",
// ... self-explaining
Player1HeroClass = CardClass.MAGE,
// add a specific Deck to the player
DeckPlayer1 = new List<Card>()
{
// add the Card "Mirror Image" to the deck
Cards.FromName("Mirror Image"),
},
// ... self-explaining
Player2Name = "RehHausZuckFuchs",
// ... self-explaining
Player2HeroClass = CardClass.MAGE,
DeckPlayer2 = new List<Card>()
{
// add the Card "Frostbolt" to the deck
Cards.FromName("Frostbolt"),
},
// game rule for decks standard and wild
GameRule = FormatType.FT_STANDARD,
// if yes will fill the decks to have at least
// 30 cards matching the game rule set
FillDecks = false,
// if yes will shuffle decks before play
Shuffle = false,
// not implemented right now ...
DrawPool = false,
// work in progress, if a game can split during
// a player move ex. mad bomber or loot hoarder
Splitting = false
}
tbd
- 0.0.1
- Work in progress
darkfriend77 – @RoxOnTox – darkfriend@swissonline.ch
Distributed under the XYZ license. See LICENSE
for more information.
https://github.com/darkfriend77/SimpleAi
... there is a lot more ... but no time need to code ^^
thx to this project which inspired me a lot ... and was a great base of solutions ...