Author Topic: AI Improvement  (Read 2729 times)

0 Members and 1 Guest are viewing this topic.

Offline DawnMachine (OP)

  • Petty Officer
  • **
  • D
  • Posts: 20
  • Thanked: 4 times
AI Improvement
« on: December 31, 2024, 06:38:01 AM »
I see you're (Steve) focused on turning spoilers into a more challenging task. NPR also received multi-star empires. But this improvement is quantitative, not qualitative.
Have you thought about adding more interesting and challenging behavior to NPR fleets?
Because they are quite predictable and sometimes stupid. Focusing on a specific weapon type makes them more interesting in the initial encounters, but as if that weren't enough. And they need to be taught the best tactics for using this weapon.
Perhaps a whole set of tactics with the ability to change on the fly is needed.
IMHO
Perhaps you have your own thoughts or plans on this matter.
I understand that this is probably a very difficult task and it does not pay for itself.

Happy New Year soon
Maybe I shouldn't have created a special topic.
 

Offline nuclearslurpee

  • Admiral of the Fleet
  • ***********
  • Posts: 3286
  • Thanked: 2644 times
  • Radioactive frozen beverage.
Re: AI Improvement
« Reply #1 on: December 31, 2024, 08:07:52 AM »
Steve usually makes AI improvements with every update. These improvements are often not the headline news compared to new features, but this is an ongoing effort nevertheless.

That said, the NPRs exist as strategic factors more than tactical challenges, so some directions for improvements may not be very suitable for this game in particular. For example, having each NPR stick to a fixed subset of weapons may make them predictable and exploitable, but it also makes each NPR more unique and interesting, including presenting the opportunity for the player to use different classes or doctrines to face different opponents. Having the NPRs adjust their weapons and ship designs to counter the player might make them more challenging, but would also lead to every NPR feeling very similar to all the others and thus they will get boring quickly.
 
The following users thanked this post: paolot

Offline Steve Walmsley

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 12185
  • Thanked: 23754 times
  • 2025 Supporter 2025 Supporter : Support the forums in 2025
    Gold Supporter Gold Supporter :
    Above & Beyond Supporter Above & Beyond Supporter :
Re: AI Improvement
« Reply #2 on: December 31, 2024, 11:05:54 AM »
I see you're (Steve) focused on turning spoilers into a more challenging task. NPR also received multi-star empires. But this improvement is quantitative, not qualitative.
Have you thought about adding more interesting and challenging behavior to NPR fleets?
Because they are quite predictable and sometimes stupid. Focusing on a specific weapon type makes them more interesting in the initial encounters, but as if that weren't enough. And they need to be taught the best tactics for using this weapon.
Perhaps a whole set of tactics with the ability to change on the fly is needed.
IMHO
Perhaps you have your own thoughts or plans on this matter.
I understand that this is probably a very difficult task and it does not pay for itself.

Happy New Year soon
Maybe I shouldn't have created a special topic.

If you have specific tactical suggestions regarding AI behavior and how it could be improved, rather than the generic comment that the 'AI is stupid and doesn't use weapons correctly', then please add them to the thread.

Don't forget to include all possible situations in the game in which the AI might employ the tactic and how to modify that against different enemies with different weapons and levels of technology. Also, please take account of the relative strengths of the forces involved, their current locations, relative speed, interception opportunities, available reinforcements, anything important you might need to protect and the proximity and potential implications of nearby jump points and Lagrange points.

Those decisions should also take account of any existing armour or internal damage, whether you are actively under fire, your current ordnance loadout, whether it would be better to pull back and gather separated forces together, or whether you should try to escape and, if so, how you should judge relative escape routes, or move to a planet with defences - taking account of the locations of enemy ships and their interception opportunities.

All the above decision-making should be informed by what you know about each specific enemy ship, such as point defence effectiveness against your potential throw-weight, their electronic warfare capability, your effective combat range against that enemy, armour strength, enemy weapon-range, etc.

On top of the above, you should be assessing the relative value of different systems and which forces to deploy to each, taking account of known enemy deployments, plus ensuring that any unarmed ships avoid those enemy concentrations - at least until there is a chance they have left. Don't forget to follow-up on any contacts you didn't investigate so far and remember to prioritise those. I'm ignoring empire and colony management, shipbuilding, ground force deployments, invasions, etc. to make it more straightforward.

Finally, bear in mind that its taken hundreds of people and billions of pounds to develop an AI that is good at Poker. Aurora is vastly more complex and I have slightly fewer resources available.

So, once you have considered the above, I look forward to your detailed suggestions.

Happy New Year!
 
The following users thanked this post: Bremen, Garfunkel, DawnMachine, randakar

Offline Barkhorn

  • Commodore
  • **********
  • B
  • Posts: 736
  • Thanked: 135 times
Re: AI Improvement
« Reply #3 on: December 31, 2024, 12:18:29 PM »
Well one easy idea I had is to just not tell the player so much.  Like if I have two 150-strength thermal signals detected, it shouldn't tell me that one is an Alpha Class, the other is a Beta Class.  How can I possibly know which class(es) they are just from how hot their engine exhaust is?

I think it would go a long way to make the AI feel smarter if it was harder to ID what classes ships you had detected were.  Maybe you should need an Active Sensor contact on them, or perhaps even make it so you need an AS contact of a certain quality.  Like if it takes a 150-strength AS signal to get a contact on a certain class at a certain range, maybe it would take a 300-strength AS signal to ID it.

It'd be good for RP too because history has lots of examples of ships being misidentified.
 

Offline Andrew

  • Registered
  • Commodore
  • **********
  • Posts: 791
  • Thanked: 163 times
Re: AI Improvement
« Reply #4 on: December 31, 2024, 01:41:11 PM »
Well one easy idea I had is to just not tell the player so much.  Like if I have two 150-strength thermal signals detected, it shouldn't tell me that one is an Alpha Class, the other is a Beta Class.  How can I possibly know which class(es) they are just from how hot their engine exhaust is?

You can identify a vehicle from its light reflection, so you can also tell a lot from the heat emissions, how different bits of the vehicle heat up , or block the heat emissions a large amount of signal processing can tell you a lot. See for instance a large amount of Infrared Astronomy.
Your eyes after all only see how bright something is , and yet you can tell what you are looking at.
 
The following users thanked this post: Warer

Offline JacenHan

  • Captain
  • **********
  • Posts: 464
  • Thanked: 120 times
  • Discord Username: Jacenhan
Re: AI Improvement
« Reply #5 on: December 31, 2024, 05:57:35 PM »
Well one easy idea I had is to just not tell the player so much.  Like if I have two 150-strength thermal signals detected, it shouldn't tell me that one is an Alpha Class, the other is a Beta Class.  How can I possibly know which class(es) they are just from how hot their engine exhaust is?

I think it would go a long way to make the AI feel smarter if it was harder to ID what classes ships you had detected were.  Maybe you should need an Active Sensor contact on them, or perhaps even make it so you need an AS contact of a certain quality.  Like if it takes a 150-strength AS signal to get a contact on a certain class at a certain range, maybe it would take a 300-strength AS signal to ID it.

It'd be good for RP too because history has lots of examples of ships being misidentified.
I believe that this was how passive sensor contacts used to work in very old versions of the game (before I started playing). It was changed to the current auto-identify model because in practice it just added busywork to manually investigate every single contact just to see if it was an enemy warship or a neutral freighter.
 
The following users thanked this post: nuclearslurpee

Offline Barkhorn

  • Commodore
  • **********
  • B
  • Posts: 736
  • Thanked: 135 times
Re: AI Improvement
« Reply #6 on: January 01, 2025, 01:53:36 AM »
Well one easy idea I had is to just not tell the player so much.  Like if I have two 150-strength thermal signals detected, it shouldn't tell me that one is an Alpha Class, the other is a Beta Class.  How can I possibly know which class(es) they are just from how hot their engine exhaust is?

You can identify a vehicle from its light reflection, so you can also tell a lot from the heat emissions, how different bits of the vehicle heat up , or block the heat emissions a large amount of signal processing can tell you a lot. See for instance a large amount of Infrared Astronomy.
Your eyes after all only see how bright something is , and yet you can tell what you are looking at.
The problem with this is it's totally impossible in-game for sensors to ever be unable to tell two ships apart.  Q-ships are impossible; you can't hide guns on what looks like a cargo ship.  You also can easily tell a troop transport from a cargo ship somehow, or a railgun DD from a particle beam DD, even if these ships could be refitted to one another.  I would think if they're similar enough the same shipyard can build both, a thermal sensor should have trouble distinguishing them from 100 million miles away.
 

Offline Steve Walmsley

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 12185
  • Thanked: 23754 times
  • 2025 Supporter 2025 Supporter : Support the forums in 2025
    Gold Supporter Gold Supporter :
    Above & Beyond Supporter Above & Beyond Supporter :
Re: AI Improvement
« Reply #7 on: January 01, 2025, 06:53:06 AM »
Well one easy idea I had is to just not tell the player so much.  Like if I have two 150-strength thermal signals detected, it shouldn't tell me that one is an Alpha Class, the other is a Beta Class.  How can I possibly know which class(es) they are just from how hot their engine exhaust is?

I think it would go a long way to make the AI feel smarter if it was harder to ID what classes ships you had detected were.  Maybe you should need an Active Sensor contact on them, or perhaps even make it so you need an AS contact of a certain quality.  Like if it takes a 150-strength AS signal to get a contact on a certain class at a certain range, maybe it would take a 300-strength AS signal to ID it.

It'd be good for RP too because history has lots of examples of ships being misidentified.
I believe that this was how passive sensor contacts used to work in very old versions of the game (before I started playing). It was changed to the current auto-identify model because in practice it just added busywork to manually investigate every single contact just to see if it was an enemy warship or a neutral freighter.

Yes, that's correct. In practice, it meant sending a scout to identify every thermal contact. It's interesting the first couple of times, but it gets tedious fast, so I changed it to the current auto-identify model.
 

Offline Garfunkel

  • Registered
  • Admiral of the Fleet
  • ***********
  • Posts: 2989
  • Thanked: 1229 times
Re: AI Improvement
« Reply #8 on: January 01, 2025, 06:55:42 AM »
As JacenHan said, there used to be a more "fuzziness" to contacts but it only added mostly pointless busywork. And as Andrew pointed out, our current astronomy/photography tools are good enough to measure the number of different gasses in the atmosphere of a planet several lightyears away. With TN tech, it is not unreasonable to assume that ships can be easily identified once detected due to the variety of emissions they let out.

What I really want from AI, is to prioritize defence of their homeworld - that fleets in other systems should head home once the NPR detects a threat to their HW and that fleets in the same system regroup at the HW before deciding whether to stay put to defend it or to sortie out to engage the enemy. It's sadly far too common that NPR fleets are wiped out in a piecemeal fashion. Though this is hardly an Aurora problem - it's a major issue in almost every strategy game.
 
The following users thanked this post: Xkill, gpt3, Louella

Offline Steve Walmsley

  • Aurora Designer
  • Star Marshal
  • S
  • Posts: 12185
  • Thanked: 23754 times
  • 2025 Supporter 2025 Supporter : Support the forums in 2025
    Gold Supporter Gold Supporter :
    Above & Beyond Supporter Above & Beyond Supporter :
Re: AI Improvement
« Reply #9 on: January 01, 2025, 07:17:29 AM »
What I really want from AI, is to prioritize defence of their homeworld - that fleets in other systems should head home once the NPR detects a threat to their HW and that fleets in the same system regroup at the HW before deciding whether to stay put to defend it or to sortie out to engage the enemy. It's sadly far too common that NPR fleets are wiped out in a piecemeal fashion. Though this is hardly an Aurora problem - it's a major issue in almost every strategy game.

I could probably add a 'threat to home world' override on ship deployment. However, any distant fleets will be too far away to respond fast enough to a real threat and it might lead to a tactic of faking a threat to the hone world to draw forces away from NPR colonies (especially now when they start with large colonies). It's probably better to flag a decent proportion of NPR forces as home system only.

The reason that NPRs may commit forces piecemeal is that they will react only to detected enemies. There is code for 'pull back and gather forces' if a sufficiently large hostile force is detected..
 

Offline paolot

  • Lt. Commander
  • ********
  • p
  • Posts: 255
  • Thanked: 55 times
Re: AI Improvement
« Reply #10 on: January 01, 2025, 09:04:45 AM »
I could probably add a 'threat to home world' override on ship deployment. However, any distant fleets will be too far away to respond fast enough to a real threat and it might lead to a tactic of faking a threat to the hone world to draw forces away from NPR colonies (especially now when they start with large colonies). It's probably better to flag a decent proportion of NPR forces as home system only.

The reason that NPRs may commit forces piecemeal is that they will react only to detected enemies. There is code for 'pull back and gather forces' if a sufficiently large hostile force is detected..

Maybe, the number of ships to send back to the NPR HW could be linked also to the time the hostile ships remain in the system and/or to their direction of movement, considering a random quantity to add to the returning ships, and a range of time intervals and of directions to evaluate, to vary the NPR responsiveness.
Maybe the question can be, which parameter is more important to evaluate about the hostile ships: the time in the system, or their direction of movement? Some randomness also for this one?   ???
« Last Edit: January 01, 2025, 09:08:56 AM by paolot »
 

Offline Garfunkel

  • Registered
  • Admiral of the Fleet
  • ***********
  • Posts: 2989
  • Thanked: 1229 times
Re: AI Improvement
« Reply #11 on: January 01, 2025, 04:06:09 PM »
it might lead to a tactic of faking a threat to the hone world to draw forces away from NPR colonies

That's true but I wouldn't worry about it too much as it would just be another way to cheese the AI, same as baiting them to waste their missiles by repeatedly moving just inside missile range and then fleeing. If someone wants to play the game in such a way, that's their 'mistake'.
 

Offline Panopticon

  • Gold Supporter
  • Rear Admiral
  • *****
  • P
  • Posts: 904
  • Thanked: 45 times
  • 2023 Supporter 2023 Supporter : Supporter of the forum in 2023
Re: AI Improvement
« Reply #12 on: January 01, 2025, 05:39:48 PM »
I think there is an argument to be made for having some form of return to home system when it is threatened logic. There are several AARs currently on this very forum that are talking about home system invasions that take in game weeks or months so there are cases where they could make it in time to be a factor.

Of course, piecemeal reinforcements would be useless, and I imagine having the AI figure out when and how it is appropriate to consolidate fleets is non-trivial. So that's probably too much work for a while, especially as it really isn't a huge problem.
 

Offline Ghostly

  • Warrant Officer, Class 1
  • *****
  • G
  • Posts: 99
  • Thanked: 68 times
Re: AI Improvement
« Reply #13 on: January 02, 2025, 03:50:23 AM »
I agree wholeheartedly about the AI being one of the weakest parts of this amazing game, and while I understand that creating a competent artificial intelligence is a civilization-scale task, not a single-developer one, there's plenty of small changes that can be made to turn NPRs into more formidable foes.

On the lowest level, in ship-to-ship combat, I believe the solution is to make the AI utilize its intelligence of enemy classes to determine a so-called Goldilocks zone where the ratio of its ships' DPS to the known enemy ships' DPS is the highest. This way, if there's one player fleet in the system and the AI has a fleet with at least one ship whose weapons outrange those of all known player classes, it will attempt to maintain the minimum distance from which it can fire unopposed. If the player's anti-ship weapons have longer range but the AI fleet is faster, it will attempt to close distance, potentially aiming to sit just outside the enemy PD range instead. If the player has two such fleets in close formation, the AI will attempt to close in with one such fleet while keeping as far away as possible from the second one, to minimize its effective DPS, and if the NPR detects two different fleets on the opposite sides of the system, it will attempt to engage the weakest one since that's where its ratio would be the highest.

In the latter case, two distance checks (one based on time for the NPR fleet to intercept either of the fleets, another based on time for either of the fleets to intercept anything the NPR assigns value to, such as itself, other fleets or colonies) could be added to assign more value to closer or more threatening fleets. As such, a closer, but more dangerous fleet would be a higher priority target for an NPR fleet than a distant, weaker one, unless the weaker one is able to intercept another fleet or colony, and the first NPR fleet can intercept it before these things happen, while the stronger fleet has no chance of intercepting anything during that time. I understand this wouldn't be as simple as I described and probably opens up additional cheese possibilities, but even if this DPS ratio evaluation behavior were to apply for close threats (within beam weapon range of a fleet) only, this would still boost AI combat efficiency considerably.

Additionally, NPR AI only considers (missile range*((missile speed - target speed)/missile speed)) when determining the distance at which it can begin firing its missiles at the enemy. I understand this is added to prevent cheese, but it also leads to NPR ships with 100mkm missile range potentially being outranged by player ships with 70mkm missile range, depending on the approach vector. I propose the AI should take the approach vector into account, potentially firing at (or close to) max range if it's being chased, but only until a salvo fired thusly runs out of fuel, at which point the AI will "realize" it's getting cheesed and have the fleet in question revert to its current conservative behavior. The fleet can switch back to long-range fire after a sufficiently long time elapses to make cheesing the AI in such a fashion unattractive to the player (hours? days?) or after it detects inbound missile contacts and assumes its being outranged again (with a random delay up to several minutes to make it unclear to the player when exactly he should begin retreating).

In a similar vein, the AI will be more than happy to fire missiles at an enemy who can reach a jump point before the missiles can impact. I'm not sure how to handle this, banning the AI from firing missiles before the missile time to impact is shorter than the enemy time to JP (or assumed enemy jump shock duration) seems a bit too radical, but maybe the AI could at least wait to reload its missile launchers before transiting a JP through which a hostile contact fled seconds or minutes ago.

On a higher level, I made some observations and possible solutions here, and I see homeworld defense in particular being discussed in this thread. There should be no reason whatsoever for NPR fleets to attempt to escape the home system if a stronger enemy fleet is present, they should rally at their homeworld and go down fighting. As far as fleets in distant systems are concerned, I understand that feigning attacks on a home system to draw the NPR from its colonies could be considered cheesy, however it would make sense for the NPR to at least commit all forces from the neighbouring systems into a threatened system with higher System Value, doubly so if both significant enemy contacts and own ship losses have been detected recently. This, however, brings me to:

The reason that NPRs may commit forces piecemeal is that they will react only to detected enemies.

This is the biggest problem with the AI thus far and should be addressed before everything else. The fact that NPRs have no concept of a "Lost Contact" like we do makes them incredibly weak and predictable. Using Precursors as an example, they can be lured piecemeal from the safety of their orbital bases and STOs by enabling transponders or sensors on a single ship, lose their forces to an overwhelming player fleet they couldn't see, then fall for the same bait again and again. I understand that a proper threat evaluation system for lost contacts would be tricky to implement, NPRs can't simply behave like every enemy fleet ever detected remains there forever until detected again, but in case of losing some ships to a superior enemy force they should definitely hunker down for a significant amount of time and cautiously use their scout ships (and scout fighters, maybe? ;)) to re-establish contact or verify its absence before they can resume normal operations. I'd suggest waiting double or triple the time it would take for known enemy contacts to approach any NPR colony or fleet, or leave the system (whichever is longer) with no other contacts or ship losses in-system during that time, before the AI can "forget" about the contacts, assume they're gone and regain its normal threat response.
 
The following users thanked this post: DawnMachine

Offline DawnMachine (OP)

  • Petty Officer
  • **
  • D
  • Posts: 20
  • Thanked: 4 times
Re: AI Improvement
« Reply #14 on: January 02, 2025, 09:51:38 AM »

If you have specific tactical suggestions regarding AI behavior and how it could be improved, rather than the generic comment that the 'AI is stupid and doesn't use weapons correctly', then please add them to the thread.

I understand you. We need specific proposals with a description of all the nuances.
I need to think more about this. For myself, I would start with my own behavior when confronted with an enemy empire.

Maybe someone from the community has their own ideas