Skip to content

darkfriend77/SimpleAi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple A.I.

Small project about how to write a A.I. for Hearthstone using HsProtoSim.

NPM Version Build Status Downloads Stats

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:

  • Playing Maelstrom and Spell definition code

Quick Play

... 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);
            }

Installation

Windows:

check-out the project
run Programm.cs 

Usage example

not uploaded right now ... comming soon ... (The test Example is using the Pirate Warrior Deck vs. Shaman Aggro Deck (Season 2017 Jan.))

Game Configuration

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										
    																		
    
}

A.I

Development setup

tbd

Release History

  • 0.0.1
    • Work in progress

Meta

darkfriend77 – @RoxOnTox[email protected]

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 ...

https://github.com/HearthSim/Brimstone

About

Simple Hearthstone A.I.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages