conditional subtrees

HDeffo
Neural Network
Neural Network
Posts: 212

conditional subtrees

Post#1 » 18 Dec 2016, 07:42

Essentially allow a subtree without action nodes to act as a condition where it'll show green only where any full tree extension in the subtree shows green and reached a dead end. This will allow players to make their own more complex conditionals without actually adding more complicated items like variables or functions

User avatar
Kanishka
Skynet
Skynet
Posts: 1420
Contact:

Re: conditional subtrees

Post#2 » 18 Dec 2016, 08:11

Can you elaborate? :?
Fixes break an AI more than bugs do. :ugeek:

Gladiabots Off-Topic Chat


My Stats: Kanishka_RN3;Kanishka_MiPad

ConsciouS-0nE
Autonomous Entity
Autonomous Entity
Posts: 740

Re: conditional subtrees

Post#3 » 18 Dec 2016, 08:17

IMG_20161218_151603.png
You wanted the left one?
But with action node?
IMG_20161218_151603.png (35.39 KiB) Viewed 1535 times
Wont work on just an ai full of conditions? Until it reaches dead and then execute the action 'beside'(not below)
Last edited by ConsciouS-0nE on 18 Dec 2016, 10:58, edited 1 time in total.
Im not the best player, but atleast im something.I'm 8
Science is madness! 3:)

User avatar
NullPointer
Autonomous Entity
Autonomous Entity
Posts: 539

Re: conditional subtrees

Post#4 » 18 Dec 2016, 10:56

Good idea, there are still some parts of my AIs I can't reuse because subtrees can't have children nodes and need to end in an Action.

Maybe we could have a Return Action.

Christian
Algorithm
Algorithm
Posts: 56

Re: conditional subtrees

Post#5 » 18 Dec 2016, 11:25

Would be needed for trees that calculate a condition.

User avatar
GFX47
Dev
Posts: 2841

Re: conditional subtrees

Post#6 » 18 Dec 2016, 12:12

Let's keep it for later (https://trello.com/c/lkTsTRuo/347-condi ... -sub-trees).
It's another concept that seems a bit hard to teach without specific tutorials.

Plus, I'd like to wait for more feedback to see how the current version of the system is understood and used.

The Eye
Hello World
Hello World
Posts: 9

Re: conditional subtrees

Post#7 » 18 Dec 2016, 23:09

Basically, we're asking for procedure nodes, right? Go to MIT App Inventor 2, if you don't understand. Like this:

Image
Image

sethcohn
Automaton
Automaton
Posts: 122

Re: conditional subtrees

Post#8 » 25 Jan 2017, 15:42

As I mentioned on the trello card, require these AI to begin and end with a single connector, and then it shouldn't be hard to implement

Think of a complex and/or setup, turning it into a simple subnet rather than rebuilding it each time. "If A And B and not C and not D but if E then"

If you allowed multiple input/output connectors, the subnet linking would get harder to UI so I'd avoid that. This way it's either true or false, one path in, one path out

pier4r
Skynet
Skynet
Posts: 3334

Re: conditional subtrees

Post#9 » 25 Jan 2017, 17:39

I cannot at the moment but a mockup can be even a sketch on paper
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

ConsciouS-0nE
Autonomous Entity
Autonomous Entity
Posts: 740

Re: conditional subtrees

Post#10 » 25 Jan 2017, 17:59

Got me a light bulb from my previous post above.

Screenshot_2017-01-26-01-02-36.png
Screenshot_2017-01-26-01-02-36.png (60.24 KiB) Viewed 1459 times
Screenshot_2017-01-26-01-04-59.png
Screenshot_2017-01-26-01-04-59.png (65.65 KiB) Viewed 1459 times


Hdeffo hax
Im not the best player, but atleast im something.I'm 8
Science is madness! 3:)

sethcohn
Automaton
Automaton
Posts: 122

Re: conditional subtrees

Post#11 » 25 Jan 2017, 19:29

What he said. Good illustration.

sethcohn
Automaton
Automaton
Posts: 122

Re: conditional subtrees

Post#12 » 25 Jan 2017, 20:04

NullPointer wrote:Good idea, there are still some parts of my AIs I can't reuse because subtrees can't have children nodes and need to end in an Action.

Maybe we could have a Return Action.


Actually, I'm using bot tags to implement the equivalent of return actions.
I need to refine it better and do a illustration. edit: done now...
Screenshot_2017-01-25-19-19-36.png
Screenshot_2017-01-25-19-19-36.png (176.48 KiB) Viewed 1433 times

To run this demo, test arena team play (or any really), set all others to an idle AI, change the second enemy to a non assault.
Watch the bugger scurry back and forth get ever closer until he finally fulfills the end conditions.

But essentially:

self bot tag 1 if filter conditions
If self bot tag 1(you can also do If not, working out the differences now)
-- go subtree XYZ (etc)
next item after

in subtree XYZ:
do whatever
when ready to return: remove self bot tag1 (or add bot tag if you did If Not)

sethcohn
Automaton
Automaton
Posts: 122

Re: conditional subtrees

Post#13 » 26 Jan 2017, 01:28

Updated above with demo AI

sethcohn
Automaton
Automaton
Posts: 122

Re: conditional subtrees

Post#14 » 26 Jan 2017, 01:41

Also, doesn't have to be self tags... tag an enemy, or a base, etc... lots of options. The key is the conditional has to be placed earlier than the usage elsewhere, so it interrupts the tree scan and runs next.

sethcohn
Automaton
Automaton
Posts: 122

Re: conditional subtrees

Post#15 » 26 Jan 2017, 01:43

And of course these could be placed in a subtree... I didn't for the sake of the single AI demo.

pier4r
Skynet
Skynet
Posts: 3334

Re: conditional subtrees

Post#16 » 26 Jan 2017, 01:47

Thanks for sharing. I should remember to put it in the faq
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

sethcohn
Automaton
Automaton
Posts: 122

Re: conditional subtrees

Post#17 » 26 Jan 2017, 01:51

Unrelated but I decided to put it in the above demo: I intentionally used the "Move Toward Enemy that I'm not moving toward" to force the bot to only take small steps each time, and iterate more for demo purposes so when you watch in the debugger, you see it running thru most of the loops repeatedly...

User avatar
Uthael
Script
Script
Posts: 28

Re: conditional subtrees

Post#18 » 22 Feb 2017, 12:02

Unaware of this topic (didn't manage to find it on Trello), I created mine. Here's the OP quoted. I think it would make for a good implementation of this idea.

Uthael wrote:Here, the idea is to turn at least a half of the mess on the screen into small black boxes that refine inputs into outputs.

At the moment, connectors serve only to make your AIs visually tidy. They do that perfectly. But configuring them is greyed out. Sooo... How about marking a connector as an output? The sub-VI name would get extra dots on the sides or below it, depending on the number of outputs it has. The order of those dots is the same as the order of connectors in the sub-VI.

Now, I'm not sure how the game code is written, but this may also solve the "complex AI loading time" problem (if loading is segmented or the visual representation of the AI causes the problem). But even if it lenghtens that time slightly, the convenience of not having to add, configure and link several modules again and again would be worth it.

Edit: Yeah, in Mass Effect they differentiate Virtual Intelligence and Artificial Intelligence. Sentient software (AI) may be intelligent, but just a VI can't be sentient. I like that and got used to that :D
<extra fancy signature>

ElvenMonk
Neural Network
Neural Network
Posts: 219

Re: conditional subtrees

Post#19 » 28 May 2018, 18:13

+1 for conditional sub-ai and placeholder action.

sollniss
Automaton
Automaton
Posts: 176

Re: conditional subtrees

Post#20 » 01 Jun 2018, 22:25

This is easily possible with tags now. I use it in my AI a lot.

Return to “Feature Requests”

Who is online

Users browsing this forum: No registered users and 2 guests