Why ship ai stinks so bad for escort missions

This forum is the ideal place for all discussion relating to X4. You will also find additional information from developers here.

Moderator: Moderators for English X Forum

Post Reply
kerber0s
Posts: 8
Joined: Sun, 28. Feb 10, 02:07
x4

Why ship ai stinks so bad for escort missions

Post by kerber0s » Fri, 24. Sep 21, 04:43

I was escorting a cargo transport ship today in a fighter, and I realized why the AI is so bad at escort.

It's because of travel speed.

Once a ship goes to travel mode, it goes whatever the max speed it's engines are capable of in travel mode. For a fighter, that might be 2x faster than the transport it's supposed to be escorting. It's hard to escort a cargo ship even when you're flying the escort manually.

Ways I can see to fix it:
* AI leaders don't go to travel mode when it's vessel is in a wing. When not in travel mode, escorts match speed with the escorted vessel.
Obviously not ideal, because travel will take longer. But it would work.

* When in escort mode, let faster ships reduce travel speed to match the travel speed of the escorted vessel. Probably not a trivial change. But I think it would work.

Assigning ships to escort traders or miners is pointless today as things are, unless I'm just doing it wrong. I even kinda hope I AM doing it wrong. But I don't think so.

User avatar
Digitalcat
Posts: 12
Joined: Tue, 4. Dec 18, 20:25
x4

Re: Why ship ai stinks so bad for escort missions

Post by Digitalcat » Fri, 24. Sep 21, 05:12

kerber0s wrote:
Fri, 24. Sep 21, 04:43
* When in escort mode, let faster ships reduce travel speed to match the travel speed of the escorted vessel. Probably not a trivial change. But I think it would work.
This would be perfect, and I don't think there is a way to make fleets stick together at all times yet besides matching speed outside of travel, kinda honestly makes me never use escorts, because what's the point if fighters make it to a massive engagement first before the heavy hitters do, just causes the fighters to be wiped out.

humility925
Posts: 1416
Joined: Tue, 11. May 04, 20:34
x4

Re: Why ship ai stinks so bad for escort missions

Post by humility925 » Fri, 24. Sep 21, 06:29

M and S are easy throw your credit out of door, L ship is worthy investment because L is harder to kill so not losing money that easy, but ton of money and speed issues as L and XL is too slow for escort meanwhile M and S could reasonable speed but you lost credit easy when doing those as it's got killed easy.
Each even s could easy cost over million each.
Had a compassionate when you able... :)

Pares
Posts: 468
Joined: Wed, 6. May 09, 15:46
x4

Re: Why ship ai stinks so bad for escort missions

Post by Pares » Fri, 24. Sep 21, 08:25

kerber0s wrote:
Fri, 24. Sep 21, 04:43
It's hard to escort a cargo ship even when you're flying the escort manually.

...

* When in escort mode, let faster ships reduce travel speed to match the travel speed of the escorted vessel. Probably not a trivial change. But I think it would work.
There is a hotkey to match target speed and it works in travel mode too (although you have to hold it down), so it seems travel speed matching for the AI should be a trivial thing to implement...

A5PECT
Posts: 6078
Joined: Sun, 3. Sep 06, 02:31
x4

Re: Why ship ai stinks so bad for escort missions

Post by A5PECT » Fri, 24. Sep 21, 13:11

Lead ships already reduce their maximum travel speed to match slower subordinate ships. The problem is twofold:

1) It only accounts for top speed, not acceleration. When a subordinate ship has lower acceleration than their leader, they'll usually lose formation even if they engage their travel drives at the same time. And that's a big "if", as

2) the AI isn't great at deciding when to engage and disengage travel drive in general.

This is one of the areas I wish the devs would simply cheat more with, instead of chaining themselves to having to simulate the minutia of every ship's actions. When a fleet leader is executing any command where the fleet is to make a synchronized movement (e.g. a basic Fly To command), limit the lead ship's speed, acceleration, and turn rates to the lowest common denominators in the fleet. Then forgo simulating every subordinate ship's flight commands and physics, and just have them maintain their relative positions to the lead ship. Basically, apply the "gravity well" anchoring function used on the player ship to subordinates in a fleet when they move in formation.
Admitting you have a problem is the first step in figuring out how to make it worse.

taztaz502
Posts: 799
Joined: Sun, 17. Nov 13, 12:22
x4

Re: Why ship ai stinks so bad for escort missions

Post by taztaz502 » Fri, 24. Sep 21, 20:41

They should just lock in formation when in travel speed at the slowest ships speed, like they do in freelancer.

flywlyx
Posts: 956
Joined: Sat, 15. May 21, 03:45
x4

Re: Why ship ai stinks so bad for escort missions

Post by flywlyx » Sat, 25. Sep 21, 07:22

A5PECT wrote:
Fri, 24. Sep 21, 13:11
2) the AI isn't great at deciding when to engage and disengage travel drive in general.
It should be simple math, no idea why it is so hard for X4 AI.

I have no idea how their design intention is, it should be quite easy to make AI perfectly finish all the basic tasks, and they add additional stupidity afterward.But I barely saw 5 stars pilots could perfectly perform their duty, So I assume their fundamental AI design has some issue.

peteran
Posts: 269
Joined: Thu, 26. Jul 07, 13:01
x4

Re: Why ship ai stinks so bad for escort missions

Post by peteran » Sat, 25. Sep 21, 10:39

flywlyx wrote:
Sat, 25. Sep 21, 07:22
A5PECT wrote:
Fri, 24. Sep 21, 13:11
2) the AI isn't great at deciding when to engage and disengage travel drive in general.
It should be simple math, no idea why it is so hard for X4 AI.

I have no idea how their design intention is, it should be quite easy to make AI perfectly finish all the basic tasks, and they add additional stupidity afterward. But I barely saw 5 stars pilots could perfectly perform their duty, So I assume their fundamental AI design has some issue.
I observed this very behavior in my last game. Asgard as a commander of a fleet and a lot of faster ships as subordinates (in a complex hierarchy of destroyers, frigates, and such).

I need to replicate that behavior to pinpoint it with a save, but I agree: there does indeed exist a bug with the move to command that commanders issue to their subordinates.

I think it has to do with there being no parameter for the time when subordinates should reach their destination.

A5PECT
Posts: 6078
Joined: Sun, 3. Sep 06, 02:31
x4

Re: Why ship ai stinks so bad for escort missions

Post by A5PECT » Sat, 25. Sep 21, 13:06

flywlyx wrote:
Sat, 25. Sep 21, 07:22
A5PECT wrote:
Fri, 24. Sep 21, 13:11
2) the AI isn't great at deciding when to engage and disengage travel drive in general.
It should be simple math, no idea why it is so hard for X4 AI.
I'm not privy to low level engine coding in X4, but my assumption is scalability and accessibility. Calculating, planning, and executing the travel drive timing on a single ship for a single trip is easy. But X4 isn't about a single ship, or ten ships, or a hundred ships. It's a game of thousands of interlocking pieces.

There are many situations in the game navigation AI and physics calculations to be run on many different objects performing many different tasks simultaneously. So that code has to be very lean if they want it to reliably run on players' computers. The devs could make it more detailed and elaborate, but that would make it heavier, and raise the game's already high processing requirements.

The commitment to persistent simulation of the game universe is what makes X games unique. But I feel it hinders more than it helps when it takes it as far as it does in cases like this. Personally, I'd take more consistent, more presentable abstraction and consolidation of fleet movements over the messy, overly detailed simulation of individual ship behavior we have now.
Admitting you have a problem is the first step in figuring out how to make it worse.

dtpsprt
Posts: 2794
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Why ship ai stinks so bad for escort missions

Post by dtpsprt » Sat, 25. Sep 21, 15:11

peteran wrote:
Sat, 25. Sep 21, 10:39
I observed this very behavior in my last game. Asgard as a commander of a fleet and a lot of faster ships as subordinates (in a complex hierarchy of destroyers, frigates, and such).

I need to replicate that behavior to pinpoint it with a save, but I agree: there does indeed exist a bug with the move to command that commanders issue to their subordinates.

I think it has to do with there being no parameter for the time when subordinates should reach their destination.
It's not a bug. Each ship's reaction time to a command is dependent (to a great degree) to the ship's captain experience. Low level experience (below 4 stars!!!) will result in delayed response to the command given by the commander (usually a 4 or 5 star as should be), throwing everything in the "frustration" or "why this is not working" bin...

flywlyx
Posts: 956
Joined: Sat, 15. May 21, 03:45
x4

Re: Why ship ai stinks so bad for escort missions

Post by flywlyx » Sun, 26. Sep 21, 05:30

A5PECT wrote:
Sat, 25. Sep 21, 13:06

I'm not privy to low level engine coding in X4, but my assumption is scalability and accessibility. Calculating, planning, and executing the travel drive timing on a single ship for a single trip is easy. But X4 isn't about a single ship, or ten ships, or a hundred ships. It's a game of thousands of interlocking pieces.
This is the funny part, the perfect decision only needs 1 time, but for a non-perfect one, your best bet is one.
And for all the movement decisions, you only need position vector, rotation vector, speed vector, and time, there isn't any "hard" decision that needs to be made.
This means, for a single task, the perfect decision-making AI will cost less CPU effort to finish.
For a game of thousands of interlocking pieces, it gets worse thousands of times.
peteran wrote:
Sat, 25. Sep 21, 10:39

I think it has to do with there being no parameter for the time when subordinates should reach their destination.
I don't want to believe this is true, but maybe you are right, the engine performance doesn't allow such calculation is not expected but still possible.

S!rAssassin
Posts: 355
Joined: Sat, 7. Aug 10, 10:31

Re: Why ship ai stinks so bad for escort missions

Post by S!rAssassin » Mon, 27. Sep 21, 15:33

IMO, in fleet, move orders, travel or cruise, should be operate with minimal speed and steering of fleet member.

dtpsprt
Posts: 2794
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Why ship ai stinks so bad for escort missions

Post by dtpsprt » Mon, 27. Sep 21, 23:46

S!rAssassin wrote:
Mon, 27. Sep 21, 15:33
IMO, in fleet, move orders, travel or cruise, should be operate with minimal speed and steering of fleet member.
That's how it happens in Real Life, so fleets don't get eliminated in detail. Do you expect this to happen in a space sim that is, supposedly, as close to real life as it gets? Nahhhhh... as long as the economy is based on wartime and the player is forced to grind for hours on end for the smallest of things Egosoft is doing fine... not!!!

Post Reply

Return to “X4: Foundations”