RHQ Artificially Intelligent AI Mod

RHQ Artificially Intelligent AI Mod RHQ AI Mod 2.07

If we wanted to make the AI DOW more like older Civ games, trying to add a grievance for a civ having a weak army, would be similar to how the other games worked, and something Humans keep saying they believe the Civs should DOW because of, but it isn't actually something I've seen in Civ 7 as something they evaluate.
 
Currently what I'm working on and testing.

AI to build planes, and use them
Different method of specifying Army Compositions to require more ranged units in Army Compositions
Prioritize Army Commanders in City Attack trees, and not stuck at home. They often don't gain XP that way optimally.
Forcing the AI to always slot their unique traditions
Forcing the AI to get their pantheon
Seeing if I can get the AI to attack two cities simultaneously with large armies.
Test even higher AI operation limits.
Improve the AI's resource allocations if possible.
Increase likelihood that AI will disperse independents
Find a way to have the AI pillage aggressively.

No idea what will succeed or not. No idea what will change. I also need to do more for the naval stuff. But those are the things I'm currently working on.
That's an impressive list! Please keep your sanity :)

Adding on this, it may be worth my time to see if I can sort out how to show this in the UI for the player, like the Transparent Diplomacy option in Civ 5 VP

Here I'd caution because hiding the total grievance score from the player is likely a game design decision and some things are better left like that not to make the game too predictable.

It's analogous to how back in Civ 5 (?) an AI could sometimes go in 'deception' mode and appear Friendly to you and then DoW a couple turns later. I loved that! I don't want 100% transparent, predictable AI.

Looking at the hidden grievances score for testing/debugging purposes of course that's another story. (it also saves you from having to dip your hands in the UI world too...)
 
If we wanted to make the AI DOW more like older Civ games, trying to add a grievance for a civ having a weak army, would be similar to how the other games worked, and something Humans keep saying they believe the Civs should DOW because of, but it isn't actually something I've seen in Civ 7 as something they evaluate.
Are you saying the AI does not take into account your army power at all when declaring war? (shocked if true) Such that you're considering resorting to making it a 'grievance', even though it's not technically a grievance?

Or are you saying it does, but it doesn't attach as much weight to it as it "should" (= the community woudl like) --> I'd argue it's this, otherwise how can the Firaxis devs omit something so basic?
 
Yeah it seems like the difference me and others with the same experience have in common is that we play on marathon. I'm not sure I have anywhere that can record the length of footage needed for a full marathon playthrough, but is there some slice of play I could capture for you that would be relevant? I could record a portion of the gameplay the next time I see the AI building up and not declaring, and save the logs?
I can autoplay on marathon and see if it shows anything.

That's probably the most effective way to understand what is happening.
 
Here I'd caution because hiding the total grievance score from the player is likely a game design decision and some things are better left like that not to make the game too predictable.

It's analogous to how back in Civ 5 (?) an AI could sometimes go in 'deception' mode and appear Friendly to you and then DoW a couple turns later. I loved that! I don't want 100% transparent, predictable AI.

Looking at the hidden grievances score for testing/debugging purposes of course that's another story. (it also saves you from having to dip your hands in the UI world too...)

I specifically mean as an options for players to see it, and reference it while playing.

Currently I watch it in a tuner panel.
 
Are you saying the AI does not take into account your army power at all when declaring war? (shocked if true) Such that you're considering resorting to making it a 'grievance', even though it's not technically a grievance?

Or are you saying it does, but it doesn't attach as much weight to it as it "should" (= the community woudl like) --> I'd argue it's this, otherwise how can the Firaxis devs omit something so basic?

Nothing I say is absolutely true. I have to reverse engineer everything I do. There is no documentation for modders. Everything I say can potentially be wrong, and need adjustments.

Moving from what I am saying, to Firaxis omitted something basic, should never happen.

I do not have access to the DLL. I have very little access to many systems. I have to reverse engineer them every time through trial and error.

I will have to stop communicating my thoughts on the AI publicly if this continues. I am talking about what I understand, and what I see through trial and error reverse engineering.
 
Nothing I say is absolutely true. I have to reverse engineer everything I do. There is no documentation for modders. Everything I say can potentially be wrong, and need adjustments.

Moving from what I am saying, to Firaxis omitted something basic, should never happen.

I do not have access to the DLL. I have very little access to many systems. I have to reverse engineer them every time through trial and error.

I will have to stop communicating my thoughts on the AI publicly if this continues. I am talking about what I understand, and what I see through trial and error reverse engineering.
Sorry didn't mean to be alarmist, won't happen again! (the possibility of AI not evaluating weak army for DoW sounded too huge to stay silent on, but I get it now, it's not to be intepreted in the absolute sense)

Yes totally understand you're openly sharing your thoughts & observations and it's a learning phase. Really appreciate that, please don't stop sharing!
 
I have airplanes being built, and lots of them. But they all end up in the areodrome commander packed in, and i'm not seeing them get used.

I would like the commander to use
UNITCOMMAND_FOCUSED_ATTACK_AIR_BOMB

However, I am not finding any way to force the AI to do that. The only thing I have is a general statement to make a commander, use an ability. But no way to set which one.

I am going to try to set a higher priority for
UNITOPERATION_AIR_ATTACK


From everything I see though, there is no way for me to fix this. Air attacks are mostly still setup as Civilization 6 did. Which doesn't work as far as I can tell for Civlization 7, because they are in a commander. They are considered off the map. I will try to use the Unit Operation, but I have zero expectation it will work.

And the AI doesn't have Commander tactics... if it did, I could order them in value, or do something.

I do see that the Air Assault part of the Behavior Tree will rarely, but sometimes run as Success, with units in range. But I haven't caught a plane being used.

It might be that they can use them if only I can catch these rare times. I do see a lot of times they theoretically should be used, but are not.
 
Last edited:
notque updated RHQ Artificially Intelligent AI Mod with a new update entry:

RHQ AI Mod 2.03

------------------------
RHQ 2.03 Patch Notes
------------------------

Increase AI building of Air Units

Revert AI Diplomatic Token change, keep default

Revert First Meeting Responses Adjustments

-----------------------------------

INSTRUCTIONS

If you have any previous version of the AI mod in your mods directory you MUST delete it.

RHQ, Or Artificially Intelligent, they must be deleted. This is the only AI mod that can be in the mods folder.

Delete any other folders before copying...

Read the rest of this update entry...
 
IMO, this game will never really be a challenge as long as commanders are so powerful, especially since it seems unlikely that the AI will ever be able to learn to use them like this.
I fear the same - they made commanders super FUN to use for sure but at the same time gives human tremendous advantage. Almost as if you give the AI deity bonuses and gift the human the magic of commanders and it cancels out!

If they did the following it may level the playing field with AI:

1. find a way to make them less powerful w/o taking away the fun factor (eg downgrade certain features - I haven’t thought thru details)

as well as

2. Improve AI’s ability a tiny bit (eg swap out injured units more consistently) >> not expecting master strategist, just use the powerful functions more often.

P.S. also doesn’t help that every time one plays the game, you get better at using commanders, so this human advantage grows and grows and this issue becomes more noticeable
 
Another simple reason for human commander superiority: AIs don't bring enough range units.
If they do, they're quite capable of sniping your commanders (Maya's Hul'ches did it to me).
My experience has been a little different.

First, I agree the AI isn't using commanders well at all -- but at least in 2.0.2 they aren't just sitting ducks either.

In 2.0.2 I am seeing many more ranged units and more AI cycling injured troops off of the front lines. Both is great, and leads to more involved tactical battles. I do agree that bringing 2 or 3 commanders to a battle becomes too much for the AI to handle given the sophistication that a human can bring to the battle. Plus the fast levelling up that ultimately becomes tide turning.

One interesting 'bug' -- in exploration, early -- if you have units packed into a commander, you can go across open ocean -- individual units cannot. Another fun thing that is allowing me to win in a 3 on 1 war against the AI at the moment.
 
One interesting 'bug' -- in exploration, early -- if you have units packed into a commander, you can go across open ocean -- individual units cannot. Another fun thing that is allowing me to win in a 3 on 1 war against the AI at the moment.

It's not a bug - all units except individual combat land units can cross oceans after Shipbuilding. Individual combat land units can cross (by themselves) after shipbuilding mastery
 
Last edited:
I think they need to limit being able to do multiple actions in a single turn. A single command should only be able to load or unload in a turn, not both, and a single unit should only be able to load or onload into a commander once in a turn (another fun trick you can do with commanders is set up a line of them one hex apart from each other, and you can "teleport" a unit from one end of that line all the way to the other in a single turn by loading into one side of a commander then unloading the other side, and repeating).
LOVE that idea - easy for devs to implement, don't need to teach AI anything, still keeps fun but limits it.

The assult promo is so OP that being able to use commanders multiple times ampflifies its power even more, due to all these tricks we humans are doing...
 
I do not have granular options to control ai commander behavior.

So I can't do magic here. I've done a lot to improve the ai, there are going to be several things I just am unable to do.

This is the same problem with Air Units... they are controlled by a commander. I can't make the commander make them do things.

It is challenging without granular options to get these commanders to function properly.
 
It’s been a mystery to most since release why the AI will often offer you a crazy peace deal, giving away valuable cities even when it was winning the war, and I wonder if this is related to the other discoveries, that the AI simply isn't accounting for a power differential? I'm speculating that maybe it's just coded to offer peace if it's suffering from too much war weariness, or something else that's more or less independent of how the actual war is going?
I’ve been paying attention to this in my games. While it’s still a mystery, two factors I noticed the AI consistently puts a lot of weight on for peace deals are:

- how many units they lost
- WW

If either is going bad for them in my experience they are very inclined to “strike a peace deal” (aka give away a settlement)
 
Last edited:
I figured out how to get wars looking more like war pacts.

I upped the favor/grievance up for leader ideologies...
also upped the grievances for competing victories, borders touching, and made sanctions cause grievances as well.

Right now it's me as Egypt, Lafayette and Himiko vs Napoleon and Xerxes. they're are both huge like 14+ cities each... the wars weren't rush, they just escalated to a point. a lil bit more realistic :)

Now it's exploration age and I'm curious to see who's side the outsiders will take if any.
Sounds like a great solution. It's not really the kind of thing I want to change, but at the same time, Roman may think that's a proper way to go.
 
I have the AI using some of the diplomacy actions they don't like Friends of Wei in the development build, but I think i'm going to take a little bit of a break and just get feedback, and have things stabilize a bit before the next release.
 
Has anyone seen the AI or IP pillage ever? I haven't... I wonder if it's seldom / situational or not there at all?
 
What also just occurred to me: I know that Isabella had a Level 4 commander somewhere, but it never showed up in this battle - or anywhere in this war. But that's probably something for FXS to sort out.
Yeah I know a lot has been said about commanders already so I won’t repeat that… but…

It seems the AI plays/considers its commanders as just another military unit (eg moving them to edges of battlefield alone) vs keeping them near the center of their army as a true support unit.

Teaching the AI to use commander tricks is complex so for the time being, simply telling it to keep its commanders toward the center of its troops could go a huge way..

(Just stand there don’t do anything , collect XP, level up and give your radius troops passive combat strength, healing, etc. Even the passive bonuses only are good enough, no thinking needed! AI does well with passive bonuses)
 
Reaching nearly 40 pages of discussion on AI improvement and with all this heroic effort from our modders, all I can hope is Firaxis devs are their using AI bots to summarize this page / forum so they can “steal” some of these ideas!
 
Back
Top Bottom