Difficulty level and AI buildings

DeaExMachina

Warlord
Joined
Sep 30, 2007
Messages
168
I'm sure we have all seen how the AI doesn't understand it needs some buildings to produce some units. However it seems to understand better at different difficulty levels which aren't consistent between Civs. I've found playing a Large map with 10 opponents, 8 of them being AI, on Noble that only the Calabim built there Training Yards (and built it fairly early). However on Immortal everyone seems to be able to build there required buildings.

Whats the "balance" level where all the AI know the value of the buildings? Does Aggresive make them want to pump out units instead of the building to get them better units (I always play on Aggresive AI)?
 
I don't think it's that easy, else the team would have copied parts of the higher difficulty level AIs to lower difficulty.
Actually, higher difficulty often means the AI cheats more, rather then it's more intelligent. They will gain HUGE bonuses to research, production, happiness ... on immortal. With those bonuses they produce more, so they can build the yards easier.
 
We're working on it, it annoys us too. But the mechanics of the AI's way of choosing buildings is more complicated than you might think. Sadly, you can't just tell them "Building X is good, build it when possible"...
 
Actually, I think that might be because of AI bonuses to production and reduced upgrade costs at higher difficulty levels, rather than more intelligent building. i.e., they have the hammers to spare on the buidings (even though they should consider them essential at any level, one per city at least).
 
The problem was that Blake (awesome guy that he is) finally added some AI weighting for buildings that enable units. So that when an AI player considers buildings, if the building is required for some units he is more likely to build it. Great stuff!

Then I come along... Since we have so much customization I had to add some new attributes to units. Instead of a required building, I added a required buildingclass (so a axeman requires a "Training Yard type building" instead of specifically a "Training Yard"). That way I dont have to make a UU Axeman for the Bannor who dont have access to a training yard, they only have a "Bannor Training Yard".

The problem was that in the new method the unit didnt have a required building, so Blakes AI wasnt picking up the fact that the building allowed units and they werent being weighted correctly. This effected the Training yard (switched to the buildingclass to accomodate the Bannor Training Yard), Hunting lodge (switched for the Svartalfar Hunting lodge), Stable (Hippus Stable) and Archery Range (Ljosalfar Archery Range).

The only T2 unit enabling buildings that it didnt effect were the Mages Guild, Temples and the Siege Workshop. Which made the AI really really likely to build those buildings (as from its perspective they were the only buildings that allowed new units).

The whole mess is fixed in 0.30 and Im testing it now.
 
Personally, I would rather each building be given some bonus of its own, like a free specialist, culture, gold, happiness (with resource//civic/other building), a little xp, etc. It seems like that would make the Ai build them more often, and it would just feel more rewarding to build them yourself, instead of just forcing yourself to make just one of them in one city where your units can go for upgrades.

I also think that "Bannor Training Yards," "Ljosafar Archery Ranges," and Hippus Stables," along with any more future UBs, need some more unique, flavorful names. (I prefer the way Arenas were handled.)They should also be able to pass on their respective promotions to units that upgrade to their unit class while in that city.
 
If the buildings gave bonuses though it would make people who are less experienced at the game more likely to try and build every building in every city (which is a losing strategy in ffh since everything takes longer).
 
If the buildings gave bonuses though it would make people who are less experienced at the game more likely to try and build every building in every city (which is a losing strategy in ffh since everything takes longer).

It is? Cause I'm a builder and thats EXACTLY what I do but I win most of my games. Oh they are LOOOONG games for sure, I don't know how to win a game in under 8 hours unless I"m Hippus. xD
 
lol, same comment...
not really all buildings in every cities.. but in most.
when at peace... what do you want to build ... expensive units or buildings to research quicker, to be able to build the new units quicker in preparation for war (ie in more towns)..etc
 
I'm also an all building builder. I may sometimes designate a city melee and another archers and another mages, but otherwise every building gets built. Of course, that might explain why my games take so long.
 
OK, maybe it isn't a losing strategy, but it isn't the best use of resources. You could probably make specialized cities and win quicker.
 
It's even harder to program an AI for this mod than for regular CIV, simply because everything takes so long and you really have to focus. I am still highly challanged at beating this mod on Deity AI - magic seems to be the only thing keeping me alive in a perpetual defensive war.

What has this got to do with AI buildings? The personality-maximin argument.

Many people say that one of the main reasons why BTS AI is vastly improved is because the personality matrix of the AI are weakened, and now the AI's are closer to "optimum decision". However, I'm very convinced that in a problem, especially a stocastic problem, with so many dimensions, there are many points and local maxima and minima, many "optimum" decisions that are powerful as long as they are focused.

Suggestion: rather than working with Blake's general AI, take feedback on how human players play each leader and each civ, and then simply try to program the AI to follow that script, build order,...
 
The whole mess is fixed in 0.30 and Im testing it now.

What exactly are you trying to achieve by having unit enabling buildings? I ask because they seem to be causing a lot of trouble for the AI. Or is this just my erroneous perception?

I think another problem, for the AI building units, is the long startup phase. With the prolonged research times, you create a situation where you can have military supremacy for a lot of turns if you rush for military at first. This causes a pretty hefty imbalance in favor of the rusher.

I hope everything is perfect in 0.30, but the pessimist in me is whispering words of discouragement in my ear. The problems above seem pretty fundamental to the current design, but I hope I am wrong in the end.
 
Could be a nice quick fix to just remove all building requirements from units, but make them weaker. Then the building which previously allowed the unit to be built instead grants a promotion/boost to those units to bring them up to the strength they are now.
 
I'd rather keep the building requirements, but make the prereq buildings offer other bonuses that would make you (and the AI) want to build them even if they weren't unit prereqs.
 
I think another problem, for the AI building units, is the long startup phase. With the prolonged research times, you create a situation where you can have military supremacy for a lot of turns if you rush for military at first. This causes a pretty hefty imbalance in favor of the rusher
IMO, it is of design... in FfH you should rush toward an army type : melee, recon, mage, disciple, mounted..
and when you have spare time/ressources, invest in developping you rempire and getting other branches of the military...
 
Suggestion: rather than working with Blake's general AI, take feedback on how human players play each leader and each civ, and then simply try to program the AI to follow that script, build order,...
I was thinking it might be good to come up with 3-4 strategies for each civ or leader, and then have them choose one at random on game start. But 1-it would take some time to do, and 2-IF the ai could paly intelligently (with regard to opponents and surroundings) it would be better than choosing a good generic strategy.

What exactly are you trying to achieve by having unit enabling buildings? I ask because they seem to be causing a lot of trouble for the AI. Or is this just my erroneous perception?
It's a long hallmark of FfH2, having unit buildings which promote city specialization. But perhaps it's a sacred cow we should look at, perhaps instead with unit-type exp. granting buildings, or buildings that speed production of certain unit types.
 
Its all about forcing the player to make decisions. In vanilla you don't really make choices about units, you just get the ones you come across. The focus is reward/risk at the empire level.

FfH pushes this focus closer to the individual units. But to make this distinction visible (to give the players options some weight) we have to enforce deeper investment in the units. They cant simply be stacks of replaceable resources.

The biggest part of that design is the increased production costs of units. You can't simply make them more powerful and allow them to be mass produced, you would have the same design with the power levels increased across the board (which means its fundamentaly the same game since power level is relative). That increased production cost follows 2 forms, the most visible is the direct hammer cost of each unit. But secondly the requirement for prereqs that require resources adds a fixed cost to unit creation that is paid once and opens up options to the player.

The good things about fixed cost resources (the unit enabling buildings) is ther allow the player to make a decision that dramatically effects his empire. The player also must draw a balance between building his infrastructure or actually producing entropic resources (those things whose value lies in their ability to tear down opponents).

Do you focus on one line (like melee) and specialize? Or do invest more in your infrastructure so you can field a wider variety of units? If we have done our job correctly both options should be viable. If we have really really done our job correctly the answer to that question should depend on other choices like the map, religious choices, spell choices, civ abilities, leader abilities, etc etc. Complexity not from confusing systems, but the interaction of simple systems.

We have a ways to go, but I think we are heading int he right direction. And Im not opposed to cutting features that are hard on the AI, but I think building prereqs are easy enough to get right and worth the effort.
 
Top Bottom