Results 1 to 10 of 10

Thread: October 3 Bot Update

  1. #1
    Valve Developer
    Join Date
    Sep 2011
    Posts
    1,704

    October 3 Bot Update

    • The handles specified in CMsgBotWorldState now are increasing and unique.
    • Added GetBotByHandle( iHandle ) and GetBotAbilityByHandle( iHandle ) for getting bot and ability handles in lua from their CMsgBotWorldState handle id.
    • Fixed a hang caused by disconnecting from the world state socket streaming.

  2. #2
    Basic Member
    Join Date
    Dec 2016
    Posts
    731
    So you seem to indicate that your expectation is a bot framework where you have an external client pulling CMsgBotWorldState dumps which then can somehow communicate to a bot API running in-game to retrieve extra information for specified handles. This confuses me a little bit as there is still only a POST (not a GET) mechanism for in-game bot frameworks to communicate with the outside world. What is your envisioned use-case here?

  3. #3
    Basic Member
    Join Date
    Dec 2016
    Posts
    180
    can anyone provide a simple and short example of how to benefit from CMsgBotWorldState in lua?

  4. #4
    Basic Member
    Join Date
    Dec 2016
    Posts
    76
    Quote Originally Posted by SIKIM View Post
    can anyone provide a simple and short example of how to benefit from CMsgBotWorldState in lua?
    isn't it made for external ML programm?
    https://github.com/lenLRX/Dota2_DPPO_bots ----My ML bot work in progress

  5. #5
    Basic Member
    Join Date
    Dec 2016
    Posts
    731
    Quote Originally Posted by SIKIM View Post
    can anyone provide a simple and short example of how to benefit from CMsgBotWorldState in lua?
    I started a write-up here

    All it doesn't do is show actual usage of dumps for ML purposes which I'm working on but it's going slowly as I am very busy in real life.

  6. #6
    Basic Member
    Join Date
    Sep 2017
    Posts
    56
    Even without GET requests, couldn't you just have the external client write to files that your code can read? It'd be inconvenient of course, and you wouldn't be able to get updates within a game, but it's something.
    Perhaps that's the intended use case, since you won't have the external client run on the machines of folks downloading your bot. Evolutionary systems (like OpenAI apparently has) could just place a trained model in a file, and have the bot run off of that file

  7. #7
    Valve Developer
    Join Date
    Sep 2011
    Posts
    1,704
    Quote Originally Posted by nostrademous View Post
    So you seem to indicate that your expectation is a bot framework where you have an external client pulling CMsgBotWorldState dumps which then can somehow communicate to a bot API running in-game to retrieve extra information for specified handles. This confuses me a little bit as there is still only a POST (not a GET) mechanism for in-game bot frameworks to communicate with the outside world. What is your envisioned use-case here?
    You should still be able to talk to an external programs using CreateHTTPRequest(), even though it's POST, right?

  8. #8
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,012
    Yeah but I think they'd expect to use GET for the Get*ByHandle calls

    I guess this would be an alternative? *
    Someone else made a PoC for the D2 game API as well.

    Chris perhaps you can consider being less strict in local dev mode? I'd say considering anything you do impacts only your machine things should be ok.
    This could also be prevented by having a custom Lua package (say dota2) with some more commands (maybe some reading text files like some requested) and not include it on the server therefore any attempt to use it would be an attempt to index nil dota2.whatever. (but of course to include extra checks of being a local dev script just in case)

    Just a thought
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  9. #9
    Basic Member
    Join Date
    Dec 2016
    Posts
    731
    Quote Originally Posted by ChrisC View Post
    You should still be able to talk to an external programs using CreateHTTPRequest(), even though it's POST, right?
    Yes I can by sending messages back through responses. Although the transport is asynchronous so handles could change/disappear during travel time.

    However, if that's the expectation, why not just create an API call that creates a CMsgBotWorldState serialized dump for transmission through our POST? I'm guessing it's the packet size. I feel like there has to be a better solution to achieve both goals.

    Currently basically I would have to have a localhost server process running that accepts in-game POST messages from the in-game bot script and separately CMsgBotWorldState dumps on a separate PORT connections, decides what it needs and piggy-backs on the POST responses to send requests it needs clarification back to the in-game bot script. While doable, seems convoluted a bit.

  10. #10
    Basic Member
    Join Date
    Mar 2012
    Posts
    2,012
    I am still unsure how one can benefit from the Get*ByHandle() functions. I guess, in a way I am wondering what the purpose of Get*ByHandle() functions is and how to use it

    If the handle is only relevant within a certain context from a certain game at a certain time (read - in that game dump), how could you then use an application that processes the dump and at the same time benefit from whatever Get*ByHandle() returns.
    I assume the idea behind it is to get context-specific dumps in CMsgBotWorldState to server as more or less specific infos while using the actual game to send game-sensitive info, both to the same destination server. Then the app on that server could aggregate the info for more details (?)

    If that is the idea, the only thing I am wondering is if it wouldn't be less hassle to just use a replay parser.
    Last edited by The Nomad; 10-05-2017 at 12:44 PM.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

Posting Permissions

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