• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Customized Routines

    Discussion in 'Archives' started by chainapockets, Dec 28, 2014.

    1. chainapockets

      chainapockets New Member

      Joined:
      Dec 26, 2014
      Messages:
      98
      Likes Received:
      1
      Trophy Points:
      0
      Hello guys,

      after playing with the bot for a few days now, i'd like to share my opinions on how to make the DefaultRoutine even more viable for constructed ranked games or tournaments (if you do participate in them with the bot).

      First of all, everything mentioned in here is only my opinion. Feel free to discuss and share your own opinions on several things, with the friendly amount of respect for each user.



      Let's start.


      Since the Bot comes with Silverfish API as Routine and is currently under rework/rewrite there are a lot of stuff in the Routines which isn't optimized yet. That doesn't mean that the basic DefaultRoutine.cs is bad, not at all.
      It works quite good, but i'm one of those person who wants to get every little possible peace out of a bot to push it to the limits.

      Before you continue reading, please backup your DefaultRoutine.cs right now. Go to your Hearthbuddy folder \Routines\DefaultRoutine\ . Thanks.


      If you open your DefaultRoutine.cs now with Notepad you see a big field of lines and code. If this is too messed up for you, i suggest you to download Notepad++ (it's free). It makes everything easier to read and look through.

      Now start to search for the following line (ctrl+F / strg+F):
      You found it? Great.

      At the first look you won't understand too much on it, but if you read the stuff behind the code lines it all gets kind of "understandable".

      Now we come to the interesting stuff, finally ! :)

      These are actually the only code lines yet, which are worth to change.


      Here is the original DefaultRoutine.cs code snippet of that part in the Routine:


      So what i actually did was creating 2 modified Routines. One for "Control" decks and one for "Rush" decks.

      That's actually quite easy, because you only have to change one single line!

      If you want your Routine to play a "Control" style, you must have the following code line like this:
      - this actually the default setting of your DefaultRoutine.cs which comes with the bot.

      If you want your Routine to play a "Rush" style, you must have the following code line like this:
      by enabling the "Rush" mode your hero is set to focus mainly on hitting the enemy hero and taunt's (and some times big threats). Taunt's are focused for obvious reason. ;)


      Now let me show you how my modified Routine looks like.

      Routine - modified:
      As you can see i changed a few values. These are not set in stone. As they are my personal preference and i still have to do a lot of testing.

      - i did change the value to 30, so my hero does start hitting the enemy hero with his weapon from the start.

      - needs explanation by the API creator for better understanding. i tried values between 3000-5000, but higher value = needs more time for calculating. users with slower pc's could end up not finishing turns if the number is set to high.

      - did try numbers between 25-350. didn't feel a weaker play by the bot, so i just took something in the mid at the end.

      - IMPORTANT! You always have to be one step ahead of your enemy and so the bot has to be too. Calculating the enemies response is crucial for this!

      - i didn't test this yet, but "avoiding" some enemy aoe spells could be nice in certain matchups. on the other side, i don't see much use of this yet. (maybe some1 does)

      - i wasn't able to find silver.exe yet, but the programmer says that calculating will be a lot faster with it and setting this to "true" is recommended. maybe some1 can help out with this?

      - needs explanation by the API creator for better understanding. i did only play around with the first and last number. tried values between 20 and 300. couldn't find any bad response yet.

      - needs explanation by the API creator for better understanding. i did only adjust the first number between 6-25.



      Right now, as i mentioned at the start of this post, there are a lot of code lines which aren't quite clear for understanding yet.
      So the only thing we can do is changing values, testing, testing, changing values, testing testing.

      If there were a possibility of getting a "calculating" logfile output for every single game, in which you can see what the bot actually did calculate for each action it made, we might would get a better understanding for the single code lines and how they actually do effect the Routine and the play of the bot.


      If you have any questions feel free to ask, maybe i can answer them.
      If someone has a better understanding of the API, it would be nice to get some explanation on some code lines.

      To the Developers: Would it be possible to implement some kind of "Calculating Logfile" output? Just for getting a better understanding on how each value effects the routine / bot and to get a better chance of tweaking it to it's limits.



      Let's play cards,

      chainapockets!
       
      Last edited: Dec 31, 2014
    2. Lelepere

      Lelepere New Member

      Joined:
      Nov 28, 2014
      Messages:
      45
      Likes Received:
      0
      Trophy Points:
      0
      Nice guide, bro! But too much work. I'm lasy and shit. :p
       
    3. chainapockets

      chainapockets New Member

      Joined:
      Dec 26, 2014
      Messages:
      98
      Likes Received:
      1
      Trophy Points:
      0
      You need to edit the DefaultRoutine.cs to Rush


      If you want to play Control again, you have to change it back, yes. That's why i created 2 profiles for me, one DefaultRoutine_Rush.cs and one DefaultRoutine_Control.cs, so i just have to rename the .cs files to DefaultRoutine.cs when i want to use them. (need to reload the bot btw)
       
    4. Lelepere

      Lelepere New Member

      Joined:
      Nov 28, 2014
      Messages:
      45
      Likes Received:
      0
      Trophy Points:
      0
      Sorry for the dumb question, but where i put Behavior behave = new BehaviorRush(); in the code?
       
    5. chainapockets

      chainapockets New Member

      Joined:
      Dec 26, 2014
      Messages:
      98
      Likes Received:
      1
      Trophy Points:
      0
      simply search for
      in your DefaultRoutine.cs, then put "Rush" instead "Control" in it. (CTRL+F / STRG+F) for quick search
       
    6. Lelepere

      Lelepere New Member

      Joined:
      Nov 28, 2014
      Messages:
      45
      Likes Received:
      0
      Trophy Points:
      0
      Thanks!
       
    7. obtkamer

      obtkamer New Member

      Joined:
      May 27, 2014
      Messages:
      261
      Likes Received:
      4
      Trophy Points:
      0
      thanks for this little guide, you can find all these informations in the silver-ai-thread, but its too messy and distributed!
      but to be honest: even your settings are to low! once you figure out how to use the exe, i recommend theese settings:

      maxwide: 5000
      twoturnsamount: 1000 or more

      but set nextturndeep to 6. 10 wont change anything.

      (if you know how the ai works you understand why it is performing "not so good" with the current default settings)
      and as a little hint for your search after silver.exe: search on my github page: https://github.com/noHero123/silverfish?files=1
       
    8. chainapockets

      chainapockets New Member

      Joined:
      Dec 26, 2014
      Messages:
      98
      Likes Received:
      1
      Trophy Points:
      0
      already found it :) and it's just so more "human" like playing because the calculating is a lot faster and you don't get these 2-3 sec game freezes while calculating.

      thanks for the hint on settings.

      currently i'm trying these, but will adjust to your suggestion asap after the game is finished.

       
      stelios21 likes this.
    9. stelios21

      stelios21 New Member

      Joined:
      Oct 3, 2012
      Messages:
      377
      Likes Received:
      0
      Trophy Points:
      0
      is the default routine control? my shaman just coined out ''mind if i roll weed'' turn 1 xD
       
    10. chainapockets

      chainapockets New Member

      Joined:
      Dec 26, 2014
      Messages:
      98
      Likes Received:
      1
      Trophy Points:
      0
      yes, the default one is control
       
    11. crampleg

      crampleg Member

      Joined:
      Mar 19, 2014
      Messages:
      133
      Likes Received:
      1
      Trophy Points:
      16
      does that silver exe work on it's own or do u need to know how to compile it?like can i just download that and place it in a folder and it works?
       
    12. chainapockets

      chainapockets New Member

      Joined:
      Dec 26, 2014
      Messages:
      98
      Likes Received:
      1
      Trophy Points:
      0
      I'll give you a short brief of what hearthbuddy dev said to me about Silver.exe :):

      - it's not recommended to use Silver.exe (Security reason)
      - the better performance that comes with the excluded calculating will be implemented into Hearthbuddy in the future in other ways.


      if you still want to use it (at own risk), then you just download it and put it in the Silverfish\data\ folder. "carddb.txt" should be already in it. you have to leave the folder open while using the program.
       
      Last edited: Dec 30, 2014
    13. Lelelili

      Lelelili New Member

      Joined:
      Dec 29, 2014
      Messages:
      7
      Likes Received:
      0
      Trophy Points:
      0
      Greetings Chaina, the guide has been working out well so far. I can't however find "Behavior behave = new BehaviorControl();" in the folder,
      does it change a lot? Has the bot been updated?

      Thanks for the guide, everything else has been working wonders.
       
    14. chainapockets

      chainapockets New Member

      Joined:
      Dec 26, 2014
      Messages:
      98
      Likes Received:
      1
      Trophy Points:
      0
      Nice to hear ! :)
      it's a code line in your DefaultRoutine.cs file, not an extra file in the folder :)

      If you don't mind, you can post your modified values. maybe it helps some people to get a start in their tweaking journeys :)
       
    15. Lelelili

      Lelelili New Member

      Joined:
      Dec 29, 2014
      Messages:
      7
      Likes Received:
      0
      Trophy Points:
      0
      I misspoke, I can't find it in the DefaultRoutine.cs, I also tried DefaultRoutineSettings, nothing there either,
      I'm not sure if the problem is on my end, because I'm copy pasting it into the search field :(

      The only thing I tweaked besides the things you have in your own, is the "int mxwde = 5000;"

      Chaina, I was thinking if there was a way to customize mulligan, right now it's ranking up my alt account as hunter,
      but it keeps starts with no minions. Anything I can do?
       
    16. chainapockets

      chainapockets New Member

      Joined:
      Dec 26, 2014
      Messages:
      98
      Likes Received:
      1
      Trophy Points:
      0
      that's strange.
      it has to be between these code lines. if it isn't there, simply put it back in there (magic stuff is magic :p)

      the mulligan is something i have to get my head into in the next hours.
      because i did read the whole Silverfish AI thread (100+ sites) on sunday to monday. i felt like getting mana drained by a warlock ^^ and i still have to update first post according to the new acquired informations, but i'm giving info about mulligan as soon as i have them :) maybe obtkamer is reading in here meanwhile and will provide you with an answer asap
       
    17. Lelelili

      Lelelili New Member

      Joined:
      Dec 29, 2014
      Messages:
      7
      Likes Received:
      0
      Trophy Points:
      0
      Thank you, that was kind of strange, I must've made a typo, because it was right where it's supposed to be.. Hmm.. Magic.

      That sounds like a lot of reading.. I'm not sure how much help I can provide. I guess analysing the most commonly used cards in each deck and matchup. Would that be of any help?
       
    18. chainapockets

      chainapockets New Member

      Joined:
      Dec 26, 2014
      Messages:
      98
      Likes Received:
      1
      Trophy Points:
      0
    19. chainapockets

      chainapockets New Member

      Joined:
      Dec 26, 2014
      Messages:
      98
      Likes Received:
      1
      Trophy Points:
      0
      [UPDATE #2]

      - Value optimization
      - should be perform better for most users now who are trying these settings
       
      Last edited: Dec 31, 2014
    20. crampleg

      crampleg Member

      Joined:
      Mar 19, 2014
      Messages:
      133
      Likes Received:
      1
      Trophy Points:
      16
      HREngine.Bots.Settings.Instance.simulatePlacement = true; // set this true, and ai will simulate all placements, whether you have a alpha/flametongue/argus
      //use it only with useExternalProcess = true !!!!


      so should we change that to false since it say use only with useExternalProcess = true and we not using silver.exe
       

    Share This Page