• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [Custom Deck] Silverfish AI

    Discussion in 'Archives' started by obtkamer, Jul 11, 2014.

    1. obtkamer

      obtkamer New Member

      Joined:
      May 27, 2014
      Messages:
      261
      Likes Received:
      4
      Trophy Points:
      0
      ... also known as "Ultimate Ai"

      Hi, im Botmaker (reorder the chars in my username ;P) and i present you the (ultimate)
      Silverfish-AI
      (i will use "uai" as a abbreviations in most cases)

      This ai should be able to handle most decks, with an acceptable winrate.

      How it works:
      the ai simulates (almost) every possible combination of actions, which you are able to do in your current turn.
      it gave every simulated board a value, and chooses the moves which leads to this board.

      Download:
      https://github.com/noHero123/silverfish/blob/master/HrtBddy/Silverfish/Silverfish.zip?raw=truee

      or use https://github.com/noHero123/silverfish/trunk/HrtBddy for svn checkout

      Install instructions:
      Load the rar-file and copy the Silverfish-folder into the CustomDecks-folder

      follow this guide:
      http://i.imgur.com/yfhU9kT.png

      If everything works well, you should show the two new custom decks in you dropdown list :

      2014-07-11 08_38_40-EVA (884 726 835) - TeamViewer - Licence gratuite (seulement pour l'utilisat.png

      Then you can choose one of the two behaviors (Rush for rush-decks, Control for board-control decks)
      in your Hearthbuddy.

      Control will focus on clearing the board
      Rush will focus on attacking the enemy directly


      Note : This custom deck works for Hearthbuddy versions >= .82

      Source:
      https://github.com/noHero123/silverfish (the repo after the rewrite)
      https://github.com/noHero123/HRCustomClasses (for Hearthbuddy release, look at HrtBddy folder)

      Thanks to Hankerspace, who helped me to transfer this ai to hearthbuddy (i cant use hearthbuddy :D)

      Howto Report bugs/missbehaviors:
      Got to CustomDecks/Silverfish folder, there should be a folder-named "UltimateLogs", this is the place
      Where the battle-logs are saved (each fight is stored in another logfile (and a start/stop of the bot should also create a new one)),
      Each log has the timestamp of the battle-begin and contains all the data to resimulate your turn, so im able to tweak the ai.
      Please post them whether you report bugs (or i will ignore your bugreports). (but if you are thinking, that you found a hearthbuddy-bug, post the log from your hearthbuddy-window)

      Dont know whether Tracking or Druid-choice-cards are working! please test it, and if you are thinking that the ai did the wrong move please post the log.

      Sincerely
      Botmaker

      update v113.3:
      https://www.thebuddyforum.com/heart...custom-deck-silverfish-ai-28.html#post1667060

      update v112.4
      - some tweaks with aoe-spells
      - some other bugs

      update v111.4
      -some fixed (like better mana handling, give token-minions less value etc, full graveyard in log)

      update v111.3:
      - the use of the external process is turned off atm (next turn calculations are also turned off, to compensate the speedloss)
      - silver.exe is deleted from hrtbuddy-svn-folder + zip
      - some fixes

      update v111:
      - fixed some bugs
      - added Enemy's response to your second turn simulation (default on (because of the next point))
      - added external process (is used at default) will make the calculations more than 10 times faster!
      YOU HAVE TO START IT MANUALLY (just start the Silver.exe in the CustomDecks\Silverfish\Data -folder and DONT CLOSE IT)
      (i cant start external programms with the .cs-versions (atm))

      update alpha 15:
      - fixed bonus for killing minions that spawn other minions on death
      - raised the value of every card from 1 to 5 (fixed the wasting of cards, whether they will buff a minion on your side )
      - will not simulate the second turn, whether the enemy has lethal on that board

      update alpha14:
      - fixed board-comparison (will fix multiple use of the hero-power in one turn and other stuff)

      update alpha13:
      -tweaked multiturn simulation (new default value is 256) and the amount of calculated second turn-boards is halved every recalculation :D

      update alpha12:
      -changed two turn simulation: it will now only simulate the 2. turn of the 500(default) best boards. change the number by editing the .cs file:
      change the number in the line:
      Ai.Instance.setTwoTurnSimulation(false, 500);
      (dont set it to high!!!!, set it to 0 to turn the second turn simulation off)

      update alpha11:
      -fixed shadow word pain
      -fixed traps

      update v110alpha10:
      - rewrote a very big part of the ai

      update v97:
      - should not waste upgrade
      - tweaked soulpriest
      - lethal detection tweaks
      - should not ignore bloodmage anymore
      - tweaked mukla
      - tweaked knifejuggler
      - tweaked placing
      - fixed manacalculations

      update v94:
      - fixed hero-power usage
      - new option in advanced settings:
      set the minimum probability for using the play-around-aoe-spells-feature:
      simulation uses the enemy aoe-spells only, if the probability to have this aoe-spell in hand is higher, than the given border (a value from 0-100) (default 40)
      -fixed placement with 4 minions

      update v93:
      fixed 2 turn simulation

      update v92 (delete the old files):
      - fixed weblord + spectral knight (did this a week ago, but was overwritten due to the new database ;_;)
      - should fix ancestral spirit
      - fixed windfury
      - fixed sylvanas
      - fixed buffing spells (and target nothing)
      - fixed iceblock detection
      - fixed blessing of might
      - fixed discard penalty

      update v91:
      -should work like charme

      update v81:
      -some fixes due to last update
      -very small enemy-turn-sim-speedup
      -will draw cards whether enemy has lethal

      update v80:
      -enemy turn simulation is a lil bit faster
      -fixed stealth-issues
      -little tweak in control-board-evaluation

      update v79:
      -some tweaks for warrior

      update v77:
      - updated _mulligan rules:
      - you will not attack with an sword of justice.
      - warrior should attack first, then armor up
      - should not spawn mobs, that spawn another mobs, whether these "kids" have no place on field
      - fixed return to hand (enemy draws now a card ;D (so ai knows that destroying > return to hand))

      Edit:

      if you want to change the two turn simulation you have to change the number of this line:
      Ai.Instance.setTwoTurnSimulation(false, 256);
      if you change it to
      Ai.Instance.setTwoTurnSimulation(false 0);
      the second turn simulation is turned off.-

      to play around some aoe-spells, change:

      bool playaround = false;
      to
      bool playaround = true;
      (bot might be to carefull)
      (they are only experimantal functions)
       
      Last edited: Oct 21, 2014
      Antediluvian, Endus and pballer like this.
    2. harvest655

      harvest655 Member

      Joined:
      Apr 26, 2014
      Messages:
      98
      Likes Received:
      0
      Trophy Points:
      16
      i will try

      thx u~~

      --------------------------

      Test a few games

      The AI is great judgment

      -----------------------

      Can I use Argent Commander and Fireball

      The remaining four blood enemies

      He chose to cast Leper Gnome with Argent Commander

      Do not use Fireball attack enemy players with the Argent Commander

      Instead, the first attack enemy monster

      ----------------------------------------------

      Sometimes

      Monster can act

      No action
       
      Last edited: Jul 11, 2014
    3. drillepind

      drillepind Member

      Joined:
      Jan 1, 2012
      Messages:
      51
      Likes Received:
      0
      Trophy Points:
      6
      "choose one" option on druids works better, but still sometimes bug out and no action taken resulting in ended turn with the creature not dropped, but farely rare this happens. Also the trades of minions is better, could still be better imo.

      The combo with savage roar and treants still doesn't work, and im still not satisfied when lethal is there there's a 50/50 chance it goes for it
       
    4. mahe4

      mahe4 Member

      Joined:
      May 3, 2010
      Messages:
      138
      Likes Received:
      3
      Trophy Points:
      18
      pretty good AI i have to say.
      a lot better than the standard ai.

      but you wanted posts, to improve your ai.
      the battle was won, but near the end it did a pretty bad trade.

      but thanks for your nicely done work :)
       

      Attached Files:

    5. NiklasNikke

      NiklasNikke New Member

      Joined:
      Jul 15, 2010
      Messages:
      129
      Likes Received:
      1
      Trophy Points:
      0
      I think it's a big improvement over the standard AI. Good job!
       
    6. janusznazir

      janusznazir New Member

      Joined:
      Jun 28, 2014
      Messages:
      108
      Likes Received:
      1
      Trophy Points:
      0
      Its good that you work on hearthbuddy bot too :) I hope you will up to date it daily same as on other bot
       
    7. pballer

      pballer New Member

      Joined:
      Jun 7, 2012
      Messages:
      75
      Likes Received:
      1
      Trophy Points:
      0
      awesome work bro such good logic +++++++++++++++++++++
       
    8. drillepind

      drillepind Member

      Joined:
      Jan 1, 2012
      Messages:
      51
      Likes Received:
      0
      Trophy Points:
      6
    9. obtkamer

      obtkamer New Member

      Joined:
      May 27, 2014
      Messages:
      261
      Likes Received:
      4
      Trophy Points:
      0
      @drillepind i think you dont have any idea what you have linked. and please post logs from the missing lethal.

      @harvest655 you read the first post? then you would know, that i need logs.
       
      mahe4 likes this.
    10. rpg1313

      rpg1313 New Member

      Joined:
      Jun 18, 2013
      Messages:
      16
      Likes Received:
      4
      Trophy Points:
      0
      The logic is sound, but I notice quite frequently that available attacks seem to be missed. This seems to happen most often with cards with charge (such as the log with Leeroy that I've attached), but I've also seen it with other cards as well.
       

      Attached Files:

    11. pballer

      pballer New Member

      Joined:
      Jun 7, 2012
      Messages:
      75
      Likes Received:
      1
      Trophy Points:
      0
      i noticed this two might wanna check charge ill look for logs
       
    12. rpg1313

      rpg1313 New Member

      Joined:
      Jun 18, 2013
      Messages:
      16
      Likes Received:
      4
      Trophy Points:
      0
      This time it didn't attack the taunt card and got a targeting error, then skipped attacking with a full field of cards that could attack.
       

      Attached Files:

    13. rpg1313

      rpg1313 New Member

      Joined:
      Jun 18, 2013
      Messages:
      16
      Likes Received:
      4
      Trophy Points:
      0
      According to the log I posted it was flagged for charge. It correctly played LJ and then an abusive sergeant to boost his attack, but then it ended the turn without attacking with LJ.
       
    14. harvest655

      harvest655 Member

      Joined:
      Apr 26, 2014
      Messages:
      98
      Likes Received:
      0
      Trophy Points:
      16
      Because too many times I restart

      There are too many logs

      I have to see when the next

      I then uploaded
       
    15. obtkamer

      obtkamer New Member

      Joined:
      May 27, 2014
      Messages:
      261
      Likes Received:
      4
      Trophy Points:
      0
      reading your logs, i noticed some bugs in hearthbuddy, so please until hankerspace fixed them, please no more bug reports.
      (@rpg1313 jeah, LJ was played, and in the first round, he wouldnt even play abusive, only wantet do attack the auctioneer, but then auctioneer got taunt + divshield out of nowhere)
       
    16. Puzzyfloor

      Puzzyfloor Member

      Joined:
      May 28, 2010
      Messages:
      224
      Likes Received:
      1
      Trophy Points:
      18
      i dont know what to say,.. iam using this "Silverfish AI" and it maked my mage aggro deck so much stronger,.. no wasted fireballs and manacristalls anymore =)
       
    17. Fujiyama

      Fujiyama Member

      Joined:
      Mar 27, 2014
      Messages:
      485
      Likes Received:
      4
      Trophy Points:
      18
      Great work :) :) but one issue: Sometimes it will lay a Raid Leader after attacking so that the extra damage is wasted that round.
       
    18. Robsao

      Robsao Member

      Joined:
      Sep 26, 2012
      Messages:
      172
      Likes Received:
      0
      Trophy Points:
      16
      Great work indeed, much better than current AI for sure.

      I notice Defender of Argus doesn't work very well. It's only buffing one creature when it could have buffed two. I've seen it happen 3 times.

      I've also seen it pass the turn without attacking with a minion
       
      Last edited: Jul 12, 2014
    19. obtkamer

      obtkamer New Member

      Joined:
      May 27, 2014
      Messages:
      261
      Likes Received:
      4
      Trophy Points:
      0
      @Robsao atm hrtbuddy doesnt allow to place the minions on a specific place. and api still have some bugs (doesnt give my ai the correct data of the current board)
       
    20. Robsao

      Robsao Member

      Joined:
      Sep 26, 2012
      Messages:
      172
      Likes Received:
      0
      Trophy Points:
      16
      I see. Great job anyway! Thanks for the custom AI !
       

    Share This Page