View Issue Details

IDProjectCategoryLast Update
0019590AI War 2SuggestionAug 15, 2019 2:16 pm
ReporterBadgerBadger Assigned ToBadgerBadger  
Status resolvedResolutionfixed 
Product Version0.720 
Fixed in Version0.882-0.883 Research and Reconquest 
Summary0019590: Make the AI smarter when attacking
DescriptionThis is kindof a reminder/placeholder for generally making the AI more intelligent. Give it some randomization when attacking, better target selection (kill the controller first sometimes?). There was a decent amount of this in email discussions, but

I think right now the AI doesn't come across as, well, very intelligent. For example, when it attacks a planet with a lot of turrets surrounding the wormhole the attack comes through (this seems to be the optimal form of defense) the following happens: Most of the turrets get killed but the AI takes casualties. The AI fleet splits apart to attack all the Power Nodes and the controller. If the Controller doesn't die quickly then the turrets start to respawn. The AI thinks "Oh crap, the planetary defenses are too strong now" and exits via the same wormhole it came in (ie right past the turrets they destroyed the first time). This is not an Artificial Intelligence I'm particularly worried about.

Now, if a human saw this style of defense they'd say "If I'm strong enough to just crush the turrets then stick around and do so. Otherwise leave a few ships caught by the tractors, blow up the controller and then keep going into the enemy territory and wreck as much havoc as possible. And if the humans send a fleet at me, don't fight it, just run further into human territory and do all the damage possible."
TagsNo tags attached.

Activities

Chris_McElligottPark

Aug 29, 2018 8:00 pm

administrator   ~0048557

Last edited: Aug 29, 2018 8:01 pm

This also goes back to some of our discussions in email recently. Keith noted:

On auto-targeting: the AI is already on a long-running separate thread that's nonsim (host-only) and issues GameCommand's, as in AIWC (albeit a separate thread per faction). So in SpecialFaction_AI.DoLongRangePlanning_Subclass() it can give individual commands to each unit if desired. Right now it just routes threat (including retreating and waiting) and decides when guards should sally/hunker/abandon. The operative cases would be:

#region normal fight case for guards

#region normal fight case
(which is for threat, which perhaps should have different priorities than guards)

and:
#region case where we would retreat, but are restrained from doing so by that stupid timer the humans insist we have so they have a chance to play shooting-gallery
(which is oddly self-explanatory)

Addendum: if that third case gave commands to have all the units do a space-invaders-like march back and forth until the retreat-timer expired, that would be an excellent passive-aggressive expression for the AI.

Chris_McElligottPark

Aug 29, 2018 8:01 pm

administrator   ~0048558

One question to anyone reading along is what specific behaviors are missing from AIWC that we'd like Keith to look into after the performance issues are resolved.

BadgerBadger

Aug 29, 2018 8:13 pm

manager   ~0048561

I for one don't really remember specific AI behaviours per se, but I do notice that the absence of interesting strategies from the AI. It's been a long time since I've played AIWC though.

Chris_McElligottPark

Aug 29, 2018 8:28 pm

administrator   ~0048562

Oh, and then some of my notes from the last email, too:

Right now I don't have anything super useful to add to the cases you've laid out above, although I will note that there is a new PriorityAsTarget.ImportanceMetric and PriorityToProtect.ImportanceMetric. Ideally the AI, on its own planets, would gain a preference to attack enemy units that are near PriorityToProtect.ImportanceMetrics that are higher than 400 or so, increasing as that goes up. And a preference for attacking anything that's attacking those units, I suppose.

In general some of the spatial awareness stuff coming back would be nice.

Performance and targeting logic seem to be the two main things, though, at the moment, that I'd send your way. I'm not really feeling like transports are super important at the moment.

Something for de-clumping units in transit would be nice, particularly for large units, but it's not a crisis. And ships getting stuck against forcefields is another one of those. Ideally treating some of the huge units like they were forcefields would be kind of useful, but potentially also game-breaking. So that's a thing that I've been stuck on, but it's a complex isolated case to look at.

Chris_McElligottPark

Aug 29, 2018 8:29 pm

administrator   ~0048563

Badger, I do agree and I know what you mean. Perhaps a perusal of the AIWC codebase by Keith is in order when this comes up, and then he can propose what he thinks would fit in here.

BadgerBadger

Aug 29, 2018 11:32 pm

manager   ~0048578

Also defense needs some work. Here's a save game, go to Tichy to check out the fight. There area bunch of AI units clumped around the Command Station; some of those units are out of range of my fleet, but they aren't moving to get in range. I feel like the fleetships on the far side of the fleetball should move to attack me.
Boring AI response.save (1,263,070 bytes)

RocketAssistedPuffin

Feb 12, 2019 5:21 pm

reporter   ~0050806

Having to do this in pieces, else it errors.
AI Attack 1.save (2,442,473 bytes)
AI Attack 2 Trickle In.save (3,206,435 bytes)

RocketAssistedPuffin

Feb 12, 2019 5:23 pm

reporter   ~0050807

In the saves where it attacks me, there is often threat on nearby planets idling.
AI Attack 3.save (1,999,971 bytes)
AI Dark Spire Fight.save (3,143,564 bytes)
Player Attack 1.save (2,307,461 bytes)

BadgerBadger

Aug 15, 2019 2:16 pm

manager   ~0052563

Lots of changes have been made in this area, and the AI is (hopefully) much smarter and scarier. If people have additional problems then please open a new ticket.

Issue History

Date Modified Username Field Change
Apr 13, 2018 12:44 pm BadgerBadger New Issue
Apr 13, 2018 12:44 pm BadgerBadger Status new => assigned
Apr 13, 2018 12:44 pm BadgerBadger Assigned To => keith.lamothe
Aug 29, 2018 8:00 pm Chris_McElligottPark Note Added: 0048557
Aug 29, 2018 8:01 pm Chris_McElligottPark Note Added: 0048558
Aug 29, 2018 8:01 pm Chris_McElligottPark Note Edited: 0048557
Aug 29, 2018 8:13 pm BadgerBadger Note Added: 0048561
Aug 29, 2018 8:28 pm Chris_McElligottPark Note Added: 0048562
Aug 29, 2018 8:29 pm Chris_McElligottPark Note Added: 0048563
Aug 29, 2018 11:32 pm BadgerBadger File Added: Boring AI response.savemet
Aug 29, 2018 11:32 pm BadgerBadger File Added: Boring AI response.save
Aug 29, 2018 11:32 pm BadgerBadger Note Added: 0048578
Feb 12, 2019 4:34 pm BadgerBadger Assigned To keith.lamothe => BadgerBadger
Feb 12, 2019 5:21 pm RocketAssistedPuffin File Added: AI Attack 1.save
Feb 12, 2019 5:21 pm RocketAssistedPuffin File Added: AI Attack 2 Trickle In.save
Feb 12, 2019 5:21 pm RocketAssistedPuffin Note Added: 0050806
Feb 12, 2019 5:23 pm RocketAssistedPuffin File Added: AI Attack 3.save
Feb 12, 2019 5:23 pm RocketAssistedPuffin File Added: AI Dark Spire Fight.save
Feb 12, 2019 5:23 pm RocketAssistedPuffin File Added: Player Attack 1.save
Feb 12, 2019 5:23 pm RocketAssistedPuffin Note Added: 0050807
Aug 15, 2019 2:16 pm BadgerBadger Status assigned => resolved
Aug 15, 2019 2:16 pm BadgerBadger Resolution open => fixed
Aug 15, 2019 2:16 pm BadgerBadger Fixed in Version => 0.882-0.883 Research and Reconquest
Aug 15, 2019 2:16 pm BadgerBadger Note Added: 0052563