Zen and the art of AI city placement.

Discussion in 'Civ4 - Strategy & Tips' started by Andvare, Nov 14, 2007.

  1. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    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
     
  2. KMadCandy

    KMadCandy giggling permanoob

    Joined:
    Oct 16, 2005
    Messages:
    3,993
    Location:
    Peepsville
    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.
     
  3. Diamondeye

    Diamondeye So Happy I Could Die

    Joined:
    Apr 20, 2007
    Messages:
    6,527
    Location:
    Dancing in the Dark
    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:


    Julius can do better at domination, I know that from experience...
     
  4. Yesod

    Yesod Warlord

    Joined:
    Nov 4, 2007
    Messages:
    278
    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.
     
  5. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    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.

    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
     
  6. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    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
     
  7. Yesod

    Yesod Warlord

    Joined:
    Nov 4, 2007
    Messages:
    278
    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
     
  8. SenhorDaGuerra

    SenhorDaGuerra Prince

    Joined:
    Dec 13, 2005
    Messages:
    463
    Location:
    London

    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.
     
  9. JoeBlade

    JoeBlade Warlord

    Joined:
    Feb 1, 2006
    Messages:
    219
    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.
    Make that 'improvements that increase either commerce, hammer or food yield'
    Oh ok, that's fair enough.
    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.
    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.
     
  10. LlamaCat

    LlamaCat Emperor

    Joined:
    Dec 29, 2005
    Messages:
    1,212
    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.
     
  11. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    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
     
  12. Bhruic

    Bhruic Emperor

    Joined:
    Nov 15, 2005
    Messages:
    1,457
    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
     
  13. futurehermit

    futurehermit Deity

    Joined:
    Apr 3, 2006
    Messages:
    5,724
    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.
     
  14. Andvare

    Andvare King

    Joined:
    Sep 14, 2007
    Messages:
    788
    True, true. But you could code it so the game wouldn't consider a fort an improvement.
     
  15. Andvare

    Andvare King

    Joined:
    Sep 14, 2007
    Messages:
    788
    Early game? Absolutely, and that is where most of the game is played. It's so darn hard to play catch-up.

    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...
     
  16. Diamondeye

    Diamondeye So Happy I Could Die

    Joined:
    Apr 20, 2007
    Messages:
    6,527
    Location:
    Dancing in the Dark
    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:
     
  17. Refar

    Refar Deity

    Joined:
    Apr 10, 2005
    Messages:
    4,608
    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
     

Share This Page