AI with stockades only

Vorpal+5

Venturing in Erebus
Joined
Mar 25, 2008
Messages
658
Hi,

Another bug, and I'm fairly sure that in others mods the AI built past stockades. But not In RAR, even the capitol remains with this poor defense.

Also large cities (20+) defended by a single townguard? That's an invitation to war. But I'm playing it fair and will allow a one turn warning. Still I don't understand, if the AI was improved as claimed by the mod, that the basic of garrisoning more and more the biggest cities is not there.

That's still an awesome and the best mod around though.


ps: playing on max difficulty. The AI has a plentiful of everything!
 
It is not a bug. :)

AI simply needs to prioritize the construction of its buildings.
In those days I simply decided to give other buildings higher priority.

It is simply a matter of personal taste and balancing.
Either you balance AI to focus a bit more on Econonomy Buildings or Defense Buildings.

You can't have it focus on both all the time.
It is not as efficient as a Human Player considering construction of buildings.

Basically I had purposly decided to have AI try to build the first (1 or 2) levels of all important buildings first.
After it has done that, it might as well build higher levels.
But that simply takes time.

Of course there is other (more complicated) logic as well.
(e.g. Checking if the City is a Harbour, which Base Goods it has, ...)

Summary:

Please do not call every AI inefficiency a bug. ;)
I had to make decisions about AI behaviour.

To my opinion, AI in RaR is much better than in Vanilla and even better than in TAC.
But RaR is also much more complex since it has much more Yields, Buildings, Professions, ...

It was extremely difficult to even balance AI so it would not be completely lost.
(In the first internal versions of RaR, AI was completely overwhelmed and lost.)

I tried my best but it is simply extremely difficult to programm and balance AI.
Creating an AI that can match a Human Player is simply impossible.

Of course you might not understand or like everything I programmed or balanced.
And of course you are completely free to change that programming and balacing in your private version. :thumbsup:
 
I'm not underplaying the difficulty of improving the AI, but I still believe you gave too low priority to defense. As an example, attacking the Portuguese in 1700, they had perhaps 12 cities, some being at 40 populations. They were very powerful, but yet they only had the first defense improvement.

So I still believe you went too far in economy, you should have balanced slightly better the need for defense. As I'm not an exploiter, I gave free defense to AI cities with the world builder before the attack.

Do you know if I can up the priority by editing weights in XML?

Thanks.
 
Do you know if I can up the priority by editing weights in XML?

Of course you can. :)

Just check Civ4BuildingInfos.xml.
There should be something like <AIWeight>.
 
I know the mod won't change and the problem comes from Vanilla, but an obvious issue is that the AI don't differenciate :
- general buildings: which are needed everywhere (stockades, lumbermills, printing press, schools, etc.)
- specialization buildings: which are needed according to the available ressources (distillery, fur trader houses, tobacconist house, etc.)

Because of that lack of differenciation, the AI will tend to build all specialization buildings within a city before upgrading the general buildings. And yes, it's rather common to find the AI building a distillery in an arctic city with no sugar around.

A year ago when I studied the issue, I came to the conclusion the problem came from Vanilla AI which was in itself coming from Civ4 AI (in which specialization buildings are much less advanced).

RAR does its best to correct the issue without alternating too massively the AI logic. Implementing something like I've said could be actually a huge modding task, with tons of unexpected consequences.

So it's probably good the way it is. I personnaly learnt to live with it. And once in a while, I open the WorldBuilder and "help" the AI by giving to it the good buildings it needs. That's at least my solution to keep my game both challenging and "athmospheric".
 
That is not completely correct. :)

Of course there is other (more complicated) logic as well.
(e.g. Checking if the City is a Harbour, which Base Goods it has, ...)

AI will try to build all specialization buildings in coastal cities.
(Simply because they function as transportation hubs where lots of raw yields are potentially collected.)

In inland cities, AI is a lot more specific with specialization buildings.
(It will try to build only those it can really use locally considering its available raw yields.)

koma13 had improved AI logic for buildings for TAC.
That is the logic he had come up and it is still the system used in RaR.

The current logic is definitely not perfect, but there are always a lot more factors to consider than most players think about.
And you always need to consider performance and stability as well, especially when messing with AI logic.

Actually I had originally wanted to one day implement a smarter weighting system for AI considering construction of buildings.
(I was totally aware, that the existing system is problematic for AI because we had so massively increased number of yields and production buildings in RaR.)

The complexity we have added to RaR (huge amount of yields, buildings, professions, features, ...) is quite a problem for AI.
We had tried to compensate that with better AI logic (and sometimes special AI rules) because without those, AI would have been completely lost.

But even though AI logic in RaR is a lot better than Vanilla, there is no doubt, that several more AI improvments would still be possible in RaR.
All it takes is skilled and motivated modder to do so. :thumbsup:
 
Thanks for this useful information Ray, I didn't know that. I'll check about it.

At first sight, I would say it's less harmful that a coastal city wouldn't produce the weaver shop for the cotton coming from the inland city rather than that a coastal city produce every single specialist buildings before improving any existing structure and without even checking if the good is actually produced. So I would say we should use the "inland city" logic for all AI cities.

But anyway, I haven't tested anything, so I may be wrong.
 
After checking again my last savegame. Frankly the current situation is not so bad. Okay the AI doesn't build a lot of fortifications, but it's not that wrong in what it builds. I've been exagerating the issue.
 
Top Bottom