Resource icon

AI+ v13.1

Wow. Is it just me or did the AI almost eliminate you in the medieval era?
 
Thanks for the mod bro, could i ask a solution for this http://steamcommunity.com/app/8930/discussions/0/864976837817023213/ ? (How do you stop your AI allies (team) from making peace with the enemy without your permission?) It's extremely annoying!

Well, for one, "ally" doesn't mean "team". It's a seperate nation which makes it's own choices. And yes, it would be nice if you could somehow convince your ally to go to/remain at war with someone you are at war with, but I very much doubt it is even possible to mod that in currently, let alone that it has a place in an AI behaviour improvement mod. A diplomacy mod would be a much better place to look. Or, of course, you can make sure you're strong enough to beat the AI on your own.
 
Lack of dll access means we can't see the code, correct.
But we do have access to xml files and logs, which betray a lot about the internal code. The system used also seems very similar to civ 5 codes in places, which suggests theres code reuse, and since we know the civ 5 code, we can infer some things.
It depends a bit on the system, but most of the internal civ systems use some kind of heuristics. For example building buildings, it calculates the worth of buildings based on the yields, then compares all the buildings and picks what it thinks the best one is. The desire for each yield can then depend on some factors
This is honestly probably one of the best approaches if done well, which it unfortunately isn't.


...

Hi, I've not been part of this discussion, and was just looking for some views on AI+ when I came across this.

I'm not experienced in coding or anything like that, but I do like to tinker with the game and went through a phase of manually editing pretty much every single facet of the game to make it more interesting for me. One thing I noticed in that is related to what you said; the AI absolutely works out the pros/cons of an item (unit, building, whatever), even if that item isn't available to them. If that item's benefit is high enough, they will move heaven and earth to make it available. For instance, I changed the yields for a religious building, making its benefits better than practically every other building. I reloaded the game (I'm a dunce when it comes to coding, I don't know how to make mods, so I just edit the XMLs directly. The upside of this is the changes take effect immediately. The downside is...I regularly forget which changes I made lol), and suddenly every single Civ had switched focus to religion, and those that already had a religion, well, everyone was now gunning to build mahabodhi temple (I had also changed that to give 4 Apostles instead of 2).

I toyed around with making lumber mills more effective by introducing adjacency bonuses, however I made them a bit too good..the AIs not focused on Science had a change of tune it seemed, in a bid it seemed to get to the tech that unlocked it. And this is quite early in the game. So the AI definitely constantly measures up future benefits.

You can test it yourself quite easily, simply change an output to an absurd amount, and you'll see a noticeable change in the AIs' eyes (hehe)
 
Hey Siesta and folks ;):lol::love: , here are some more observations with the AI using the newest AI+ patch Siesta sent to Abd121, at https://forums.civfanatics.com/attachments/ai-hotfix-rar.491256/. However, this patch is not available from steam workshop yet. Sorry for the pictures spam below, i hope the picture provided help to give clarity to the descriptions.

Hey thanks for the detailed gun run through :) Looks like a fun and challenging game. I guess the hotfixed mod is probably good enough to become a new main release then

F)After allying with mongol and advancing east, China orchestrated a suprise attack on me. 100 turns later, One strange thing i noticed is that even Mapuche is angry at me, they did not sneak attack me while i am attacking china. Is it possible to make AI more able to seize opportunities?

Yes, I'll be able to make the AI more opportunistic in the next version. It's going to need the new techniques I'm using now, so unfortunately I won't be able to make a hotfix out of it.
The next version is going to be essentially a full rewrite though, so I'm not sure yet if this lacking point in AI behavior will even carry over even if I don't pay special attention to it.

Thanks for the mod bro, could i ask a solution for this http://steamcommunity.com/app/8930/discussions/0/864976837817023213/ ? (How do you stop your AI allies (team) from making peace with the enemy without your permission?) It's extremely annoying!

Ah yeah I can imagine. Unfortunately there's no way for me to touch this. Even with the upcoming lua mod I don't have any way to stop the AI from doing diplomacy stuff on its own. We're going to need DLL access to do something about this

You can test it yourself quite easily, simply change an output to an absurd amount, and you'll see a noticeable change in the AIs' eyes (hehe)

Ha yeah it's quite fun to boost some random desire and see all the AIs run off to do ridiculous things. My favorite is massively increasing their desire to go to war and to send troops. It may not make for a good game experience, but it sure is fun to watch
 
My favorite is massively increasing their desire to go to war and to send troops. It may not make for a good game experience, but it sure is fun to watch

Any chance you got fun screenshots of that one?

Also, how possible do you intend it for the AI to succeed at a domination victory?
 
Any chance you got fun screenshots of that one?

Also, how possible do you intend it for the AI to succeed at a domination victory?

Hmm, can't really find any. I know there's a few, but they seem to have gotten lost somewhere. I'll try taking some good ones if I do that again

In the lua mod, I am intending really hard. Whether there'll be results is another question haha. Still stuck on many fundamental control issues. Right now the game crashes for mysterious reasons when I try to have it denounce players for example.
Not entirely sure what percentage of games I should have end in domination if it ends up relatively easy. It might be the case that I could get it as high as 50% in AI only games, but that might be too high for player enjoyment. I'm thinking maybe 10%-20% in AI only seems about right for player enjoyment, but I'm not sure whether that's true or even accomplishable. What do you think?
 
Last edited:
@qqqbb That seems like a lot of work for not that much gain... I do like the idea of a choice between a "roleplaying" AI and a "trying to win" AI though.

As to how often they should go for domination vs other victory conditions?
For the roleplaying AI I'd think that each AI should have an equal chance of going for each possible victory condition, and should be equally good at all of them. That would make it a domination game ~1/4 of the time.
A trying-to-win AI should be as good as possible for each victory condition, but ought to know (or rather, be told) how good it actually is at each victory condition. So if you see that AIs that constantly go for domination do better than AIs that constantly go for science, then you should make it more likely that a trying-to-win AI goes for domination.

Hey Olleus I just wanna say you're awesome for your 8 ages of pace mod! Before I found it, I used that mod that lets you speed up tech/culture by a certain amount, and I'd edit it every now and again to smooth out the progress of the game. The base game is WAY too fast or way too sluggish if you go with Standard/Prolonged. But your mod, since I installed it, I completely forgot about micro-managing time scales, that's how good it is!
 
Siesta Guru updated AI+ with a new update entry:

v12.1



Read the rest of this update entry...

You named "AI+ v12.0" AI+ v12.0, but 12.1 is AI+. Would be awesome if you could stick to just the name of the mod please mate ? Then I can drop it into ongoing games; my games last a few days/weeks as I don't play for long, so mods can upgrade a few times - if they've got the same name it's just a matter of extracting.

Thanks for your hard work though mate, really appreciate it.
 
@qqqbb That seems like a lot of work for not that much gain... I do like the idea of a choice between a "roleplaying" AI and a "trying to win" AI though.

As to how often they should go for domination vs other victory conditions?
For the roleplaying AI I'd think that each AI should have an equal chance of going for each possible victory condition, and should be equally good at all of them. That would make it a domination game ~1/4 of the time.
A trying-to-win AI should be as good as possible for each victory condition, but ought to know (or rather, be told) how good it actually is at each victory condition. So if you see that AIs that constantly go for domination do better than AIs that constantly go for science, then you should make it more likely that a trying-to-win AI goes for domination.

I disagree. A roleplaying AI shouldn't often attempt to conquer the entire world - after all, how often did someone in real life make a good attempt at doing so? I cannot think of many examples apart from Alexander the Great and Genghis Khan. Arguably some empires that lasted longer and didn't have a single conquerer, like the Roman Empire and the English Empire, would count too. A roleplaying AI winning a domination victory should be a rare occurence imo, though the more warlike ones should certainly be able to do so ocasionally, and at the very least wipe out a civ or two next to them if they get going. A trying-to-win AI, I would argue, should go for domination 25% of the times, with every AI picking a victory condition they go for at the start of the game (biased on their bonuses) and sticking with it for the entire game.

Regarding the two different AI's, I guess one could argue that the current base game AI is already a good enough roleplaying AI, and that we only need a trying-to-win AI.
 
I vote for more trying-to-win AI as well. Civ 6 AI is very lacking in this regard. When I get to top secret status it reveals how hopeless it is because I get notifications about AIs going for domination victory where they have virtually zero chance.
 
Eh, I think it's a matter of style. There are certainly plenty of Civilizations/Leaders in the game that tried to conquer the world (or the world as they knew it), 1/4 is probably a conservative estimate at that. More importantly for a role-playing AI, I'd want as much variety as possible. The cleanest way of doing that is to make each victory condition equally likely.

A more comprehensive approach *might* be to make domination rarer (ie 10% rather than 25%) but to tell some of the AI to do limited conquering at an appropriate part of the game to support it. So if its going for a religious victory and there is one rival religion with strong faith and very weak military, to kill it by sword rather than missionary. That - however - seems much harder to implement to my untrained eye.

Limited conquering I agree with, that is very much a part of roleplaying AI. I think that if you make one out of every four AIs go for domination though, you're going to end up with like at most half civs remaining a tthe end of the game.
 
Deeper into my game(deity) , even where my enemy has 4 times my military scores, i found a really big flaw of the AI. Even with urban fortification (200 fortification hp, 200 city health ) the AI likes to surround my city and get poked down by my surrounding units . They also like to do a two front attack which tend to disperse their troops. Yes they do aim our units but only to clear a path to try to surround our cities....:sleep:
Is it possible to make the AI concentrate their force to attack our units instead of going for our city instead? This will tremendously make the AI 10x more challenging:love:. With modern support and range units , it is so easy to defend a city if the enemy forces choose to focus on our city compare to our units. During the earlier era, the AI can more easily clear a path to surround our cities, so i really hope to see the AI focus on my units first before going for our cities as it will make the AI more challenging in any era, just my humble opinion. From the rise and fall patch notes," If the AI can capture, or significantly damage, a target city, it may ignore hostile units nearby to do that." This could the reason why they ignore our units and overestimate their ability to "significantly damage target city".

Another pressing thing i noticed in all my games is that catapults and siege weapons do not attack the cities even it is a free shot/kill. Is it related to the code below ?
ABILITY_NO_MOVE_AND_SHOOT now belongs to CLASS_SIEGE_SETUP not to CLASS_SIEGE.
There is new AiType: UNITTYPE_SIEGE_ALL
 
Last edited:
Thanks all for your comments on how much the AI should focus on winning, I'll try to take your opinions into account.

Luckily I managed to be able to find a way to do denouncements and war declarations today, including popups for human players. Which was one of the remaining core pieces of functionality I was still missing. I'm slowly getting to the point where I can actually focus on making the AI play well, instead of just having to focus on getting them to be able to actually engage in the mechanics o the game.
Unfortunately, on the biggest element, movement and attacking, I still haven't found a non-buggy reliable way of getting them to what I command them to. The best I've gotten is to make them obey my move commands about 70% of the time, with them being especially likely to ignore my commands when it's most important (when enemy units are around). I'm not sure if that's good enough to be able to make them play better than the default, but we'll see.

You named "AI+ v12.0" AI+ v12.0, but 12.1 is AI+. Would be awesome if you could stick to just the name of the mod please mate ? Then I can drop it into ongoing games; my games last a few days/weeks as I don't play for long, so mods can upgrade a few times - if they've got the same name it's just a matter of extracting.

Thanks for your hard work though mate, really appreciate it.

So you mean just always calling it "AI+" ? I forgot to add the version number to the last patch. I had been adding versionnames because someone commented that that's what they wanted.


Deeper into my game(deity) , even where my enemy has 4 times my military scores, i found a really big flaw of the AI. Even with urban fortification (200 fortification hp, 200 city health ) the AI likes to surround my city and get poked down by my surrounding units . They also like to do a two front attack which tend to disperse their troops. Yes they do aim our units but only to clear a path to try to surround our cities....:sleep:
Is it possible to make the AI concentrate their force to attack our units instead of going for our city instead? This will tremendously make the AI 10x more challenging:love:. With modern support and range units , it is so easy to defend a city if the enemy forces choose to focus on our city compare to our units. During the earlier era, the AI can more easily clear a path to surround our cities, so i really hope to see the AI focus on my units first before going for our cities as it will make the AI more challenging in any era, just my humble opinion. From the rise and fall patch notes," If the AI can capture, or significantly damage, a target city, it may ignore hostile units nearby to do that." This could the reason why they ignore our units and overestimate their ability to "significantly damage target city".

Another pressing thing i noticed in all my games is that catapults and siege weapons do not attack the cities even it is a free shot/kill. Is it related to the code below ?
ABILITY_NO_MOVE_AND_SHOOT now belongs to CLASS_SIEGE_SETUP not to CLASS_SIEGE.
There is new AiType: UNITTYPE_SIEGE_ALL

Yes, I'll be able to do finer control of unit movement in the next patch. Including focusing on enemy units when that's more appropriate. I didn't have that option in all previous patches, so it's using a slightly modified version of the default way of ordering units around. Which indeed could only be used to target cities, not units.
Not entirely sure how it'll end up, but it's going to feel significantly different for sure.

Ranged units also frequently fail to attack, even when they have the movement points let. It isn't just about siege units. It seems to be some kind of bug in the internal code, because even when I use my new alternative way of ordering units around, ranged units still frequently fail to actually shoot, even if I directly order them to attack units on a certain tile (which is within range). I really hope I'll be able to circumvent this, because it massively affects how useful the enemies ranged and siege units are. Since they're very important in warfare, terrible use of ranged units is always going to be make the AI feel like it's crap at war.
 
So you mean just always calling it "AI+" ? I forgot to add the version number to the last patch. I had been adding versionnames because someone commented that that's what they wanted.

Ah OK my bad I thought this was the one off. Naming the zip files the current version is OK (and is probably what the guy meant, and is best practice, as it helps sorting out filenames), but zip contents themselves, with them being a uniform name, you can just drop-replace. It also has the added benefit of being compatible with any saved setups; the list of mods is saved too when you build a config, so people wouldn't have to rebuild their config collection to include your new AI+ version.

As a side note I've always kinda seen it as a bug that they save the mods enabled, as configs can be set in stone for quite a while, but mod usage is fluid.
 
As a side note I've always kinda seen it as a bug that they save the mods enabled, as configs can be set in stone for quite a while, but mod usage is fluid.

I think it's because some mods can crash the game if they get loaded in halfway the game, or if they get unloaded halfway through. Maybe I should actually do it so that if a mod version of mine has breaking changes, I change the filename, but if it's a small fix, I keep the name the same.

Firaxis should perhaps be warned about this...?

Yeah I've reported this on the 2K forums meanwhile, not sure if there's a better place for it. Added a couple of other major but fixable issues with the AI too
 
Yeah I've reported this on the 2K forums meanwhile, not sure if there's a better place for it. Added a couple of other major but fixable issues with the AI too

Perhaps make a copy of this report here in the Bug forum section, too...

also: can you give a link to that 2K Forum post you wrote?
 
Last edited:
Back
Top Bottom