Going to respond to a few things, Keith will I'm sure respond to more.
Well, things are a bit more complex than that but yeah, the bottom line is that in most practical situations it makes sense to ignore the turrets for an attacking A.I.
That's a good point. Basically, the part of the AI that assigns where to move, anyhow. When it comes to where to fire, then if turrets are in range, fire away.
The problem is that the A.I. seems to assign more or less the same priority to every stationary target in the system.
That does strike me as a problem, yes.
The thing is: by doing this, the A.I. splits its forces in several small groups which become (especially during the early game) too tiny to be effective.
I think there should be a rule that basically slows down reconstruction of stuff the more of an AI presence there is. Maybe that would be too much of a nerf to static defenses compared to mobile ones, but then again maybe mobile fleet ships need to also construct slower when the AI presence on the planet is high. Basically I'm thinking of a "construction penalty percentage based on AI strength at this planet" which would globally apply at that planet.
Fast refleeting is GREAT, don't get me wrong, but when it's during the middle of battle it gets into this strange territory you're talking about here.
Either that, or have a cooldown on turret remains and similar where they can't do any rebuilding for 2 minutes after being destroyed, or something like that. A long and painful enough time for players to deploy other things elsewhere. Then again, that would just make people want to scrap the remains and build fresh turrets, so that's really a no-go.
And the controller is rebuilding turrets and tractors so fast that as soon as one of them is destroyed, the units go "hey my target is back up... let's go kill it again!". So they keep "hovering" around the clusters and the smaller the attacking fleet is, the longer this lasts.
As you say, some of the AI's stupidity is based around these mechanics, so these also need to be addressed.
My hunch is that the controller should always be the highest priority whenever there is little to no defending fleet. If the player has a big defending fleet instead, then things become more complex as the A.I. should factor the expected controller-time-to-kill given the units it has at its disposal, their travel time to bear their damage on it, and the continuously decreasing dps due to the attrition rate caused by the player's defenses (including the standing fleet). That's a system of differential equations, but it should be easy peasy to solve for a sentient A.I.
If the A.I. determines it doesn't have enough strength, it should kill whatever target they can quickly reach and then retreat. Or (far more evil) check if there is a nearby wormhole which can be used to travel to another player-controlled planet thus "bypassing" the defending fleet, or at the very least getting the jump on it by forcing the player to chase it and thus gaining more time to kill the controller on the other planet.
One of the things that makes an AI dumb, typically, is when it's too predictable. Even if it's best to bumrush the controller, it shouldn't do that more than 60% of the time. When the AI enters a planet, it should choose a tactic to use for a while. What is its objective? Kill the controller? That's the most likely. But other times it should randomly decide to kill a random power distribution node. Perhaps with more desirable targets weighted more heavily, but still. It's those surprising ones where the AI suddenly zips off toward the wrong end of your planet, accomplishes a semi-pointless objective, and is now in a different position and chooses a new objective from an unexpected angle that really make for a feeling of playing against something alive.
We're going to want to have as much of that logic as possible in place on lower difficulties, because that's what makes the AI feel like it's actually a cool opponent. In my opinion, at the tactical level the AI should do
almost as much as possible that is clever from difficulty 7 and down, and then keep a few truly devious tricks for higher levels.
Reducing the number of ships tends to also make things feel different (worse) for a variety of reasons, so simply having the AI get either lower-mark ships for a much longer time, or have a multiplier against their stuff that keeps them weaker in some other way, would be ideal for lower difficulties. Perhaps from difficulties 1 through 6, the AI's damage per shot is reduced by some multiplier.
Perhaps on difficulty 1-3, the AI's waves and reinforcements are always 2 marks lower than they normally would be, obviously minimum 1, so most of the game it's going to be mark 1 waves and reinforcements all over the place. Some more nuance would be needed on that, but still. And then difficulties 4-5 it's 1 mark lower than it normally would be.
Even on lower difficulties (5 and down), we want people to go "wow, this AI is smart," but we want that to be followed up by "but it isn't enough, mwa ha ha." Difficulty 7 is the default experience, and difficulty 6 is watered down just a bit to be something you can lean back and watch more calmly as you play. And then on difficulties 8+, we want the AI to be pulling out extra tricks where the players go "WHAT?"
Difficulty 10, incidentally, is meant to basically be just extra curbstomping from more ships and higher-mark ships. The last of the new tactics should kick in at difficulty 9, since 9 is meant to be incredibly hard but also fair. Difficulty 10 is meant to be impossible to win, literally, but only barely so. And that via pulling out all the stops as well as having unfair numbers. Some people play exclusively difficulty 10, and try to find the chinks in the armor despite the overwhelming odds. Whenever they win, they gleefully tell us how they did it, and we put in changes to "fix the bug" that they won.
This tends to cause improvements for the AI at all levels, because we're not fixing the bug by just upping the numerical amounts more again.
As far as defending goes, the A.I. tactics simply do not make any sense to me. What I've observed it doing is:
- if the attacking force is too big, leg it with only a few of its starships
- no matter what, throw the small ships to the attacker force
- no matter what, several of the guardians stand in place doing nothing except passively fire on whatever reaches their range
This makes zero sense. If the attacker is too strong and the planet is considered lost no matter what, the logical thing to do is to have everything which can run away and go defend something else.
Alternatively, it can make sense to sacrifice the local fleet if it can buy enough time to significantly slow down the attack thus enabling the A.I. to better pursue offense with the next wave.
In any case, whenever the decision is made to stand and fight, the A.I. ought to employ its forces optimally, which most of the time means: park the small ships on top of the controller, have the starships hover near their maximum range, and focus fire the best target (which is in itself a complex decision, which depends on available dps given the target's defenses, target value, expected time to kill given continuosly decreasing dps). If the player then tries to "game it" by using e.g. sniper units then wait till they come within their maximum range (where they will presumably stop and fire) then "charge" them.
You know, in the first game the guard posts were immobile for a reason: you'd have to go around traveling to them, and each one was a bit different. You had to be the one maneuvering your own ships for a change, rather than letting the AI come to you. The AI was assumed to be pinned down to these positions, and the smaller ships were explicitly NOT ALLOWED to leave their post unless the post was destroyed. Once the post was destroyed -- and it was not auto-targeted -- then they were free to flee or bumrush or whatever else.
I kind of miss that. The guardians tend not to feel all that threatening to me, because I see them EVERYWHERE. I kind of wish we had a really basic guard post that was just a passive thing like in the older AI War Classic 3.0 and below, and those were what you saw the most, with the above restrictions in place.
Then once AI ships are freed from a posting, they do the sort of tactics you're describing. But before that, it's kind of reverse tower-defense.
And I feel like the guardians should be... I don't know. Slightly more rare, maybe more powerful, to differentiate them more from starships. They're like these roaming mini-fortresses on the AI worlds, and maybe they're really slow but also unable to go through wormholes at all. So that way you have this one big scary thing (or more than one!) that you have to deal with on the planet no matter what, because it's the local goliath that just can't even leave if it wanted to. It has to commit.
The other issue is how ships of the AI are stored in the guardians and then pop out. That just
feels bad. I bet you didn't even know they were doing that; I knew from Keith and I talking about it, but otherwise I probably would have thought that new ships were just spawning. Basically when reinforcements happen, they go inside the guardians and don't pop out until it's time to fight. This keeps the targeting logic during large battles on AI worlds way simpler. And it is a good idea, in theory, except that I can't see the entire battlefield properly.
For me, I think that we should keep the general mechanic in place...ish. But basically make it so that the ships that would be "inside" the guardian are instead visible outside of it, in proper positions, but they aren't running their logic and can't be shot. But then once you approach them, they come active and deactivate their shields... or something. Right now the AI worlds keep feeling kind of empty to me.
Is there any document explaining how to mod tactical A.I. behavior? I know a few programming languages myself and could give it a shot.
Keith will have to fill you in. I
really appreciate the offer, though, and any help you can provide. Already this thread is a goldmine of ideas.