yangyuan/hearthrock

Tutorial

Opened this issue · 12 comments

there are a lot of people that want to get into this, I feel like there needs to be a tutorial for both the installation and the creation of a basic bot (not one that just does random moves) by doing this it will help the community to grow for new comers and they will actually be able to use this.

Installation isn't too difficult but for people its hard to understand on where to start when creating a bot that doesn't just do random moves. Just some advice I guess.

you can check my code as example

#18

Alright, I have seen it the only problem I have with it, where does this go?

I saw another comment that was posted where someone wanted to use another AI and then have hearthrock process the result of the AI, good example, Silverfish which is an AI that can get the "Best moves" for that turn using hearthstone logging, but there is no example of someone doing this. Any ideas / help, there isn't much help out there on Google.

@CodeXLmao Excuse me, but you seem to have been able to make the client work with the example code at least. Can I ask you exaclty whant did you put in the the various fields and what local server service did you use? I am trying to get it done with WampServer, I copy the address where I put the downloaded code (http://localhost/hearthrock/python/) in the "bot" section, but when I try it out the bot just doesnt do anything. Could you lend me a hand, please?

@allocro if you are running the bot using App.py
in the code it states this: RockApiService.run(RockBot(), '127.0.0.1', 7625) which means you can run it with either local or custom and then just enter 127.0.0.1:7625/
I didn't use python to do mine, I am using C# but I think thats how the Python example works

@CodeXLmao I`m lunching the client that you find in the main page, Hearthrock.Client.exe, but no matter how i set up the various field, it doesnt seems to pick up any bot beside the built-in one. Does App.py run the program directly from the bot location?

How did you manage to get it to pick up your bot anyway? Where did you put the bot's code (I got in a local server diretory, as suggested in another discussion)? I mean I can work with C Sharp too, if you can tell me how to get the client started. Maybe it is Wampserver fault, should I use another localhost provider?

Thanks a lot for the help anyway, it's really appreciated.

you don't have to launch it using a server, aslong as you have Python properly installed. you can literally run App.py and it will run the bot service which works, In the hearthstone.exe client all you need to do is set the bot to Local, you don't need to change the trace if your not planning on changing those functions. Are you asking where you need to go to edit the bot in Python for you to make changes? I am not sure what you are struggling with, All I know is you need no form of virtual server or actual server to run this because it runs as a webservice.

I AM AN IDIOT. I thought the client was supposed to find and and start the bot for you once you launch the game. Thanks a lot, now everything works, couldnt have done it without you, mate!

No worries, it can be confusing, do you have any plans for the bot in specific. I would love to hear any ideas you have for implentation etc.

Nothing special. Trying to build up an AI that can help me monitor matchups and how many classes of what type you can find in casual and ladder and what card do they use. The key feature I'm missing right now tho is how to make my bot hit the Concede button after some turns. I mean, I can count turns easily, but I dont seem to be able to find out what is the create_action() input to give to concede the game.

Obviously if you have any idea on how I can find out said command code, you are wellcome.

Hi Does this still work?
Im replacing "Assembly-CSharp-original.dll" as this is no-longer in the actual HS game.
will then change the SHA1 checksum and see if that gets it to work