Uveso / AI-Uveso

AI Mod for Supreme Commander FAF Version
5 stars 3 forks source link

Suicidal Commander #5

Open Achilleshiel opened 3 years ago

Achilleshiel commented 3 years ago

The ACU walks offensive out of its base and often gets sniped early, or late game without any resistance. ACU walks to often into T2 point defense without upgrades. This is happening since v93.

bergzand commented 3 years ago

To elaborate a bit on this, we're seeing this behavior a lot on 10 km (autogenerated) maps with the adaptive AIx. The 20 km maps are probably too large allow for the offensive play style. Where previously the enemy ACU would bunker up in it's base underneath a lot of shielding, it now can be sniped easily because it is idling or out hunting outside the base.

I think we should be able to provide some replays showing the issue if that helps.

Uveso commented 3 years ago

Thanks for the report!

Yes the ACU is suicidal. :)

I build a new system to decide if the ACU should attack or retreat. I call it the Braveness factor. Positive numbers will lead to an attack, negative lead to fall back to base:

Basically ist calculated by this conditions:

Here is the code: https://github.com/Uveso/AI-Uveso/blob/master/hook/lua/platoon.lua#L3565

The calculation is not balanced yet, and its absolute normal that the ACU is way too aggressive. This will be better after adding more conditions for losing Braveness.

At the moment i collect user feedback to see where and why the AI ACU is dying and then i try to add those threats to the Braveness conditions to make the ACU more survivable.

bergzand commented 3 years ago

I think the idea behind this braveness factor is great, makes the AI a lot more adaptive in how to us the ACU.

I have two remarks so far:

As always, thanks for all the effort you've put in this AI!

LordTy commented 3 years ago

I see the same behaviour,

I think the ranges for losing braveness from enemy units are a bit low. The range of a T2 point defense is 50, This would mean that the enemy ACU remains within the range of the T2 point defense until it is below 20%.

I think in general that it should lose more braveness for damage, maybe based on the rate of damage? That would not prevent snipes, but it might help.

Can you filter based on which unit can target you/has hit you? That might be better then within range?

Uveso commented 3 years ago

New update is out (v95)

Sadly i did a mistake and forgot to disable the debug output from the ACU function.

But for now you can see the bravenesstable inside the game.log (press [F9] to open the moho debug window) Also when you focus the AI army (cheats on and [F2] menu) then you can see the debug drawings for the ACU. Looks like this: https://www.youtube.com/watch?v=LvLNFyNk3kg

Since you all have so much good ideas, maybe this can lead to even more ideas :D

[Edit] threat for point defenses is already implemented in v95

ken2k commented 2 years ago

Hi, First of all, thanks a ton for your mod.

Here are some few suggestions about this issue:

1) maybe make the braveness factor automatically slightly decrease over time. While it makes perfectly sense to push with the ACU at the early stages of the game, human players most of the time move back their ACU to their primary base after a few time (for example when most of the unit on the battlefield are T3). Too difficult to constantly check for snipes (missiles, gunships, billy...).

2) in case it's possible, it would be greatly useful to take the victory condition into account: while it's perfectly fine to push with the ACU when playing in supremacy mode, assassination in the other hand should make the Uveso ACU way more careful. As the ACU is really kinda suicidal with the v98 of the mod, we always play in supremacy mode because otherwise the game would be too easy (just too easy to snipe an ACU with either T2 bombers, gunships or any other unit that the human player could stack in their base and send altogether in a massive snipe attack).

Hope this could help.

Uveso commented 2 years ago

Hey @ken2k

yes feedback is always helpful! Its a good idea to change the ACU behavior with the gamemode. I play mostly supremacy, i guess this is why the ACU is so suicidal :)

Added this issue to my ToDo list.