RHQ Artificially Intelligent AI Mod

RHQ Artificially Intelligent AI Mod RHQ AI Mod 2.07

Actually, I can already predict modern victory may not be as swift anymore due to the resource changes alone. In those 4 modern cultural victory games I keep quoting, I leaned heavily on the “hoard silver” strategy to get / trade for 10+ silver and heavily discount explorers.

Resources are totally overhauled now and I don’t even see a single silver so yeah, gonna be interesting!
 
How's the current state of this mod post-patch, now that you've done some more extensive testing? With all the stuff you had to delete etc.
 
Here's a summary of my ANT and EXP games with 1.2 vanilla (first game w/o RHQ mod, for future comparison purposes). Deity, Continents, all standard, only UI mods. Screenshots attached.

Most hostile, challenging and FUN game ever! Diplomacy was not on my side. Everybody hated me, I was always reactive never proactive. Complete bloodbath and I was on the wrong side of it. Very stressful, I played it like chess thinking my every single move and pulling my hair. Did a lot of appeasing in EXP.

ANTIQUITY
The lead AIs went over their cap, good yields. AI continues to do well in ANT, no complaints here other than the usual tactical stuff I won't get into here. (e.g. commanders, embarking, naval, lack of pillaging) The strategic/victory AI problems start in EXP, as pre-patch.

EXPLORATION

The good = First Civ 7 game I had to give away a town to make the AI stop from destroying me!! Check out screenshot of Charlie coming at me with his cavalry. 2 more turns and I would have lost 2 precious settlements. Charlie had mercy on me.
AI yields are great. Lead AI cul/sci triple mine. HOWEVER...

The bad = Despite high yields, the AI still cannot translate this into legacy points. i.e. they cannot punch their weight. I dominated here once again. 2 reasons for this:

1. The AI's desire for expansion fizzles in EXP, it doesn't keep up with the pace / the human. As you can see from the minimap, very little effort to settle distant lands from both sides, despite empty space. All AI ended the age BELOW THEIR CAP. This can be easily avoided. I will look for this when I play RHQ mod and hopefully improvement.
2. Related to above, extremely slow to generate treasure points. This has not changed post patch.

Next I will finish Modern to complete this benchmarking (not holding my breath but want to have a post patch point of reference) and start a new game later this week with the RHQ 2.07.

-----

End of ANT legacies:

End of ANT legacy pts.jpg


End of EXP yields, legacies, rankings

End of EXP yields.jpg
End of EXP legacy pts.jpg


End of EXP rankings.jpg


End of EXP map


End of EXP map.jpg


Charlie attacks and has mercy on me

Charlie attacks.jpg
 
Last edited:
I've played 2 games post 1.2 without AI mod. I've played with this map script https://forums.civfanatics.com/threads/mundus-novus-new-world-map-script.697787
Those were 2 hardest games on deity for me (I have ~200 hours, and lost only 1 game so far, before the patch 1.2).

I tried 1.2 with AI mod 2.07 beta shared here + map script mentioned, but it seems to be the easiest game I've played so far :(
AI had units, but there was only 1 AI/AI war and 1 Me/AI war initiated by myself in ANTIQUITY. (maybe buffing negative relations could help?)
AIMOD_BETA_ANCIENT_ERA_RANKINGS.png

In EXP AI tried to settle, but I saw too many settlers running around and not settling. There was only 1 war 3AI versus 1 AI with one city on the island, that was dragging for 50 turns, until I decided to finish it with just 1 ship...
After that some more wars broke, but it was very easy, without any surprises. For the first time, I've reached yields in EXP higher than any AI. Most of the age, I just was buying stuff and steamrolling with wonders and building.
I think it is possible that 3 AIs were stuck with that war I mentioned against island civ, but they couldn't finish it off, since it was always buying a unit in that city again and again, and AIs were too dumb too attack this city from all sides.
AIMOD_BETA_EXP_ERA_RANKINGS.pngAIMOD_BETA_EXP_ERA_POINTS.png

I have a strong feeling that this beta has fewer wars than the vanilla 1.2 patch.
From the bright side - AI settling OVER CAP works well. In ANT era 2 AIs were having cities over the cap.
Maybe I was very lucky with my start and decisions and other people experience with the mod will be better, but it was the easiest game on deity, I've played :/
Maybe this map script is not working well with the mod
 
Appreciate the feedback on the Beta.

This beta patch intentionally has fewer wars. I can make it default or tweak it, but the goals being pushed (wonders, yields, settling) are pushed so high, it's focus is there. It's a give and take, but also why I need human feedback. From my perspective, the AI is doing nicely in antiquity focused on being a little more careful to war.

It's not negative relations, it's requiring a stronger offense to defense ratio for a given target.

The AI naval combat there is base game. Nothing I can really do on the island.

The AI's war decision making is also base game in Exploration.

It is possible they were stuck in war focus, and unable to persue the victory conditions as well. I really don't like that. That's why I lowered war a bit for the AI in antiquity.

Nothing in particular with the map script would change the pieces I've modified. It would be base game stuff.

But it's totally reasonable, and interesting feedback. A lot of the focus here is on the AI persuing a science victory in modern, and trying to go after victory conditions in antiquity as well much stronger. Especially wonders.

I have yet to do the same thing in exploration, which of course I can. I can have them persue the wonders much more doggedly which will help, but again, that trade off is often less war, so they can actually do it.
 
This is quite a dilemma.

What I would -ultimately- like would be a bit of unpredictability (either completely random or calibrated based on the leader/civilization focus). I would ideally love one game to be quite AI aggressive, the next game AI non-war aggressive (or more focused on certain victory conditions). When I know that the AI (by design) isn't going to declare war, I will get quite lazy and not have a strong defensive capability. And if it is "total war all the time" type AI, then I know what to expect.

Unpredictability becomes the real strategic challenge -- not knowing if we are going to get super aggressive, aggressive or passive makes decisions throughout the game challenging. Especially if that unpredictability comes in every era. Again, calibrated based on the leader/civ -- I would be more prepared for AI war against Mongolia for example.

In my current game with the latest stable (non-beta) release, in Antiquity -- I had the Romans on my southern border led by Frederick -- and throughout the final half of the age, it became an arms race where we never declared war against each other -- but faced off on the shared border. I ended up amassing 4 commanders and they constantly showed a rotating number of archers, legions and the like in a carpet of doom manner. Because of Diety -- had I declared war, I likely would have been massacred. And had they declared war, it is likely they would have suffered major losses.

Nirvana would be random and rotating focus to keep the player on their toes constantly.

With that said -- you have been quite the miracle worker to be able to do what you have done to improve without the documentation, tools, data dictionary, etc.
 
^^^^

100% agree with above - at Deity level unpredictability is the biggest challenge for the human player. That’s why diplomacy is the best way to go in Civ 7. The possibility of getting declared on and having to fight the -8 combat penalty with lower tier units forces the human player to divert resources to units, commanders, walls, keeping supply line to towns so if attacked they can be rescued, spend influence to appease, and much more. Without this threat it becomes way too easy, you know you’re not gonna get attacked so can laser focus even more on sprinting to victory. Most if not all deity players would not want predictability. Randomness is challenging.

I’d go even further to suggest that even friends and allies should have chance to backstab based on personality + random factor every game. Eg I’m in Modern age rn and spent all my influence to appease and ally so I can safely collect my artifacts and end the game very quickly before the AI even realizes the age has started..

Edit: As said before modern age needs a lot of work still, it’s not a real “age” IMO but rather a lightening fast victory rush. Once I end this game gonna do my full report but I’m on T32 rn and looks like again little has changed in 1.2 - artifact victory comes swift by T50-60 at latest. Space race cannot keep up with that IMO no matter how much AI focuses on it.

The only reason I’m playing modern again is maybe there’s a chance I can be proven wrong.. atm doubt it.

EDIT: It’s not all doom and gloom however. Until devs either change the cultural victory mechanic to be harder OR make the AI better at it , one temp solution is to make the AI better at EXP era, so human deity player starts modern at a greater disadvantage. Eg per my post above, I shouldn’t have been able to finish EXP with such a huge lead in settlements, which makes my victory sprint in modern even faster. The AI missed the memo somewhere, they have settlers running around in modern era trying to meet their cap. Too little too late, should have done that in EXP lol
 
Last edited:
Unpredictability is something you do after you get all the other base stuff working. It's the final touches, as you have verified things have worked.

It's not something I can put as a priority early in the process, or it becomes impossible to get feedback that is meaningful without many, many runs. It's already a challenge to get feedback.

But yes, I understand that unpredictability is the goal if all the paths function.
 
My thoughts about wars:

Wars should be quick and effective:
Attack with power at least 3:1 ratio to the defender and do a quick capture of a well chosen target of 3-4 settlements in a reasonable short time. While doing this, keep focused on the goals - losing some units is not a problem here. When goals are met, make a peace that favors you and go for legacies/victory.

Can the AI be instructed to something like this?
 
Appreciate the feedback on the Beta.

This beta patch intentionally has fewer wars. I can make it default or tweak it, but the goals being pushed (wonders, yields, settling) are pushed so high, it's focus is there. It's a give and take, but also why I need human feedback. From my perspective, the AI is doing nicely in antiquity focused on being a little more careful to war.

It's not negative relations, it's requiring a stronger offense to defense ratio for a given target.

The AI naval combat there is base game. Nothing I can really do on the island.

The AI's war decision making is also base game in Exploration.

It is possible they were stuck in war focus, and unable to persue the victory conditions as well. I really don't like that. That's why I lowered war a bit for the AI in antiquity.

Nothing in particular with the map script would change the pieces I've modified. It would be base game stuff.

But it's totally reasonable, and interesting feedback. A lot of the focus here is on the AI persuing a science victory in modern, and trying to go after victory conditions in antiquity as well much stronger. Especially wonders.

I have yet to do the same thing in exploration, which of course I can. I can have them persue the wonders much more doggedly which will help, but again, that trade off is often less war, so they can actually do it.
Can I change the frequency of wars by modifying certain files? Although the ai seems to be better in terms of development, I would prefer to see a game of constant war😄
 
Unpredictability is something you do after you get all the other base stuff working. It's the final touches, as you have verified things have worked.

It's not something I can put as a priority early in the process, or it becomes impossible to get feedback that is meaningful without many, many runs. It's already a challenge to get feedback.

But yes, I understand that unpredictability is the goal if all the paths function.
I was actually referring to something more basic that is likely already in the code. I did my own share of xml exploration back in Civ 4 days, talking year 2005, 20 years back lol. I recall each AI had some base warmonger value plus some +/- # which introduced randomness in each game. On top of that each AI also had a likelihood for DoW, backstab, dogpile war chance, etc based on their attitude. Some were coded never do DoW if friendly or allied, others could be sneakier.

That sort of thing - now 20 years later I’m sure there’s a much more sophisticated version of that built into Civ 7. So not brand new type of work for you but perhaps possible to tweak?
 
Well, you will be surprised, but AI logic didn't change much in CIV games, in CIV7 even get simpler, since some mechanics were removed (not implemented yet)
 
My thoughts about wars:

Wars should be quick and effective:
Attack with power at least 3:1 ratio to the defender and do a quick capture of a well chosen target of 3-4 settlements in a reasonable short time. While doing this, keep focused on the goals - losing some units is not a problem here. When goals are met, make a peace that favors you and go for legacies/victory.

Can the AI be instructed to something like this?

The ratios are based on the target in the ai setup. So do I have enough units compared to the cities known defenses and units around it. I do not see any way to check a global evaluation of the strength of the ai when considering an attack.

You don't get to target settlements like that. You get a best target in the operation, or multiple operations, and the AI does the choosing based on info in the DLL we don't have access to.

I can't even get the AI to stop giving up cities in deals, let alone deciding when peace favors the AI.

So all good ideas, none of which I can do.
 
Can I change the frequency of wars by modifying certain files? Although the ai seems to be better in terms of development, I would prefer to see a game of constant war😄
It's probably time for me to just make an option in the game start options where you can decide the level for this particular setting.
 
I was actually referring to something more basic that is likely already in the code. I did my own share of xml exploration back in Civ 4 days, talking year 2005, 20 years back lol. I recall each AI had some base warmonger value plus some +/- # which introduced randomness in each game. On top of that each AI also had a likelihood for DoW, backstab, dogpile war chance, etc based on their attitude. Some were coded never do DoW if friendly or allied, others could be sneakier.

That sort of thing - now 20 years later I’m sure there’s a much more sophisticated version of that built into Civ 7. So not brand new type of work for you but perhaps possible to tweak?
Point me to it when you find it.
 
Well, you will be surprised, but AI logic didn't change much in CIV games, in CIV7 even get simpler, since some mechanics were removed (not implemented yet)
It's a mix. Depends on the system. AI logic changed dramatically in every Civ game except Civ 6 to Civ 7, since it's basically the same architecture.

But there are new features as well, so it depends.
 
Back
Top Bottom