Page 1 of 1

Ability to detect which module an allly is in.

Posted: 06 Oct 2017, 14:59
by MrChris
I request the ability to detect/filter which module an ally is in.

If ally is in [module name], then...

E.g.

If 3 medium range allies are in [pushing-hard] module then....
If 2 long range allies are in [retreating-like-a-mofo] module then....
If 3 out of range units are in the [pincer-formation] module then... Push like a mofo
Future:
If leader unit is in [charge!!!] module then....

What this allows is allies to pass state between another. It's almost like each bot is a finite state machine with the ability to communicate that complex state to all other units. Along with the current ability to see if allies are attacking, we would now be able to see exactly what kind of behaviour our allies were doing.

This would allow *very* powerful AIs to be created. It's almost a new way/paradigm of building AIs and would require, if the users decide to use it, a change in how modules were created/named.

A big advantage is that The concept is simple enough to be understood by a complete noob. It requires virtually no explanation.

One issue with tagging that can make them more trouble than they are worth is the problem of when to un-tag. This solution does not have that problem.

Also, I'm guessing that it would be fairly trivial to implement? So we could try it out and see if it works well?

It would need to work in a nested way. A unit could at any moment be within several modules (parent modules).

Re: Ability to detect which module an allly is in.

Posted: 06 Oct 2017, 15:25
by sollniss
Isn't that what instant tags would do?

Re: Ability to detect which module an allly is in.

Posted: 06 Oct 2017, 16:58
by Kanishka
sollniss wrote:Isn't that what instant tags would do?


no

Re: Ability to detect which module an allly is in.

Posted: 06 Oct 2017, 18:09
by MrChris
sollniss wrote:Isn't that what instant tags would do?


I don't know as I'm not sure how they work, but my guess is you still have the complexity of managing tags? untagging etc...

Aren't tags for tagging random things in the world? Whereas this feature is just about communicating the current state of the bot

Re: Ability to detect which module an allly is in.

Posted: 06 Oct 2017, 18:36
by MrChris
If instant tags are executed within the tree but then nodes after them are still tested, then that would work well too.

Re: Ability to detect which module an allly is in.

Posted: 06 Oct 2017, 20:37
by sollniss
That's what I assumed. Just tag self for every module.

Re: Ability to detect which module an allly is in.

Posted: 07 Oct 2017, 03:42
by Miojo
More elegant than Insta tag.
Would increase the complexity by a good amount ... hmmmm...

Re: Ability to detect which module an allly is in.

Posted: 07 Oct 2017, 10:34
by GFX47
evilgeenius2 wrote:I'm guessing that it would be fairly trivial to implement?


Please. Don't.

Re: Ability to detect which module an allly is in.

Posted: 07 Oct 2017, 15:16
by Kanishka
GFX47 wrote:
evilgeenius2 wrote:I'm guessing that it would be fairly trivial to implement?


Please. Don't.


XD

Re: Ability to detect which module an allly is in.

Posted: 09 Oct 2017, 16:03
by MrChris
GFX47 wrote:
evilgeenius2 wrote:I'm guessing that it would be fairly trivial to implement?


Please. Don't.


Yeah, sorry about that. I meant that detecting which module an enemy is in would be trivial relative to the work required to implement a tagging system.

Re: Ability to detect which module an allly is in.

Posted: 09 Oct 2017, 20:26
by mcompany
evilgeenius2 wrote:Yeah, sorry about that. I meant that detecting which module an enemy is in would be trivial relative to the work required to implement a tagging system.

I actually doubt that's true

Re: Ability to detect which module an allly is in.

Posted: 10 Oct 2017, 12:21
by MrChris
At the moment it's impossible to detect easily if a specific ally is attacking a sniper. GFX could probably implement some kind of complex filtering mechanism to add this, but with this mechanism it would be simple:

If medium range enemy is in [attacking-sniper-module].

Instead of modules it would be better done using a new node type which is just like a connector node (things connect to and from it) but can have a name (the label) associated with it. If we could then detect which label/(instant tag?) an ally was in then it would work the same. This would have the advantage of not needing to put things in modules just to communicate state (nobody wants to create a module just for attacking the sniper) and would be a lot simpler.

One way it could work:

Adding nodes:
1. Add connector node
2. Select connector node and click button named "add label"
3. Type in name
4. Profit

Re: Ability to detect which module an allly is in.

Posted: 10 Oct 2017, 15:05
by TheKidPunisher
I think mcompany make a remark about your mistake (you wrote «enemy» instead of «ally»)

The idea is good but we already have tags to share status between bots and not sure your idea will simplify AI creation for beginners.

Re: Ability to detect which module an allly is in.

Posted: 10 Oct 2017, 18:11
by mcompany
TheKidPunisher wrote:I think mcompany make a remark about your mistake (you wrote «enemy» instead of «ally»)

Umm... I don't remember saying anything like that. My first message in this thread was me saying that it would probably be harder than instant tags


Anyways (to be on topic), this is an interesting idea, but I really doubt it has more uses than instant tags, and even if it does, it is still so much more complicated

Re: Ability to detect which module an allly is in.

Posted: 10 Oct 2017, 18:32
by TheKidPunisher
Oh ok, my bad.

Re: Ability to detect which module an allly is in.

Posted: 10 Oct 2017, 21:01
by pier4r
I don't like the request much, especially from a debugging point of view.

But hey, I did not like other requests before that I found nice afterwards.