Page 3 of 3 FirstFirst 1 2 3
Results 21 to 28 of 28

Thread: anyone managed to use CreateHTTPRequest?

  1. #21
    I think the point of only allowing POST, was that bots couldn't read in information from the outside world that would allow them to 'cheat'(?) (I didnt really understand this, but I think this was the logic given as to why POST okay, but not GET)

    Maybe having no callback is deliberate. as otherwise you could just POST to localhost, read the response and it would act in the exact same way as a get.

    @lightbringer Im far from finished (need to normalise inputs + lots of other fixes), and Im a machine learning noob.
    but what Im trying is to basically ship the data off to an external program (either by http post or log parsing). This has a neural net running in it.

    It then takes the nets weights and literally writes them into the lua bot files, where there is also a pure-lua implemented copy of the net, which it can run through during the game to make predictions for new data.

    This means it can learn things 'between' games, it just cannot learn during the game.

    It's kind of hard to implement and a pain, but I dont see a simpler way

    (also currently bot games are providing the training data for what im trying to learn. but for more advanced things like laning/fighting. it's probably going to be best to use clarity to parse high-level replays for the training data)

    havent worked on it in a while but should have a lot of free time in the summer
    https://github.com/ThePianoDentist/t...dentistdotabot Lina bot which pulls small camp when 'laning' (Aim to work on pulling and stacking bots initially)
    https://github.com/ThePianoDentist/dotabots-ml-tools Parsing data from bot games

  2. #22
    Basic Member aveyo's Avatar
    Join Date
    Aug 2012
    Location
    EU West
    Posts
    2,371
    The goal of this project is to improve built-in bots without cheating, not external AI bullshit.
    Any bots depending on external stuff should not be admitted to the workshop, period.
    Optional external stats & etc. are fine as long as the bots work without them in offline mode.
    But maybe that's just me, and Valve is actually out for the next HL3 AI, encouraging stuff like above.

  3. #23
    Basic Member
    Join Date
    Dec 2016
    Posts
    524
    Quote Originally Posted by aveyo View Post
    The goal of this project is to improve built-in bots without cheating, not external AI bullshit.
    Any bots depending on external stuff should not be admitted to the workshop, period.
    Optional external stats & etc. are fine as long as the bots work without them in offline mode.
    But maybe that's just me, and Valve is actually out for the next HL3 AI, encouraging stuff like above.
    I don't see the harm with external stuff or AI. While I agree that workshop bots should be offline only, but for the purposes of AI training and developing offline Q-values we need online test environments.

    "localhost" exists to protect people from having bots post private/personal information to webservers from nefarious bot creators. There is nothing stopping me from having my localhost forward the messages and responses to any webserver of my choice, but I have to setup the relay on my own network to do so and it is a conscious decision on my part that would not be part of the workshop bot.

    Why we are limited to POST only, is more ambiguous. I can think of several reason for it but they all are "meh" to me.

    I do not know their motivations for starting down this path, but Dota 2 AI is only AI if we have AI. Scripting is not AI.

  4. #24

  5. #25
    Quote Originally Posted by TheP1anoDentist View Post
    I think the point of only allowing POST, was that bots couldn't read in information from the outside world that would allow them to 'cheat'(?) (I didnt really understand this, but I think this was the logic given as to why POST okay, but not GET)

    Maybe having no callback is deliberate. as otherwise you could just POST to localhost, read the response and it would act in the exact same way as a get.

    @lightbringer Im far from finished (need to normalise inputs + lots of other fixes), and Im a machine learning noob.
    but what Im trying is to basically ship the data off to an external program (either by http post or log parsing). This has a neural net running in it.

    It then takes the nets weights and literally writes them into the lua bot files, where there is also a pure-lua implemented copy of the net, which it can run through during the game to make predictions for new data.

    This means it can learn things 'between' games, it just cannot learn during the game.

    It's kind of hard to implement and a pain, but I dont see a simpler way

    (also currently bot games are providing the training data for what im trying to learn. but for more advanced things like laning/fighting. it's probably going to be best to use clarity to parse high-level replays for the training data)

    havent worked on it in a while but should have a lot of free time in the summer
    Of course I can't provide a definitive answer on what Valve is trying to do here, but providing a function with a signature with an argument that gets ignore seems like bad API design to me; so it's probably broken and not intentional. Besides, even if the callback wouldn't be allowed to do anything, you'd still need a hook to know when the POST has been sent as it's an asynchronous call. And afterall: technically POST and GET do the same thing (send/receive entities), but their contracts are slightly different.

    By the way, I just recognised your nick from an issue you've created a few months back on my project. I has been remodelled since then and I believe is much simpler to use now. You might want to give it a second look if the Bot API doesn't work out for you either.

    So, what does your ANN actually learn, and what's your reward function?

  6. #26
    Quote Originally Posted by Lightbringer View Post
    Of course I can't provide a definitive answer on what Valve is trying to do here, but providing a function with a signature with an argument that gets ignore seems like bad API design to me; so it's probably broken and not intentional. Besides, even if the callback wouldn't be allowed to do anything, you'd still need a hook to know when the POST has been sent as it's an asynchronous call. And afterall: technically POST and GET do the same thing (send/receive entities), but their contracts are slightly different.

    By the way, I just recognised your nick from an issue you've created a few months back on my project. I has been remodelled since then and I believe is much simpler to use now. You might want to give it a second look if the Bot API doesn't work out for you either.

    So, what does your ANN actually learn, and what's your reward function?
    trying to learn when to time double-pull.
    as double-pulling is something that im not sure you can assign a static "yep this is the correct time" to (I know people technically use creep-camp total health left as an indicator. But I think depending on hero movespeed and other varaibles that can fail as well rarely)
    timing can also wildly differ in situations where all friendly creeps randomly end up aggroing the healy-creep/ versus none of them.
    It's actually a quite hard-ish problem to solve with 100% accuracy I think. then when you take into account you want to maximise xp gain from killing small camp, whilst still making double pull, even more complicated

    so inputs: (total neutral camp health left, total friendly creep health, current most targeted neutral health, % target focus on neutrals (i.e. 3/4 creeps attacking lowest health neutral = 0.75, same targeting values but for neutrals attacking lane creeps, hero_movespeed, hero attack range, attack speed) there might be things ive missed/could also take into account

    *all health means effective health (takes into account armour)

    yeah my reward function is....... well its 1 for success, 0 for failure. I dont think this is going to work properly and something better will be needed

    my idea was do a net prediction every frame/think, when the net prediction gets above a sufficient value, then we try the pull.

    one problem I can see, is for all the inputs, rather than just have 'as x gets bigger, success if more likely'. theres a sweet-spot. too low it'll fail, too high it'll fail.
    I dont know yet if you need to do anything special to the net to make it behave sensibly for these type of inputs, maybe so long as you can avoid overfitting it's just fine? (Im just learning as I go )
    I am likely to just stick with the valve bot api for now (so far basically everything Ive asked for to be included has been), but Ill have certainly have another look. Your framework is what got me interested in dota bots in the first place(also learnt-ish lua from it), so Im still very grateful even if I dont end up using it much



    edit: here is my net in lua...which may or may not work!
    https://github.com/ThePianoDentist/t...neural_net.lua

    also I didnt know how many weights to put in each layer, so theres just same as number of inputs until I find out how to decide \_(ツ)_/
    Last edited by TheP1anoDentist; 04-12-2017 at 10:07 AM.
    https://github.com/ThePianoDentist/t...dentistdotabot Lina bot which pulls small camp when 'laning' (Aim to work on pulling and stacking bots initially)
    https://github.com/ThePianoDentist/dotabots-ml-tools Parsing data from bot games

  7. #27
    Quote Originally Posted by TheP1anoDentist View Post
    also I didnt know how many weights to put in each layer, so theres just same as number of inputs until I find out how to decide \_(ツ)_/
    Chosing the number of inputs, hidden layers and neurons in those layers is a research task on its own. If backpropagation doesn't yield good enough results, you could try NEAT; but training will be much slower.

  8. #28
    Basic Member aveyo's Avatar
    Join Date
    Aug 2012
    Location
    EU West
    Posts
    2,371
    nero went open source long time ago, I remember appreciating some of it's features, and laughing at others that cs bots did years before.
    I'm looking forward to the first bots rushing blade mail on ogre instead of going for a popular guide and tactical feed for it's carry and some other crazy stuff like that, but atm it seems a little far-fetched, when thing like lame map nav grid is causing issues even to human players..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •