Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 27

Thread: June 8 Update

  1. #11
    Valve Developer
    Join Date
    Sep 2011
    Posts
    1,665
    Quote Originally Posted by nostrademous View Post
    @ChrisC - couple of questions for you:

    1) At what frequency does the dedicated server pull down updates to the workshop bots? As in - if I update my bot, how soon until the dedicated server has the new code?
    2) If a patch accidentally breaks the API used by my bots, what happens on the dedicated server to my bot (which might be crashing Dota as a result)?
    3) Forward Looking (as I'm working on a bot that leverages a separate web-server process) - will bots that communicate with a web-server (in my case written in Python with it's own code) ever be possible on the dedicated server? (I don't see how, but figured I would ask).
    1) It should be basically realtime. I'm not super familiar with the Steam-updating part of the pipeline, but I don't know of any reason why it'd be delayed.
    2) It'll crash just like a local version. If we see a bot script that's crashing servers a lot, we'll potentially pull it from the dedicated server list, so long as they're not super common, they're not the end of the world. Obviously it gives us more reason to make it so that scripting can't cause a crash too.
    3) If the HTTPRequest stuff could hit whatever server you wanted, would that work? We're considering just opening it up so it's not forced to localhost.

  2. #12
    Basic Member
    Join Date
    Dec 2016
    Posts
    611
    Quote Originally Posted by ChrisC View Post
    1) It should be basically realtime. I'm not super familiar with the Steam-updating part of the pipeline, but I don't know of any reason why it'd be delayed.
    Okay, seems like a sym link (or rsync probably) of the workshop code then. I assume that it makes a copy of the code when loaded into the VM when playing so if my bot was to be playing when I updated it in the workshop it would not be affected until the next play session.

    I do have a question about the "dedicated server" model. It seems that my understanding and how I hear some people refer to it in this forum are at a different understanding of how or why it is there. It was my belief that the "dedicated" server was for showcasing bot vs. bot matches and while spectating by humans is probably allowed, humans & developers do not have direct access to the "dedicated" servers and do not upload or initiate bot games on that server. I was under the impression that the dedicated server was essentially a carrot-on-a-stick for bot developers to better their bots b/c they will be getting more visibility / attention. Probably ultimately resulting in some bot MMR system and possible a tournament. In the long run perhaps you even envision a Top Bot vs Top Human Team tournament (once AI and all that jazz is in place).

    Is this the intent here ChrisC, or if not, what is the purpose?

    Quote Originally Posted by ChrisC View Post
    2) It'll crash just like a local version. If we see a bot script that's crashing servers a lot, we'll potentially pull it from the dedicated server list, so long as they're not super common, they're not the end of the world. Obviously it gives us more reason to make it so that scripting can't cause a crash too.
    Cool, I noted a crash I got recently (my fault) in another thread. Repeating here - if you require() a module/file that has a mis-spelled directory in it's path the client crashes to desktop. This is different than if you just mis-spell the filename which just throws a traceback (at least I think I recall that being a difference).

    Quote Originally Posted by ChrisC View Post
    3) If the HTTPRequest stuff could hit whatever server you wanted, would that work? We're considering just opening it up so it's not forced to localhost.
    For me that would be great, although I'm surprised Valve is willing to take the liability here. I see huge positives and possible negatives here.

    NEGATIVE - If you do this you have to be very weary of phishing bots people could upload that would ask for peoples usernames / passwords (and while you would think that NO ONE is that dumb to think that a Valve Employee would ask for their info in a Bot Match ... you would be surprised how naive people are). I realize that currently there is no API for retrieving chat messages, but I'm sure there will be one soon enough (especially once "training" bots start coming out).

    POSITIVE OR NEGATIVE - Secondly, this would potentially allow for bot developers to monetize the logic of their code server AI/Machine Learning/RL (or scripting even) - forcing people to purchase monthly subscriptions to their web-servers which control the bots. Not sure where you stand on people possibly doing this, but I could easily ask for a username/password to "my" web-server in order to give people the advanced code I have (or technically will) create.

    POSITIVE - People could protect their Intellectual Property (the brains of their bot code) by never sharing it (it stays on their web-servers) and possible we could even standardize on a Web-Server to Bot Communication API. It wouldn't need to be in the workshop or any github (unless people want public collaboration).

    CONSIDERATION - if the dedicated servers are in Seattle and my web-server is on the East Coast, then network latency becomes a much larger factor in what can be commanded by the web-server as you will not have fast enough round-trip-time to do at frame-rate decision making. Sure, you could host your server at Seattle to reduce this, but still, nowhere close to as fast as localhost.

    Just my initial thoughts here, I'm sure I will edit this post several times in the coming hours/days as I think more on it.

  3. #13
    I could still do with either

    a) a GetUnitToLocationDistance() that returns path-distance, not raw distance.
    b) GetNearbyTrees(vLocation, nRadius)

    Im trying to avoid hardcoding locations to stack/pull from. so the bots can approach/attempt from any starting angle/position and it looks natural
    my issue is they can just wait the wrong side of the trees

    b) would solve it by letting me work out the 'average tree position' surrounding the camp. The camp opening side is roughly the 'inverse' of this position with respect to neutral spawn location
    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

  4. #14
    Code:
    function Pulling:Call(lane, camp_type, camp_location, camp_wait_at)
        local amount_along_lane = GetAmountAlongLane(lane, camp_location)
        local camp_pull_to = GetLocationAlongLane(lane, amount_along_lane.amount)
        local camp_timing = (camp_type == "large") and 23 or 13
        if GetSeconds() > 30 then
            camp_timing = camp_timing + 30
        end
        local pullCompleted = Stacking:Call(camp_location, camp_timing, camp_wait_at, camp_pull_to)
        if pullCompleted then
            print("Add the last-hitting/farming func!")
        end
    end
    pretty happy with this
    might need to do slight bit of fiddling with hardcoded pull-timings (calculating them is just too much work, especially with the bend the creeps go round)
    but it theoretically works for both lanes, both small camp and hard camp, even works for offlane pulling as well
    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

  5. #15
    Basic Member
    Join Date
    Dec 2016
    Posts
    120
    Can anyone explain me how to use dedicated servers?

    Im working on some complex decision making for bots now and i was away from API updates many days( just following your ideas and comments )

    thx

  6. #16
    Basic Member
    Join Date
    Dec 2016
    Posts
    611
    Quote Originally Posted by SIKIM View Post
    Can anyone explain me how to use dedicated servers?

    Im working on some complex decision making for bots now and i was away from API updates many days( just following your ideas and comments )

    thx
    I don't think we (aka "developers") can "use" the dedicated servers - hence my questions a few posts above yours. I think the dedicated servers exist purely to showcase our bots.. but are not available for us to use as a testbed.

  7. #17
    Quote Originally Posted by nostrademous View Post
    I don't think we (aka "developers") can "use" the dedicated servers - hence my questions a few posts above yours. I think the dedicated servers exist purely to showcase our bots.. but are not available for us to use as a testbed.
    Is there a way to see them or is this still wip?

  8. #18
    Basic Member
    Join Date
    Dec 2016
    Posts
    611
    Quote Originally Posted by ChrisC View Post
    [LIST][*]Added global GetItemComponents( sItemName ) function -- returns a table of lists of components used to construct the specified item.
    @ChrisC - I did a quick test here and it seems there is an extra table around them.

    Code:
        local comp = GetItemComponents("item_dagon_5")
        for k,v in pairs(comp) do
            if type(v) == "table" then
                for k2,v2 in pairs(v) do
                    print('nest: ', k2,v2)
                end
            else
                print('single: ', k, v)
            end
        end
    Result:
    Code:
    [VScript] nest: 	1	item_dagon_4
    [VScript] nest: 	2	item_recipe_dagon
    I would expect it to all be "single" not "nest".

    Also, any chance to have an optional flag you can pass to fully explode the components all the way to basic items?

  9. #19
    Basic Member
    Join Date
    Mar 2012
    Posts
    1,679
    What does GetAttackProjectileSpeed() return? Is it meant to return the physical right click attack "bullet" ? It seems to make sense as Jug has 0 since he is melee. However, PA has 900. How come ? The dagger is an ability and should not be included here IF this function only refers to attacks.
    Explanations on the normal, high and very high brackets in replays: here, here & here
    Why maphacks won't work in D2: here

  10. #20
    Thanks again ChrisC for the update, here is another update on my ranged heroes last hitting (again with no items and abilities):

    LaningRange10Min.png

    I had to rewrite my generic laning again so that ranged heroes can last hit properly BTW. while I was tracking lane creeps to improve the last hitting I realized they usually attack once every 1-1.15 seconds, is this because of host's update rate or their attack speed is actually not what Dota claims it is? Anyway, I blame this for the creeps my bots missed I won't need pulling for now (the lane equilibrium is almost perfect). I'll start writing the rest of the things in a few weeks. I think I won't be pickier than this for laning (I personally can't last hit better than this without items and abilities!).
    Attached Images Attached Images

Posting Permissions

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