Special failings of the combat AI

These are old bug reports that have been closed.
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

Right now the AI is very incompetent in a few situations:

1. Following the player at range. The AI will bunch up. The AI stops being able to hit the player at about 50 ls with a wolfen. However, the player can effectively bombard the pursuing AI. If the AI stayed out of the line of fire of the playership when at great range, the AI would be more effective in pursuit. Perhaps the AI could follow a "shadow" of the player slightly offset from the firing lines until 60ls or so, when it has a decent chance of actually being able to hit the player.

2. Dealing with an Omni weapons at range. Omni weapons can whittle away even the biggest ship (as long as each hit does a minute amount of damage), and can chew through smaller ships withou giving them a chance to fire back. This usually is a problem at greater than 40-50 ls. When I get attacked by an omni at range, I "slalom". This behavior is very effective and shouldn't be very hard to code (though harder than 1 and 3), since its just an equal rotation left and right.

3. "Gliding". When the player is moving at a constant speed in a constant direction similar to, but possibly slightly less than the top speed of the AI ship. direction the AI will often sit in a place where the player can hit it, but the AI ship does not hit the player. This usually happens within 30ls. When the AI chooses to "glide" it needs to make sure it can hit the player.

4. Swarms of small ships will never fire at the player if the player doesn't move. When a smaller ship cannot hit the player because of freindly fire concerns, it should not continue to divebomb the player, but sit at 20-35ls so that eventually the useless swarm organizeses into a deadly destructive force.

Are these viable ways to solve certain AI exploits? What other exploits are there and how could they be solved?
User avatar
Aeonic
Militia Commander
Militia Commander
Posts: 469
Joined: Sun Jun 14, 2009 1:05 am
Location: Designing his dream ship.

Perhaps the AI should simple give up on perusing a ship that is faster than they are. I know if I were in a freighter trying to catch a hornet or an interceptor that wanted to run away, I'd quit chasing them. I have to quit chasing the stupid Barbary-class all the time because they're obnoxiously good at getting away. So the AI could either quit pursuit and return to base, or quit pursuit and return to stargate when their targeted ship is out of firing range.

Long range omni weapons are just cheap. Combined with a targeting computer you can take anything out. I'd just as soon see them removed since I find that they spoil the game. As far as I'm concerned, most long range weapons have these problems anyway. If you can get far enough away that the AI doesn't know what to do about you bombarding their base, then the range of the weapon to too long.

I'd also like to see something added to prevent the AI from approaching stations that will happily blow them away.
Last Cause Of Death: Destroyed by Karl Svalbard's last Lucifer missile, right after I blew him up. And the crowd cheers.
Image
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2801
Joined: Mon Aug 17, 2009 4:27 am

Aeonic wrote: I'd also like to see something added to prevent the AI from approaching stations that will happily blow them away.
I've seen Korolov freighters do this....so enemies travelling to stations might be able to use the same code.

Although sometimes the AI would have not a hope in hell. EG. A Dwarg Master with a whole load of zoecanthopes behind it will NEVER survive if there's an Adventure Outfitters right next to the WH (I've seen Behemoths and Earth Slavers die many times over that way as well)

In terms of Range, I think George was thinking about rebalancing the range and speed of projectiles....which will be nice.

Currently, there are very few short range turrets. There's the RK15, which isn't that good....and there's the Moskva, which is insane if you get too close to it. The others are designed specifically for longer-ranged combat...I *think* anyway.

The grouping-at-range thing is MAJOR. With shields now nerfed, drawing a battle into a chase is a very good way to make your enemy be the one under attack... And it can be very much like the charge of the light brigade. Pour down fire, and take none in return....


The thing with Slaloming is this: It can't happen too often. Otherwise, Omni-cannons lose their big advantage: The fact that they *are* stand-off weapons (except the Moskva and RK15).....and can attack in any direction.

Have the AI make it completely impossible to pick off enemies at ranges, and combine that with the nerfed shields, and freighters will become much harder to use....since the freighter immediately is at risk if it HAS to get close....

But reasonable evasive action and anti "charge of the light brigade" style bunching changes would be great fro the AI.

:D
Mischievous local moderator. She/Her pronouns.
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

#1 requires the AI actively avoid the line of fire. If accomplished this will make the AI actually more capable than the player. They already outnumber you.

#2 will make the AI weaker, not stronger. The more time they waste dodging around the less damage they deal. It also severely weakens non-tracking ammo weapons.

#3 and #4 are simple fixes to obviously braindead behavior, though I've never seen swarms completely stop firing myself.
User avatar
Aeonic
Militia Commander
Militia Commander
Posts: 469
Joined: Sun Jun 14, 2009 1:05 am
Location: Designing his dream ship.

Atarlost wrote:#1 requires the AI actively avoid the line of fire. If accomplished this will make the AI actually more capable than the player. They already outnumber you.
I've always figured, from a game design perspective, that if you can make an AI that flawlessly defeats the player every time, that is ideal. Because its much easier to make a smart AI act dumb than it is to make a dumb AI act smart.
Last Cause Of Death: Destroyed by Karl Svalbard's last Lucifer missile, right after I blew him up. And the crowd cheers.
Image
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

It's something that would be turned off anyways though. Any truly intelligent dodging would make the AI untouchable except the capital ships, which couldn't make use of dodging anyways.
User avatar
Aeonic
Militia Commander
Militia Commander
Posts: 469
Joined: Sun Jun 14, 2009 1:05 am
Location: Designing his dream ship.

You don't turn it on and off - its just like AI's accuracy. They have a percent chance of targeting precisely, and if their roll fails, they target poorly. Likewise, you give the AI the ability to dodge and a percent chance that they'll use it. If the roll succeeds, they'll try to evade your shot. If not, they'll just sit there and get hit.

The dumber the AI, the lower the chance that they'll try to get out of the way. But if you want a challenging AI, such as in the arena, you give them a high chance to dodge.
Last Cause Of Death: Destroyed by Karl Svalbard's last Lucifer missile, right after I blew him up. And the crowd cheers.
Image
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

Aeonic wrote:[snip]...you can get far enough away that the AI doesn't know what to do about you bombarding their base...[snip]
Call this #5
I'd also like to see something added to prevent the AI from approaching stations that will happily blow them away.
And #6
Atarlost wrote: #2 will make the AI weaker, not stronger. The more time they waste dodging around the less damage they deal. It also severely weakens non-tracking ammo weapons.
True. Ignore #2 then.
I've never seen swarms completely stop firing myself.
Blow up a ferrian hive in RC1 (RC2 will probably work too, but its harder due to the warrior explosion) and then use sustain. The ferrians will swarm you in this way.
Atarlost wrote:#1 requires the AI actively avoid the line of fire. If accomplished this will make the AI actually more capable than the player. They already outnumber you.
This is only useful when the AI is >50ls from the player, otherwise the AI needs to be able to hit the player, and therefore be in the line of fire. The long-range bombardment is an exploit, and I don't believe it is not needed to win the game. If it does make enemies too hard, then decrease the strength of the enemies. This can very easily be done without the nerfing of the player's loadout via things like fireadj and price changes.

You just can't get too good AI, unless they often use (occasional and rare usage is fine) prediction skills that would be completely unavaliable to the player. The tactics described in #1 are often used by the player because they seem to be common sense. What is wrong with the AI having this common sense?

Long-range bombardment isn't fun, its how you grind away (often on autopilot) any group you can damage. This tactic turns into a mere annoyance what potentially could be dangerous enemies. Having to actually use creativity and cunning to get rid of a more powerful enemy is fun to me.
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

Improved dodging is useless in arena combat. Everything there is a close combatant and the arena is far to small to hold the range open. Fleeing AI ships already slalom.

The dodge chance will have to be tuned down to near zero on all fast enemies, be completely useless on slow enemies, and the code will be a lot of work that is better spent on something that will actually be used.

George is not a 20 man dev team, nor is coding transcendence his full time job. Making the AI dodge more should be so far down the priority list you can shamelessly apply colorful hyperboly to it, somewhere past turn the game from a 2d space shooter into a 3d space shooter and add reletivistic effects.
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

I think writing some neat little tricks for the ai to use is a great idea.

If an enemy base is being hit and the player is >50 ls away, send a group of ships away to circle around behind the player, or call in reinforcements and have them sneak up right as the bases remaining guards turn into the attack as well.

Some of the more advanced races (sung, ares, ranx) should have squad tactics. The ranx DN has escorts yes, but what if two of those groups worked in unison? keeping the player between them if possible.
Swarms of fighters could line up in an echelon formation and concentrate their fire on one side of the player.
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

Prophet wrote:I think writing some neat little tricks for the ai to use is a great idea.

If an enemy base is being hit and the player is >50 ls away, send a group of ships away to circle around behind the player, or call in reinforcements and have them sneak up right as the bases remaining guards turn into the attack as well.

Some of the more advanced races (sung, ares, ranx) should have squad tactics. The ranx DN has escorts yes, but what if two of those groups worked in unison? keeping the player between them if possible.
Swarms of fighters could line up in an echelon formation and concentrate their fire on one side of the player.
Large formations don't work well with fixed firing weapons in reality, and the granularity of aiming will make them worse. The scripted events at Point Juno prove this is already possible, and the formations can about manage to hit the broadside of the largest (unless you count the St. K arcology as a single station) target in the game.

All your other suggestions would make the game all but impossible. The goal here is not to make a game that puts Nintendo Hard to shame, it's to make a game that's fun. That means you need to be able to run away. That means you need to be able to avoid winding up pinned between two formations, which in turn means the enemy needs to not actively try to pin you. But don't believe me. You can script this sort of behavior right now if you're clever and find out firsthand how irritating it is to have ranx dreadnaughts mousetrap you in every system they appear in, Sandstorms and Chasms circling around beyond radar range and pincering you, and the anti-Huari assault appearing in miniature in every system with a Sung citadel with you as the target.
OddBob
Militia Captain
Militia Captain
Posts: 505
Joined: Sun Mar 05, 2006 6:05 pm

#1 requires the AI actively avoid the line of fire. If accomplished this will make the AI actually more capable than the player. They already outnumber you.
They outnumber you because they are so incapable. Of course there needs to be more than one enemy ship, and many enemies are 'swarmers' by nature, but in many places I see no particular reason that there need to be so many - if they were smarter, but fewer, they would provide an equal challenge (and I think a more interesting and fun one, but this is subjective)


Obviously, any change that affects the strength of enemy ships will necessarily require their numbers to be reconsidered.
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

It makes no sense at all for the major powers to have small numbers of ships. They're already on the small side in many cases.

As to Prophet's suggestions I should clarify.

Formations can be done now. They will only work effectively for ships with turrets. My Sung comment reflects this suggestion.

Override the Sung Citadel (and maybe fortress) In an onAttacked event use sysfindobject to get a list of Sung ships nearby. Enumerate over it for Earth slavers. Take the first and assign all the others to escort it. Then grab all the steel slavers and assign them to escort the same earth slaver if you found one or the first steel slaver otherwise. Send the escorted ship to attack whatever attacked the station.

Pincers are a little tougher. In an onAttacked event on, say, an Ares shipyard or commune find the attacker's vector. Grab all the nearby Sandstorms, Chasms, and Tundras. Que up some goto orders on waypoints to skirt the attaker at over 100 ls followed by an attack order. Finding the waypoints will take som e vector math.

Ranx working in unison is going to require a timer. In an oncreate on a fortress put some code to store a flag if no other fortresses have the flag, and then if nobody else had the flag set up a timer. In that timer run good old sysfindobject to look for Ranx dreads within say 100ls of gplayership. If there is one grab every ranx dread in the system and order it to attack the player. Cue up wander afterwards so they don't gate out in case the player is insured.

Since your suggestions are scriptable right now there's no reason no make a suggestion in this forum. If you're really interested in complex AI behaviors make a mod. I don't think the results will be fun, and especially not fun for the new players we hope to have when 1.0 is released, but if it's a mod it's not hurting anything.
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

I thought this topic was a brainstorm about the failings of AI and ways to fix them? I'll guess I'll just go make my mod then and stop posting suggestions to make the game more interesting.
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

I noted another strange AI behavior, that I think it's related to the spinning ships bugs.
If you take a look at the centurions orbiting a CSC, sometimes they make small circles backwards, then they return to they usual orbit.

I took some screenshots and added a couple of coloured circles to help visualizing what I'm talking about:
Image
http://img9.imageshack.us/img9/5536/ripplesp.jpg

Is the Centurion trying to match the speed of the large orbit, and in order to do so because AI ships do not slow down, it makes nice little circles ?
They don't happen very often, but they are surely fun to look at :D
Locked