AI Considerations

Zechnophobe

Strategy Lich
Joined
Sep 1, 2006
Messages
1,867
Location
Goleta, California
One of the things you notice when you play the cool new 'high to low' game type, is the mistakes the AI was making when you got in there. Probably the most common, and most frustrating, are them not researching techs that directly develop their starting area. I don't want to force an AI to research anything, but if you start with numerous calendar resources on grassland, or a multitude of wines, then craft/calendar techs need to be heavily weighted towards.

Some AI's completely ignore the actual economics of their area, and beeline things that are almost useless to them. Both Capria and Sabathiel seem to go for bronzeworking at the expense of all else, which very often cripples them out right, since a lot of the time none of the techs on that path help them at all.

Similarly, I've seen Os-Gabella with her research set at 40%.. with one city. She didn't need to set it that low to pay for anything.. she just apparantly liked making a whopping 4 science a turn. Guess she may have had plans for the 6 gold she was bringing in.


Anyhow, I"m not sure if you can effect the weighting of AI research at run time, but if you can, how about increasing the weight as relevant resources are discovered, especially ones you can in fact build on? (4 dye on jungle resources shouldn't cause you to research calendar).

Especially in the early game, where a single worked Dye will literally double your research, I'd very much like to see this tweak made.




Second area, is in civics. I'm not sure exactly how the AI picks its civics, but it seems to have a few favorites that are almost always a bad idea. Pacifism, for instance it will very often pick up early on (seems about 65% of the time I get to a new civ, it is in pacifism) and rarely if ever have I seen it actually getting GPP. Similarly it seems to very much favor Military State(I think this civic is still broken) and conquest (A very situational civic). If these were adopted with the plan of bearing an army down on someone, maybe it'd make sense. But far too often they are just building defensive units, slightly faster, and gimping their growth while doing so.
 
Yeah... that last part. AI have favorite civics. :)

I'd say toss it, but flavor and atmosphere are pretty important along with challenge. Not sure about when they're just picking the wrong civic because the math is added badly, but whatever. They have so many bonuses that you might be seeing pacifism as a big drain when they're not paying upkeep for it too.
 
good thread! taking control of an AI is definitely useful to clearly see the errors of their ways.

it seems like the AI is choosing what tech to research a lot more based on flavor ( I LIKE THIS! ) instead than the ones they would benefit them. same thing with civics obviously.
 
The reason that the AIs ignore the economic techs for the most part is that their choices are heavily weighted towards military and most AIs get forced into stupid tech paths via python scripts(for example the Bannor in your example always have to beeline bronze working, there is no algorithm involved that takes starting resources into account). The notable exception is flauros/alexis, who gets forced to beeline feudalism, which is actually a pretty decent techpath and results in the calabim doing well.

Almost all AIs have a military weighting of 40-80 or higher AND additionally a weighting of -10 for science techs. This means that they almost always pick the military tech. This results in pretty much everyone beelining straight for warfare after they are done researching their python tech path.


To put a weighting of 40- 80 in perspective, compare it to regular civ where a religious nut like Isabella has a weighting of only 10 for religious techs, which is the max weighting any of the civ4 leaders have.

I changed all the weights to 2/5th of their base values, added GROWTH flavors and put Education as a prereqtech before they are forced to do their python path. Seems to work ok, but I made lots of other changes to the game as well.
 
The catch is what Turinturambar mentions. The flavor values are so high that they choose a tech instead of just breaking ties (or tipping near-ties).

What should happen is putting the flavors as small values that do almost nothing till you have the AI playing effectively, THEN increase the values slightly, and add new flavors for FfH themes (like magic, religion, types of military...)
 
Yeah, I don't mind weighting towards things for flavor reasons, but economy really has to come first. You aren't going to get to do anything with the Order once you found them, if you have no economy to build behind.
 
I also noticed that the AI doesn't seem to be good at building the bazaar in its holy cities. :)
 
Even without flavor tech paths I doubt the AI would do well with tech research, because FFH2 radically changes the start of the game compared to Vanilla. In vanilla you can afford to research a coupla techs you actually don't need to improve your land at the beginning, but in FFH2 you absolutely can't. So unless some programming to make so that the AI takes this in consideration, there won't be much improvement.
 
Even without flavor tech paths I doubt the AI would do well with tech research, because FFH2 radically changes the start of the game compared to Vanilla. In vanilla you can afford to research a coupla techs you actually don't need to improve your land at the beginning, but in FFH2 you absolutely can't. So unless some programming to make so that the AI takes this in consideration, there won't be much improvement.

Yeah this is the dilema. If we push growth the AI is weak to rushes but stornger if it isnt rushed. If we push military the ai is stronger against rushes but lags in growth.

I dont know that there is a right answer though I often see people who prefer a set build order and its interesting to debate the different ones. As it is right now some of the players will focus on military paths (the bannor being a great example) and others will do so to a smaller degree. In general all the ffh players value military higher than the vanilla leaders, but thats probably a good adjustment considering what ffh is.

I may make a weighting change so the ai undervalues military goals if it hasnt met another player (making it more likely to pursue growth). Stays about where it is (maybe a little lower) if its met other players. And boosts the military weighting a bit if aggressive ai is on or its at war.

But Im hesitant to swing it so much. The ai used to get killed pursueing early growth over military. Early FfH is just to dangerous for that. So the change needed to take place, but we may be able to improve it some through tweaking.
 
while some early game military is useful, most of the times i find you can easily manage with some decently promoted warriors (lvl 4+). You don't need to hit hunters or axemen untill your 6th or 7th tech. Imo, the most vital thing to get set up first is a source of commerce/science, eighter through cottages, elder councils, fishing (sea food required 75% of the time), calender (with several calender resources nearby) or mining (gold/gems nearby). Which one you chose depends on civ, leader, and a lot on starting position. Making sure the AI better evaulates it's starting terrain could help a long way towards improving their early game (going elder coucils over cottages in a heavy forested area, or rushing bronze working, is a big one here).
 
while some early game military is useful, most of the times i find you can easily manage with some decently promoted warriors (lvl 4+). You don't need to hit hunters or axemen untill your 6th or 7th tech. Imo, the most vital thing to get set up first is a source of commerce/science, eighter through cottages, elder councils, fishing (sea food required 75% of the time), calender (with several calender resources nearby) or mining (gold/gems nearby). Which one you chose depends on civ, leader, and a lot on starting position. Making sure the AI better evaulates it's starting terrain could help a long way towards improving their early game (going elder coucils over cottages in a heavy forested area, or rushing bronze working, is a big one here).

Yeah getting your science/commerce rate up is always my first concern in the beginning as well. One change I have been experimenting with to offset this was raising the palace commerce from 8 to 12. This helps a lot with commerce poor starts and you don't have the AIs lagging that much behind.
 
The central problem is that the AI is run by the computer. Therefore, it isn't as smart as the human player. But the AI never sees the big picture I think. It jus looks at wat it's been programmed to look at. Until computer are smarter tho, no 1 can't really fix this.
 
Yeah getting your science/commerce rate up is always my first concern in the beginning as well. One change I have been experimenting with to offset this was raising the palace commerce from 8 to 12. This helps a lot with commerce poor starts and you don't have the AIs lagging that much behind.


That sounds like it'd help a lil. Was the AI less stupid, shall we say? Did it solve this problem? If so, how well did it solve it? Were they any other problems that came up?
 
Since the AI gets discounted armies, it might just be ok to tell the computer to keep 4-5 warriors per city and pursue growth at the same time. That's often what the player does and it provides protection against barbarians, rushes, and other AI attacks.
 
The only problem I see with that is the AI doesn't upgrade those units or delete them and build the upgraded versions. That's why I've seen warriors when the 4 horsemen start to show up.
 
The only problem I see with that is the AI doesn't upgrade those units or delete them and build the upgraded versions. That's why I've seen warriors when the 4 horsemen start to show up.

this shouldn't be that tough to program though, although one would require to add different military levels based on war/peace (are you at war, are you planning to go to war, do you see a build-up of forces in a neighbouring civ?). Set a limit for the amount of exp / special promotions (items, mutations) a unit requires to be upgraded, and let lesser units be disbanded when their upgraded versions are produced. The production ai would have to be upgraded to keep this in mind as well.
 
Yes, but the question is this...does the FfH team want to program that into the game? *looks round for Kael*

Personally I agree tho, Demus. I think your ideas are very doable and would solve the "um...I'm the AI...I'm retarted" syndrome. I'd do it if I was the FfH team. *looks for Kael again*
 
Yeah this is the dilema. If we push growth the AI is weak to rushes but stornger if it isnt rushed. If we push military the ai is stronger against rushes but lags in growth.

I dont know that there is a right answer though I often see people who prefer a set build order and its interesting to debate the different ones. As it is right now some of the players will focus on military paths (the bannor being a great example) and others will do so to a smaller degree. In general all the ffh players value military higher than the vanilla leaders, but thats probably a good adjustment considering what ffh is.

I may make a weighting change so the ai undervalues military goals if it hasnt met another player (making it more likely to pursue growth). Stays about where it is (maybe a little lower) if its met other players. And boosts the military weighting a bit if aggressive ai is on or its at war.

But Im hesitant to swing it so much. The ai used to get killed pursueing early growth over military. Early FfH is just to dangerous for that. So the change needed to take place, but we may be able to improve it some through tweaking.

Rather than checking if they have met another player, maybe check if they have met a human (SDK already provides that tool, and uses it quite a bit).

I do think it is well worth the time to break up the MILITARY flavor into multiple branches. At the least make a distinction between basic and magical, but ideally make it religious, magical, and basic (if not splitting up basic even more). Proper weighting based on a cycling through all of a Civilization's UUs could accomplish the same somewhat, but it can be a bit tricky to account for UUs which are far down the tech tree with such a method.
 
Yeah this is the dilema. If we push growth the AI is weak to rushes but stornger if it isnt rushed. If we push military the ai is stronger against rushes but lags in growth.

I dont know that there is a right answer though I often see people who prefer a set build order and its interesting to debate the different ones. As it is right now some of the players will focus on military paths (the bannor being a great example) and others will do so to a smaller degree. In general all the ffh players value military higher than the vanilla leaders, but thats probably a good adjustment considering what ffh is.

I may make a weighting change so the ai undervalues military goals if it hasnt met another player (making it more likely to pursue growth). Stays about where it is (maybe a little lower) if its met other players. And boosts the military weighting a bit if aggressive ai is on or its at war.

But Im hesitant to swing it so much. The ai used to get killed pursueing early growth over military. Early FfH is just to dangerous for that. So the change needed to take place, but we may be able to improve it some through tweaking.


Does the AI also take into account the barbarian world and raging barbarians options? If it doesn't, and we are reducing its military buildup before meeting the player, it really should prioritize military a bit more when either of these settings are on, so we don't see even more guys wiped out before you meet anyone.
 
I think the critical mistake that we are forcing on the AI, is the assumption that tech is required to have a good military, especially for defense. There is no advantage to bee-lining Bronze working, because the player who spent one tech researching calendar, and building two dye plantations, will end up reaching it faster anyway.
 
Back
Top Bottom