AIs and the Art of War

In my game (also deity / nightmare) the AI is just doing fine - best of the known ones has 14 cities by now and they are ranked as the 3rd biggest (I have 7 and am 6th or 7th). However, I haven't really seen barbarians - only one Neanderthal so far, and lots of animals.

The thing is, when you started it? I did mine after the latest SVN changes. I also had one game about a month ago, when they were expanding pretty well. I abandoned it because I played it without the tech difusion and then I was really behind in tech... probably the whole era or so.
 
I have TD on and still I am at least 1/2 era behind and my empire needs as much attention as my enemies since Education, Crime etc is really killing me. I haven't had as much fun since ages, it's really challenging! :goodjob:

What keeps me alive:

- AI still seems to have a hard time conquering cities with Walls and a high defense (at least now with only Arsonists and Battering Rams). Sometimes they bring nothing to reduce city defense, so they just wait in front of my city.

- AI doesn't really learn: My northern boarder gets constantly invaded by huge (40+) stacks of Trained Dogs, Archers, Dog Soldiers, and Stone Warriors (Spear, Axe, Mace...) along with Ambushers and Hunters. I haven't seen any Healers in their stacks, nor any Great Commanders. But they always get surrounded by 9 merged Coyote Runners and then pummeled. This has repeated at least 10 times by now and happens at least every 10 rounds. I'm concerned what would happen if they actually focus their units in one gigantic stack :eek: Oh, and they DO merge their units, so there is sometimes a strength 9 Archer :goodjob:

- Even lesser Wealth is quite OP. I can easily generate 70-150 :gold: per turn per city, which would allow for quite an expansion of my empire.

- Tech diffusion generates 50% of my :beakers:, eventhough I am at war (minor) with all 6 civs I've met.
 
Yeah, they still aren't bringing nearly enough City Defense destruction to war with them. I'm understanding the AI more and more but I haven't delved too far into city attack AIs. The few adjustments I've tried to make to get them to value rams and such just haven't seemed to have the impact they should.

The Healer and Property Manipulator AI project is coming along nicely however. It's just very mentally intense! My poor New Year's Day after drinking head is spinning trying to piece it all together - lol.

At the moment most types of stacks wouldn't contain any healers because healer units have been removed from being selections for various types of AI that they were expected to be able to safely fulfill. In many ways, this alone has improved things greatly since they really aren't suited for anything but ACCOMPANYING the types they were set as - this was intended to get them to accompany those stack AIs but the reality was it was fouling up these stacks in many ways. But the new changes, crude as they may be at first, should at least get the AI to appropriately build and distribute healers to where they are most needed. It will take some fine tuning and more specialized responses to get it to a state of perfection but even this alone should make for a huge improvement.

The same can be said for the Property Manipulator AIs - they were fouling up the ability of a nation to properly defend itself as they were filling in as City Defenders when they really make poor ones and the City Defenders, when called for, were needed for their ability to truly defend the city. and were being given commands that defeated their ability to help with the role they were really supposed to be fulfilling. The changes I'm instilling with these should keep units intended to help control properties into playing just this role and doing it as well as it can be done and to the exact extent the AI needs it done. Imagine how much more difficult things will be when the AI is controlling its crime, disease, and education levels to an almost perfect degree that would make the best player envious!
 
It's really impressive how much you already learned on AI and other stuff TB!

My newest (odd) observation (snail, GEM, Deity, Nightmare) is my neighbor building TONS of composite Bowmans. Litteraly. Every city is protected with at least 40 of these guys and he has even bigger stacks wandering around. Maybe that's a result of his lack of Obsidian, Horses and (likely) Copper, so these are actually the strongest units he can build? Here the merge option would be a huge benefit: Right now I can farm XP for my Commander and Points for new GG on his boarder city, which is protected by over 40 unmerged (rarely there is a merged one) Composite Bowmen (7 :strength: ). I attack with merged Coyote Runners (10.5 :strength: ) and have basically always a 100% success rate.
I assume I would have had a much harder time if the AI could "see" that and would merge at least 27 (probably even 81) Composite Bowmen to a 10.5 :strength: or 16.5 :strength: unit, respectivly. A well promoted 16.5 :strength: should be even able to take out my attackers. And it would cost less :gold: fot them.

Another one:

I blocked a one tile wide landbridge with a city on a hill. (AI is so much advanced in techs that I am not sure if I can defend it, which is awesome! :) ) It has Walls and everything in it, along with highly promoted and merged Bowmen and Javeliners. Tried twice to take it down and lost lots of it's units. Now, a Commander, a few Composite Bowmen and Siege Onagers are camping on a Mountain next to it and Range Bombard attack my city. I have a Healer there and Healer's Hut, so I start every turn with full HP again. While it is not that bad, I think the AI could see that it's strategy is pretty pointless and instead gather a HUGE SoD together to give it the final blow. If my weak enemy in the north can build 200+ Composite Bowmen, I can try to imagine what the worlds tech leader with 4 times the cities is capable of :eek:
Is there an "all out!" AI strategy?


I know AI work is hard and complicated. I just want to report "issues" or scenarios that might help future developements. I saw the progress you made in programming TB, and I am confident that one day you (together with Alberts and others) will create an AI that actually deserves the "I" in it's name and can cause some serious headache :goodjob:
 
I did increase the minimum city defense levels for Size Matters with the intention that they would naturally merge/split many of those units... strange they aren't doing so. It's going to take some closer observation there. 40 seems a bit excessive far beyond the numbers I'd added so I'm wondering if there's not a difficulty/map size modifier or something in play I'm not aware of.

I do want to complexify the Merging and Splitting factor so it IS more responsive but one task at a time. I agree that eventually we'll get the 'I' in AI but it's also going to take quite a while to get there.
 
No rush, you are doing an amazing job! :goodjob:

The AI also split their swordmen for attacking. I don't know if this was good in the end because they could take down much more bowmen each turn this way, but I wonder if their 2.8 :strength: units were good enough to kill these 5 :strength: Bowmen...

Then the AI had around 45 units in it's city and an additional 30 on a hill 2 tiles away (no fort there). I killed 10 units each round, but the AI didn't move their 2nd stack UNTIL after the turn I fought the last 5 (l let 1 left because I just wanted more XP and not actually conquer the city.)


Do you want me to post more of these or is it more annoying then helpful? :mischief:
 
I just downloaded a recent svn version of this mod and see that the AI is as bad as ever. All of them hit tribalism well before me but I have 3 cities to their 1. And I'll have my 4th one soon. This needs to be fixed or I'm going back to ver33.
 
Are you on Aggressive AI or Ruthless AI? There's noted problems there with them sending the settlers out without escort. It should be resolved very soon. Not to say that tests aren't showing there could still be some severe improvements there... and this is the next top priority beyond the debug task I'm working on now where missiles can't seem to load on ships. (I may prove to be unable to replicate the problem so I suspect either way I'll be soon to work on the AI much more.)
 
I just downloaded a recent svn version of this mod and see that the AI is as bad as ever. All of them hit tribalism well before me but I have 3 cities to their 1. And I'll have my 4th one soon. This needs to be fixed or I'm going back to ver33.

Which svn version? We made some changes recently and some svn versions had that problem.
 
I'm not sure which version it is since I got it using Sparth's link in another thread. And I was using both aggressive and ruthless AI.
 
For now, (won't be long before we resolve it) playing with aggressive and/or ruthless AI will cause severe growth problems. That said I'm still seeing some issues even not on those settings.
 
I tried to test a fix for the aggressive and/or ruthless AI options but the game crashes alot so this has to wait until it is possible to play again.
 
After trying for a week after new year to start competitive game i gave up and reverted SVN back to 8159.

Started new game on giant GEM map, deity, nightmare on, aggressive/ruthless on, eternity gamespeed, no positive traits, developing leaders

- after week im researching optics and this game is a blast so far. AI's are VERY good at both expanding and waging war, i was falling pretty much behind for most of game, and only after few wars and conquering weak neighbours and backstabbing strong ones i was able to become somewhat competitive, yet right now im like 2-3 times below top AI GNP wise, and about 5-10 techs behind, yet i use every possibility to trade my workers for techs, and use 3 of my vassals to research techs i miss (other vassals are useless 2-3 cities "fail-states"). Power ratio of 3 strongest AI's are 0.4, 0.8, 0.8.

There are of course some old known weaknesses - stacks they build are no match for mine SoD, even despite fact those stacks are 3 times bigger, but they lack top attackers and top defenders. Also they build armies all around their country and units are weakly promoted. Also they often send Warlord units wandering alone (even my vassals do), so i have now around 40 lesser military instructors sitting in my capital.

So far i found 3 serious semi-exploit things (i wrote about them often before) -

1. ambushers/assassins - those can be promoted infinitely and harass AI to no end, if they are accompanied by general sitting in neighbour AI city, giving str boost to them. Free workers, free general xp ... Once detected visible - they should be attackable inside city.

2. trading techs for workers - sometime ai value your workers up to 12000 gold, and trade decent techs for 1-2 workers. Combined with stealing workers with ambushers this helped me alot to dig me out of deep hole i was in.

3. Warlords - hidden nationality crippes AI both ways - i can use mine warlords for free kills and exp, and AI warlords serve as free instructors. Making hidden nationality optional should make things even.

4. Vassals - when weak AI offers to become your vassal and he is in war with somebody, you can always bargain for peace with his enemy first, then he usually still wants to be a vassal. When AI offers that to another AI, it accepts vassalage and declares war instead of trying to bargain peace first. Not sure if this can be coded.

There were some oddities about story tellers - once i captured with my ambusher stack of 272 story teller, and couple of times when conquering city i captured 50-70 of them, but overall it didn't seem as big problem as before. I did notice, however, in few AI cities 300-400 of them sitting around in city, while education was 3000+. Not sure if it crippled AI economy or not.

I haven't noticed huge healers stacks too.
 
There were some oddities about story tellers - once i captured with my ambusher stack of 272 story teller, and couple of times when conquering city i captured 50-70 of them, but overall it didn't seem as big problem as before. I did notice, however, in few AI cities 300-400 of them sitting around in city, while education was 3000+. Not sure if it crippled AI economy or not.

I haven't noticed huge healers stacks too.

If I remember correctly Koshling said that the code evaluating what to do for the properties was based on one direction is good eg low value crime is better than high value crime with zero crime or lower being the best so it does its best to move the value in that direction. My understanding of the education property is that the more positive the value does not always equate with a better outcome. This means that it can't use the same AI decision making as the other properties.
 
8159 would be long before any recent adjustments that would have STs built for property purposes... I'm not sure what would've been causing such stacks of Storytellers under that revision but I'd suspect it may still be a lurking issue.
 
8159 would be long before any recent adjustments that would have STs built for property purposes... I'm not sure what would've been causing such stacks of Storytellers under that revision but I'd suspect it may still be a lurking issue.

Yeah, i just wanted to point out that AI in this revision were very strong.
 
Things like that are a really good example for a difficulty system that's not primary based on abiary modificators for humans and AI. How complicated is it if you would have this new behaviour only on noble and above and below that the AI sends their hunters alone?

Could you teach them to also bring Spearman maybe? They are far worse at capturing but they are good versus animals and also decent against Neanderthals.
I've been having great difficulty with two segments in the AI instruction code blocks that need to be overcome that were fouling me up when trying to get them to bring a counter unit (which for some reason the AI thinks a slinger is the best for when it should be an axe or spear, which is another issue to address.) But I was testing to see if it was possible.

What I was thinking was actually to have leader personalities control the manner in which these stacks are designed rather than difficulty level. I get what you're saying there but it may yet remain to be seen what the BEST approach really is... there's pros and cons including training time to be taken into consideration. This should just improve survivability which is the only goal at the moment.

Aside from not being set by difficulty level it also does nothing to increase the survivability of them. I take it you are not only talking about Hunters but also Master Hunters. Either way both are by far stronger than any contemporary Recon units (maybe Defend Only Recon units need a slight buff?) so a Recon coming along will only serve to leave the Recon unit alone in the wilderness after the Hunter is killed/dies.
The reason a Hunter unit dies is usually by being injured and a strong animal/barb/Neanderthal comes along and attacks it. For that reason I tend to send out Hunters in groups as a Hunter can usually survive anything, once, and a second unit will take over defending if there are multiple attacks and the first is injured.
(Now I do this with having them plots apart and getting them together if one or both get injured for healing together but an AI should probably group them).

This might make it easier by difficulty too, having 1 alone in the easy settings, 2 in the medium, 3 in the hard, or with Size Matters trying to always have a larger group merged.

Cheers

First, this doesn't hold back a Master Hunter though scouts will want to join them.

A scout along with a hunter is a great tactic. It doesn't slow down the hunt. It's the first to be attacked by a Neanderthal. On Fight or Flight it commonly can escape and enhance the likelihood it will be the first to be attacked. It can quite often survive attacks from anything in the wild, be it from escaping or standing up to the attack. Until Hunters are strong enough to go it alone in the wilderness, recon units are generally equivalent in strength or better - they just can't attack and don't have quite as much strength against animals. They form a padding that can deflect the first attack - there's not too many concerted attack forces out to get hunters usually so this will at least increase the hunter's survivability by quite a margin without sacrificing speed... in fact it's a recommended strategy if you don't mind running away from Neanders - which I find hunters aren't doing which is ALSO leading to an abnormally high death toll for them. I personally prefer to let my hunting parties move a bit slower - my hunters can always move faster when needbe - but for the AI that second half of that statement is nearly impossible to arrange... at least for now when so many functions aren't working quite as I figure they should.

Anyhow, when I did have an attack unit and a counter unit joining them they just flat took too long to get their hunters in the field and it was too great a distraction to the effort of building up the city. So again, this became the balance point between too much investment into hunter survival and not enough. And perhaps eventually leader personalities can vary the approach.

This was developed as much to help the game as it was to give me numerous test cases to work with and there's much still to be figured out here.
 
There does need to be some changes to the AI on the hunter line anyway. They seem to be a turn behind in their decisions, they continue to move when there are perfectly good and even wounded animals right next to them. They prefer to move into a good defensive position and let the animal attack, which often it wont. They don't avoid danger.

After Canine Domestication the hunter units should be considered to have a dog present so they should see invisible. This should reduce their loss to ambushers. (I loose lots to ambushers when they are on auto hunt ;)).
 
Back
Top Bottom