Resource icon

Delnar's AI Cleanup 2016-11-06

Delnar_Ersike

Prince
Joined
Jan 1, 2007
Messages
497
Location
localhost
Delnar_Ersike submitted a new resource:

Delnar's AI Cleanup - Delnar's AI Cleanup

I had a bit of an initial looksie at Civ6's SQL database and found a couple AI-related shortcomings. Fixes are included in this rather small mod. All fixes have comments attached to them in the .xml files if anyone's curious about the reason behind each change.

Latest version: v7 - 2016-Oct-31

For forum guests, here is the Dropbox link.

Spoiler Full Changelog :
v7 - 2016-Oct-31

* Lowered the cap on...

Read more about this resource...
 
Last edited by a moderator:
Awesome work Delnar. Since AI autoplays work, going to test it out, and try to get used to the new ai system.
 
I started new games many times and each time an unknown civ declares war on me, causing all their friends that I have met to also declare war on me to back them up. I have to meet this Civ that declared war then they send a peace request.
 
So nice! Some questions:
- You will work in a more depth version like CIV V and BE?
- As a first sight, the IA system is "the same" that in the previous mentioned games?
Thanks for your work! IA need revamp...
 
I started new games many times and each time an unknown civ declares war on me, causing all their friends that I have met to also declare war on me to back them up. I have to meet this Civ that declared war then they send a peace request.
I saw that happen in my very first Civ6 game, before I even started modding: neighboring Egypt DoW'ed me, which caused Aztecs to DoW me even though we hadn't met. I had to meet Aztecs and wait a turn before they would accept a peace request. I'm guessing this is a bug in the main game unrelated to the mod.
So nice! Some questions:
- You will work in a more depth version like CIV V and BE?
- As a first sight, the IA system is "the same" that in the previous mentioned games?
Thanks for your work! IA need revamp...
If Firaxis release their DLL source code (especially because more of the AI is locked behind it now) and if I find the proper time for it (I've got significantly less free time to mod and run test games than I did a few years ago), I will try in-depth improvements.

Based on a couple of my games where I went out of my way to see how the AI behaves, the AI in Civ6 seems to be sort of similar to Civ5's. There are definitely some improvements (such as being able to move and shoot with range 1 units, I'm unsure if the AI can do it with longer-range units), but there are also some things the AI is flatout worse at (such as citizen allocation, where the citizen manager will often prioritize 2 food 1 hammer tiles over 3 food 1 hammer tiles, and I've definitely seen it prioritize 1 extra gold over 2 extra faith when no focus was set). Until I get my hands on the DLL source code though, I cannot actually look at the AI's code, so all of my info is from inferences and speculation.
 
I saw that happen in my very first Civ6 game, before I even started modding: neighboring Egypt DoW'ed me, which caused Aztecs to DoW me even though we hadn't met. I had to meet Aztecs and wait a turn before they would accept a peace request. I'm guessing this is a bug in the main game unrelated to the mod.

If Firaxis release their DLL source code (especially because more of the AI is locked behind it now) and if I find the proper time for it (I've got significantly less free time to mod and run test games than I did a few years ago), I will try in-depth improvements.

Based on a couple of my games where I went out of my way to see how the AI behaves, the AI in Civ6 seems to be sort of similar to Civ5's. There are definitely some improvements (such as being able to move and shoot with range 1 units, I'm unsure if the AI can do it with longer-range units), but there are also some things the AI is flatout worse at (such as citizen allocation, where the citizen manager will often prioritize 2 food 1 hammer tiles over 3 food 1 hammer tiles, and I've definitely seen it prioritize 1 extra gold over 2 extra faith when no focus was set). Until I get my hands on the DLL source code though, I cannot actually look at the AI's code, so all of my info is from inferences and speculation.

Thank you for this mod. The mod causes an unknown civ to start the war is what my game does. If I play un-patched only the civs I have met start off early trying to take me out.
 
So I'm curious how well this works and while I'm working on a mod to balance out some of what I see as flaws in other parts of the game I haven't even begun to look at the AI... and to be honest I wouldn't know what I was lookign at even if i did :)

But here's what feels off to me and I was wondering if you could either address it in your mod or tell me how I could address it and I'll add it to mine.

1. AI doesn't prioritize building setters enough... by the end of a game on king or emperor there is still a HUGE amount of unsettled land and it easy for me as the player to have 3-4x the number of cities this makes the AI weak in the late game.
2. The same feels true for builders
3. AI doesn't prioritize industrial districts
4. Once relationships have deteriorated there doesn't feel like a way that the player can improve relations or make friends
5. The AI over builds military but then doesn't use them... this leads to an early game rush that can be unstoppable on higher difficulties but then again weak performance in mid and late game
 
So I'm curious how well this works and while I'm working on a mod to balance out some of what I see as flaws in other parts of the game I haven't even begun to look at the AI... and to be honest I wouldn't know what I was lookign at even if i did :)

But here's what feels off to me and I was wondering if you could either address it in your mod or tell me how I could address it and I'll add it to mine.

1. AI doesn't prioritize building setters enough... by the end of a game on king or emperor there is still a HUGE amount of unsettled land and it easy for me as the player to have 3-4x the number of cities this makes the AI weak in the late game.
2. The same feels true for builders
3. AI doesn't prioritize industrial districts
4. Once relationships have deteriorated there doesn't feel like a way that the player can improve relations or make friends
5. The AI over builds military but then doesn't use them... this leads to an early game rush that can be unstoppable on higher difficulties but then again weak performance in mid and late game

Numbers 1 through 3 are WIP on my end. The flavor system that was used to determine priorities in previous Civ games has been replaced with favoring lists and behavior scripts in Civ6... except in cases where it hasn't, since the one of the default favoring lists in use defines four flavor values (offense, defense, city defense, and expansion), so flavors aren't completely gone from Civ6 even though they're nowhere to be found in XML/SQL entries. Without the DLL source code and proper modding tools to interpret behavior scripts, it'll probably going to take a lot of time, trial, and error to find out how the system can be tweaked, and I'm going to be quite busy for the next 6 months or so (final university year).

Number 4 is tied to DiplomacyAI logic, which can probably only be modified through the DLL, so it's probably impossible to mod without Firaxis releasing DLL source code.

Number 5 is tied in part to behavior scripts with a Build Units node, but primarily to the DLL (through both MilitaryAI and the Build Units action node definition). Again, without DLL source code and/or easy tools to handle behavior scripts, not much can be done.
 
So I'm curious how well this works and while I'm working on a mod to balance out some of what I see as flaws in other parts of the game I haven't even begun to look at the AI... and to be honest I wouldn't know what I was lookign at even if i did :)

But here's what feels off to me and I was wondering if you could either address it in your mod or tell me how I could address it and I'll add it to mine.

1. AI doesn't prioritize building setters enough... by the end of a game on king or emperor there is still a HUGE amount of unsettled land and it easy for me as the player to have 3-4x the number of cities this makes the AI weak in the late game.
2. The same feels true for builders
3. AI doesn't prioritize industrial districts
4. Once relationships have deteriorated there doesn't feel like a way that the player can improve relations or make friends
5. The AI over builds military but then doesn't use them... this leads to an early game rush that can be unstoppable on higher difficulties but then again weak performance in mid and late game

I know #4 still probably needs to be modded, but I was able to bring another civ back to friendly from denouncing by gifting them a city. I had taken the city over from another civ and didn't really do much with it. It ended up rebelling and was about to be smashed by about 5-6 nasty barbarians. Since I figured it was going to be lost, I just gifted it to one of the civs and a few turns later, they declared friendship. Not fantastic, but at least it's something.
 
#5 killed a play-through of mine due to England over building of military units to where there was no way i was going win a domination victory.
 
#5 killed a play-through of mine due to England over building of military units to where there was no way i was going win a domination victory.

What difficulty? I got done with a king where every AI civ had 5x the number of units but 1/3 the number of cities and about 2-3 tech ages behind me. Just to see if I could I killed about 30+ units and captured 5 cities with only 3 units. The flip side of that is I just lost an emperor game by about turn 30, I built nothing but slingers and warriors from turn 1 and it didn't matter the AI swarmed me with warriors and took my capitol. Never had a chance for peace.
 
What difficulty? I got done with a king where every AI civ had 5x the number of units but 1/3 the number of cities and about 2-3 tech ages behind me. Just to see if I could I killed about 30+ units and captured 5 cities with only 3 units. The flip side of that is I just lost an emperor game by about turn 30, I built nothing but slingers and warriors from turn 1 and it didn't matter the AI swarmed me with warriors and took my capitol. Never had a chance for peace.

Prince, she had 34 units right outside my borders doing nothing. What preventing her from declaring war on me and wiping me out was that we were friends. She had one city london on one side and the rest of her cities on the other side. There was no way i was able to deal with 34 units like that while preventing form being attacked from behind. Those other cities preventing me from really moving on and taking out other civs.

http://i1331.photobucket.com/albums/w585/Soundersfan84/england army_zpsddvtlmew.jpg

This is what i mean.
 
I'm on my phone so I'm having a hard time seeing what year that's at. But on prince difficulty my guess is you should be 2-3 ages beyond her so 34 horsemen can be killed with less than 10 units. And the AI likely knows it or it should be declaring war on you.

The problem is you and I are complaining about 2 different things. Your saying the AI spamming that many units makes the game too hard. I'm saying the AI spamming that many units makes it too easy as it gimps itself for late game.

But back on topic just as an experiment I added +1 movement to all units and it WAY improves the AIs ability to wage war.
 
In what way - did they commit more units to strike where they would otherwise sit there doing nothing?
I dint play much beyond the ancient era but they where way better at using slingers and archers, and getting behind my units to pick off wounded troops. Mostly that one extra move allows them to move through their own units way better.
 
Delnar TY very much, your work is highly appreciated.

The word ""hopefully"" appeared in mist important part of change log for me. :) I hate those AI's not upgraded units. Did anyone test this? Do AIs with this mod upgrade their units faster?
 
Thank you for this mod. The mod causes an unknown civ to start the war is what my game does. If I play un-patched only the civs I have met start off early trying to take me out.

Don't be stupid, this is confirmation bias. I haven't used this mod and computers I haven't met have declared war on me multiple times.
 
Top Bottom