Zen and the art of AI city placement.

Yeah, they implemented Blake's modification to city placement. I'd agree that it's better, but it still has some significant flaws in a few areas. The thing that I find the most annoying is the AI's insistence on putting a city anywhere it can legitimately put a city. You end up with numerous cities at the minimum 3 tile distance, which leads to considerable overlap. From my perspective, I consider that a bad thing. Maybe it's not, I haven't looked at the numbers to figure that out, but it's definitely something I'd like to reduce/eliminate if possible.

Bh
 
Of course as a player I always want it to be better too :D and actually I personally feel that the city placement was better in Warlords. Maybe that is my imagination. Were there changes to the city placement from Warlords to BTS?

Yeah, they implemented Blake's modification to city placement. I'd agree that it's better, but it still has some significant flaws in a few areas.

i really don't think it's better now. one big difference between the two versions sticks out like a sore thumb. i don't know if it's a hint about where to look in the code or not, but i'll throw it out there: barbarian cities. i know they're just random spawns. i don't know if they use any "location picking logic" for where to show up once the "yes a barb city can show up now" rules are met, or if they do it's different in any way than the civ AI logic is.

in warlords i captured some seriously kickass barb cities. in at least two games i had my ironworks in former barb cities, a barb city went legendary on me once, etc. in BtS, i raze so many more of them than i used to, just to resettle one tile over. probably 75% of them burn, even early on when saving a settler would be very helpful. i just can't stand the city spot.

in warlords i was impressed with barb cities more than with AI civ cities. that makes sense, because #1 they know where all the resources are and #2 they don't have to consider the distance from their other cities at all or any overlap issues. well it makes sense in a way, if they sort of get to pick the location ... but their cities are random spawns, so i'm not sure they get to.

but in BtS, barb cities are just as likely to suck as any AI's cities. was there any difference in the specific barbarian city location formula between warlords and BtS? there have been threads about the new sucktacularity of barb cities before and i'm not the only that's noticed this.
 
I do count forts as improvements because, well, that's what they are classified as - improvements. That's my point, you can't make a "can this tile be improved" check because it'll always at least turn up forts.

As for your "I've seen a city", I'm not sure what exactly I'm supposed to explain about it.

Bh

I don't consider forts an improvement in the manner we are currently discussing. The fort does no prodive any yield bonii, which is the main reason why I do not consider them improvements. They are mini-cities. But without yield. and to the "I've seen a city" case, here is the answer:
I think he is saying this is an example where there are no improvements that can be made for this city, right?



they were going for a failed domination win :crazyeye:

Julius can do better at domination, I know that from experience...
 
You end up with numerous cities at the minimum 3 tile distance, which leads to considerable overlap. From my perspective, I consider that a bad thing. Maybe it's not, I haven't looked at the numbers to figure that out, but it's definitely something I'd like to reduce/eliminate if possible.

Bh

I thought the same thing for the longest, then one day i was in the world builder trying to figure out why an AI civ was on my heels in tech. I realized that even though i had twice his land area, i was working about a third of it. He had every single tile covered with his ugly little utilitarian overlapped cities.

I personally can't bring myself to pass up planning supercities, but realistically speaking, i think the AI may use the better strategy. :hatsoff:

On another note, why is everybody so obsessed with river/coastal placement??? A harbor and custom's house only double your trade routes, a single town makes up for it.
 
I thought the same thing for the longest, then one day i was in the world builder trying to figure out why an AI civ was on my heels in tech. I realized that even though i had twice his land area, i was working about a third of it. He had every single tile covered with his ugly little utilitarian overlapped cities.

True, I understand that in some ways I'm mentally biased against overlap. But at the same time, I still believe the AI has excessive overlap, especially when it comes to resource dependency.

On another note, why is everybody so obsessed with river/coastal placement??? A harbor and custom's house only double your trade routes, a single town makes up for it.

The river placement is because of levees. They are incredibly powerful once you have them. For coastal, well, it's a combination of issues. The lighthouse allows you to work ocean tiles more effectively. Also, you are vastly underestimating the potential income from trade routes - as well as overlooking the fact that harbors also give extra health to cities. Plus, of course, coastal cities can build ships.

Bh
 
I don't consider forts an improvement in the manner we are currently discussing. The fort does no prodive any yield bonii, which is the main reason why I do not consider them improvements.

Ok, this is going to sound callous, but... It doesn't matter what you consider them. The game considers them improvements in the same category as any other form of improvement. Therefore you can't do a simple "can this tile be improved" check because it will always turn up as "yes".

Bh
 
The river placement is because of levees. They are incredibly powerful once you have them. For coastal, well, it's a combination of issues. The lighthouse allows you to work ocean tiles more effectively. Also, you are vastly underestimating the potential income from trade routes - as well as overlooking the fact that harbors also give extra health to cities. Plus, of course, coastal cities can build ships.

Bh

What i meant was placing you city on fresh water, I love cities that have rivers running through em, but unless its a flood plain, i wont sacrifice much to get them the fresh water bonus. As far as trade routes, my inland cities will have 3 or 4 routes with 4 or 5 commerce each. My coastal cities will have 8 or 9 commerce per route. The extra commerce i think is trumped by the 3 or 4 town sites you pass up on average.

I understand you need some cities for ships, but i tend to build perimeter cities on my coastline that only use 2 or 3 tiles of available land. They get the perks of overseas routes and with a dry dock, they can even be on ship duty
 
Ok, this is going to sound callous, but... It doesn't matter what you consider them. The game considers them improvements in the same category as any other form of improvement. Therefore you can't do a simple "can this tile be improved" check because it will always turn up as "yes".

Bh


so if i place a city in the desert, surrounded by 20 desert tiles in my BFC and "improve" all of them with forts, could you explain to me the benefits of such a strategy. The only "benefit" i can exptrapolate is that if your at war, you could place a gazillion units on every square and that city would be nigh on impossible to conquer. but that would just be silly.

Im not trying to be a smart ass, i'm just clearly not seeing thing from your POV.

whether or not the game considers them an improvement is irrelevant, because a fort gives me no extra :food:, :commerce: or :hammers:.

hope this makes sense.
 
I don't think there's much question that resources make for a better city in almost all circumstances. I don't think the weighting is off there
I suppose we'll have to agree to disagree on this point then. Swapping, say, 10 workable tiles for 9 unworkable ones + a resource is very rarely worth the trouble IMO, esp. when already in possession of several instances of that resource.
All tiles can be improved in some fashion.
Make that 'improvements that increase either commerce, hammer or food yield'
I'm not sure they are as out of line as you think. On average, a hill is only going to account for 1-2% of the "weight" of a square.
Oh ok, that's fair enough.
Realistically, food is a more important determinant of a good city than hammers. And commerce is often more important than hammers as well. For the human player, for example, you often make a few "production cities", but you certainly wouldn't want all of your cities production-heavy (until late game, anyway). So I'm not sure how much more weight should be allocated to hammers.
Not sure either, but I find that the AI tends to overemphasise food-intensive cities at the detriment of production. Of course, their bonuses do make up for it I guess.
That's another point I'm unsure of: should the algorithm consider the inherent AI bonuses? If it does, the placement will be less ideal at higher difficulty levels because even a bad location is still sufficient to make for a good city including the bonuses then.
There's plenty of weight applied to distance. You'll only see Civs building far-distant cities when there are no more close locations. Weighting isn't going to change that.
I'm not sure about that; I've seen many instances of early-game cities being built on the far side of a continent (from the AI's PoV, of course) even though it didn't net anything of interest. It was probably just the location it knew about and seemed 'most attractive' for some reason. Again, I suspect the weight of resources in the algorithm skews this too much.
 
Anyway, one thing that people don't really consider is "low space" cities. I've been writing my own "city placement" code. So far it does a really good job of picking cities when it's got plenty of open space to do so. Where it starts to fall apart is when all the "good" locations are taken. It then starts squeezing cities in anywhere it can fit them. So all those "good" locations become "mediocre" locations because they are being shared with other cities. Bh

If all the good spaces are taken, then why does the AI feel the need to keep placing cities at all? Is it somehow not possible to code it otherwise? The ironic thing is Civ IV is about not spamming cities and watching maintenance. It would be good if the AI understood this better somehow. Personally it seems in my games the AIs will keep trying to grab any empty land and only when it's all taken up do they stop expanding that way.
 
whether or not the game considers them an improvement is irrelevant, because a fort gives me no extra :food:, :commerce: or :hammers:.

How can it possibly be irrelevant what the game considers them when you want the game to make a determination? If you're going to code the game to only build a city where it can build improvements, ignoring the fact that the game considers forts improvements is idiocy.

Stop trying to look at it from a "human intelligence" point of view, that has absolutely nothing to do with the topic at hand.

Bh
 
If all the good spaces are taken, then why does the AI feel the need to keep placing cities at all? Is it somehow not possible to code it otherwise? The ironic thing is Civ IV is about not spamming cities and watching maintenance. It would be good if the AI understood this better somehow. Personally it seems in my games the AIs will keep trying to grab any empty land and only when it's all taken up do they stop expanding that way.

You should join the "Unofficial Patch" thread over in the BTS forum. Roland is doing a good job of defending the "settle every possible inch of land you can" philosophy. :)

Bh
 
If you settle one away from the coast you end up with a pile of 1 food coastal tiles that are practically useless. At least if you are able to build a lighthouse, those tiles feed themselves...not to mention all the other issues (health, trade routes) that have been mentioned.
 
How can it possibly be irrelevant what the game considers them when you want the game to make a determination? If you're going to code the game to only build a city where it can build improvements, ignoring the fact that the game considers forts improvements is idiocy.

Stop trying to look at it from a "human intelligence" point of view, that has absolutely nothing to do with the topic at hand.

Bh

True, true. But you could code it so the game wouldn't consider a fort an improvement.
 
I thought the same thing for the longest, then one day i was in the world builder trying to figure out why an AI civ was on my heels in tech. I realized that even though i had twice his land area, i was working about a third of it. He had every single tile covered with his ugly little utilitarian overlapped cities.

I personally can't bring myself to pass up planning supercities, but realistically speaking, i think the AI may use the better strategy. :hatsoff:

Early game? Absolutely, and that is where most of the game is played. It's so darn hard to play catch-up.

On another note, why is everybody so obsessed with river/coastal placement??? A harbor and custom's house only double your trade routes, a single town makes up for it.

In my original case, expansion, the possibility to meet other civs, the ability to build the lighthouse, which can be a great boost to both commerce (indirectly, as it allows you to work more tiles without having to farm) and food, the ability to build harbours, which is great, added health is always nice, and it's the cheapest health there is, and last, but not least, to be able to build sea improvements. That the AI doesn't consider it a high priority to have access to the sea is not good IMHO. It doesn't have to be every bloody city (though with the lighthouse, it certainly is nice ;) , but no sea access for ages can potentially hurt the AI quite a bit.

Rivers? Levee. Oh and health, but levee mostly. I build levées en masse (pun intended) in later games, of course, I also love the Dutch UB...
 
Ok, this is going to sound callous, but... It doesn't matter what you consider them. The game considers them improvements in the same category as any other form of improvement. Therefore you can't do a simple "can this tile be improved" check because it will always turn up as "yes".

Bh

I am not trying to figure out what this means :P

What I am saying is that I ind it stupid to build cities that cannot work any improvements but forts, i.e. Ice or deserts. :rolleyes:
 
The thing that I find the most annoying is the AI's insistence on putting a city anywhere it can legitimately put a city. You end up with numerous cities at the minimum 3 tile distance, which leads to considerable overlap.

Also those annoying cities the AI tries to squeeze in everywhere a coastal plot is not covered by culture on a freighn continent. Or one plot islands without any ressources. As soon as Astronomy is discovered, the AI try to grab every junk peace of land left on the map. Sooner with Jao in the game. This is beyond city-spam - it's plain city-pollution.

[Edit.] Oh just noticed that LlamaCat has already pointed at this issue. Sorry for doubling it. On the other hand... This is so stupid, its wotrh ranting about it twice :D
 
Back
Top Bottom