Enhanced AI

5- Too much arty (espacially mortar) : AI train like 2 or 3 batch of 5 mortar with a 2/3 of his base razed and in defending position, it’s kind of ridiculous.

Thanks for these additional notes, @Khalmos. I will keep them in mind. It does make less mortars than the “vanilla” AI, as I changed that logic last year, but I will look into it.

4- When the AI want to kill one of our frontine outpost, even not that close, AI tend to go straight without giving a sh*t of my troups, so it become total free dps for me. (And it can change it mind so it go backwards with the same troops, hum…)

Are you saying the AI ignores your attacking units at times? It should not be occurring, but if you can give a more specific description of the behavior you saw, that will give me something to investigate and (if it’s relating to my AI) resolve.

6- Less performance issues, but there is still some time at specific moments in the game, I guess some script are much more consuming than others ^^

Again, I would say this is more due to the core game itself. I experience no difference when using my AI vs playing against players. What does cause a difference with or without mods, in my experience, is whether or not the map features a lot of water and/or if there are more than four players on the map.

Thank you again for your feedback, @Khalmos. I do appreciate it. Please keep the constructive feedback coming.

I have to point out a couple of things.
First and foremost, the positives: I like how the AI feels more like a player than a machine that can just dumb spam units.

Thank you, I appreciate the feedback.

However, I should also point that maybe this is overtuned.
AI is better than you at the start of the game and will be continuously faster, but if you manage to resist their first onslaughts, you will win inevitably. AI selfdom build military buildings and even less train soldiers. When it does, is in the minimal quantities despite of being obsesed with big eco, resulting in late game single cannon attacs and even worst, if you manage to put it off to age V, is most likely that it won’t have an army at all.
I don’t have to point out that this isn’t funny at all.

I am going to have to disagree with you and question some of your claims here. If the AI seems too economically-powerful, I would recommend playing against it on Hard mode. Hard mode, like with the default AI, does not receive any economic advantages.

As for your claims about military sizes and the number of military buildings, I have numerous screenshots, a few game recordings, and more that will show that the AI does indeed build large armies and a more than adequate amount of military buildings.

On a related note, I am in the middle of refining how the AI ages up, as the default AI’s behavior was too slow for my liking. A good player may be able to catch an AI that is aging up off guard under the right conditions, but to claim that this AI consistently does not make any military units at Age 5 is simply not true.

Now, if you are witnessing odd military behavior with a specific civilization, point that out and be specific.

Perhaps there should be a command to always have a blob of units near the initial TC unless their units are already in the players city.

You are describing a behavior that was present in the default AI and still exists in this AI.

Question : in your version : Hard AI = Extreme AI without build-in handicap (or more ressources at start), that’s it ?
So they should behave the same way in theory ? (good to know for balancing games depending on how many we are ^^)

@Khalmos, yes, the Hard AI in my mod does not have any built-in handicaps.

1 Like

I didn’t mean that they have an eco advantage, but rather that they focus in eco building, having several more farms and plantations than standard AI. And I think this is totally great, one of the things I like the most about your AI.
What I lament is that they mostly don’t take advantage of it.
To be very clear: My favorite strategy is a Tower control of the map, to try to take fights as far as possible from my HC while denying enemies, in this case AI, from map zones. And I belive this strategy kinda makes the AI gameplan to go south.

@tilanus Please make this improvements and fixes to AI on an official upcoming update!

Another month has arrived and another update is here. I am not finished with the card selection refinements, more updates will come in this area in the future.

Changes in 1.0.6:
Updated card selection logic.
More refinements to various parts of the naval invasion logic.

Thanks for these additional notes, @Khalmos. I will keep them in mind. It does make less mortars than the “vanilla” AI, as I changed that logic last year, but I will look into it.

Europeans do make much more mortar than usual. I never saw vanilla AI use 10-15 mortars at once ^^ (yesterday experience vs Portuguese, Ottoman and USA)

Are you saying the AI ignores your attacking units at times? It should not be occurring, but if you can give a more specific description of the behavior you saw, that will give me something to investigate and (if it’s relating to my AI) resolve.

Yes it happen both in “attacking” mode, in “retreat” mode and “relocate at home” (deciding to go back at home because it get backstabbed not because it lost a battle).
For the retreat it can make sense, but intercepting an army going back home that doesn’t retaliate, well it’s christmas but it’s not supposed to happened and it’s not that occasionnal occurence.
For attacking I didn’t study the phenomena well enough to see if all attacks or only some specifics one are victim of tunnel blinded vision.

6- Less performance issues, but there is still some time at specific moments in the game, I guess some script are much more consuming than others ^^

The last big spike of lag we can see sounds link to settlers task attribution in later age.
AI sounds to do it all at once (all AI at once or at least several one) a bit all over the place. A big lag occurs and we see mass moving settlers around the map (for wood and gold is there is any left).
Some optimisation to smooth those task to avoid AI tend to do it all at once could be an idea :slight_smile:

All others civs put too much weight in age 4 troops cards. Only troops with upgrade (like for Aztecs and Incas mainly) should be still there, not more.

Still a thing, all non-european decks are still flooded with age4 units and it impact quite a lot their quality in eco therms and army (europeans outmatch them in score at 40min)

Thank you for taking account feedback ! :slight_smile:

1 Like

This update should be an interesting one. I would appreciate feedback on the newly-added King of the Hill support, as I literally threw that together in ~7 minutes. It appears to work overall.

Changes in 1.0.7:
Refactored the naval invasion logic some more.
Added King of the Hill support.
Fixed an issue where too much artillery was being trained.
Added Swahili Coast map support. (I forgot about this map!)
Added the ability for the AI to collect sea treasures.
Refactored various parts of the code for better performance on older or low-end systems.

2 Likes

Hey !
Small bug saw in treaty as well : French AI do Revolt with Revolutionary France as the default AI.

Hi @Khalmos, that would be a feature of the default AI that comes with the game, as I have not touched the code that deals with revolutions in my mod.

I can look into it though. Are you saying they always revolt to Revolutionary France in treaty games?

Every single time, like the default AI at this state.
And AI don’t know how to use it ofc, like not go to Napoleonic Era and gather ressources during treaty.
Just do this morning a 7 AI French games, they all revolt. (between 15min to 18 min of treaty)

About the “too much artillery trained”, I think there is still an issue with mortars as you can see here (yesterday game : about 12 portugueses AI mortars (Pink player), especially in a defensive position :

Hello. Can I make a fork of this AI as I want to improve the performance of Napoleon in Treaty. (He keeps on revolting and Sanscoloutte is automatically assigned to attack instead of gather, a possible solution is to let him go Age5 or make Sanscoloutte perform gatherin

My test condition was: Treaty 30 minutes Empire Wars. Difficulty Extreme

The related code is in aiTechs.xs Line 170.
case cAge4:

@Khalmos, thank you for your continued input and interest in my mod. I appreciate it. I uploaded a temporary solution for the French revolution issue, so that behavior should stop now. Let me know if you notice anything.

Hello @chlorine, thank you for your interest in my AI mod. I already have some in-progress logic for Napoleonic France that goes beyond the sans-culotte issue, so I wouldn’t recommend spending too much time on that since I will likely include that in an upcoming release. I also uploaded a hotfix for the issue today.

If you are truly interested in helping with the mod, perhaps I can setup an online repo at some point.

I tried to make custom decks for all nations. Bots use the deck I made… BUT they don’t order cards from it, through “all your base are belong to us” I saw that the AI ​​is literally hoarding ships without spending them.
I want блять set up decks for these fools, but they don’t want that…

@MaoMadosa, they were using the decks I made when I tested that feature long ago. Do you have any other mods installed?

Last time I used mods for gun sound and recolor interface. Now I only tried the Ai mod and “DeckMod” - result was same.


I watch for bot through “all your base…”, it dont use supplies and that’s it. Bots without “deckmod” immediately fill up the supply queue. Nations like America/Mexico with “deckmod” use state cards, but completely ignore other cards in the deck.
Mb Im trying to create deck in the wrong way, but I followed your instructions and decks themselves appear in the game.

@MaoMadosa, thanks for the extra information. I will take a look when I get a chance. I think the fix will be pretty simple, as I recall the area in the scripts where that is and I have an idea of what is going on just from the information above.