[NFP] [bug/discussion] Has something gone wrong with the tile selection "governor" AI?

kaspergm

Deity
Joined
Aug 19, 2012
Messages
5,577
There was a post recently with a player experiencing the governor AI choosing to work a tile with inferior yields compared to another tile which was left unworked (I don't remember the location of the exact post). I've myself had several cases of the land expansion going to tile I consider to be inferior than another in the same distance from the town.

Here is an example from a game I just started:
Spoiler :
upload_2021-4-5_20-31-4.png

The game first expands to the cocoa (2F1P3G), then to the wine (2F1P2G) yet leaves the 2F1P4C tile for later. Why? Is it because I use corporations mode and it forces selection of tiles with luxury resources? Or has some bug appeared?


Here's another example from a recent game:
Spoiler :
upload_2021-4-5_20-34-7.png

The game chooses to expand to an (unworkable!) mountain tile instead of claiming the 3F1P1G reef tile to the right of Coimbra (and yes, it did in fact expand to the mountain tile!). Why? Unless this involves some precognition of future AI actions - Vietnam claimed the reef tile from a culture bomb district a couple of turns later - I see absolutely no rational explanation of this.


I would like others to share pictures in this thread to try to get an overview and understanding of what's happening.
 
The game first expands to the cocoa (2F1P3G), then to the wine (2F1P2G) yet leaves the 2F1P4C tile for later. Why? Is it because I use corporations mode and it forces selection of tiles with luxury resources? Or has some bug appeared?
I think, that is conform with observations since vanilla:

Highest priority: always pick up 2nd before 3rd ring tiles.
Then in the same ring (2, 3, 4 ...) tiles with resource are preferred over resourceless.
Then the higher number of yields is picked (all types count the same, even if you may say eg. 3gold = 1production = 2/3culture).
All other things being equal, it even chooses that 2nd ring tile, which allows you to buy a 3rd ring resource tile ...


The mountain tile is funny - but still, it is a potential teleportation station :D

 
I think, that is conform with observations since vanilla:

Highest priority: always pick up 2nd before 3rd ring tiles.
Then in the same ring (2, 3, 4 ...) tiles with resource are preferred over resourceless.
Then the higher number of yields is picked (all types count the same, even if you may say eg. 3gold = 1production = 2/3culture).
All other things being equal, it even chooses that 2nd ring tile, which allows you to buy a 3rd ring resource tile ...


The mountain tile is funny - but still, it is a potential teleportation station :D

To add on to this - after all resources in each successive ring are claimed, land tiles ALWAYS are claimed before water tiles. That's why the mountain is being claimed. I can guarantee that after that mountain tile is claimed, the two south of the iron mine will be claimed too before ANY of the water tiles.
 
I think, that is conform with observations since vanilla:

Highest priority: always pick up 2nd before 3rd ring tiles.
Then in the same ring (2, 3, 4 ...) tiles with resource are preferred over resourceless.
Then the higher number of yields is picked (all types count the same, even if you may say eg. 3gold = 1production = 2/3culture).
All other things being equal, it even chooses that 2nd ring tile, which allows you to buy a 3rd ring resource tile ...


The mountain tile is funny - but still, it is a potential teleportation station :D


The only thing I would suggest needs to be inserted in this hierarchy is Natural wonder tiles, because it seems to me even unworkable ones get added in pretty quick if you settle 2 tiles away. But I'm not sure exactly where this priority would go.
 
To add on to this - after all resources in each successive ring are claimed, land tiles ALWAYS are claimed before water tiles. That's why the mountain is being claimed. I can guarantee that after that mountain tile is claimed, the two south of the iron mine will be claimed too before ANY of the water tiles.
Oh really? Well that’s a rather bizarre rule to code, but certainly explains.
 
after all resources in each successive ring are claimed, land tiles ALWAYS are claimed before water tiles
Oh really? :eek: Well, that certainly explains, why I like the idea to grant coastal cities 1 extra (FREE) water tile per 2 tiles acquired ("real" coastal cities with a lot of coast & ocean tiles can gain a lot - cities with only a few, ie. barely coastal cities, not). ;)

Highest priority: always pick up 2nd before 3rd ring tiles.
Then in the same ring (2, 3, 4 ...) tiles with resource are preferred over resourceless. After all resources in each successive ring are claimed, land tiles ALWAYS before water tiles.
Then the higher number of yields is picked (all types count the same, even if you may say eg. 3gold = 1production = 2/3culture).
All other things being equal, it even chooses that 2nd ring tile, which allows you to buy a 3rd ring resource tile ...

The only thing I would suggest needs to be inserted in this hierarchy is Natural wonder tiles, because it seems to me even unworkable ones get added in pretty quick if you settle 2 tiles away. But I'm not sure exactly where this priority would go.
In kaspergm's first picture I'd have predicted cocoa, wine, maize, 7-yields adjacent Paititi, 5-yields adjacent Paititi, 3x any out of (plainsWoods & 2x plainsRainforest), grassland, Paititi, 2x desert.

So is the Paititi tile instead selected after the resources (between maize and 7-yields)?

 
Last edited:
The only thing I would suggest needs to be inserted in this hierarchy is Natural wonder tiles, because it seems to me even unworkable ones get added in pretty quick if you settle 2 tiles away. But I'm not sure exactly where this priority would go.
In kaspergm's first picture I'd have predicted cocoa, wine, maize, 7-yields adjacent Paititi, 5-yields adjacent Paititi, 3x any out of (plainsRainforest & 2x plainsWoods), grassland, Paititi, 2x desert.
In my experience, it goes:
1) Resources, highest to lowest yield
2) Natural Wonders, highest to lowest yield (yield order here usually never matters in my experience, since wonders can't spawn that close)
3) Land, highest to lowest yield
4) Water, highest to lowest yield

This has lead me to a LOT of frustration surrounding tile acquisition in cities near the Galápagos Islands, since if there's no resources next to Galápagos in a given ring, the game will go for other resources first (random fish, cattle, etc.), then the Galápagos Islands themselves (which are unworkable), then every available land tile (including mountains and desert), then finally the Galápagos-boosted water tiles.
Also frustrating when you have the Mausoleum of Halicarnassus and you just wanna get all the coast tiles first.

I haven't ever noticed a bias for 2nd ring tiles that are adjacent to 3rd ring resources, but I've never looked for that, so it might be the case that that's how the game breaks ties in priority. And then if there's still a tie in priority, I'm pretty sure the game just uses RNG to decide.

So my guess for the first picture is: Cocoa, Wine, Maize, Païtiti, 7-yield adjacent to Païtiti, 5-yield adjacent to Païtiti, 2 Rainforest (random order), Woods, Grassland, Desert (west), Desert (east)
Woods goes after the rainforest because I'm assuming the 2 unrevealed 3rd ring tiles next to the woods have a lower tile yield than the 3-yield woods and rainforest next to the 2 2nd ring rainforest tiles.
And the Desert tiles go west then east because the western one is adjacent to a 3rd ring Stone tile.
As for the second picture, I'm guessing all of the mountains will be acquired in random order, then the reef, then the rest of the coast tiles in random order

Would it really be too much to ask for an (entirely optional) tile acquisition queue? We can already queue up city production, and techs/civics, why can't we have an option to manually set the order tiles get acquired in each successive ring?
 
that's how the game breaks ties in priority. And then if there's still a tie in priority, I'm pretty sure the game just uses RNG to decide.
I suspect, maximizing visible tiles may also play a role - at least I seem to remember Russia having sometimes interesting starting patterns ...

Probably no need to call a RNG, I mean, you can easily use in every category (eg. Resources, Natural Wonders, Land, Water) different start positions & search direction within the ring to select from already "randomly" distributed target tiles.
Would it really be too much to ask for an (entirely optional) tile acquisition queue?
I like the rest of randomness. You can quite reliably predict the sequence of the first picked effortless tiles in the 2nd ring and you know, that you have to buy the resources in the 3rd ring, if you REALLY want them early. The 7-yield adjacent to Païtiti above or your Galápagos-boosted water tiles ...

 
But why does the Tile Governer change it's mind?

I recently wanted to buy a nice tile for my builder but saw that the border would expand there in 5 turns, so I stationed the builder on it and waited.

It changed its mind of course so ended up buying it, but this lack of predictability is a regular occurrence.
 
But why does the Tile Governer change it's mind?

I recently wanted to buy a nice tile for my builder but saw that the border would expand there in 5 turns, so I stationed the builder on it and waited.

It changed its mind of course so ended up buying it, but this lack of predictability is a regular occurrence.
Very good question. I haven't been able to spot any pattern to this that would make sense in my mind. Even when no new resource is discovered in unclaimed tiles or when no new tile is purchased or claimed artificially, it still changes which tile it's going to expand to seemingly out of nowhere.
 
But why does the Tile Governer change it's mind?
This is the most imaginable way having fun, it is mysterious, exciting and entertaining.

Before you contradict, please watch your tongue, he said "I will use my blandest blade!", remember?

(ninja'ed)

 
But why does the Tile Governer change it's mind?

I recently wanted to buy a nice tile for my builder but saw that the border would expand there in 5 turns, so I stationed the builder on it and waited.

It changed its mind of course so ended up buying it, but this lack of predictability is a regular occurrence.

This has happened to me a few times also. I wonder if loyalty has something to do with it.
 
In my experience, it goes:
1) Resources, highest to lowest yield
2) Natural Wonders, highest to lowest yield (yield order here usually never matters in my experience, since wonders can't spawn that close)
3) Land, highest to lowest yield
4) Water, highest to lowest yield
I can confirm this, I settled a city south of Paititi and the city claim resources first, then the Paititi tile (zero yield) before the adjacent tiles with boosted yield.

This has happened to me a few times also. I wonder if loyalty has something to do with it.
From what I've observed it seems to change systematically when two tiles are equally likely to be claimed: I.e. first turn it will show tile A, then next turn it will show tile B, then next turn it will show tile A again, then tile B, etc. I'm not sure if this is intended or a result of poor coding (does the game think it already has claimed the "intended" tile and therefore marks the "next" intended on the subsequent turn, and then next turn it goes back to the highest priority tile?) or if it's just its way of handling the two equally valid options. If the latter is the case, it's an extremely poor way of solving it, it should either just pick one and then stick with it, or mark both as likely options.

One of my favorite mods from Civ5 was one of whowards mods that allowed you to select yourself which tile you wanted when borders grew. If you wanted a more expensive tile (i.e. further from centre), you'd still have to pay for it, but with the discount equal to the cost of the valid target. Such a small change but a huge QoL update.
 
change systematically when two tiles are equally likely to be claimed: I.e. first turn it will show tile A, then next turn it will show tile B, then next turn it will show tile A again, then tile B, etc.
If it strictly toggles, then it can perhaps be manipulated by working intentionally more or less tiles with culture yield. So you get tile A instead of next turn tile B, or tile B instead of last turn tile A.

 
From what I've observed it seems to change systematically when two tiles are equally likely to be claimed: I.e. first turn it will show tile A, then next turn it will show tile B, then next turn it will show tile A again, then tile B, etc. I'm not sure if this is intended or a result of poor coding (does the game think it already has claimed the "intended" tile and therefore marks the "next" intended on the subsequent turn, and then next turn it goes back to the highest priority tile?) or if it's just its way of handling the two equally valid options. If the latter is the case, it's an extremely poor way of solving it, it should either just pick one and then stick with it, or mark both as likely options.
This is yet another reason I'm glad I'm not above using a cheat map editor mod in casual games. If I really don't like how my borders automatically decided to expand, I can just grant myself ownership of the tile I did want, and remove ownership of the tile I just got. That being said, it's pretty tedious to do that every time my borders expand suboptimally, so I reserve doing that for when it's really egregious, like gaining ownership of Païtiti before the boosted tiles around it.
 
This is yet another reason I'm glad I'm not above using a cheat map editor mod in casual games. If I really don't like how my borders automatically decided to expand, I can just grant myself ownership of the tile I did want, and remove ownership of the tile I just got. That being said, it's pretty tedious to do that every time my borders expand suboptimally, so I reserve doing that for when it's really egregious, like gaining ownership of Païtiti before the boosted tiles around it.
Maybe I should get that mod, because it sure can be annoying - although in this specific case it was actually ok since I play with the Terra Mirabilis mod which doubles gold yield from the city if it owns a tile of Paititi, so I actually wanted it to claim that tile ASAP.
 
Bumping this thread because I just had this incidence in my current game:
Spoiler :
upload_2021-4-13_20-33-35.png

Why will the governor favor to work the Corn tile rather than the Sugar tile? It provides less food AND less production for the same gold yield. Notice that I do not have the city set to anything like "avoid growth".

I still feel there's something bugged here that needs to be looked into.
 
Top Bottom