AI can't pursue a target?

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

LameFox
Posts: 2411
Joined: Tue, 22. Oct 13, 15:26
x4

AI can't pursue a target?

Post by LameFox » Tue, 7. Dec 21, 07:07

You would think that if you have some fast attack ships and send them after a slower enemy they would be able to engage it, but it seems like in X4 this is not the case. I can for instance take a Katana—the game's fastest ship to date—and set it after a Xenon S, which is nothing very special, and it will not catch up unless its target stops. Why? It is faster in normal flight. It is faster in travel drive. The problem as usual is the AI. It's too slow to enter travel drive, too quick to leave it. It lags behind, speeds up, stops before it arrives, and never reaches the target.

This is just another case where what should be a simple task becomes frustrating in this game, because the mechanics of it are not designed for the AI to be able to operate.

There is even equipment intended (I guess?) to counter this: the EMP missile. But I have had no luck with it. The missile itself may be capable of catching a target in travel drive, but if it is, my ships did not seem capable of locking and firing in time to use it...
***modified***

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

Re: AI can't pursue a target?

Post by flywlyx » Tue, 7. Dec 21, 07:25

AI tends to make mistakes while doing this kind of movement command.
It never uses the travel drive perfectly, which in your case due to the speed of the S and weapon range, Katana could never get to the point to shoot its weapon.
I think Ego is trying to make AI act like humans, but they massed it up, it just looks stupid.

LameFox
Posts: 2411
Joined: Tue, 22. Oct 13, 15:26
x4

Re: AI can't pursue a target?

Post by LameFox » Tue, 7. Dec 21, 07:34

IIRC the reason ships drop out of travel drive too early is because the game has no idea how long it takes individual ships to stop. Though I think even if that were fixed, they'd still fail at this basic task, because getting them to travel drive within weapons range and shoot another ship out of it, then attack would be a whole other thing.

I just wish they designed around the limits of their AI instead of leaving it grasping at things that only a player can perform. I have seen complaints that the AI in this game is worse than in previous games, but it isn't... they just don't seem to account for its limits, so everyone gets to see what it can't do, all the time.
***modified***

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

Re: AI can't pursue a target?

Post by flywlyx » Tue, 7. Dec 21, 07:56

LameFox wrote:
Tue, 7. Dec 21, 07:34
IIRC the reason ships drop out of travel drive too early is because the game has no idea how long it takes individual ships to stop.
This doesn't make sense, the human player doesn't know is because we have no clue about the exact data behind the movement, but AI should have all the info to perform this simple liner calculation.
Making AI move perfectly is actually much easier and simpler compared to the current system since everything only needs to be calculated once.
I have no clue why they have to make AI so stupid.

LameFox
Posts: 2411
Joined: Tue, 22. Oct 13, 15:26
x4

Re: AI can't pursue a target?

Post by LameFox » Tue, 7. Dec 21, 08:00

I'm not sure why it's like that, I just remember that was the reason given in the past. Players have always wondered why ships stop so far from where they are going.
***modified***

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

Re: AI can't pursue a target?

Post by flywlyx » Tue, 7. Dec 21, 08:33

Typical AI movement should be like the docking computer, with perfect speed, and perfect position.
I actually hope there is a mod to make all the player's AI ships fly like that, this whole "human-like" AI idea is not really bad, but implementation is a disaster.

Bastelfred
Posts: 4047
Joined: Tue, 31. Aug 04, 15:31
x4

Re: AI can't pursue a target?

Post by Bastelfred » Tue, 7. Dec 21, 08:41

A new course is regularly set to the current location of the target. However, since the target is moving, a new course is constantly set. That is why the travel drive does not work, too often a new course is set before the travel drive is used by the AI.
The script for tracking a target is too simple. No point is calculated for interception, but even that is not so easy to realize.

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

Re: AI can't pursue a target?

Post by flywlyx » Tue, 7. Dec 21, 08:50

Even to a stationed target, the AI could never use the travel drive perfectly, moving target makes the condition even worse.
Tracking is based on prediction, and prediction is based on perfect timing, since there isn't perfect timing existing from the beginning, prediction is simply impossible.

xWolfzx
Posts: 181
Joined: Fri, 14. Aug 09, 07:46
x4

Re: AI can't pursue a target?

Post by xWolfzx » Tue, 7. Dec 21, 09:04

I do notice and this is also my biggest peeve is that the AI tend to turn off travel drive 10+ km from a stationary target and they are not aggressive enough to re-engage travel drive again... I wish there is a check that whenever the AI turn off travel drive from a target, they should check the distance, realign their orientation where needed and reengage travel drive again

User avatar
grapedog
Posts: 2398
Joined: Sat, 21. Feb 04, 20:17
x4

Re: AI can't pursue a target?

Post by grapedog » Tue, 7. Dec 21, 09:06

THis is a pretty annoying issue. I'll send a pack of destroyers after an I or K.... and every single one of my ships is faster than the target they're after... but they'll never really engage it. This isn't even in travel drive... this is just cruising speed.

I used to have this issue camping a FRF shipyard killing FAF rattlesnakes. I'd have like 5 speed modded rattlesnakes set to attack the ship, and they would just trail behind it, while being able to move almost 100ms faster than the target. When I teleport over to the ship to take over, because my idiot 4 star captains can't take out the lone ship... I'll find im like 13km away for some reason. I just increase throttle to full, catch up with the ship, and blow it up.... super easy. But the AI for some reason has REAL issue with this. Same thing with fleets guarding Xenon gates, I'll have I's and K's that "escape" my fleets even though every single ship is faster than the I or K. Or they'll do this weird thing that they like run in front of it and try to do a broadside attack or something... but just end up taking damage constantly and not firing back.

It's VERY frustrating...

phrozen1
Posts: 241
Joined: Fri, 30. Nov 18, 11:37
x4

Re: AI can't pursue a target?

Post by phrozen1 » Tue, 7. Dec 21, 09:23

Yes. It's one of the issues that make you think why you even bother playing this game. It just feels so wrong and everything has been said about it over the years but nothing really has changed. :(

LameFox
Posts: 2411
Joined: Tue, 22. Oct 13, 15:26
x4

Re: AI can't pursue a target?

Post by LameFox » Tue, 7. Dec 21, 09:36

Bastelfred wrote:
Tue, 7. Dec 21, 08:41
A new course is regularly set to the current location of the target. However, since the target is moving, a new course is constantly set. That is why the travel drive does not work, too often a new course is set before the travel drive is used by the AI.
The script for tracking a target is too simple. No point is calculated for interception, but even that is not so easy to realize.
Yeah, this is another issue... to some extent I understand not predicting it much because your ships should not be prescient, but I've noticed that when they get closer they don't seem to update its position faster, so they end up tailing it rather than catching it.
***modified***

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

Re: AI can't pursue a target?

Post by flywlyx » Tue, 7. Dec 21, 17:24

LameFox wrote:
Tue, 7. Dec 21, 09:36
Yeah, this is another issue... to some extent I understand not predicting it much because your ships should not be prescient, but I've noticed that when they get closer they don't seem to update its position faster, so they end up tailing it rather than catching it.
A 5 year old kid knows how to estimate a lead to catch a butterfly, why the most advanced space ship should not be prescient?

LameFox
Posts: 2411
Joined: Tue, 22. Oct 13, 15:26
x4

Re: AI can't pursue a target?

Post by LameFox » Tue, 7. Dec 21, 17:33

flywlyx wrote:
Tue, 7. Dec 21, 17:24
LameFox wrote:
Tue, 7. Dec 21, 09:36
Yeah, this is another issue... to some extent I understand not predicting it much because your ships should not be prescient, but I've noticed that when they get closer they don't seem to update its position faster, so they end up tailing it rather than catching it.
A 5 year old kid knows how to estimate a lead to catch a butterfly, why the most advanced space ship should not be prescient?
The way I look at it you can either predict where momentum is carrying it over a short span of time, or look at where its orders are taking it. The latter seems too much of a cheat for me, while the former... well, with travel drive, highways and the like, I think that kind of prediction would have to be quite short indeed or it could cause more navigational issues than it solved.

Having ships update the position more often for a closer target seems like a good compromise for game performance and actually having them get there rather than forever be 9 steps behind.
***modified***

capitalduty
Posts: 374
Joined: Mon, 23. May 16, 02:02

Re: AI can't pursue a target?

Post by capitalduty » Tue, 7. Dec 21, 17:58

one big issue with current follow and attack command is that In Sector new updates for target position takes to long and ai ship is not capable to adjust path to predict new target position in a reliable way.

Other big issue that could be improved is ability to highly change path on the fly when in travel drive to npcs, this will make positive impact in number of engagements when order to follow a target.

NightmareNight91
Posts: 426
Joined: Sun, 7. Feb 16, 17:28
x4

Re: AI can't pursue a target?

Post by NightmareNight91 » Thu, 9. Dec 21, 17:23

I hate watching my ships decide to slow boat it 50km away from the target/destination. This really should be something that gets improved. 15 km from destination would be far more reasonable.

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

Re: AI can't pursue a target?

Post by flywlyx » Thu, 9. Dec 21, 21:44

NightmareNight91 wrote:
Thu, 9. Dec 21, 17:23
I hate watching my ships decide to slow boat it 50km away from the target/destination. This really should be something that gets improved. 15 km from destination would be far more reasonable.
AI should do suicide burn like Falcon's landing. I have no idea why the ace pilot on the most advanced battleships 500 years later feels like a student driver in 2020.

LameFox
Posts: 2411
Joined: Tue, 22. Oct 13, 15:26
x4

Re: AI can't pursue a target?

Post by LameFox » Tue, 14. Dec 21, 13:16

This is getting really obnoxious in my latest game. Traders keep getting harassed by pirates, so I send faster ships to hunt them down, but all they do is this worthless tailing behaviour. The same pirate can hang around making my traders hide for ages because the AI ship I sent to pursue it is just being utterly incompetent.

It should not be the case that I have to personally deal with every minotaur raider the game spawns.
***modified***

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

Re: AI can't pursue a target?

Post by dtpsprt » Tue, 14. Dec 21, 13:57

LameFox wrote:
Tue, 14. Dec 21, 13:16
This is getting really obnoxious in my latest game. Traders keep getting harassed by pirates, so I send faster ships to hunt them down, but all they do is this worthless tailing behaviour. The same pirate can hang around making my traders hide for ages because the AI ship I sent to pursue it is just being utterly incompetent.

It should not be the case that I have to personally deal with every minotaur raider the game spawns.
Let's make two very important things clear:
1) The ship you are sending to "follow" another needs to know where it is going, so it actually reaches it when it is stopped or close to stopped anyway.
2) The AI is "programmed" to get the ship out of traveldrive with enough distance for it to stop. Unfortunately (and I've been having this conversation over a year now) it will not take into consideration the current ship, it (most often than not) calculates based on a Dragon Raider with Split MK4 Engines(!!!) and applies this calculation to any ship(!!!) resulting in them exiting traveldrive about 40km before their target...

Best thing you can do is send an equal class of ship to attack the pirate with the "Attack" command issued from the beginning.

LameFox
Posts: 2411
Joined: Tue, 22. Oct 13, 15:26
x4

Re: AI can't pursue a target?

Post by LameFox » Tue, 14. Dec 21, 14:01

I am issuing attack commands, in this case using a Peregrine Vanguard vs Minotaur Raiders, which are slower. The travel drive seems to be the main sticking point. Not only does it drop out too soon, it waits too long to engage as its target travel drives away from it. And it updates its orders very slowly. If the pirate backtracks it can pass right by the attacking ship, but it never thinks to stop flying to the old position and attack, it just casually meanders on to where the target used to be.
***modified***

Post Reply

Return to “X4: Foundations”