Intelligent AI still fails at this

Unfortunately, even the "intelligent" AI screws up many of its games against me in the following situation:
Early on, one can easily access tech allowing all starbases to be equipped with good defenses and decent attacks. I often try to get my mining bases at least (and others as well) equipped with +10 attack (battle stations, devastation beam) and +15 defense (the 3 +5s), which requires 5 constructors. The more aggressive AIs (Drengi, Yor) like to declare war on me and annihilate themselves on my starbases, committing suicide runs one after the other. Their fleets, often consisting of 1 to 4 ships with little or no defense and 1-4 attack, are no match for my bases; they send wave after wave of ships at them, all to die without even denting my starbase. Their military rating drops from astronomical to pitiful in a number of turns, and I have to purposefully hold back so as not to destroy them too easily.
This seems to me to be an algorithm suboptimality. Will it be addressed in 1.1?
Thank you
26,665 views 51 replies
Reply #1 Top


I'll have to try that, It'll make a pleasant change to the usual wave after wave of unescorted troop transports which the AI tends to feed me with.

One thing I think needs to be added on intelligent is things like attacking and THEN declaring war, usually they declare war and then it will often be months before I see their first wave. Why give me so much warning? Any human would attack as suddenly and as unexpectedly as possible.

Reply #2 Top
Just played and saw the same thing with the 2nd beta patch. In the early game I had a military starbase deep inside my borders and the just parked my best fleets near the starbase and watched as the enemy kept sending fleet after fleet at my 2 rather weak fleets. I halved the enemy's military strength in just one turn.

The AI is a bit too agressive here. It should know when to retreat and when to fight. Also saw a lot of single attacker suicide runs at my other starbases. Maybe the range of military starbases should be decreased aswell. They seem a bit overpowered at the moment.
Reply #3 Top
The AI is a bit too agressive here. It should know when to retreat and when to fight.

Somebody wrote about it in another thread and I agreed: Maybe there's an evaluation problem regarding the effective strength of ships boosted by military bases. I don't use military bases for some time now, but I remember that I was confused because the starbase effect wasn't shown reliably in the digital release version. I think that starbase effects aren't considered when calculating the total military power either (they should be IMO).
Reply #4 Top
I think that starbase effects aren't considered when calculating the total military power either (they should be IMO).

Well I guess military power should be splitted in 2 difference things:
- military offense power: your military rating not taking in account starbase effects
- military defense power: your military rating taking in account starbase effects

The basic idea is when you attack someone, you can't count on your existing military starbases but you must deal with opponent military starbases.

In short, someone with a low military offense power and a high military defense power is someone whould shouldn't attack but needs specific tactics to be defeated: dealing with military stabase first, high speed ships to target military starbase without being intercepted ...
Reply #5 Top
One option I'd like to see- the ability to leave a fleet on auto-intercept as a defensive option, and let the AI use this to help protect its starbases...

Reply #6 Top
One option I'd like to see- the ability to leave a fleet on auto-intercept as a defensive option,

Well, that supposes you are allowed to have your ships moving in the AI turn
Reply #7 Top
Well I guess military power should be splitted in 2 difference things:
- military offense power: your military rating not taking in account starbase effects
- military defense power: your military rating taking in account starbase effects

The basic idea is when you attack someone, you can't count on your existing military starbases but you must deal with opponent military starbases.

In short, someone with a low military offense power and a high military defense power is someone whould shouldn't attack but needs specific tactics to be defeated: dealing with military stabase first, high speed ships to target military starbase without being intercepted ...


Unfortunately, this won't work at all. One of the ways to completely WTF own the AI on any difficulty is to use military bases offensively. Simply build a fleet of fast constructors, erect a starbase with full defenses in one turn and you are pretty much guaranteed whatever is within it's range. Just fly a fleet of cheap tiny 1 def and 1 off ships with a ton of engines to wipe the floor with anything and everything that they may have after the starbase is fully operational. In order to do this, all you really need is a strong defensive position early on (which also involves military starbases), there's absolutely no way the current AI can beat this strategy no matter how much money they may have. In most games, I build a massive excess of cash and literally litter the galaxy with starbases. It is rather unfortunate, but with proper usage, I don't see how an AI will EVER defeat a strategy like this, unless it too builds military bases defensively like crazy. Right now, the only thing to do is to keep yourself from abusing this, because you just can't lose. You can pretty much skip the planet grab phase and just go straight into war mode by rushing starbase tech and invasion tech (you willl probably steal all your other techs through invasion, but you won't really need them at all except for maybe logistics for your tiny fleets and stock exchanges for cash).
Reply #8 Top
That seems to indicate to me that something may be broken regarding starbases, either the cost-effeciency for decent defense or their HP level.
I think the problem here is both one regarding AI and one regarding starbase effectiveness.

Additionally, one could consider changing the way military starbase bonuses affect ships: I would prefer beam-enhancers helping only ships with beams, armor enhancers only ships with armor, etc. (instead of the blanket coverage they receive now).
Reply #9 Top

Kalin speaks the truth, the offensive military starbase push is impossible for the AI to defend against, in fact the only way for the AI to counter it would be to spot the build up of constructor ships and premptively start a war to take them out. This would be hard to implement though because how would it tell the difference between and immenent attack and someone who's just building up constructors waiting for their logistics to finish researching or someone who just got lazy and let them keep building.

I'd say perhaps a the AI could open a dialogue "we've noticed an alarming build up of constructor ships/troop ships/whatever in your sector, if they're not gone within a week we'll be forced to declare war", of course you could still attack but if you had 3 AIs ready to open fire on you for building up constructors it would be a sufficiently risky tactic to pull off. .


Reply #10 Top
Maybe military (or any) starbases should not be operationalthe turn they are build?
A build time of 1 or 2 weeks per module should prevent ridiculous agressive starbase rushes,
as it would allow your opponents time to react.
Reply #11 Top
Unfortunately, this won't work at all. One of the ways to completely WTF own the AI on any difficulty is to use military bases offensively. Simply build a fleet of fast constructors, erect a starbase with full defenses in one turn and you are pretty much guaranteed whatever is within it's range. Just fly a fleet of cheap tiny 1 def and 1 off ships with a ton of engines to wipe the floor with anything and everything that they may have after the starbase is fully operational.

True. But it isn't because that there is currently an offensive tactic against which the AI can't defend that this rules out the need for a better calculation of military rating, depending if you are attacking or defending.

The idea was to allow the AI to better see who are easy targets and relatively tough targets, WHEN he decides to go to a war.
Reply #12 Top
I agree that the AI needs a way to stop repeatedly loosing battles.

One possibility would be for it to have a combat simulator algorithm, which gave a % success rate for an attack (and possibly the likly health % of the survivor), possibly using an average of 10 (or more, depending on computational effectiveness) simulations.
This would allow it to decide for any given attack or defence plan if they should instead be doing a bunny impression and running for the hills.


Regarding military starbases, and starbase defences:
The computer players need to defend their planets with military bases, and their military bases with starbase defences, as they are basically the fundemental defensive advantage. They would be much much better doing this than wasting all the planet tiles on +25% defensive ground combat, and orbital fleet managers.

I've noted inthe late game that other AI strabases are woefully under-developed too, in a game I am playing currently, Thala, which is serviced by 3 econ starbases and has been since the early game (the thanan empire now has a respectable chunk of the galaxy, dispite not getting any planets in the early planet grab phase), has a depressing total of +24% production from the starbases (8 from each); they have still not built masive scaling centre modules dispite having had the tech for them for a long time. The game is currently in 2231.

One thing that might help against the offensive military starbase would be to change the planetbound defence buildings to provide similar bonuses to orbiting ships.
Alternativly, the military starbase should only add bonuses to fields that are already positive.
Currently, if you have any sort of weapon, a +1 beam from a mil base will change 0 beam attack to 1 beam attack. It could be made to work only if you have at least 1 beam attack already.
Or the military starbase modules could provide % based bonuses, so that the base quality of the ship being enhanced is more important.
Eg you could have a base that gives +50% hp, +100% beam attack, +200% armour; A ship that normally was 2 beam, 1 shield, 10 hp would be enhanced to 4 beam, 1 shield (not getting a shield bonus, and no armour), 15 hp.
Reply #13 Top
Hi!
My opinion on the civ's military power: as it calculated now it doesn't reflect the real attack and defensive power. IMO it should be based on the relative combat value of the ships, and be calculated for each player against known designs of every other player.

Let me explain with an example from my usual game.
AI builds very early lots of "defenders" - those are ships with single beam weapon, that are sitting in orbit of a planet all the time. For the same purpose I use small hull with 3 beams (att. 4 in orbit), but I move them out, closer to the front if necessary. So AI builds 100 ships, and its mil stats grows to 100. I build 10 of my design, and my mil stats goes to 40 - enough to be no more an attractive target. AI keeps building those small hulls with 2 attack as attackers for a war. I wait and build my attack fleet of ~15 medium hulls with 5-6 beam attack and 1-4 shields (depends of the speed of the tech - in my current slowest-tech game I've used 2 impulse engines, 6 lasers IV and a single shield, but AI was fielding a single beam attack ships only). Such a design eats those hundreds if defenders as popcorn , but AI doesn't recognize that and keeps building them, relying on it's "superior" mil stats of 00+, compared to my new attack fleet of 60-100. However the combat effectiveness of my ship against their defender is about 6-to-1, and in fleets of 4 up to 15-to-1. If AI would take that into accout, would its mil stat against my race suddenly drop from 200 to 40 and below.

IMO a new model of mil strenght should be developed. It would have an array of two values: attack strenght and defense strenght, evaluated against every other race in the universe. Both values would be based on combat effectiveness against known designs, multiplied by the number of (known) ships. Attack value would be measured with attack ships against others' defenders and attackers, defense value against others' attackers only.

In my described case the evaluation would look like this:
  • at the start would AI notice a fleet of my 4 mediums closing to the border. it would calculate combat effectivenes against its 1-beam defenders and get a 7 to 1 ratio.
  • calculating its defese value it would "scrap" 24 defenders, going from defense 100 (from defenders only) down to 76 (OFC it could made calc for the fleet - then it would end with 60 less points).
  • But it has also some 50 attackers with 2 lasers. Those are a bit better (3-to-1, in fleets 8-to-1), but it still "losses" 12 ships to my 4, so its attack value goes from 100 to 76, and defense part of its attacker also from 100 to 76.
  • Now it will also calculate its attack value against my 10 3-laser defenders (4 attack in orbit). The ratio is 3 to 2 in my favor, so it will "lose" another 15 attackers, or 30 points. Its attack value to me is now 46.
  • Altogether is now AI's mil strenght against my race changed from initiall 70att. & 200def. to 46att.+152def., just by introducing a fleet of 4 mediums.


Such a drop in mil strenght shoud be a big sign to the AI it should do something - initiating peace talks, starting research for counterdesigns, changing designs, finding an ally... All that it does now after it loses lots of ships and planets, just because the current mil strengt doesn't reflect the real warfaring strenght.

My 2 cents, hopefully usable.

BR, Iztok
Reply #14 Top

True. But it isn't because that there is currently an offensive tactic against which the AI can't defend that this rules out the need for a better calculation of military rating, depending if you are attacking or defending.

The idea was to allow the AI to better see who are easy targets and relatively tough targets, WHEN he decides to go to a war.

Military starbases, especially when well upgraded, should be worth a LOT of military rating, possibly as a multiplier to the military rating from other ships.

I've noticed something odd about the AI's placement of military starbases - it tried to put them at the edge of the map, just slightly overlaping their planets, rather than putting them so that most of their diameter covers the possible war zone between their planets and the enemy planets. This sort of wastes 1/2 the starbases power. Admitedly, they then fail to upgrade them which wastes the other 1/2 too...
Reply #15 Top
Military starbases, especially when well upgraded, should be worth a LOT of military rating, possibly as a multiplier to the military rating from other ships.

Maybe. But the AI must learn how to deal with them: with fast ships that aren't intercepted by ennemy ships. If not, the starbase becomes a nice bait that will attract the AI ships which will be slaugthered.
Reply #16 Top
One possible tactic for killing fortified bases would be to use the suicide cargo hull.

Pack a cargo hull with nothing but weapons and engines. Prepare a fleet of such ships, and get one good hit in against the starbase.
Repeat, till it goes down.
Reply #17 Top
True. But it isn't because that there is currently an offensive tactic against which the AI can't defend that this rules out the need for a better calculation of military rating, depending if you are attacking or defending.

The idea was to allow the AI to better see who are easy targets and relatively tough targets, WHEN he decides to go to a war.


I completely agree with your second point, there should definitely be a better algorithm in determine whether somone is vulnerable. However, I don't think splitting military ratings will really help. For one, the offensive military rating is pretty much useless if you consider the military base strategy, and if someone is willing to use their starbase defensively, it's pretty much safe to say that they know how to use it offensively as well. So in your example, if you look at defensive military strength to check vulnerabilities, and look at offensive military strength to check for possible repercussions, you end up completely missing out the fact that those tiny 1 off and 1 def ship will be lethal dreadnought slayers in a few turns in your space as offensive weapons as well. Which, I believe, completely defeats the purpose of splitting them up. The SIMPLEST solution, would just be for the AI to only check one military strength, but include military starbase bonuses for both, so that they have a good idea. I won't say that it's not exploitable (IE: park your tiny fleets OUTSIDE military bases to trick military ratings, or make a TON of tiny ships to inflate your military to insane numbers and get bribes every turn), but it would certainly be the easiest.


Now, what would be my "ideal" check list for a war declaration? Well, that's much more complicated. The AI will have to look at many factors (sorry, this is LONG):

1) Vulnerable Spots. He should look at your border area, and check for fleet strength and starbase support. This will go to determine whether or not these border planet is actually "vulnerable". What this means is that he will have to be building sensor ships to scout territory, which, is what normal players do when they don't have Eyes of the Universe. This will also solve the whether to escort transport problem completely, since he won't need to guess, he will be able to see (as long as he keeps scouts in the areas. If he scout the area, and there are no vulnerable targets for said empire that he hates, he should look around for better targets or build up until he can take the defenses on. If he determined that there are indeed vulnerable targets (undefended planets, non operational military bases, etc.), then he needs to take a look at your...

2) Nearby Fleet Strength. Definitely not your "military rating", instead, what he should look at is the distance between his planets and the target, and then look in the area the same distance away to see how many ships you have, their strength, and speed. Since the AI is rather nice about it's war declaration policy, it HAS to realize that you will be pulling those ships towards the border as soon as war is declared. So these nearby ships are the most important, because it will determine whether or not a target is "really" vulnerable, or just looks like it is. He should then look at your faster ships elsewhere and put that into consideration as potential defenders as well, (since those are probably the ones that will come as reinforcements). Looking at your total military strength wouldn't be of much use, simply because most defense ships won't be entering the war, and factoring in the military bonuses from across the galaxy seems pointless. If the nearby ships are strong, and the target has fast powerful ships in their navy, then the AI needs to 1) reconsider the target, or 2) build up some more until he's ready. If the nearby ships and reinforcements can be taken care off (remember to modify by military base AT the target, not at their current location), or much slower than his (so that he can get his ships in, attack, and win before your reinforcements come), then he needs to look at your...

3) Economic Strength. Believe it or not, comparing economic strength is probably 10 times as important as military strength when you are about to attack someone (the way the AI does it anyways - without sneak attacks). Since you get several turns of notice, the AI has to look at your production and economic ability and realize that while you might LOOK vulnerable right now, by the time their fleets arrives, you will have a fleet bigger than theirs waiting just by cranking up military production to 100%. Whether this is by building massive amounts of constructors to erect new military bases, or just through offensive ship pumping, this is one key aspect that I believe the AI fails to consider when he rushes into wars. In order to win a war, the AI needs to have a MASSIVE build up of ships, ready to be devoted to that war alone, and have the economic backbone in place to keep up with you in the war. Simply comparing the two military strength is virtually useless, because 1) most of their ships will probably sit at home while you will probably devote most of yours to the battle, and 2) the war might last very long, and the potential for new ships is just as important, if not more so than current ship strength (because of the rock, paper, scissor system). However, economic strength needs to be modified by...

4) Existing Wars (not really a separate check, more like a #3b, but needs clarification). Simply put, if someone is in 2 wars at once, they can't devote all their resources to fighting you. Similarly, if you are already in another war, it would be wise to think twice about starting another, because you have to realize that you need to divide your economic strength to fight two battles. If your economic potential is more than both of them combined (modified by however many wars THEY are in), go right ahead and start another, but if it isn't, then you would be wise to either: 1) wait until you beat this first foe down, or 2) try to make peace first before attacking the new target. I realize that this alone might shift the game into a "gang on the economically weak" situation, but since this point is at #4 (or perhaps a part of #3) on the list that an AI should check, wars will most likely only occur between bordering empires (because of #1, potential targets - which makes perfect sense). If the AI just doesn't have enough economic strength to compete with you, and can't make peace with someone else, then he must build up a bigger reserve of fleets so as to counter the potential ships that might come later as a result of it. If he finds that he has enough ships and economic power to take you on, then he needs to make one final check...

5) Technological Strength. By this, I don't mean the "Tech rating" what is in used currently, I mean he should take a look at the military technologies that you possess. This is a good indicator for the strength of new ships that would soon be created for the war (will also determine which defenses he needs based on your best weapon - he should start producing this right away if you're a viable target), and the strength and defenses of starbases and their support to ships. These values need to be linked with Economic Strength to determine your "potential military rating" so that he knows how much ships he needs to build up to have a chance in the war. Similarly, the AI should also take into consideration your soldiering ability to make a rough estimate as to how many transports he will need, for the target planet(s) itself.


So after he reaches #5, and declare war, he should have:
1) target planet(s) to strike at, all scouted out,
2) enough ships to take on your defenders, and possible reinforcements,
3) already have the transports needed to take those planets as soon as the defenders are cleared,
4) known your best weapons and starting a line of new combat ships to combat the ones you will roll out very soon.


Believe it ot not, these are the things that a good player does naturally without even thinking about it. Now, compare that to a rough "ooh, my military is bigger than yours" and you can understand why the AI fails miserably when it comes to dealing with good strategy players, let alone ones that plays extremely defensively. Granted some of those things are being done (the multiple war one is used, I think, but it is used to modify military strength, not economic strength, which isn't very useful, because you should be looking at vulnerable targets anyways).

All that's left to say is: Would what I propose help? I definitely think so, wars will only be viable when one is truely ready, and although a defensive player might be able to avoid earlier wars, that doesn't mean that the AI will lack targets found in other AIs. Once they grow powerful enough, they SHOULD be able to take on a defensive player if he's too slow about his business (forcing him to play better - which is the point). Now I won't go as far as to say my proposal is perfect, since it is very possible that I have completely missed some things (I AM just human), but it is definitely much better than a simple military comparison. So would I like to see a system like this implemented? Yes. Do I expect it any time soon? No. I realize that these kinds of checks are massive changes that would require some major testing. But perhaps Brad will come across this article by some chance and see something that he can use for 1.2, since I hear they are still not sure what will be added... If not, perhaps sometime in the future.
Reply #18 Top
Kalin speaks the truth, the offensive military starbase push is impossible for the AI to defend against, in fact the only way for the AI to counter it would be to spot the build up of constructor ships and premptively start a war to take them out.


It's hard to counter for the human player as well without very specialized tactics. Military starbases are just overpowered. A fleet of constructors can do more more damage than a fleet of ships.
Reply #19 Top
why dont they just make military starbases only increase attack, that way weaker ships still get the boost to destroy stronger ones without becomes invincable?
Reply #20 Top
I don't mind having miltiary starbases increase attack AND defense, but they are overpowered based on how MUCH defense can be added very cheaply immediately --- you can add only +1 attack, but right away you can add +1 defense to each defense type (too powerful) and then a big defense boost to the area of your choosing. So you can build a fortress with only three constructors --- that is way too easy.

Reply #21 Top

What I've been doing over the weekend is a combination.

The AI is becoming more effective with starbases.

But the fundamental problem is that the starbase attack asist is a) To easy to get to and b) too cheap.

You can take 10 100bc ships and tuyrn them into 10 400bc ships with a half dozen constructors. 

So what I've done is make the starbase militaration techs cost more to get to. The first one is still relativley cheap to get to, it's defensive in nature and we still want people to be able to use them to give their home units an edge (or even offensive units an edge).  But the subsequent ones cost on par with what the higher level military techs would cost. 

Secondly, the attack assist modules will cost $300 (base) to add on.  Now, experienced players later in the game will consider $300 chump change and that's fine.  But what it does prevent is a player from being able to go right after these techs and crank out a game-ending strategy in the first couple of years.  It will give the AI time to put outs strategy.

And lastly, the first level defensive techs are a bit less powerful.

Reply #22 Top
Wow -- great! Thank you for that insightful reply. I think it is a very good start, and we will have to see how the AI deals with it. I think 300bc per module is still very cheap, but perhaps this is just fine.
You are correct too about the tech -- but just one more point: it is monodimensional in nature, as well. That makes it much easier to research per point of bonus.
Reply #23 Top
A solution would be kamikaze attack or ramming the starbase with the ship or fleet.You would get a screen much like you do with planetary invasion in which you could choose several diabolical tactics,like blow the engine core,causing much more damage.Or introduce a missile technology with fast speed and higher damage capability that could fly on its own.
In the expansion I would imagine spys could reduce starbase effectivenesss.
Reply #24 Top
Frogboy, I'd really like to second the idea that starbase bonuses be restricted to ships with the relevant type of equipment. It seems to me that there's already a check loop in the code to see if the ship in the base's area of effect has an attack or defense value, so I wouln't think it'd be much of a change to restrict that to an attack / defense value of the relevant type. This would make the starbase boosted ships devastating if and only if the base was adapted to the opponent's tech. The uberbase of doom would now require 6 times as many constructors, and I think that's a)enough of a nerf, b) an improvement in the strategic importance of tech selection, and c) an improvement in realism. Please consider this carefully and share you thoughts on the idea.
Reply #25 Top
So what I've done is make the starbase militaration techs cost more to get to. The first one is still relativley cheap to get to, it's defensive in nature and we still want people to be able to use them to give their home units an edge (or even offensive units an edge). But the subsequent ones cost on par with what the higher level military techs would cost.

Secondly, the attack assist modules will cost $300 (base) to add on. Now, experienced players later in the game will consider $300 chump change and that's fine. But what it does prevent is a player from being able to go right after these techs and crank out a game-ending strategy in the first couple of years. It will give the AI time to put outs strategy.


Don't forget starbase fortification. One of the reason offensive and defensive starbase deployment is so sickly powerful is that the AI will be perfectly happy with just ramming their fleets hopelessly into the fully protected starbase (unless you've added better attacking strategies since beta2). While I do recognize that there is a definite need for starbase defenses, and their effectiveness shouldn't be lowered, perhaps a similar increase in higher end starbase fortification technologies and module cost would make the whole starbase construction more costly (since you have to fortify it to protect your investment) and lessen their overpowered nature.