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.
Help me improve my AI
Re: Help me improve my AI
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
Re: Help me improve my AI
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.)

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

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.)
Re: Help me improve my AI
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
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
- Ritter Runkel
- Neural Network
- Posts: 498
Re: Help me improve my AI
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.
And here is an example when i flee at 100% shield when the enemy is in a better position:
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.
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.
And here is an example when i flee at 100% shield when the enemy is in a better position:
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.
Re: Help me improve my AI
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.
Re: Help me improve my AI
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.
- Ritter Runkel
- Neural Network
- Posts: 498
Re: Help me improve my AI
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
Who is online
Users browsing this forum: No registered users and 1 guest