AI early game economical crash

Lone Wolf

Deity
Joined
Dec 4, 2006
Messages
9,908
Ok, it's known that the AI's sometimes tend to direct their research wrongly in the early game and crash their economy. What can be done to make that occurence less common?

I think that the Bronze Working Bannor and Doviello beelines in Python need to be softened. At least, have them automatically beeline Mining, not Bronze Working.

Maybe the AI's should beeline Carthography or Code of Laws when their empire gets big enough, like Notque did it in his modmod.

Maybe the weight of the early worker techs like Education, Agriculture, AH etc. should be increased.
 
I always play classic advanced start. That helps a lot. I've seen very strong Kuriotates and Luchuirp. :D

The early economic crash wouldn't occur if the pre-classic techs were much cheaper. If the AI can get education and mining early it will become a competitive enemy. If it instead beelines for trade or magic and builds 10 cities it will inevitably fail.
 
If it instead beelines for trade

Well, Balseraphs beeline for Festivals and are among the strongest AI civs.

I usually end up gifting techs to crashed AI civs, just to make the game more interesting.

Maybe, as a measure before the early tech AI gets improved, they should receive more free techs at the start of difficult levels?
 
I don't think that the current AI tech beelines need to be changed directly, but there needs to be certain exceptions in place that will divert the AI away from its beeline temporarily to get vital techs at appropriate states of expansion.

At 4 cities the AI desperately needs to get out of Despotism soon. It should switch to researching either Cartography, Mysticism, or Code of Laws (whichever will take the least total amount of research to achieve from its current research state).

At 8 cities the AI desperately needs to have income boosting and maintenance reduction buildings available. It should switch* to researching either Festivals or Code of Laws (whichever will take the least amount of research to achieve from its current research state). Once it has the first of those, it should research the other one. (* The exception to this is if the AI is currently researching Way of the Earthmother, in which case it should finish that research and then pick up Festivals and Code of Laws.)

Additionally, the AI needs to make sure it has the most basic techs for stable development before researching any expensive techs. These techs are Calendar, Animal Husbandry, Fishing*, Mining, and Education. If an AIs tech path would have it research any tech more expensive than Hunting it should first have to detour to pick up any of those basic techs it is missing. This will ensure that the AI doesn't get stuck researching an expensive tech while underutilizing the tiles its cities are working. (* Naturally, AI civs without any coastal cities should be exempt from having to research Fishing.)

I believe that those changes would drastically reduce the instances in which early game AI economic crashes occur.
 
The AI should focus on techs that would make sense depending on their starting position. If they started with water resources in their cross and founded a coastal city next to them, they should grab fishing asap, for instance. Lots of jungle and nothing else? Beeline bronze working.

The AI should really be taught the concepts of cottage economy and specialist economy, as well.
 
If they manage to get education, there will be endless towns to pillage. It's getting the tech that's a real problem. And they should not spam forts in dumb places.
 
The AI doesn't value Education at all, that's the main problem. They can run a cottage economy perfectly well if they get there, but the less economically-inclined civs usually don't research it until well after their economy has plummeted through the floor. Heck, the less religious ones don't even bother to research Ancient Chants half the time.

Reducing the flavour values (preferably in the DLL) should help quite a bit. I think they have too much of an effect now and often tend to override common sense, especially in the early game. The code to do most of what Honor suggested is actually in the DLL; it just gets overridden by much bigger values that get placed on other things.
 
We should increase all the flavour weights of Education.
 
I don't know. I was just playing a high to low game and for my final team I was switched to the Malakim.

They were on a desert (Erebus map) and they had 1 city of size 2. They were surrounded by desert / sea, and weren't close to any floodplains. They were near several fish/crab/clam resources, but they hadn't bothered to research fishing (they had popped two great merchants, and were using them to provide food).

They were trying to bee-line some religious / priesthood thing.

Somehow I should think that any AI with no food (except ocean) should just research fishing before ANYthing else.
 
after playing the khazad and watching the elves get massacred by Perpentach i did some reloads and confirm what the TS has claimed. the AI has commited suicide. Perpentach was at about 1200 score and the second highest was 648, third was myself at around 550.

so i used world builder every turn to watch what the AI was doing from earlier in the game. it turns out that Perpen captured a nearly free barb city, then IMMEDIATELY warred my elven friends and decimated them. so what were the elves doing? turn 265 and i can't even trade with them, their research path is total garbage. all they say in diplo is "lets talk about something else". pathetic. they are terrible in shape and i mean terrible.

100 turns ago or so (ok, turn 142) when 2 barb cities spawned between him and perp, he had 2 warriors near one and didn't take it. the single goblin defender fell to perps 2 turns later. Elf's also failed to build tile improvements and i think he just spammed out 4 cities with a research path directed to fellowship of leaves then got so busy hugging trees that he forgot what was going on in the game. 100 turns later, he is in the SAME state and monster perpentach has come knocking.

He founded fellowship VERY fast, i was amazed by the speed. it reminded me of "Isabella has founded buddhism". he also did a nice job REXing - but he didn't back it up, he didn't send defenders to his borders, and he failed to work on his economy at all.


my region doesn't exactly suck but i made hybrid military cities instead of specialist military cities. i decided since there is only ONE way to get in my country, i could sacrifice excess units for versatility. I am going to see if i can take my own RP challenge to liberate the elves from this wicked man and allow them to live in dwarven society. they will be allowed to keep their religion - but they must build troops for me instead of their former incompetent leader.
 
When I softened the Bannor and Doviello beelines to Mining, increased all weights of Education, and commanded the AI to beeline Code of Laws as soon as they have >4 cities, they are much better on Emperor.
 
Wolf - would it also be better on monarch or only the higher difficulties?

ive also seen a LOT of civ's die to barbs even without ortheus. i think like with RFC, this AI doesn't prioritize barbs enough. when i use worldbuilder to moniter progress i learned this AI started building worker - pallisade - worker - warrior. and guess what? it did NOT build a scout to replace the one it lost, nor did it do anything about 2 lairs near its capital. while building its first warrior, it died to goblins.

had it build: scout - worker - warrior - worker

it would have pop 2 before the worker was done, grown pop 3 on the warrior and it would have most likely lived through the goblins. if it matters, said AI was the Elohim.
 
A lot of the problems with early defence can be solved by messing around with the AI_minDefenders function in the DLL. With the default settings, if it hasn't met anyone, it won't bother with more than one defender per city (or one escort per settler, for that matter). It thinks it's still playing with BTS levels of barbs and that leaves it very open to being destroyed early game (even before Orthus/Mokka) or having its settlers eaten.

I don't think a Scout should be the first build under pretty much any circumstances, though. With your build order (scout, then worker, then a warrior), there's a long period there where the city is practically undefended.
 
Huh, I always build a scout first, too. There's still enough time to get like two warriors out before barbs start spawning and then it will be just goblins. Barbarian warriors are easy to kill, too, if you build on a hill. +40% hill defense for the first promotion, ta-da.
And it's not like there's a lot of barbs coming. At least not in my games, one warrior is enough to defend my capital, two just to be sure.
 
Not just goblins. Lizardmen are a much bigger threat, and I've had them score lucky victories against a sole fortified warrior more than once. If you don't have another warrior, in that kind of situation, you're done for.

It's all a case of how much risk you're willing to take, though. Overdoing defence means lagging behind in other areas, but living on the edge means more restarts.
 
warrior > scout for the first build imho. If your first scout dies so fast you haven't got a decent spot for a 2nd/3rd city, use the warrior instead. You don't want to be DoWed at turn 50 with scouts built instead of warriors (even 1 warrior can make the difference then)
 
I have always thought about the the idea of the AI having opening gambits for the first builds, instead of using it's normal AI.
It would be similar to chess, but taking into account that this is a much more varied game. It had to choose between some opening choises that are similar in effectivness for its first line of builds. Valueing the choises depending on the situation and randomness for rougly equally good startchoises it goes down the build tree, except maybe replacing a unit outside the build tree if it takes a loss. It also take extra consideration into babysitting the first workers and settler with warriors.
Then when it has built it's second city it reverts to using the normal build AI. Or however long it makes sence using gambit starts instead of the usual AI.
That way you could be sure that the computer avoids the most moronic starts, adepts a bit to the situation and still doesnt become to predictable.
 
I don't think that the current AI tech beelines need to be changed directly, but there needs to be certain exceptions in place that will divert the AI away from its beeline temporarily to get vital techs at appropriate states of expansion.

At 4 cities the AI desperately needs to get out of Despotism soon. It should switch to researching either Cartography, Mysticism, or Code of Laws (whichever will take the least total amount of research to achieve from its current research state).

At 8 cities the AI desperately needs to have income boosting and maintenance reduction buildings available. It should switch* to researching either Festivals or Code of Laws (whichever will take the least amount of research to achieve from its current research state). Once it has the first of those, it should research the other one. (* The exception to this is if the AI is currently researching Way of the Earthmother, in which case it should finish that research and then pick up Festivals and Code of Laws.)

Additionally, the AI needs to make sure it has the most basic techs for stable development before researching any expensive techs. These techs are Calendar, Animal Husbandry, Fishing*, Mining, and Education. If an AIs tech path would have it research any tech more expensive than Hunting it should first have to detour to pick up any of those basic techs it is missing. This will ensure that the AI doesn't get stuck researching an expensive tech while underutilizing the tiles its cities are working. (* Naturally, AI civs without any coastal cities should be exempt from having to research Fishing.)

I believe that those changes would drastically reduce the instances in which early game AI economic crashes occur.

These conditions seem to be well thought out! For anyone trying to improve the AI, it probably helps to be specific like Emptiness is here - saying 'the AI should do this better' is helpful for focus but specifics are the real hard part.

Best wishes,

Breunor
 
I don't think that the current AI tech beelines need to be changed directly, but there needs to be certain exceptions in place that will divert the AI away from its beeline temporarily to get vital techs at appropriate states of expansion.

At 4 cities the AI desperately needs to get out of Despotism soon. It should switch to researching either Cartography, Mysticism, or Code of Laws (whichever will take the least total amount of research to achieve from its current research state).

At 8 cities the AI desperately needs to have income boosting and maintenance reduction buildings available. It should switch* to researching either Festivals or Code of Laws (whichever will take the least amount of research to achieve from its current research state). Once it has the first of those, it should research the other one. (* The exception to this is if the AI is currently researching Way of the Earthmother, in which case it should finish that research and then pick up Festivals and Code of Laws.)

Additionally, the AI needs to make sure it has the most basic techs for stable development before researching any expensive techs. These techs are Calendar, Animal Husbandry, Fishing*, Mining, and Education. If an AIs tech path would have it research any tech more expensive than Hunting it should first have to detour to pick up any of those basic techs it is missing. This will ensure that the AI doesn't get stuck researching an expensive tech while underutilizing the tiles its cities are working. (* Naturally, AI civs without any coastal cities should be exempt from having to research Fishing.)

I believe that those changes would drastically reduce the instances in which early game AI economic crashes occur.

So I'd be really curious to try this. What is the code I would need to implement it? It is possible?
 
Back
Top Bottom