Author Topic: Chasing AI bombers have no sense of self preservation  (Read 5504 times)

0 Members and 1 Guest are viewing this topic.

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Chasing AI bombers have no sense of self preservation
I don't know if this is a bug or a feature request. But when giving bombers an attack order on a capital ship. They completely cease to do any kind of evasive action. Making them like lambs marching to the slaughter for any fighter attacking them.
They just get stuck in sup_attack, e_weapon or attack mode. They only go into evade when they're given a more broad order like attack any target and dogfighting.
Fighters sort of suffer from this too, but to a lesser degree. It takes them a while to realize they're being attacked before they switch from attack mode to evade mode. But if the player is equipped with powerful weapons like a bank of kayser's or Prom-s, its kind of like shooting fish in a barrel, because it takes the AI a full 2-3 seconds to go "oh, crap I'm being shot at, I should probably stop chasing what I'm currently chasing" which usually means they're already dead.

If this is a bug, it'll probably affect mission balance all-around and would probably be best off as a ai_profile flag. If it's not, please consider this a feature request for a ai_smart_chase mode that makes the ai have a higher priority on not dying like a chump.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Lepanto

  • 210
  • Believes in Truth
    • Skype
Re: Chasing AI bombers have no sense of self preservation
I've noticed that too. It makes the FREDder have to throw more bombers at whatever the player's guarding. If the bombers were a tad smarter, the player couldn't shred through entire wings so easily.
"We have now reached the point where every goon with a grievance, every bitter bigot, merely has to place the prefix, 'I know this is not politically correct, but...' in front of the usual string of insults in order to be not just safe from criticism, but actually a card, a lad, even a hero. Conversely, to talk about poverty and inequality, to draw attention to the reality that discrimination and injustice are still facts of life, is to commit the sin of political correctness. Anti-PC has become the latest cover for creeps. It is a godsend for every curmudgeon and crank, from fascists to the merely smug."
Finian O'Toole, The Irish Times, 5 May 1994

Blue Planet: The Battle Captains: Missions starring the Admirals of BP: WiH
Frontlines 2334+2335: T-V War campaign
GVB Ammit: Vasudan strike bomber
Player-Controlled Capship Modding Tutorial

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Re: Chasing AI bombers have no sense of self preservation
Isn't this already adjustable through the AI's "Courage" value? i.e. higher values mean less sense of self-preservation in following orders.

Let's consider the alternative: right now it's most effective to focus fire on one bomber at a time, but the rest of the bombers in the wing continue their pursuit, so there's target prioritization and wingman management that needs to be done to defend effectively.

If this behaviour was altered, it would encourage players to spray bomber wings with laser fire to force them all to break off their target. They would still be easy pickings for an interceptor (can't win a dogfight), but this time they would have made even less progress towards their objectives. Right now this effect is a niche held by specific anti-bomber-wing weapons like the Flail/Morning Star and EMP missiles.

If AI tweaks in this direction are to be made, I'd suggest having it kick in for the last bomber in the wing when there's no point in drawing fire away from its wingmates. On the other hand, the sooner that last bomber dies, the sooner the next wave arrives. This suggests the tweak ought to be an AI profiles flag that can be used depending on the writers' preference for enemies as either cannon fodder, or equals in combat. Further, bomber pilots should be more courageous when they have defensive turrets allowing them to stay on target while also defending themselves.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 
Re: Chasing AI bombers have no sense of self preservation
I'm not sure the Courage value can fix this problem, the thing is that the AI doesn't even recognize a threat in time. And it would make sense for an entire wing to start evading to draw fire away from another bomber wing. An interceptor wing can spray at 1 bomber wing to make them break off but then you have to dogfight them and mop up before you can chase another wing, this way the bombers would buy more time and be more effective at setting up pincer strikes.

And really, let's not pretend that bomber turrets in Freespace are anything but a small nuisance. They barely scratch your shields even on insane, not to mention that different mods might have bombers without turrets or multirole fighters with bombing capabilities that this AI flag would be good for.
[19:31] <MatthTheGeek> you all high up on your mointain looking down at everyone who doesn't beam everything on insane blindfolded

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Chasing AI bombers have no sense of self preservation
Nah, courage does nothing here. I'm still not sure if courage actually does a lot of anything to be honest. I can't say I notice much of difference between a high courage A.I. profile and a low courage one.

If this behaviour was altered, it would encourage players to spray bomber wings with laser fire to force them all to break off their target. They would still be easy pickings for an interceptor (can't win a dogfight), but this time they would have made even less progress towards their objectives. Right now this effect is a niche held by specific anti-bomber-wing weapons like the Flail/Morning Star and EMP missiles.
None of this is relevant for mods that aren't Freespace 2 though.

If AI tweaks in this direction are to be made, I'd suggest having it kick in for the last bomber in the wing when there's no point in drawing fire away from its wingmates. On the other hand, the sooner that last bomber dies, the sooner the next wave arrives. This suggests the tweak ought to be an AI profiles flag that can be used depending on the writers' preference for enemies as either cannon fodder, or equals in combat. Further, bomber pilots should be more courageous when they have defensive turrets allowing them to stay on target while also defending themselves.
I'm not super sure how you imagine this working, with the drawing away part. And even if the player sprays pew pew over a wing and they go evasive for a moment, that just means they are now no longer in a tight formation and you can't keep all of them sprayed at the same time. The A.I. will just go back to chasing its goal when its not being fired upon anymore after a few seconds.
Turrets affecting A.I. could be an extra table option maybe, but shouldn't be some hardcoded value.

I'm not sure the Courage value can fix this problem, the thing is that the AI doesn't even recognize a threat in time. And it would make sense for an entire wing to start evading to draw fire away from another bomber wing. An interceptor wing can spray at 1 bomber wing to make them break off but then you have to dogfight them and mop up before you can chase another wing, this way the bombers would buy more time and be more effective at setting up pincer strikes.

And really, let's not pretend that bomber turrets in Freespace are anything but a small nuisance. They barely scratch your shields even on insane, not to mention that different mods might have bombers without turrets or multirole fighters with bombing capabilities that this AI flag would be good for.
Indeedz
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 
Re: Chasing AI bombers have no sense of self preservation
According to the code courage only affects ships attacking other small ships and delays the change into evasion mode if the enemy is in a better position ("on your six").

I went through that cap attack code again and the only evasion mode related to external attacks it can switch to is evade_weapon (contrary to normal dogfights where more options like evading a ship are possible). Evade weapon has a lot of conditions to make it go back to attack again, some of them might be easily triggered by an attacking player so the mode never really fires or takes fa long time to actually stay on and affect the ship. For example there is some obscure condition that may block evasion mode if the incoming weapon is at a right angle to the ship and stuff like that.
Here goes scripting and copy paste coding
Freespace RTS Mod
Checkpoint/Shipsaveload script

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Chasing AI bombers have no sense of self preservation
According to the code courage only affects ships attacking other small ships and delays the change into evasion mode if the enemy is in a better position ("on your six").
That's interesting, cause pretty much all A.I. profiles operate on a "higher is better" idea, and the stronger A.I. profiles always have a very high value. But this sounds like its actually a liability in the majority of cases.

I went through that cap attack code again and the only evasion mode related to external attacks it can switch to is evade_weapon (contrary to normal dogfights where more options like evading a ship are possible). Evade weapon has a lot of conditions to make it go back to attack again, some of them might be easily triggered by an attacking player so the mode never really fires or takes fa long time to actually stay on and affect the ship. For example there is some obscure condition that may block evasion mode if the incoming weapon is at a right angle to the ship and stuff like that.
Can you tell from the code how long evade_weapon is suppose to be on before it actually starts affecting the ship?
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Lepanto

  • 210
  • Believes in Truth
    • Skype
Re: Chasing AI bombers have no sense of self preservation
I dunno if this is remotely feasible. But could you give bombers a unique evasion mode, where they do spins and turns to dodge your fire, while still flying in the direction of the target? Basically, how a player flying a bomber would react to enemy fighters on his tail?
"We have now reached the point where every goon with a grievance, every bitter bigot, merely has to place the prefix, 'I know this is not politically correct, but...' in front of the usual string of insults in order to be not just safe from criticism, but actually a card, a lad, even a hero. Conversely, to talk about poverty and inequality, to draw attention to the reality that discrimination and injustice are still facts of life, is to commit the sin of political correctness. Anti-PC has become the latest cover for creeps. It is a godsend for every curmudgeon and crank, from fascists to the merely smug."
Finian O'Toole, The Irish Times, 5 May 1994

Blue Planet: The Battle Captains: Missions starring the Admirals of BP: WiH
Frontlines 2334+2335: T-V War campaign
GVB Ammit: Vasudan strike bomber
Player-Controlled Capship Modding Tutorial

 
Re: Chasing AI bombers have no sense of self preservation
Teach bombers have to barrel roll. We obviously need this in Freespace.
[19:31] <MatthTheGeek> you all high up on your mointain looking down at everyone who doesn't beam everything on insane blindfolded

 

Offline potterman28wxcv

  • 27
  • Just a fan player
Re: Chasing AI bombers have no sense of self preservation
This is exactly why I still believe going C-3-9 gives you more chance to win the battle than C-3-1.

This has been the case for ages. I don't remember the AIs acting differently. When they are ordered to attack a target, they ignore everything else.

 
Re: Chasing AI bombers have no sense of self preservation
That's interesting, cause pretty much all A.I. profiles operate on a "higher is better" idea, and the stronger A.I. profiles always have a very high value. But this sounds like its actually a liability in the majority of cases.
Not sure about that. On higher difficulties if the AI is in a more maneuverable ship running away from the player instead of trying to outturn him is more likely to get them killed. On lower difficulties AI is stupid anyway and it doesn't really matter.

Quote
Can you tell from the code how long evade_weapon is suppose to be on before it actually starts affecting the ship?
If it is on it will affect the ships instantly but may only be accelerating depending on the angel of the incoming fire (which by itself is utterly useless if they are going full speed already). If the shot is close they might use their afterburner which they never do in capital attack mode unless you use the ai flag. Generally they only start evading 4 seconds before the shot impacts them. Additionally it looks like that usually only the closest shot is used and anything else ignored.
So altogether there are several conditions that may prevent evasion from even starting and there is another condition that prevents any turning for certain angles. Both cases look like they can be triggered relatively easy in case of a player shooting bombers.

I dunno if this is remotely feasible. But could you give bombers a unique evasion mode, where they do spins and turns to dodge your fire, while still flying in the direction of the target? Basically, how a player flying a bomber would react to enemy fighters on his tail?
Easier said than done. You would have to get the math (where to fly, how to turn) right without potential failures and you will end up adding many more hardcoded values while fiddling to make it work. When I created the "free-afterburner-use" flag I also ended up adding code to capship attack among other places. Then I modified all the new hardcoded numbers while using a FS fighter and a bomber as sample case in a sample mission to see if it feels right. May or may not be good with any mods...
Here goes scripting and copy paste coding
Freespace RTS Mod
Checkpoint/Shipsaveload script

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Chasing AI bombers have no sense of self preservation
We need to either get rid of or expose all hardcoded values like that. This is actually a big part of why high-speed mods are so hard to get to work right.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Chasing AI bombers have no sense of self preservation
When I created the "free-afterburner-use" flag I also ended up adding code to capship attack among other places.

First time I've heard of this. Zero mentions found on the wiki.

Not sure about that. On higher difficulties if the AI is in a more maneuverable ship running away from the player instead of trying to outturn him is more likely to get them killed. On lower difficulties AI is stupid anyway and it doesn't really matter.
Is there hardcoded behavior based on difficulty? If the ai profile is the same across all difficulties, shouldn't they be acting exactly the same?
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 
Re: Chasing AI bombers have no sense of self preservation
When I created the "free-afterburner-use" flag I also ended up adding code to capship attack among other places.
First time I've heard of this. Zero mentions found on the wiki.
It is an ai flag that makes the ai use afterburners while flying waypoints, flying towards objects/ships and when attacking capships. Not sure who wanted to have something like that back then.

Not sure about that. On higher difficulties if the AI is in a more maneuverable ship running away from the player instead of trying to outturn him is more likely to get them killed. On lower difficulties AI is stupid anyway and it doesn't really matter.
Is there hardcoded behavior based on difficulty? If the ai profile is the same across all difficulties, shouldn't they be acting exactly the same?
I don't know... But in general with all the other values shouldn't the ai be better on higher difficulties and create more problems for the player if it stays on him instead of turning tail?

We need to either get rid of or expose all hardcoded values like that. This is actually a big part of why high-speed mods are so hard to get to work right.
While a good idea it is actually a mess due to the huge amount of slightly different values all over the ai code, some of which are really hard to understand or rarely used.
Here goes scripting and copy paste coding
Freespace RTS Mod
Checkpoint/Shipsaveload script

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Chasing AI bombers have no sense of self preservation
It is an ai flag that makes the ai use afterburners while flying waypoints, flying towards objects/ships and when attacking capships. Not sure who wanted to have something like that back then.
Yeah okay cool, but why isn't it documented on the wiki? How are modders suppose to use these cool things if they dont know about them?

I don't know... But in general with all the other values shouldn't the ai be better on higher difficulties and create more problems for the player if it stays on him instead of turning tail?
I'm wondering if I understood your initial post on this correctly:
According to the code courage only affects ships attacking other small ships and delays the change into evasion mode if the enemy is in a better position ("on your six").
I read this as "the ai will delay the change into evasion mode if his enemy is in a better position, on the ai's six". Or did you mean, the ai will delay the change into evasion mode when its on the enemies's six and is getting shot at?

Reading comprehension, ho!
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 
Re: Chasing AI bombers have no sense of self preservation
It is an ai flag that makes the ai use afterburners while flying waypoints, flying towards objects/ships and when attacking capships. Not sure who wanted to have something like that back then.
Yeah okay cool, but why isn't it documented on the wiki? How are modders suppose to use these cool things if they dont know about them?
Not sure why it was never added. I mean that patch ended up being commited without me doing much about it, at some point, and I forgot about it. I somehow doubt it was seriously reviewed (contrary to all my other features and bugfixes). It mimics most of what is wrong about ai code in general.
I don't know... But in general with all the other values shouldn't the ai be better on higher difficulties and create more problems for the player if it stays on him instead of turning tail?
I'm wondering if I understood your initial post on this correctly:
According to the code courage only affects ships attacking other small ships and delays the change into evasion mode if the enemy is in a better position ("on your six").
I read this as "the ai will delay the change into evasion mode if his enemy is in a better position, on the ai's six". Or did you mean, the ai will delay the change into evasion mode when its on the enemies's six and is getting shot at?

Reading comprehension, ho!
Your first version is how I understood it works. I meant that when the target of the ai is actually getting behind said ai and threatens to attack it, courage modifies the value of how good the enemy position behind the ai must be before evasion mode is entered. Higher courage means the attacker can achieve a better position before the ai starts evading him. Now this only applies when the ai actually targets the attacker and thus tries to get behind his back as well. It won't be flying a straight line and in case of the ai having a fighter with a higher maneuverability it could simply outturn the attacker. That means it has good chances to win the dogfight if it doesn't run away. Courage seems to support this behaviour. If the ai flies a heavy brick, high courage delays the change to running away in a fight it is unlikely to win where evading might at least delay the death and buy some time. In this case courage seems to contribute to the ai dying a faster death.
Here goes scripting and copy paste coding
Freespace RTS Mod
Checkpoint/Shipsaveload script

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
Re: Chasing AI bombers have no sense of self preservation
I've been chasing bombers moving at 500 m/s in Shattered Stars. However, they seem to be attacking the player instead of evading themselves when they are attacked. They just glide, move sideways and decelerate to avoid weapons fire.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...