This ties somewhat into the 'Artificial intelligence is too easy and other things I would like to see in the game' thread (https://forums.sinsofasolarempire2.com/534660/artificial-intelligence-is-too-easy-and-other-things-i-would-like-to-see-in) but I've noticed the AI doesn't really build defences until late in the game, and then while it does invest (to the limit of its military slots I think) it doesn't do it intelligently.
AI placement of defences is basically the same as human autoplacement via the ctrl click option which is awful - everything is simply dumped in an arm jutting out from your planet which allows for hostile fleets to enter a system without opposition and then simply pick off the defences without concentrated firepower to contend with.
My preferred approach for defence - and feel free to argue if it's good or bad, is to tightly place turrets in a crescent along the build zone's boundary facing the phase lane hostiles are likely to approach by, attempting to ensure fleets will drop into a kill box. Conversely for civilian structures I tend to place them in a crescent hard up against the opposite side of the planet to the phase lane leading to enemy territory. Obviously that's more complicated when there's multiple phase lane directions!
For small gravity wells, especially with asteroids, I focus on light turrets on the 'frontline', plus a couple of heavy turrets back at the edge of the asteroid etc, whilst making sure the phase lane is within the kill zone. If I get technology that boosts military slots, or use planetary options that increase military slots I'll expand the number of turrets in the crescent, but not so far that the phase lane is outside the light turrets' kill zone. I focus mainly on light turrets rather than heavies - I think 5 heavy turrets plus 2 Pranast United turrets is the most I've ever used, because gravity wells with low military slots can't hold their own against a serious attack - they're more obstacles than true defences, better at delaying than winning, and while light turrets have about the same shields, armour, HP etc as heavy turrets, they're actually better at killing light units e.g. frigates or carriers, as they do more damage than heavy turrets, but lack the penetration power of heavy turrets so damage scales off against titans, starbases, capital ships, and heavy armour cruisers. Light turrets also have enough range in small grav wells that their kill zone usually covers the phase lane so there's either no safe entry spot, or only a very very small one on the edge.
For most gravity wells I'm usually doing something like a 4-4-4 build - 4 light turrets in the centre which can't actually reach the phase lane but will soak initial damage, then 4 heavy turrets on either side which do have the range. That only requires 20 military slots however and you can exceed 50 at times! In those cases I add a few more heavy turrets on each side - but not going past the point where the phase lane is outside their kill zone, and a single light turret each side to avoid full walls of heavies. I'll also add 3 heavy turrets behind the initial light turrets, plus 1 behind each of the 2 light turrets on the side, and add a few more as a second row along the sides if there's space. I may include a repair type platform but that's fairly hit and miss.
(I probably should note that the Vasari's Defensive Uplink planetary item increases (turret?) weapon range by 24% and I mostly play Vasari so that may skew my designs a little.)
When starbases are available, if I'm TEC or Advent - static starbases, then I'll place a starbase down as the 'point of the spear' facing the phase lane - it can soak a lot more damage than a turret, and spread the turrets out around it. For pre-existing defences I may place it to the side, but they should be somewhat redundant as I should be pushing forward by then. Alternatively, if I'm swimming in resources, I guess I could scuttle half the defences or so and rebuild according to the updated design.
If Vasari then I don't adjust the defence, instead I fly the starbase out and then back in a little so it's sitting behind where an enemy fleet will exit and catches them in a crossfire. Don't think there's any damage bonus for this - some other games do give bonuses for flanking attacks etc, but it does complicate which way to attack.
The idea behind these designs is so that enemies exit phase space into a torrent of firepower and start dying before their fleet finishes arriving. Obviously if they lead with a titan this probably won't happen, but the shields will take a hammering!
Against humans there is the risk of them simply running around the defences though I'm not sure how well this would work. The AI does try rushing planetary siege ships through to bombard planets sometimes, but they tend to die when swarmed by fighters\bombers.
What does this have to do with AI being too easy or what would be good to see in the game? Better designed defences - and feel free to argue my designs aren't optimal (but please explain why e.g. each enemy phase lane should have its own defences rather than relying on rotation which can't catch up to fast ships) would make each invasion more challenging. Yes the AI often uses phase jump inhibitors, which are annoying - they must be destroyed before you can leave the system, but if your fleet is powerful enough you will crush all opposition, colonise the planet, and only (potentially) be delayed waiting for defences to come online so you can keep advancing down one of the connecting phase lanes leading to enemy territory.
Alternatively combine the two strategies - I never use phase lane inhibitors myself as the AI rarely retreats. Have AI turrets creating a kill zone on the phase lane exit - and let the AI be smart enough to rotate these defences to face your invasion so you arrive into a storm of enemy firepower, which then forces you to either grind your way through turret + starbase defences, destroy the phase jump inhibitor - likely fighters and\or bombers, or see your fleet get totally wiped.
Does this sound good? Well maybe not the wipe bit 😜 - I don't like losing my capital ships (!!!) but it should make things more challenging than simply facing AI with resource bonuses.
Would something like this be easy to program the AI to do?