Keep Moving

I think that the keep moving order should (or be optionally set to) attempt to keep your ship at the range listed in the engagement orders (i.e. attempt to orbit them rather than strafing). Way too often ships with the keep moving order just “ram” the enemy ship and get caught in the explosion, or unnecessarily enter the weapon ranges of something else.

What distances are you using? And any other orders at the same time?

I have a bunch of cruisers with cruiser lasers set to engage enemies at ~400 range, but presumably because the minimum range on the lasers is only 90 they will keep moving towards (or in the general direction of) their target without trying to back off until it is way too late. They have no other orders besides keep moving and the standard engagements.

ships with an engagement range of (for example) 400, will move to range 400, but will not turn around and move back until the range drops below half that (200). It could also be that the target they have selected is further away, so sometimes ships are indeed at range 400 from their specific target, but other enemy ships may have maneuvered much closer.
In short, ‘engage at range 400’ does NOT mean “always be at least 400 away from any enemy”, which is impossible to arrange in big melees anyway.

Perhaps not, but the closest target is the most relevant in that regard, no?

A very generic fear response to the closest target would help, even if there was that possibility of getting caught in some kind of pincer.

so then, cliffski, based off your post, I can tweak the orders so that the range I set in their “engage [type] distance” is say, a third more than what I want it. then the ship will move to that range and continue forward until half as close (hence my doubling the range I want) before turning around to move away?

maybe example would be better: I set my cruiser’s max range is 400. But 200 is too close and I dont’ want that. So, to keep him at 400 I would set the range to, say, 600. Then the cruiser will continue to 300 before turning around to move back to the 600 mark?

I hope that’s clear! its got me a little confused. knowing this thought would be great to use for my torpedo frigtes or missile cruisers!

Ah no, I havent been clear.
If you set the range to 400, they will close to range 400, then stop. They then will not take any action to get further away unless the range closes to 200 by the act of the enemy ship mocing closer.
If the enemy ship is stationary the ship will just stay there at 400 at fire from there.

And there is more…
Maximum range isn’t optimum range. Optimum range is slightly lower than maximum, and full damage for most weapons is done at optimum range, so you need to be slightly closer than max range to really get the best effect :smiley:

Is there any way you can let us set the value for the range that they try to get away? Obviously the code already supports it if they will try to run away at 200 range in your example, so it shouldn’t be too difficult to give us control over that.

For example, some sort of “Standoff” order with a range slider would override any base values for when the AI decides its time to start moving away from the enemy.

Seconded. would tremendously help long range ships (which too often end up in hand to hand combat against howitzers!).

Possibly, but it’s not as simple as it sounds. Moving away from a target is relatively simple. moving away from 3 targets at 3 different angles gets more involved.
But its something that may get added at some stage.

We almost have something that is serviceable now (1600+ order ranges) but it’s held back by two things:

  1. Setting engagement ranges that far is not fundamentally sound (if two sides do it, game will never end)
  2. Drivers do not switch targets until they are destroyed

Couldn’t a smaller placeholder order be made out of that before something more sweeping?

New optional order: Flee fighters/frigates/cruisers (dist), like flee frigates 400

periodically check if (craft type) is closer than (dist)
if so, the closest (craft type) becomes the new target of driving
driver acts with (dist) as minimum range

It is a “selfish” AI pattern in that it is shortsighted and may end up pingponging back between two targets, or orbiting around enemy formations with ‘keep moving’, but this already offers a wealth of tactical depth (and counters) over what we currently have.

That reminded me of this xkcd: . However, most of the time, a good enough algorithm like yurch’s would work fine. Maybe there would need to be a restriction that ships can only avoid ships of their class or smaller to have it work well. I can’t see cruisers or frigates being able to avoid fighters.

I like yurch’s approach.
As it stands, speed is drastically undervalued. The primary tactical advantage of speed is that the faster ship can hold the relative range to whatever distance is optimal.
Right now, with the orders the way they are, this is only useable if the optimal range is close to zero. I.e. for ships armed with short range weapons like CL’s or howitzers. For ships with any other primary armament speed is of very little use.

To be clear, I’m not asking for something that attempts to keep your ship away from every enemy ship, just the one it is currently engaging. If it ends up wandering into shredding range of some other cruiser with short range weapons, so be it, but right now just getting ships with long range weapons to have any semblance of trying to stay at range is a pain.