Aggressive AI

There's nowhere to place this code
What about a % modifier to the player's military score? On prince whenever a player kills a unit he gets +0.1% military score and whenever he loses a unit he gets -0.15% military score. Meanwhile on Deity whenever a play kills a unit he gets +0.1% military score and whenever he loses a unit gets -0.35% military score.

AKA the better chance an AI has in a war where they trade units 1 for 1 the less it thinks of the player for doing so. We've already got some military score scaling based on difficulty, so adding a scaler based on gameplay and difficulty seems to make sense. This would mean that a deity player killing 500 units and losing 20 would get 43% raised military score for having such an amazing record.
 
So, some people on this forum have taken what I said personally and decided to attack my playstyle to somehow defend their l33t gaming skills or something. I was just saying I don't enjoy fighting endless AI wars because I don't spam units to my force limit. No need to keep implying I'm a huge noob and should git gud.

I can, and usually do, win wars. It can be harder than vanilla, mainly because ranged units got nerfed, but the AI still isn't some tactical genius. I fend off most AI attacks with 5-7 units per front (Sweden and Songhai are admittedly tough), and can do stuff like buy units or upgrade them, which the AI doesn't seem to take into account. Because they perceive to have some advantage against me, they keep declaring wars and ramming random units into my borders, basically wasting hammers. So every game I have to stop what I'm doing and go kill my neighbor, which I guess is what some would consider the pinnacle of civ experience.

Again, I'm not just salty or inexperienced, I just believe Civ is primarily an empire building game. Compare it to the Total War series, or even the Paradox games and you'll see there's a lot more peaceful stuff to do in Civ. Just compare the amount of screenshots and threads of canal cities against the number of map painting screenshots and threads. Civ is mostly a casual single player game , even the multiplayer community isn't really all that competitive. I personally don't believe having a cutthroat AI, always trying to win is really necessary.

There's no need to be dismissive and call me a noob. Korea would actually have a better game if they built Infrastructure with its hammers instead of those endless crusades against my nation. The AI may be playing to win but it is still pretty bad at it and makes me go kill my neighbor every game. I do enjoy most of the changes brought by the mod, but many of my games end up dragging along and I just don't bother finishing them because of these random wars.

It's not just your army size that causes AI to DoW. My guess is that you're not paying attention to diplomacy (this is my guess because you didn't mention diplomacy in your post). The combination of ignoring diplomacy and not maintaining an army will most definitely lead to lots of wars. That is the way the game is designed on purpose, and that's the way the game should be designed. To complain about it and reject advice on how to adapt to it is just... lazy?
 
What about a % modifier to the player's military score? On prince whenever a player kills a unit he gets +0.1% military score and whenever he loses a unit he gets -0.15% military score. Meanwhile on Deity whenever a play kills a unit he gets +0.1% military score and whenever he loses a unit gets -0.35% military score.

AKA the better chance an AI has in a war where they trade units 1 for 1 the less it thinks of the player for doing so. We've already got some military score scaling based on difficulty, so adding a scaler based on gameplay and difficulty seems to make sense. This would mean that a deity player killing 500 units and losing 20 would get 43% raised military score for having such an amazing record.

Military score has no direct impact on AI decision making. Again, even if I tied it into something like military threat, it would have a virtually negligible impact.

Is it possible to place the value of player combat skill in difficulties.xml?

This way, in case a player has unbalanced skills he could tweak the game to his likings.

It wouldn’t change the AI.

This is what I’m trying to say: any of the changes mentioned would be like adding wind to an already-billowing sail. It just won’t have much impact.

That DOES NOT mean I’m not looking at making some changes - rather, it just means that I’m not approaching it this way.

G
 
It’s true, and it’s not strange. Scores are just for the human. AI does not care about score. It has other methods of evaluation.

G

Wait, so how does the AI assess enemy military prowess if it doesn't take the military score into account at all? I thought the military score was basically a sum of the (weighted) units a player has...it doesn't care about his army size? :dubious:
 
It’s true, and it’s not strange. Scores are just for the human. AI does not care about score. It has other methods of evaluation.

G
Can you clarify? For a long time its been advocated that you need a strong military to avoid the AI all hating you, and I think everyone assumed you meant military score.
 
Can you clarify? For a long time its been advocated that you need a strong military to avoid the AI all hating you, and I think everyone assumed you meant military score.

Military score is just a number generate from your army stats (power, number of cities to defend, etc.), and then 'sanitized' to be a value for the scoreboard. The AI doesn't care about the 'scoreboard number,' but it does look at your military power relative to itself for the purposes of threat calculation. It just doesn't use military score.

G
 
For an update on this: @ElliotS's mention that he hadn't seen a AI demand in awhile sent me down a rabbit hole. The algorithm for demand-seeking was much more loose than the algorithm for declaring war, however - news to me - I didn't realize that the AI would auto-DOW if it tried to make a demand and failed (which, with the existing system, was happening a lot). So, I've retooled some things to make sure that the AI is pursuing demands only in situations where it can actually demand something, and it no longer auto-DOWs if it fails the demand process. This should calm down random wars a bit.

Edit: this is not an invitation, post fix, to report every single war from the AI as a 'random war.' Even Gandhi will still turn on you if you're his biggest competitor and he thinks he has an edge.

G
 
Military score is just a number generate from your army stats (power, number of cities to defend, etc.), and then 'sanitized' to be a value for the scoreboard. The AI doesn't care about the 'scoreboard number,' but it does look at your military power relative to itself for the purposes of threat calculation. It just doesn't use military score.

G
Well my suggestion of "What about a % modifier to the player's military score? On prince whenever a player kills a unit he gets +0.1% military score and whenever he loses a unit he gets -0.15% military score. Meanwhile on Deity whenever a play kills a unit he gets +0.1% military score and whenever he loses a unit gets -0.35% military score." could also be applied to whatever the AI uses to an equal or similar extent. (It should also apply to military score because just about every player thinks that matters and it would make the system more intuitive.)

I want to be clear: This isn't meant as a buff to players, this is meant to help the AI get better and deciding when and how to declare war.

As an aside: Would it be possible to change the military score formula to be closer to whatever the AI uses to understand your power if they're substantially different? Players clearly think that's what the AI uses and therefore having it match is good game design.
 
Military score is just a number generate from your army stats (power, number of cities to defend, etc.), and then 'sanitized' to be a value for the scoreboard. The AI doesn't care about the 'scoreboard number,' but it does look at your military power relative to itself for the purposes of threat calculation. It just doesn't use military score.

G
Okay, so there are a set of stats in the game.

Those stats are used to make my military score.
Those stats are what the AI looks at.
So military score is not directly factored, however they should be pretty closely related?
 
Well my suggestion of "What about a % modifier to the player's military score? On prince whenever a player kills a unit he gets +0.1% military score and whenever he loses a unit he gets -0.15% military score. Meanwhile on Deity whenever a play kills a unit he gets +0.1% military score and whenever he loses a unit gets -0.35% military score." could also be applied to whatever the AI uses to an equal or similar extent. (It should also apply to military score because just about every player thinks that matters and it would make the system more intuitive.)

I want to be clear: This isn't meant as a buff to players, this is meant to help the AI get better and deciding when and how to declare war.

As an aside: Would it be possible to change the military score formula to be closer to whatever the AI uses to understand your power if they're substantially different? Players clearly think that's what the AI uses and therefore having it match is good game design.

My point is that the added leg work to get this balance would not make a huge difference for the AI, as there are so many other factors playing into the changes. Just trust me on this, 99% of the diplo AI code was rewritten by yours truly last year.

Okay, so there are a set of stats in the game.

Those stats are used to make my military score.
Those stats are what the AI looks at.
So military score is not directly factored, however they should be pretty closely related?

They are, my explicit point is that the score you see on the scoreboard doesn't matter to the AI - the underlying comparison is valid, however (I just don't want people to think that altering the scoreboard score would affect the AI, as it won't).

G
 
They are, my explicit point is that the score you see on the scoreboard doesn't matter to the AI - the underlying comparison is valid, however (I just don't want people to think that altering the scoreboard score would affect the AI, as it won't).

G

I get that altering the score itself won't affect the AI, but my question then is if the score still shows the underlying comparison of AI's perceived military strength vs the player's, what causes the huge discrepancy in perceived strength when the AI and the player has the same number of cities and the player is at, or close to their supply cap, with more advanced units?
 
I get that altering the score itself won't affect the AI, but my question then is if the score still shows the underlying comparison of AI's perceived military strength vs the player's, what causes the huge discrepancy in perceived strength when the AI and the player has the same number of cities and the player is at, or close to their supply cap, with more advanced units?

This is one of those things that has been repeated by non-coders enough that people take it as fact, when it is - in fact - not actually happening.

G
 
This is one of those things that has been repeated by non-coders enough that people take it as fact, when it is - in fact - not actually happening.


G

Your response reads a bit ambiguously to me even accounting for your bolding the font. My first inclination is to interpret your reply as you stressing that there isn't a discrepancy between the AI's calculations relative to the military score that the eui shows, and that just raising the military score itself wouldn't change the way the AI views the situation. If so, then my question is modified:

In a good 95% of my games, I don't neglect my military. I hover right around my cap, and I'm the type to prioritize the military techs over the others more often than not. So in situations where I'm the tech leader or close to it, that means that I almost always have the more advanced units as well. Why then are there scenarios where I have ~300 less military score than a civ with a similar number of cities and a more outdated army? (I know this score isn't important but it's relatively accurate to AI calculations right?)

-------

Perhaps, however your statement was intended to stress the huge part, not the entire clause. In that scenario, I'd interpret it as you meaning that the score and the calculations are still relative, but that the numbers don't translate to a massive shift in AI decision-making.

So in a case where I have 300 military score and an AI has 600, they aren't thinking "oh I'm twice as strong as them, let me take advantage of this" without other factors outside of those calculations first coming into play.

-------

Im sure there's other ways to interpret your statement as well and it's possible I misinterpreted your ultimate point in this discussion. Also I'm sure specifics examples/numbers from specific games would be more helpful than throwing an arbitrary 300 military score difference out there; with the next newest version, I will be able to provide specifics.
 
Why then are there scenarios where I have ~300 less military score than a civ with a similar number of cities and a more outdated army?

Part of the explanation is probably that the AI gets a difficulty-dependent bonus to their unit cap.


This is one of those things that has been repeated by non-coders enough that people take it as fact, when it is - in fact - not actually happening.

G

You probably mean in terms of actual army strength and size, though, right? When taking into consideration that a skilled human is much better at war than the AI, however, the AI will inevitably underestimate him, won't it? I mean, in my games I feel like I'm usually gonna do fine in a war if I have at least half the military score of the enemy AI civ and I'm not even a Deity player.
Furthermore, since the AI plays against other AIs as well and not just the player, what are the methods the AI uses to differentiate between these two types of opponents in order to include the improved military skill of the human in its assessment? If there are no such methods then it would seem inevitable that the AI will underestimate the player.
 
Part of the explanation is probably that the AI gets a difficulty-dependent bonus to their unit cap.




You probably mean in terms of actual army strength and size, though, right? When taking into consideration that a skilled human is much better at war than the AI, however, the AI will inevitably underestimate him, won't it? I mean, in my games I feel like I'm usually gonna do fine in a war if I have at least half the military score of the enemy AI civ and I'm not even a Deity player.
Furthermore, since the AI plays against other AIs as well and not just the player, what are the methods the AI uses to differentiate between these two types of opponents in order to include the improved military skill of the human in its assessment? If there are no such methods then it would seem inevitable that the AI will underestimate the player.

You say inevitably underestimate, I say don’t overestimate the skill of the average civ player.

G
 
You say inevitably underestimate, I say don’t overestimate the skill of the average civ player.

G

Fair enough, but this is exactly why this topic has been (and continues to be) so popular: it would simply be amazing if the AI was capable of better judging the skill of the player by observing how he conducts himself in wars such that it would overestimate an average player and underestimate an above average player both to a lesser degree, instead of being more static and expecting an "average player".
I get that this might be too much to ask for, though, and in the end it is you who has the deepest insight in the actual code and what is feasible but a more dynamic appreciation of player combat efficacy and efficiency is always gonna be a good thing; not that there haven't been huge strides in improving the AI warring ability already.
 
Top Bottom