AI Improvements for Civ VI
It's watched already, no idea why I didn't get any until oedali mentioned my name :/
It's been happening to me too lately in fact, despite watching threads not getting alerts.
The main problem is indeed AI focusing way too much on units and thus becoming way behind in science/culture especially.
In my current game, AI has huge armies but is around 15 techs behind. I completed all the techs from Atomic era while the World is still in Industrial Age.
I'm popping literraly every GS because they constructed almost no Campus at all. There is ZERO Great Works in the World.
AI is doing good in battles, but I noticed several time very strange behavior in some civs or CS: spamming ONE type of unit on his whole territory and not moving one single unit, ever.
Spoiler example with a CS :
Rome did the same with much more catapults, never moved or upgraded them, never got out of his island
@Siesta Guru : Nope, i dont have any mods that touch gold or maintenance. Did you take a look at the save i uploaded in the previous page? Spain very clearly is behind because it is sitting on a massive fleet of quadriremes and the maintenace is killing him. Hes also been at war with another AI for 200+ turns but isnt using any of his units to do anything.
I started another game without the AI + mod and the AI is actually capable of advancing and upgrading his units...im fighting Russia now and hes using musketmen armies and upgrading them to infantry armies.
The save doesn't work for me, but I have a pretty good idea what you're probably seeing.These issues should hopefully be resolved in the next version when I should be able to actually make them use their units.
Right now it's a bit of a frustrating problem because it stems from the AI actually getting more hammers in AI+ due to several changes (mainly earlier/more cities and better improvements). It's not that they they don't build districts or buildings, but that they have spare production left after that and end up using it all on units. Humans in that situation go and attack people, pick better policies, build more commercial districts, use trade routes for gold or go and delete some units, but the AI's too dumb for these.
In my latest game, im playing on abudant/legendary and the AI is more than capable of using all their hammers...they are building wonders, spamming cities and districts everywhere...
Hey @Siesta Guru I started a game with AI+. Here are my observations from first ~120 turns. I am glad to have played 7 games before with vanilla R&F (thru ~ turn 100-200) so I have a good base for comparison.
Mods enabled: AI+, Smoother Difficulty, CS have Walls, settlers retreat
Settings: Deity, +2 additional AI, rest all standard
- HUGE improvement from vanilla visible immediately. KUDOS and THANK YOU.
- more units built, a lot more wars. I mean A LOT MORE.
- 2 capitals already captured, something I had not seen in my previous vanilla games ever.
- civs look like they are playing to their flavor. Genghis, Chandra constantly warring.
- Pound maker took off on other continent. His score is TWICE the runner up and 4x the lowest. In my vanilla games scores were always very similarly lined up, never this much contrast.
- Poundmaker already converted 4 to his religion. Not sure if he did this deliberately or lucky coz he is on another continent with no competing religions.
Interesting things I noticed:
- AI attitude in beginning is different. They are more neutral for a long time - as they should be - until you go toward or against their agenda. This was a big contrast to my vanilla R&F games where they usually became friendly (or in rare cases hostile) in first 5 turns. Not sure if this is related to AI+ or pure coincidence but I like it.
- Poland declared war on two civs at once, on same turn in classical era. I had never seen this before. I am 100% sure it was not due to alliance coz I checked and she wasn't allied with anyone. Why would she wanna declare war on two targets at once? Seemed strange and suboptomal.
Areas for improvement :
- Almost all warring civs went broke- no gold income, treasury empty. They are not bouncing back either. Some changes are definitely needed to have them focus on gold or at least be aware of maintenance costs.
- (Not related to AI+) - I see civs settling where they have -20 loyalty from get go, they don't assign a governor, city flips. Saw this in vanilla too. Are you able to see in settling behavior code whether AI takes this into account? One would assume so but they don't always.
- (Not related to AI+) Finally, I was curious whether you have any insight into this: if a civ has founded a religion, are they more likely to go for RV? I play RV mainly and I am sensing this is not the case, which makes RV too easy for the human. RV is already limited to 5 contenders. If 1 is found by human, and only 1 of the other 4 AI pursue, this leaves little competition. I was wondering if there's a way to make the AI pursue RV more aggressively vs other VC if they founded a religion.
I will keep sharing more as I play on. Keep up the good work!
Glad to hear that
I think it's probably a coincidence, I don't really touch the relationship system much.
Hmm, sometimes I see this too, but thought it was some kind of UI bug where it was actually a joint war against somewhere, perhaps it might not be. I'll try to figure out what's really going on
Seems to be a common complaint. I'll at least increase commercial district desire in the next patch
It seems they do take it into account because there's an exposed XML variable for it, but strangely changing it doesn't seem to do much. This should hopefully be gone in the next lua based patch.
It's actually related to AI+, because in vanilla they don't really, while in AI+ they do, I have something in place that boosts faith desire for those with a religion. Might have to buff it though if it's not noticeable enough to even offer you a RV challenge on deity.
Just to give me some idea how high I should put it, are you finding that in AI+ the following leaders do adequately try to engage with the RV?: Gandhi, Hardrada, Tomyris, Philip, Jayavarman, Jadwiga, Montezuma, Chandragupta, Tamar, Gitarja, Hojo.
I've got these marked as religious civs
A meeting was called to discuss the future of AI+
I wanted to ask y'all how you feel about AI cheating going forwards now that I can actually program stuff and move units around to some degree. It's kind of important I decide early since it'll change the way the code needs to be structured, switching later will be a massive pain.
Basically, the way the lua API is structured, vision cheating is trivial, actually accounting for vision is hard. There's basically three routes I can go in, and wanted to ask you what you would be happiest to see.
- No AI vision cheats. This is the most immersive, but, it will lead to both the longest develop time, the weakest AI and the lowest performance. It'd take significant extra time to set up the architecture (to track vision), and it would be hard to mimic the humans ability to 'feel' where units might be hiding in the fog as well as the ability to chase units etc.
- Full on vision cheating + abuse. By far the easiest to make and get good results out of, but well, it makes some tactics like sneak attacks impossible. This will result in the strongest opponents by some margin.
- Decide on a case by case basis. I might for example not have the AI respond to enemy macro troop movements that are invisible, but would allow vision cheats in unit micro situations.
Note that the standard AI also does significant vision cheating, it's just not very good at having anything (visible or not) influence its behavior.
that's difficult to answer, one of the challenge you'll have to face with a cheating AI is to make it in a way that the player will not detect or get frustrated by.
Although I agree with this quote, I do think that the "strongest" AI is what players are going to want.
Personally, I would be OK with an AI that can have full on vision. 3 reasons for this:
1. I do not like the fact that I can create one "mega army" and go conquer in one direction leaving my flank completely wide open, exploitable and "safe"
2. A stronger AI will allow for King, Emperor, and Immortal to be more playable in lieu of having to go to DIety to have a challenging game
3. Easy to make for you means easy to maintain and update as patches/etc. come out.
If the AI becomes too strong, you can lower the difficulty level. I agree that No AI vision would be completely immersive, but it will also make Diety more of a cakewalk.
I agree with this reasoning - thus: let the AI cheat on vision but it should not be "obviously seen/felt" by the human player.
So: Decide on case by case (as You, Siesta, wrote it...)
These are also imprtant points...
Would it be possible to have the AI know where units are that moved out of vision for X turns and then become properly invisible again? That would allow for them to account for units that were in fog, as long as they were recently visible, without them actually knowing everything.
@ggalindo001 makes some very good points as well, in my opinion.
Someone said civ5 VP Ai sees all tiles that were once revealed in its present turn - I guess this could be one case rule (if possibble) here too.
And then AI should use reckon units/light cavalry/air units first to reveal tiles
(and perhaps make sure that the reckon does not end turn on vulnerable position tile, so end turn on hill/forest or retreat with last movement point)
Alright, I think I'll end up doing this. I'll avoid anything extreme but will allow it to be able to use vision cheats where it just won't make much of a difference in player experience.
It's possible for sure as long as you accept it won't carry over upon loading games, but it's one of those things that'll make it significantly harder to build something. I'd not only need to make some method per unit to decide whether they should be visible, based not only on the current state and some history, but then after that, still allow the AI to also 'guess' at locations of invisible units, after having myself discarded the real information.
For example, suppose I'd want to write a method that estimates whether I'm winning on some area on the map. For humans this kind of thing comes trivially just by looking at what's happening.
If I were to use a bot, a sort of obvious metric would be to count the amount of units in the area, this would work pretty well.
However, if I can only look at visible and previously visible units, it won't be able to infer like humans that there's probably more units there. So on top of a unit counting mechanism, and a history-unit counting method, I'll now also have to look at the terrain, at nearby cities, at the enemies 'military score', etc.
It's a bit hacky, but you can put tables in a saved game using a serializer and GameConfiguration.SetValue("Name", string).
I'd actually prefer this as well (the case by case basis), but I do think that the reveal all could be done in a way where it isn't felt as a "cheat" to the player. Obviously, you would know they could do that, so you would always have that in the back of your mind. I always thought in the early days of Civ V that the AI did exactly that when they would have everyone all of a sudden declare war on you.
The reason I think the "reveal all" might be a better way to go again remains in the simplicity of implementation and maintenance, as well as providing the largest level of reasonable advantage to the AI without it being an absolute cheat (production bonuses, etc.).
In any event, either has the potential to really bring the AI up a scale, and to me that is a major positive.
In my view, if we could have the AI credibly counter the "mega army" that I can build and conquer without worrying about my rear defenses.....we will have made a major step forward.
to me, if this could be implemented, it would really solve a number of issues. I presume by this you either mean lift the "fog of war" on all previously explored tiles even if not in line of sight (or reachable by a unit) in the current turn.
One thought that would seem "fair" -- tho I think this would be a bear to implement:
1. Full visibility for all tiles for any unit that could reach that tile on the current turn (even if it means a DoW to reach that tile). So, if a warrior is on my border, it could reach 2 spaces inland to my territory, and the AI has previously explored all of my territory, it would be able to see as tho it is already 2 spaces into my territory.
This would make horse more valuable, and air even much more valuable -- as air would open up large swaths of territory. this would also help to balance the fact that the AI will build air but not use them -- now there is tangible benefit to their build.
2. All visibility is done before any AI move -- to be able to orchestrate "intel" before movement
3. No visibility for any previously unrevealed tile (ie, AI cannot see what it hasn't previously explored). So, in my example, if the warrior on my border had not explored the next tile adjacent to the tile it could reach on the current turn, it remains unexplored.
Although this is a slight "cheat", I think this would allow the AI to coordinate movement in a more meaningful way without it feeling like an overwhelming cheat.
Tho, I do think full reveal will provide the strongest AI and a real challenge to the player.
Siesta, don't make AI+ something "significantly harder to build" - do yourself and us a favour
I think, it would be OK to have the AI cheat with a method, if the method is technically simple, effective on the result the AI can get/make and is not breaking my player experience.
AI as now is bad enough to let some cheats and enjoy better AI results... we need AI that bring better experience in gamplay, I can forgive the cheats as long as I enjoy them
Separate names with a comma.