Help, why does the following happen?

pier4r
Skynet
Skynet
Posts: 3390

Help, why does the following happen?

Post#1 » 31 Dec 2016, 14:53

So the situation is the following:

Gladiabots_20161231_131644.jpg
Gladiabots_20161231_131644.jpg (212.87 KiB) Viewed 1242 times


And the mg continously switches between the shotgun and the assault bot. I pinned the problem to this subroutine

Gladiabots_20161231_131612.jpg
Gladiabots_20161231_131612.jpg (210.79 KiB) Viewed 1242 times


but I cannot understand why it does happen.

(attached is the subroutine definition)
Attachments
Gladiabots_20161231_131702.png
Gladiabots_20161231_131702.png (206.71 KiB) Viewed 1242 times
Last edited by pier4r on 31 Dec 2016, 15:04, edited 1 time in total.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

User avatar
NullPointer
Autonomous Entity
Autonomous Entity
Posts: 539

Re: Help, why does the following happen?

Post#2 » 31 Dec 2016, 15:01

- tick 1
6th action tags Assault

- tick 2
8th action tags Shotgun and untag Assault (assuming you're using exclusive tags)

- tick 3
same as tick 1, you're in a loop

pier4r
Skynet
Skynet
Posts: 3390

Re: Help, why does the following happen?

Post#3 » 31 Dec 2016, 15:08

Actually the evolution is

tick 1
- 4th action, shotgun, correct (enemy detected in medium and short range)

tick2
- 6th action assault, wtf!? (enemy detected in medium and short range, as per screenshots)

tick3
- 4th action, shotgun, correct (enemy detected in medium and short range)

tick4
- as tick2

The point is that it should not happen, even in the case that you describe. There is an enemy in short range (the shotgun) so the long range branch should not activate. For this I'm getting puzzled.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

User avatar
NullPointer
Autonomous Entity
Autonomous Entity
Posts: 539

Re: Help, why does the following happen?

Post#4 » 31 Dec 2016, 15:18

I guess the problem is with the conditions then. You're using

If closest enemy exists in Long Range
but you probably meant
If closest enemy is at Long Range

pier4r
Skynet
Skynet
Posts: 3390

Re: Help, why does the following happen?

Post#5 » 31 Dec 2016, 15:31

NullPointer wrote:I guess the problem is with the conditions then. You're using

If closest enemy exists in Long Range
but you probably meant
If closest enemy is at Long Range


I thought about this and likely will work, but it is still unclear why it does happen because even with a less strict condition, one has still priority working and all the four first actions are checked and are red. Something that cannot happen because an enemy at medium range exists and I tag every single type of bot.

My entire AIs are designed with "if enemy exist at this range" (and not, if closest enemy is at this range) breaking down the four ranges, so If there is a problem in this case, there may be a general problem although I saw it only for this subroutine at the moment.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

User avatar
NullPointer
Autonomous Entity
Autonomous Entity
Posts: 539

Re: Help, why does the following happen?

Post#6 » 31 Dec 2016, 16:27

I guess you have just deployed a match against me with that bug :D

pier4r
Skynet
Skynet
Posts: 3390

Re: Help, why does the following happen?

Post#7 » 31 Dec 2016, 16:37

Yes. I do not update all the AIs at once, I handle them according to necessity (if I lose for obvious reasons for example). So I changed a subroutine that expect other subroutines but I did not added those in the AIs for mind game (still from 5.3.1 with some changes) and so the sniper was tagging you without shooting.

We are even with the bug of the shotgun.

Anyway if someone has any idea about the problem mentioned in the first post would be great.

Oh solved: So I was not shooting using the tag2, therefore nodes with more priority were not used and the selection ended in tagging again. The interesting bit is that exclusive tag always choose a different target if the current one is tagged. So in theory one could loop through targets. For this the tagging went to shotgun/assault bot in a loop.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

User avatar
Avaren
Script
Script
Posts: 38

Re: Help, why does the following happen?

Post#8 » 01 Jan 2017, 21:03

Your if closest enemy exists (filter range), is a misleading condition... as it stands it is asking if an enemy exists at range, not if the closest enemy is at that range. The long range branch can be active even if there is an enemy closer then long range.

pier4r
Skynet
Skynet
Posts: 3390

Re: Help, why does the following happen?

Post#9 » 01 Jan 2017, 22:46

This yes, while enemy is at range is a stronger condition still, enemy exist at range, is ok when one has priority. Indeed you can see that the medium range branch was evaluated. The problem was that the system kept assigning tags and so it could not assign the tag to the medium range bit two times. Exclusive team tag iterates through items.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

Return to “Questions”

Who is online

Users browsing this forum: No registered users and 1 guest