Help me improve my AI

Jotunn
Script
Script
Posts: 23

Help me improve my AI

Post#1 » 27 Dec 2017, 01:57

Here is my retreat AI. It's the first module in my AI. It's effective, but I believe it can be better. Just not sure how I can improve on it.
Screenshot_20171226-165354.png
Screenshot_20171226-165354.png (160.85 KiB) Viewed 1312 times

mcompany
Autonomous Entity
Autonomous Entity
Posts: 872

Re: Help me improve my AI

Post#2 » 27 Dec 2017, 06:01

I don't know where to start without seeing it in action, but your node to attack low health low shield enemies seems extremely dangerous to you, especially if you are a sniper or at low health/shield and under attack

Chilio
Algorithm
Algorithm
Posts: 52

Re: Help me improve my AI

Post#3 » 27 Dec 2017, 13:17

Well, since you asked for it, I'll throw any comments at you I can think of ATM, see for yourself if they make sense :)

For clarity, I will call the stuff above the connection node the conditions, and the stuff below your actions.

So first of all: the conditions seem to fit nicely :) in your actions, I don't understand the purpose on some parts. Why do you have the part where you attack an easy killable enemy if you are almost killed yourself? I would at least make sure that 1. You are only being attacked by 1 enemy and 2. That enemy will die sooner than you. Otherwise, you may attack when you should be fleeing, and this way, you can flee even later if it's a one on one.

Second: in your last action: why flee from out of range units?

Third: if you're close to the wall: you start attacking without a check. (Even for the range, instead, you could put a simple attack subtree in there.)

For the conditions: you might want different actions resulting from the conditions: attacking a weak unit/attacking if close to the wall, instead of fleeing/moving somewhere else, is suicide if multiple enemies are attacking you. Furthermore: do check the range of multiple enemies.

Next: checking if an ally exists is nice, but check if he is of any help too (range, hp, shield?). Also: why flee earlier if an ally exists?

This should at least get it somewhat further concerning what you already have :)

To get you further than that: try to structure your action part and condition part in such a way that it is easy to add specific scenarios to your fleeing module with different actions as reactions. (Flee earlier with a mg than an as or sg for example.)

MrChris
Automaton
Automaton
Posts: 170

Re: Help me improve my AI

Post#4 » 29 Dec 2017, 20:50

I wish I could help you, but my retreatment AIs have always been total chaos and an unorganised mess. I just add new retreatment nodes when I see a scenario I need to retreat from.
------------------------------------------------
My in-game name is MrChris

Creator of the unofficial Gladiabots stats page: https://gladiabots-stats.info.tm/mrchris
And the Gladiabots retreatment simulator: https://cmrichards.github.io/glad_simulation

User avatar
Ritter Runkel
Neural Network
Neural Network
Posts: 498

Re: Help me improve my AI

Post#5 » 30 Dec 2017, 23:18

I met you some days ago (Don Quixote) and imho your ai is pretty strong, especially your attacking style and your push is very advanced.

There are two ideas I would think about. First is, that you should try to avoid any damage. With this in mind it's pretty easy to optimize your retreatment. If you retreat early enough then the opponent has to decide if he keeps attacking with no effect to you (means loosing time and bullets for him) or he switches target and loses time and you can push back very fast. So normally retreating earlier leads to harder pushing. I often flee even with 100% or when beeing attacked by only one enemy. I count enemies for that cases to get situational awareness or even better, count enemies in medium and long range which are not attacked by an Allie. This number is related to the fact if you are in a. Dominant situation or not.

The second thought is about the layout of your module. In an optimize case you watch a replay. You get damaged, then you analyze why you where hitted that hard. When you see the new condition to avoid cases like this you need an architecture which allows you some very quick fixes without getting a messed up tree.

Personally I prefer a matrix style layout like the following one. On the one side you see the bot classes in a normal version and when they are attacked by a sniper. On top you have the conditions when to flee and they are connected with simple connectors. That's a clean layout, it's easy adjustable and it's fast to work with it.

Screenshot_2017-12-30-23-10-48.jpg
Screenshot_2017-12-30-23-10-48.jpg (425.09 KiB) Viewed 1230 times


Screenshot_2017-12-30-23-09-11.jpg
Screenshot_2017-12-30-23-09-11.jpg (179.28 KiB) Viewed 1230 times


And here is an example when i flee at 100% shield when the enemy is in a better position:

Screenshot_2017-12-30-23-12-01.jpg
Screenshot_2017-12-30-23-12-01.jpg (71.62 KiB) Viewed 1230 times


I hope I could help. If you want to test some stuff, feel free to send me some private matches or to join the telegram gladiabots group. There are many good players discussing strategies and tactics there.

Jotunn
Script
Script
Posts: 23

Re: Help me improve my AI

Post#6 » 31 Dec 2017, 00:19

Thank you for your replies. I've removed the attacks from my retreat, unless the bot is cornered. And made a few other tweaks as suggested. It's still not where I want it to be, but your suggestions have helped. Thank you again.

Jotunn
Script
Script
Posts: 23

Re: Help me improve my AI

Post#7 » 01 Jan 2018, 20:57

Ritter; would you mind posting a higher quality image of the top conditions for your retreat. I'd like to try and figure out how to count enemies as well as see what other conditions I should be mindful of. My newer retreat module is weaker than the one I posted and I'm struggling to figure out why.

User avatar
Ritter Runkel
Neural Network
Neural Network
Posts: 498

Re: Help me improve my AI

Post#8 » 02 Jan 2018, 19:45

Jotunn wrote:Ritter; would you mind posting a higher quality image of the top conditions for your retreat. I'd like to try and figure out how to count enemies as well as see what other conditions I should be mindful of. My newer retreat module is weaker than the one I posted and I'm struggling to figure out why.


Sure, will send them via telegram

Return to “Strategies”

Who is online

Users browsing this forum: No registered users and 1 guest