Results 1 to 8 of 8

Thread: February 6 Bot Update

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

    February 6 Bot Update

    • Fixed GetUnitList() returning incorrect unit handles.

  2. #2
    Basic Member
    Join Date
    Jun 2013
    Posts
    274
    Courier being idle in fountain also been fixed to returns the In Base state again!

  3. #3
    Basic Member
    Join Date
    Dec 2016
    Posts
    731
    Quote Originally Posted by ChrisC View Post
    • Fixed GetUnitList() returning incorrect unit handles.
    Seems to be working properly again. Thanks!

    Question about ActionQueueing:
    You named it a "queue" but is it really a queue in programming sense? I'm seeing behavior that does not conform to FIFO (first in, first out). For example my Lina has the code:

    Code:
                    <IF SOME CONDITIONS ARE MET... DOESN'T MATTER>
    
                    npcBot:SetActionQueueing(true)
                    local nRadius = abilityLSA:GetSpecialValueInt( "light_strike_array_aoe" )
                    local nCastRange = abilityLSA:GetCastRange()
                    local dist = GetUnitToUnitDistance(npcBot, enemy)
    
                    if dist < (nCastRange + nRadius) then
                        npcBot:Action_UseAbilityOnLocation( abilityLSA, enemy:GetExtrapolatedLocation(0.95) )
                        npcBot:Action_UseAbilityOnLocation( abilityDS, enemy:GetLocation() )
                        npcBot:Action_UseAbilityOnEntity( abilityLB, enemy )
                        npcBot:Action_AttackUnit( enemy, false )
                    end
    Then she executes the combo... but it is usually Laguna Blade -> Light Strike Array -> Dragon Slave... so it is all over the place from the order I queued the actions. So what other considerations are done on the queue?

  4. #4
    Valve Developer
    Join Date
    Sep 2011
    Posts
    1,704
    Quote Originally Posted by nostrademous View Post
    Then she executes the combo... but it is usually Laguna Blade -> Light Strike Array -> Dragon Slave... so it is all over the place from the order I queued the actions. So what other considerations are done on the queue?
    Looks like the small difficulty-based delays that are automatically added are interfering with queuing properly, which is definitely a bug.

  5. #5
    Basic Member
    Join Date
    Dec 2016
    Posts
    731
    Quote Originally Posted by ChrisC View Post
    Looks like the small difficulty-based delays that are automatically added are interfering with queuing properly, which is definitely a bug.
    Another quirk which had me debugging my bots for hours to find out something wasn't what I expected is the unit-scoped HasQueuedAction() which will return "true" anytime your bot is doing any action regardless of if SetActionQueueing() has been set to "true" or not. I expected the behavior to be that "HasQueuedAction()" return "true" if and only if I had SetActionQueueing() set to "true" AND the action queue was not empty.

    What I believe is happening is that you guys always put any action onto the action queue and then use SetActionQueueing boolean to determine if to append to it or over-write the current action. In that case it is much more valuable for me to have a unit-scoped "NumQueuedActions()" which returns the size of my action queue.

  6. #6
    Basic Member
    Join Date
    Dec 2016
    Posts
    731
    Another thing that's just surprising to me:

    GetHeroLastSeenInfo( id ) returns a "nil"-equivalent (if not "nil" itself... guessing "{}") if you have not yet seen the enemy hero (so at start of game before you get first-time vision) rather than a properly initialized empty table. What I mean is I expected to get a {time=-1000, location=Vector(0,0,0)} or something like that... instead I get {} so if I try to check the .time or .location it throws an error until the first time I see the hero.

    EDIT: Running a quick test I verified it returns "nil" and not even a "{}".
    Last edited by nostrademous; 02-08-2017 at 12:50 PM.

  7. #7
    Basic Member
    Join Date
    Jun 2013
    Posts
    274
    Quote Originally Posted by nostrademous View Post
    Another thing that's just surprising to me:

    GetHeroLastSeenInfo( id ) returns a "nil"-equivalent (if not "nil" itself... guessing "{}") if you have not yet seen the enemy hero (so at start of game before you get first-time vision) rather than a properly initialized empty table. What I mean is I expected to get a {time=-1000, location=Vector(0,0,0)} or something like that... instead I get {} so if I try to check the .time or .location it throws an error until the first time I see the hero.

    EDIT: Running a quick test I verified it returns "nil" and not even a "{}".
    Try having it run once right when the strategy phase has ended. The fog isn't in place during the versus screen so you can fill a few initial enemy caches during that time. Granted, having it return dummy info would be better formatting, but it's at least a work around.

  8. #8
    Valve Developer
    Join Date
    Sep 2011
    Posts
    1,704
    That makes sense, I'll have it return { time=-1.0, location=Vector(0,0,0) } if you've never seen the hero.

Posting Permissions

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