Action filters (my personal observations)

mcompany
Autonomous Entity
Autonomous Entity
Posts: 872

Action filters (my personal observations)

Post#1 » 16 Mar 2017, 18:19

7.x NOTE: Action filters are currently bugged (I'm not sure exactly how, but player 2 generally have different results from the same nodes, sometimes having nodes active 1 tick after they was originally valid)

DEFINITION:
Action filters are conditions that covers whatever action that a bot does. For example the filter ”isAttacking” should only be active if that particular bot is attacking something. However there are some prefixes and suffixes to these conditions that gives more meaning to any action filter. A suffix (such as ”self”) tells what type of item is doing that action to your target. For example ”enemy selfAttacking” means an enemy that the ”self” bot is attacking, while ”ally allyMovingTo” is an ally that a different ally is moving towards. A prefix represents something that the target is doing an action towards (which isn't your target). For example, ”enemy attackingSelf” means an enemy that is attacking the ”self” bot, while ”ally fleeingFromAllyBase” is an ally that is fleeing from an ally base and ”ally fleeingFromAlly” is an ally fleeing from a completely different ally (for whatever reason). Honestly this should be pretty self explanatory, but then again I guess I just get used to this kind of stuff easily

DISCOVERIES:
Now, first thing that should be noted about action filters is that they actually don't tell you what any bot is currently doing... It tells you what the bot was doing one tick ago. This gives the bot very different information than what it would seem to to give you for several reasons
  • If you try to attack an enemy attackingSelf, you will always attack the enemy after they attack you, which can easily give your bot a disadvantage. That means you have to be sure to predict the enemies next move beforehand
  • ”If self isAttacking” stays valid when the enemy is attacking died one tick before the current one. This can be a very easy way to count the number of kills a bot gets and thus, an easy way to count the enemy bots remaining without subtrees being as large. Do note that this can be done with ”isMovingTo” and ”isFleeingFrom” as well

Next, it turns out that several things counts as ”isIdle”, some of which is things that would be rather surprising
  • If you move to an object, but you can't get anything closer, the bot idles
  • Tagging
  • Picking up and dropping resources
  • The very tick that a bot scores a point it counts as idle (rather than moving towards an ally base). This maybe a bug
  • And of course idling manually using the idle action

That's all I have for this post. I'm probably going to do some other informational posts (some of the later ones might be heavily opinionated​ though, especially if I talk about tags)

pier4r
Skynet
Skynet
Posts: 3390

Re: Action filters (my personal observations)

Post#2 » 16 Mar 2017, 20:56

Nice, I put it in the FAQ
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

User avatar
GFX47
Dev
Dev
Posts: 2914

Re: Action filters (my personal observations)

Post#3 » 16 Mar 2017, 23:00

The "current action" is indeed refering to the one valid during the previous AI tick.
There's no other way to do it because your target's valid action at the current tick actually depends on the order bots are checked.
You'd get different results if your bot was checked before its target or vice versa.

Grabbing, dropping and securing a resource shouldn't be considered as idle though.
I'll check the code about that.

Wozza
Script
Script
Posts: 28

Re: Action filters (my personal observations)

Post#4 » 16 Mar 2017, 23:22

MCompany - when you say action filters are currently bugged are you just talking about the 2 things detailed later in your post (filters working off previous tick and isIdle wierdness) or are you saying there are other bugs in addition with the action filters in addition to these?

Regarding isIdle and resource handling: I definitely see this happening too and have had to put nodes in my AI to deal with it. From what I can see on screen, what I think is happening is that initially the bot correctly tracks that it is picking up or dropping the resource but at the point where the resource is actually picked up or dropped the bot no longer displays a current action on screen (if you have it selected) and I guess it is at that point that it loses track of what its previous tick action was.

mcompany
Autonomous Entity
Autonomous Entity
Posts: 872

Re: Action filters (my personal observations)

Post#5 » 17 Mar 2017, 03:01

Wozza wrote:MCompany - when you say action filters are currently bugged are you just talking about the 2 things detailed later in your post (filters working off previous tick and isIdle wierdness) or are you saying there are other bugs in addition with the action filters in addition to these?

I'm​ saying there is an additional major bug that was already stated on the forums and put in the roadmap that I haven't had the time to properly narrow down. Both player 1 and player 2 can have different actions and have different modes considered as valid, even in the exact same situation. I suspect that only player 2 is affected and I suspect it is happening with ”carriesResource” and/or action filters, but I really don't know.

GFX47 wrote:The "current action" is indeed refering to the one valid during the previous AI tick.
There's no other way to do it because your target's valid action at the current tick actually depends on the order bots are checked.
You'd get different results if your bot was checked before its target or vice versa.

I figured this was true, but honestly, I prefer it like this because even if you could theoretically check after actions, it would remove the need for the bots to think ahead

GFX47 wrote:Grabbing, dropping and securing a resource shouldn't be considered as idle though.
I'll check the code about that.

Does this mean we can get action filters for all resource actions?

Also, I forgot, tick 1 also counts as ”isIdle”

User avatar
GFX47
Dev
Dev
Posts: 2914

Re: Action filters (my personal observations)

Post#6 » 17 Mar 2017, 09:39

mcompany wrote:
GFX47 wrote:The "current action" is indeed refering to the one valid during the previous AI tick.
There's no other way to do it because your target's valid action at the current tick actually depends on the order bots are checked.
You'd get different results if your bot was checked before its target or vice versa.

I figured this was true, but honestly, I prefer it like this because even if you could theoretically check after actions, it would remove the need for the bots to think ahead


Checking after current tick valid actions have been picked would actually question these actions validity in the first place.

mcompany wrote:
GFX47 wrote:Grabbing, dropping and securing a resource shouldn't be considered as idle though.
I'll check the code about that.

Does this mean we can get action filters for all resource actions?


What do you mean?

mcompany wrote:Also, I forgot, tick 1 also counts as ”isIdle”


That's the expected behavior.

User avatar
Kanishka
Skynet
Skynet
Posts: 1421
Contact:

Re: Action filters (my personal observations)

Post#7 » 17 Mar 2017, 13:22

GFX47 wrote:...


First of all, there's an extra [/quote] in your post. :P

Second, he meant Dropping Resource, Picking Resource and Securing Resource Conditions and Filters.
Fixes break an AI more than bugs do. :ugeek:

Gladiabots Off-Topic Chat


My Stats: Kanishka_RN3;Kanishka_MiPad

mcompany
Autonomous Entity
Autonomous Entity
Posts: 872

Re: Action filters (my personal observations)

Post#8 » 17 Mar 2017, 15:57

Yeah, I meant conditions and filters for picking up and dropping resources, but not so much securing them (that could stay as ”movingToAllyBase”). Otherwise, what action filter would apply for them if not ”isIdle”

User avatar
GFX47
Dev
Dev
Posts: 2914

Re: Action filters (my personal observations)

Post#9 » 18 Mar 2017, 01:15

You mean detecting the exact moment when the resource is picked from the ground or dropped from the robots?
It would only be valid during one tick, I'm not sure it would be that useful and worth cluttering the list even more.
Plus I think it's better to keep secret the nature of your enemy's movements.

mcompany
Autonomous Entity
Autonomous Entity
Posts: 872

Re: Action filters (my personal observations)

Post#10 » 18 Mar 2017, 03:29

Well, I guess it could clutter the menu, and grabbing a resource could just be ”movingToResource”, but it is still weird that dropping a resource wouldn't have an action filter at all (unlike literally every other action). Not to mention that I doubt that knowing that the enemy dropped a resource a tick ago is helpful information (unlike knowing if they were attacking), and I knowing when a resource was picked up and dropped is much more helpful information for if ”self” does it than it is for any other bot to do it

User avatar
Kanishka
Skynet
Skynet
Posts: 1421
Contact:

Re: Action filters (my personal observations)

Post#11 » 18 Mar 2017, 04:25

So... IsIdle is just a short form of NotMoving. Not technically Not Doing Anything. Just NotMoving.
Fixes break an AI more than bugs do. :ugeek:

Gladiabots Off-Topic Chat


My Stats: Kanishka_RN3;Kanishka_MiPad

harthag
Automaton
Automaton
Posts: 197

Re: Action filters (my personal observations)

Post#12 » 18 Mar 2017, 15:28

Kanishka wrote:So... IsIdle is just a short form of NotMoving. Not technically Not Doing Anything. Just NotMoving.

Not exactly, otherwise attacking would be "idle" too, since the bots don't "move" while attacking either. It seem more like the default when no other "actions" fully apply, or something like that. Maybe: engaged in an activity that doesn't have an activity label built in...

User avatar
Kanishka
Skynet
Skynet
Posts: 1421
Contact:

Re: Action filters (my personal observations)

Post#13 » 18 Mar 2017, 20:20

harthag wrote:
Kanishka wrote:So... IsIdle is just a short form of NotMoving. Not technically Not Doing Anything. Just NotMoving.

Not exactly, otherwise attacking would be "idle" too, since the bots don't "move" while attacking either. It seem more like the default when no other "actions" fully apply, or something like that. Maybe: engaged in an activity that doesn't have an activity label built in...


Hey the turret moves. :/
Fixes break an AI more than bugs do. :ugeek:

Gladiabots Off-Topic Chat


My Stats: Kanishka_RN3;Kanishka_MiPad

Return to “Strategies”

Who is online

Users browsing this forum: No registered users and 1 guest