Page 1 of 1

One AI, no conditions, assaults only

Posted: 29 Apr 2017, 12:17
by Jeffrey Harpen
I would like to show you my previous strategy, which led me to Master league. Actually it's more a challenge than a strategy. But before I show my final AI, let's start with something more simple. I ask myself if it's possible to go through whole the practice using only assault bots with the same AI and without any conditions (only actions and filters). It seemed to be difficult but became quite easy. First I've made a simple AI to shoot the enemies and collect the resources when all the enemies are dead. It went smoothly through the first mission. Then I tried it in next missions. Every time it has failed I modified it to pass this specific mission and went back to the first mission to see if it's still OK there. Actually sometimes I was suprised how well some simple AI perform even in apparently difficult missions. It was only few times I had to make quite big changes. Finally I got something like this:

tmp_19504-Screenshot_20170429-095714892111698.png
tmp_19504-Screenshot_20170429-095714892111698.png (189.85 KiB) Viewed 1883 times

OK, that was fun. Then I asked myself how far can I go in a real league doing the same. To make long story short: I have played a lot of matches, sometimes pending tens of them without any change in my AI, just to gain experience. And I mean experience, not XPs, because I needed to know how my AI perform against different opponent strategies (AIs, bots, initial settings...). Of course it was easier to see something is really wrong with the new AI and I have to get back to my previous AI, but it took tens of matches to see if there is any progress. Finally I managed to get to Master League with something like this (sorry about the quality of the image, but PNG version is to big to upload):

tmp_19504-Screenshot_20170429-095619-2123293324.jpg
tmp_19504-Screenshot_20170429-095619-2123293324.jpg (201.34 KiB) Viewed 1883 times

Seems a bit crazy, doesn't it? Especially when you look at the filters in "flee from enemy" actions it may seem illogical, but believe me, it has a reason. Here it is zoomed in:

tmp_19504-Screenshot_20170429-095619-defence931573305.png
tmp_19504-Screenshot_20170429-095619-defence931573305.png (57.31 KiB) Viewed 1883 times

This is the AI that has got to Master League when I was using only assault bots. Then I tried the same AI with Shotgun and it was even a bit worse, but when I tried it with Machine Gun, I've managed to get to Grand Master League, where I am at the moment. As you can see most of defensive actions are at the left side, because it's the first thing a bot should do when attacked and weak. In the middle there are the offensive actions and on the right there are actions to collect some points. That's the basic idea: kill all enemies and then get the resources. However I discovered that sometimes it's good to grab some resources earlier, that's why there is a single "catch closest resource in short distance" action performed in case there's nothing interesting to attack. Of course when the resource is catched by a bot, the most important thing is to secure it, because there is no reasonable way to make the bot to drop it without using a condition (at least I haven't figure it out). That's why "secure resource" action is on the left side, somewhere between "flee from" actions (since carrying resource bot should also avoid some enemy's fire - not all of it, because it wouldn't get to the base in some cases).

The funny thing about such a stupid AI is that when you look at the style it fights, it seems to be quite intelligent. I can even perform some dramatic actions, like in the matches 515359, 528198, 528469, 555125. I hope you'll enjoy watching and analysing it, while I start to program some specialized AIs. I hope this also will be fun. :)

Re: One AI, no conditions, assaults only

Posted: 29 Apr 2017, 12:41
by Kanishka
Great post! It's actually possible to pass all practice levels with just 6 Nodes. :lol:

Re: One AI, no conditions, assaults only

Posted: 29 Apr 2017, 12:48
by pier4r
Nice post. Check also the wiki, where this challenge is mentioned: viewtopic.php?f=7&t=451

Anyway I#m concerned by the priority. You know that is __not__ angle based, so actually you have attack nodes in the middle of fleeing or capturing resources. You can use connectors to order the nodes better and keep the proper priority.

Re: One AI, no conditions, assaults only

Posted: 29 Apr 2017, 13:26
by Kanishka
A *partially* working AI is

Flee, Secure, Attack, Catch.

4 Nodes.

Re: One AI, no conditions, assaults only

Posted: 30 Apr 2017, 11:20
by Jeffrey Harpen
pier4r wrote:Check also the wiki, where this challenge is mentioned: http://gfx47.com/games/Gladiabots/Forum ... ?f=7&t=451
Thanks! Seems that many people think the same way... ;)

pier4r wrote:Anyway I#m concerned by the priority. You know that is __not__ angle based, so actually you have attack nodes in the middle of fleeing or capturing resources.
Yes, and this is the way it was meant to be. Actually all these lines are not important, because I align nodes horizontally using these small dots in the background. The order of execution is from left to right, as mentioned in tutorial. It's more like good old linear program in 8-bit BASIC but even without any GOTOs. :)

Re: One AI, no conditions, assaults only

Posted: 30 Apr 2017, 14:28
by Kanishka
We have GOTOs is GladiaScript.

Re: One AI, no conditions, assaults only

Posted: 30 Apr 2017, 14:42
by Jeffrey Harpen
I meant the way I've made my AIs.

Re: One AI, no conditions, assaults only

Posted: 30 Apr 2017, 17:40
by Kanishka
Ahh

Re: One AI, no conditions, assaults only

Posted: 01 May 2017, 02:15
by neoliminal
That is very impressive.

Re: One AI, no conditions, assaults only

Posted: 01 May 2017, 21:35
by Jeffrey Harpen
Kanishka wrote:It's actually possible to pass all practice levels with just 6 Nodes. :lol:

Now with just 5. ;) :D

Re: One AI, no conditions, assaults only

Posted: 02 May 2017, 20:56
by Gimric
I reviewed the games -- very impressive! The bots react in fact dramatically.
Nice job.