The AI does not know fear (when it really should)

General Stars in Shadow Discussion Forum
zenopath
Posts: 29
Joined: Thu Dec 31, 2020 1:42 am

The AI does not know fear (when it really should)

Postby zenopath » Sat Feb 13, 2021 4:56 am

This happened to me a lot during my last game as yorals. I had a full antimatter torpedo destroyer fleet. There is nothing deadlier, honestly, yorals are OP because of that one simple ship.

That's not the problem. The problem is that whatever code the AI uses to calculate the odds of beating you in a fight really underestimates that one ship. It happens when you play other races, but the AM torp destroyer is by far the worst case. I played the whole game never once needing to declare war. AI would look at my "pathetic" destroyer only fleets and thinks, "Yeah I can beat that. I shall give you an ultimatum!"

No sir you can not beat me, all your ships are dead before they can even hit me. Then after capturing 80% of the enemy's planets, I accept a peace proposal. The AI builds up a tiny fleet after a few decades of being ignored, and repeat. You can basically win the game refusing ultimatums and accepting peace offers, without ever starting a war. The AI never learns to take you seriously, continuously underestimating you.

They also dont take gunships seriously, which is also funny to watch.

username
Posts: 44
Joined: Mon Feb 20, 2017 5:59 am

Re: The AI does not know fear (when it really should)

Postby username » Tue Feb 16, 2021 10:05 am

I suspect it would be a generally revolutionary advance in 4x AI for it to actually be able to take into account its combat record against you.

I mean, pretty much every 4x with customizable units tends to run into this situation where the player has created a combo that vastly exceeds the effectiveness of its assessed parts...but the AI will never learn that it has bit off more than it can chew with both hands, and will thus continually send units to certain 3D doom against a unit it repeatedly misunderestimates. If the AI were capable of adjusting its estimates in response to outcomes, that would be a huge advancement in such AIs.

Perhaps something like an Elo/Glicko system of unit ratings, so when the AI is confronted with a combat result that differs markedly from what it expects, the assessed combat strengths of a unit are thus adjusted. Like if you put an 2100-strength unit up against a unit rated only at 900-strength initially, the AI expects to win this handily. If the AI gets its ass handed to it, it will adjust its assessments of the relevant units downwards and upwards until the outcomes it receives more closely matches its predictions.

zolobolo
Posts: 1544
Joined: Fri Nov 25, 2016 3:49 pm

Re: The AI does not know fear (when it really should)

Postby zolobolo » Tue Feb 16, 2021 6:10 pm

It has been mentioned in the past that the AI does not take missiles and/or torps at a risk level that would be appropriate to them

I suspect this could be due to several factors:
1. Missiles/torps can be intercepted fully via PD making the mdeal zero damage dependening on range, speed, PD power and offensive power
2. They consume ammo so after a while they are completely ineffective even if they are not countered (unless yo uare the Tinkers :))
3. Shield stops them just as well as other offensive weapons (a lot of scifi says rockets and torps are not effected by shield for this reason) aND on top of that shield regenarate quite fast in this game

I suspect that the AI threat calcuation is overly cautious due to the above and rightly so considering how much in lfux their potential for damge output is in

Yoral torp destroyer is the extreme case of course and shows what happens if shere amount of torps overcome all of the above limitations
They have been nerfed once BTW - previously they could fire 8 torps at one :)

zenopath
Posts: 29
Joined: Thu Dec 31, 2020 1:42 am

Re: The AI does not know fear (when it really should)

Postby zenopath » Wed Feb 17, 2021 12:25 am

The yoral torped destroyer armed with AM missiles is so incredibly broken. I love the little ship, it does suffer in late game a bit against enemies armed with a lot of lasers. The solution is always to just build more. Local point defense gets overwhelmed, especially if you close in close enough to hit them same turn (the circle of death, I call it).

The thing that made me write the OP was that in no other race do I ever get ultimatum'd so often.

When I play as Orthin, The AI respects my military strength when I build dreadnaughts, even if only one or two to act as tanks for my gunships. If I play as one of the two Teros, I usually rely on heavy cruisers and then battlecruisers, since they don't have good missile ships, and I get respect from the AI. If I'm playing Tinkers, my missile cruisers get respect, and when I upgrade to vindicator carriers (vindicator drones so completely OP) they also get respected.

Its my opinion that there's something about using full destroyer-only fleets that just makes the AI dismiss your fleet strength completely. To them, no large ships equal helpless.

User avatar
sven
Site Admin
Posts: 1621
Joined: Sat Jan 31, 2015 10:24 pm
Location: British Columbia, Canada
Contact:

Re: The AI does not know fear (when it really should)

Postby sven » Wed Feb 17, 2021 1:05 am

zenopath wrote:Its my opinion that there's something about using full destroyer-only fleets that just makes the AI dismiss your fleet strength completely. To them, no large ships equal helpless.


The problem, at a low level, is probably this formula (paraphrased from line 88 of design_evaluation.lua):

Code: Select all

   design_combat_value =  attack_value*(1+defence_value)


This is a heuristic that either I or harpy eagle came up with (I forget which one of us bears responsibility). But, average defense values are usually large numbers (100+), so the +1 doesn't really matter, and what you effectively get is combat_value=attack x defense. This is not a terrible heuristic in many cases, but, it's problematic for glass cannons like the Yoral torpedo destroyers, because their combat value gets underestimated when they're used in large enough groups that they can win without ever suffering return fire (which means, effectively, that their defense value doesn't really matter -- it all just comes down to attack).

I can think of some crude ways of trying to fix this. But, messing with deep formulas like this in the AI often has unintended consequences, so I'd want to be pretty conservative with any change.

Maybe something like this would better respect the potential power of glass-cannon type designs?

Code: Select all

   design_combat_value =  attack_value* max( 1+defence_value, .1*attack_value )


zenopath: Could you upload one of your Yoral destroyer-spam games using the in-game "upload game logs" option? Having real fleets to look at would make trying to balance an updated formula a little easier.

User avatar
Arioch
Posts: 1403
Joined: Sun Feb 01, 2015 12:56 am
Location: San Jose, California
Contact:

Re: The AI does not know fear (when it really should)

Postby Arioch » Wed Feb 17, 2021 6:48 am

This is a common problem with AI factions, as it's very hard to simulate attitudes or intentions that persist from turn to turn. I find this irritating in my own gameplay (especially in games like Civilization 6 in which pathetic remnant nations that you spared from destruction have the gall to make demands from you), but I recognize the difficulties in making these relations seem more realistic... without turning the game into a cakewalk with all the factions surrendering to you once you've achieved a certain level of power. This might be more realistic, but I think it's less fun.

A fear mechanic could address this concern, but I worry about the many possible negative impacts this might have on gameplay. In my experience, these sorts of mechanisms have not been beneficial to gameplay where I have seen them implemented. In Civilization V and VI, for example, fear mechanics became mainly another way for the player to steamroll the AI.

User avatar
PrivateHudson
Posts: 206
Joined: Tue Feb 12, 2019 7:59 am
Location: Chelyabinsk, Russia

Re: The AI does not know fear (when it really should)

Postby PrivateHudson » Wed Feb 17, 2021 8:23 am

zenopath wrote:The yoral torped destroyer armed with AM missiles is so incredibly broken.

Maybe a little change will tone it down a bit: forbid equipping missiles into Yoral TDD's torpedo slots? This will both shift it a little later technologically, and give an enemy a little more time in combat to deal damage to them. I'd also doubled (or made 100%) for them the chance to blow-up violently once destroyed. Maybe also strip TDD of one system slot so it can't have shield and will become a truly glass cannon. After all, where on such a small ship the furry devils find room to store so many warheads? Another implication will be inability to install warp lane amplifier, so some other hull (like under-utilized simple/adv/hvy destroyer) have to be early harpy/pirate mower.
A ideal result of nerfing would be that TDD is still a powerful weapon, but not "one case suits all", and requires knowledge of weak and strong sides to use effectively.

zenopath
Posts: 29
Joined: Thu Dec 31, 2020 1:42 am

Re: The AI does not know fear (when it really should)

Postby zenopath » Wed Feb 17, 2021 6:02 pm

In the formula posted for combat strength, that should really be additive, not multiplicative.

If a superdreadnought has 500 defence and 500 attack power, it shouldn't count as being worth 25x as much as a ship with 100 defence and 100 attack power, as there is no way a superdreadnought could solo a swarm of 25 cruisers on its own. It could reasonably handle 5, maybe even 10, but not 25. Truth be told, defense isn't really nearly as valuable as attack value. Especially not when the total damage output of your fleets exceeds the total defense of enemy fleets, allowing you to one-shot them with a single (or maybe two) missile volleys.

zolobolo
Posts: 1544
Joined: Fri Nov 25, 2016 3:49 pm

Re: The AI does not know fear (when it really should)

Postby zolobolo » Thu Feb 18, 2021 10:52 am

I really only see this issue for boarding ships and Yoral torp destroyer (since the AI updates)

For Yoral Torp Destroyer there is another simple option to "resolve" this AI issue: Simply increase the defense value (and cost to mach it) of the design making it a powerfull destroyer that is feared and not jsut a glass cannon

For the same issue with Boarding Modules I have written a couple of options already but the above also applies for these of course

username
Posts: 44
Joined: Mon Feb 20, 2017 5:59 am

Re: The AI does not know fear (when it really should)

Postby username » Thu Feb 18, 2021 11:55 am

PrivateHudson wrote:After all, where on such a small ship the furry devils find room to store so many warheads?
They didn't. They're just hanging there on the outside of the hull, you can see them. If anything, the tradeoff should be the increased possibility of ammo explosion since they're just hanging there off the outside of the hull.

zenopath wrote:I played the whole game never once needing to declare war. AI would look at my "pathetic" destroyer only fleets and thinks, "Yeah I can beat that. I shall give you an ultimatum!"
I can do you one better: I played the whole game without ever once constructing my own warships. The AI would look at my pathetic transport-only fleet and think "Yeah, I can beat that."

After the first battle, all of his ships are now my ships. It snowballs HARD as I go immediately from worst fleet strength to best fleet strength in a very short span of time because of my rampant kleptomania.

I also stole all of the ion frigates in Homeworld. If it ain't nailed down, it's mine now.

zolobolo
Posts: 1544
Joined: Fri Nov 25, 2016 3:49 pm

Re: The AI does not know fear (when it really should)

Postby zolobolo » Thu Feb 18, 2021 6:42 pm

username wrote:The AI would look at my pathetic transport-only fleet and think "Yeah, I can beat that."

Yes, that is the other type of combat value the AI does not calculate optimaly: boarding modules (shuttles inlcuded but especially the bae boarding module itself)

Generally the AI doesnt even use that module at all in its blueprints and even if they were aded there, I doubt the tactical scripts would take them nto consideration

Some options to resolve this:
1. Remove boarding module and increase the threat of Shuttles
2. Change how Boarding module works and have it shoot "torpedoes" that costs and does crew damage instead of normal damage. It can be intercepted but the AI would need to see it a boarding shuttle (the logic is already there sicne hte AI optimisation to handle those effectively)

User avatar
PrivateHudson
Posts: 206
Joined: Tue Feb 12, 2019 7:59 am
Location: Chelyabinsk, Russia

Re: The AI does not know fear (when it really should)

Postby PrivateHudson » Fri Feb 19, 2021 9:40 am

zolobolo wrote:I really only see this issue for boarding ships and Yoral torp destroyer

Have you seen in action Tinkers Vindicator asteroids? I highly recommend. Low-tech, cheap, tough, numerous crew, and devastating. I wonder how torpedo destroyer equipped with antimatter-tipped Vindicators will fare.

username
Posts: 44
Joined: Mon Feb 20, 2017 5:59 am

Re: The AI does not know fear (when it really should)

Postby username » Fri Feb 19, 2021 7:03 pm

zolobolo wrote:
username wrote:The AI would look at my pathetic transport-only fleet and think "Yeah, I can beat that."

Yes, that is the other type of combat value the AI does not calculate optimaly: boarding modules (shuttles inlcuded but especially the bae boarding module itself)

Oh, I don't mean that they're boarding transports. I mean that they're just regular transports. I have *A* boarding transport, but the bulk of my fleet is just made of regular transports I draft from the freighter pool, and then use to assist the boarding. The AI assesses them as noncombatants and targets them last, you see. The AI isn't wrong to do this: I, too, would assess them as noncombatants and target them...for theft. I never blow up anything I could steal.

zolobolo
Posts: 1544
Joined: Fri Nov 25, 2016 3:49 pm

Re: The AI does not know fear (when it really should)

Postby zolobolo » Sat Feb 20, 2021 8:17 am

username wrote:Oh, I don't mean that they're boarding transports. I mean that they're just regular transports. I have *A* boarding transport, but the bulk of my fleet is just made of regular transports I draft from the freighter pool, and then use to assist the boarding. The AI assesses them as noncombatants and targets them last, you see. The AI isn't wrong to do this: I, too, would assess them as noncombatants and target them...for theft. I never blow up anything I could steal.

I was thinking you smacked a boarding module on normal transports.

If that is not the case, then it might be a bug as I thought you canot board another ship (without a boarding module or shuttle) that has active engines: first need ot disable their engines and then boarding is enabled

If you are transporting crew from the normal transport into the boarding transport that is legit I also do this regularly from large ships to the boardign transport (they cannot be boarded untill engines working and if enemy doesnt have boarding ships which the AI usually doesnt have as it is not usein the boarding module only shuttles

User avatar
PrivateHudson
Posts: 206
Joined: Tue Feb 12, 2019 7:59 am
Location: Chelyabinsk, Russia

Re: The AI does not know fear (when it really should)

Postby PrivateHudson » Sat Feb 20, 2021 9:08 am

By the way, transferring crew to boarders from other ships that just accidentally stopped side-by-side could considerably increase AI mil. transports' efficiency, while being hopefully relatively simple change of combat script.


Return to “General Forum”

Who is online

Users browsing this forum: No registered users and 10 guests

cron