AI settles very suboptimal tiles


As I have attempted to document elsewhere (https://forums.elementalgame.com/447719/page/1/#3392882), because the AI builds many of its cities so poorly, I usually end up razing them instead of keeping them.

In doing so, I've noticed that the AI has been choosing incredibly suboptimal places upon which to build. Today, I razed a useless town which was build, apparently, on a 2-4-0 tile, only to find, directly adjacent to it, a 3-3-3 tile! Independently of the fact that 3 Essence is very rare and quite valuable, and some Essence almost always better than none, the AI should at the very least be able to calculate the difference between 6 and 9.

AI citybuilding needs more help in the very beginning as well.

17,921 views 11 replies
Reply #1 Top

Also observed this and more than once.

Reply #2 Top


While I agree that the AI doesn't always settle in an optimal spot, your example is flawed.  After you raze a city, there are often new spots (and better spots that weren't there before) because the land changes for the better while it is under player/AI control over time.

Reply #3 Top

The example maybe flawed, but I've seen the AI rebuild in equally "awesome" spots. Rebuild as in, coming in after a city is razed and still ignore a essence advantage. I've recently tripped over the AI having a city in a 0/0/0 spot ... somehow.

It seems to first pay attention to food, a little to material, material, a little to food and totally ignore essence. It doesn't seem to plan around things like Arcane Forge, Natures Bounty, Gentle Rain, or a conclaves ability to add it's to it's essence or material values.

Edit:  Which isn't exactly stupid considering population seem to have zero affect on income, and buildings are no longer limited to city level (just city type). That is a level 5 city with a population of 2000 will do just as well as a any other level 5 city. The AI still seems to pick suboptimal tiles.

Reply #4 Top

Quoting Trojasmic, reply 2

While I agree that the AI doesn't always settle in an optimal spot, your example is flawed.  After you raze a city, there are often new spots (and better spots that weren't there before) because the land changes for the better while it is under player/AI control over time.
End of Trojasmic's quote

Just razed an opponent level 1 village with no structures yet built, quite on the edge of a map, it couldn't have been on that land for more than 5 turns or so. It was on a 3-3-1 tile, and there was a 4-3-2 next to it which it did not choose.

Reply #5 Top

Quoting HarbingerLeo, reply 3

Rebuild as in, coming in after a city is razed and still ignore a essence advantage. I've recently tripped over the AI having a city in a 0/0/0 spot ... somehow.
End of HarbingerLeo's quote

I saw this as well, an AI building a settlement on a 0/0/0 tile. I would say just build an output but stranger still it didn't even put any new resources under its control. At this level, it isn't even an AI issue, the game logic should simply not allow settlement on a tile less than 1/1/0. And when you really think about it, for the AI the requirements should be higher than that. The sum of grain, material, and essence shouldn't be less than 5 or 6. I have a strong incentive for wanting the AI to pick good tiles since eventually those cities will be mine. Certainly, there must be some way to have the AI sum the 3 values and focus on the tiles with the highest sums. You could even give the AI a slight bias towards essence, tile value = grain + material + (1.1 * essence) or something like that. Not that I know squat about programming AIs but just saying.

Reply #6 Top

0/0/0 settlements are a bug (which I haven't seen in a long while), the game doesn't normally allow AIs or players to settle on combined yields of less than 6, they don't even show up on the map, and I believe the food minimum is 2 and the material minimum is 3 (or maybe also 2, I forgot).

The AI being stupid is why I've kicked the minimum yield requirement up from 6 to 8 in my ElementalDefs. A 3-5-0 is still terrible compared to a 3-3-2, but they are less common. I wish there was a setting for minimum essence for a tile to be settle-able (without giving like every tile on the map essence). Anything without essence is pretty godawful, city buffs and essence related buildings are too powerful to go without.

Very little the AI does in this game has any "thought" behind it. Seems most areas they got the AI to "do something" and never bothered with doing it well or intelligently. Every time I come back to play this game the amount of AI derp just ends up turning me away again.

Reply #7 Top

Quoting Sanati, reply 6

The AI being stupid is why I've kicked the minimum yield requirement up from 6 to 8 in my ElementalDefs.
End of Sanati's quote

How has this worked out for you? Have you found that the AI has fewer cities overall, or are they actually building fewer pioneers and aiming there efforts at the better tile locations???

 

Reply #8 Top

Hard to say because I've also boosted yields of resources a little, mostly essence, increased resource density a bit, and removed the 9 total yield cap. Most settle-able locations on my maps are pretty good, and they aren't that uncommon, so most AI cities tend to be built on decent yields. Hasn't really changed the number of cities that much, it might be a little lower but that just means the AI builds more outposts, so I don't think it's effecting their pioneer production rates.

Edit: Ya, don't do what I did. Apparently the AI ignores the rules and looks for 6 yield tiles to settle on even if they aren't valid tiles for settling. This is why some people see AI cities on tiles with no yields, they actually do have yields the player just can't see them because the city location is invalid for other reasons. Bumping the minimum yield to 8 causes the AI to continue to settle on 6 yield tiles when nothing better is in their zone of perception, creating a higher number of 0/0/0 cities. By bumping the yields of resources and increasing their density I didn't notice this behavior right away because the AI had so many good tiles to settle on.

Reply #9 Top

So, the idea is that the AI can compute the tile rating, but ignores the Minimum material yield of 3 (there is no minimum for grain in the Elemental def). That I find is a valuable observation of an AI settling problem. So, if the removal of the minimum material yield is changed, the AI will only settle on viable tiles and the problem would disappear.

Reply #10 Top

Quoting Sanati, reply 8
Hard to say because I've also boosted yields of resources a little, mostly essence, increased resource density a bit, and removed the 9 total yield cap. Most settle-able locations on my maps are pretty good, and they aren't that uncommon, so most AI cities tend to be built on decent yields. Hasn't really changed the number of cities that much, it might be a little lower but that just means the AI builds more outposts, so I don't think it's effecting their pioneer production rates.

Edit: Ya, don't do what I did. Apparently the AI ignores the rules and looks for 6 yield tiles to settle on even if they aren't valid tiles for settling. This is why some people see AI cities on tiles with no yields, they actually do have yields the player just can't see them because the city location is invalid for other reasons. Bumping the minimum yield to 8 causes the AI to continue to settle on 6 yield tiles when nothing better is in their zone of perception, creating a higher number of 0/0/0 cities. By bumping the yields of resources and increasing their density I didn't notice this behavior right away because the AI had so many good tiles to settle on.
End of Sanati's quote

Yeah. I've quickly noticed this too.

To the first point: Increasing the min from 6 to 7 and increasing the max from 9 to 10 has been A-FLIP'N-MAZING! Will never go back! Love not having to dick around with sub-optimal locations all the time. Sure, you get fewer spaces...but they are more consistently decent to settle.

To the second point: The AI settling under different rules compared to the player is frustrating. I'm no coder, so I can't speak to how good a job or how bad a job SD has done with this approach. Maybe they had no choice. Maybe there are problems with other solutions too. I would think though, that it would have been smart to have the AI see the same settle locations that the player sees so that the AI can strategize as to whether a race for a spot should take place or whether a spot is too far away to adequately defend or whether or not a spot is worthwhile to defend, despite the distance/risk.

 

Reply #11 Top

This seems to be similar to the problem that used to exist for razing cities for players versus AI.  The AI can see and settle everything where the player is limited in its sight and accessibility by the UI.  The only realistic solution seems to be to code in the min food of 1 for a tile to be settleable for a AI then it can do its algorithm to determine which ones are the best.  This mainly seems to be AI coding, as stated above, not game coding.