1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Does the AI cheat about resource locations?

Discussion in 'Civ4 - Strategy & Tips' started by jihe, Jan 11, 2012.

  1. krikav

    krikav Theorycrafter

    Joined:
    Aug 25, 2011
    Messages:
    3,462
    Location:
    Sweden
    The function "AI_foundValue", in which tiles are evaluated and graded on how good they are to place a city on, consists of 400 lines of code, in which a complete circus of considerations dance together.

    To call it weird is a understatement...

    For example, freshwater source gives 40 "points", a river gives 60 "points", whereas if the tile is on a hill, that gives a 200 point bonus.
    I'm not sure I as a player would grade a hill more than 3 times as valuable, as a river.

    Hence the considerations are wierd.
     
  2. krikav

    krikav Theorycrafter

    Joined:
    Aug 25, 2011
    Messages:
    3,462
    Location:
    Sweden
    Yes, hilltops are favored heavily.
    Much more so, than a human would favor them.

    This could be a good thing though, since it has better synnergy with the AI players.

    A human player who has some experience, should not pay much attention to the blue circles however...
     
  3. Bostock

    Bostock King

    Joined:
    Apr 28, 2008
    Messages:
    778
    Sweet mother of one-off-the coast! :lol:
     
  4. krikav

    krikav Theorycrafter

    Joined:
    Aug 25, 2011
    Messages:
    3,462
    Location:
    Sweden
    Since the code is quite complex, I don't know exacly what this does, but it seems to be that the grading is 2 for food, 4 for commerce and 8 for production. Food beeing regarded weakest.

    Code:
     iTempValue += (pLoopPlot->getYield(YIELD_FOOD) * 20);
    				iTempValue += (pLoopPlot->getYield(YIELD_PRODUCTION) * 80);
    				iTempValue += (pLoopPlot->getYield(YIELD_COMMERCE) * 40); 
     
  5. Seraiel

    Seraiel Deity

    Joined:
    Sep 6, 2011
    Messages:
    8,035
    Gender:
    Male
    Perhaps this makes sense for AI? Heard it gets production Bonuses so every Hammer is multiplied or is the cost lowered? Food being so low is weird, that's right, but a Hill ranked so high is imho ok when you think of the 75-50% defense Bonus for Archers / LBs which makes them at least twice as hard to conquer if not more, I don't have "Hill Archers are OP" as a chosen Title because I don't mean it. At least I would value a Hill over a River, Freshwater doesn't matter, Healthbonus, doesn't matter, Levees, games don't last that long, production bonus of 1 Hammer and 50-75% more Defense, that a lot in the beginning.

    And I think you're right with your Assumption of points and that it's not the other way round, AI just gave me a city without having food and always gives me cities 1 tile far of a river, but what's ranked high is connection to the coast (even though in the test above it still settles there) production and hills. Just looked in my actual game, 1/3 of the cities is on hills, and this was / is a successful game meaning this time there were only few hills cities, I had games where AI had like 80% hills-cities.
     
  6. krikav

    krikav Theorycrafter

    Joined:
    Aug 25, 2011
    Messages:
    3,462
    Location:
    Sweden
    Yes, it could make sense for the AI.
    It's accually good that the AI does settle so many hill-cities, since they would be far too easy to conquer if they only settled flatland.

    The big advantage with rivers is imo not the levvy potential, but the trade routes.
    Saving workerturns is allways valuable. :)

    I do not think that health is unimportant, it's not allways you get all of the trio of grains that supercharges your granaries..


    I would have loved to see more considerations to how the AIs empire look like, when they evaluate what spots are good to settle.
    If they have very few health resources, freshwater increases in prio.
    Hills are valuated higher on city sites close to a player/AI the AI doesn't like.. Such considerations would be nice.
     
  7. Seraiel

    Seraiel Deity

    Joined:
    Sep 6, 2011
    Messages:
    8,035
    Gender:
    Male
    Workerturns and TRs are good arguments though most Workerturns get eaten up by removing Jungle (12 turns on Marathon) and chopping Forrests (9 turns on Marathon) . A road is only 6 turns so one tile of the river doesn't matter that much and TRs with foundation of a city can be planned if played well with pre-roading and even pre-chopping, though I seldomly find myself having the time for that. Health though is a minor argument imho as one always gets at least one of the trio + cows / pigs + fish / crab / clam + one has all the forrests allowing for cities of at least size 6-10 which enough for the beginning, later on as forrests get chopped away one gets the plantation ressources and the other ones through trade or conquest, I know health is more of a problem then happiness actually but actually health is not a real problem imho as it's only food that gets eaten up, not people doing nothing.

    If you want a better AI, play Civ 5 ;) :D :D
     
  8. krikav

    krikav Theorycrafter

    Joined:
    Aug 25, 2011
    Messages:
    3,462
    Location:
    Sweden
    Removing jungle and chopping forests are cheaper in marathon.
    9+1 vs 3+1.
    The ratio is 10/4 = 2,5, when it "should" be 3.
    Also, the number of moves marathon provides makes worker movements much more unimportant.
    And on top of that, workers get a hammer discount on marathon. :>

    In fact, workerturns etc are one of the things that eventually lured me over to playing normal speed.


    I agree mostly on what you say about health, but I still like freshwater.
    I don't have to be as selective with when to chop. And health resources seem to be chronically lacking.
    Happiness is much easier to get once you have monarchy.
     
  9. Manco Capac

    Manco Capac Friday,13 June,I Collapse

    Joined:
    Mar 1, 2010
    Messages:
    8,051
    Always there to dispel all uncertainties. :)

    =========================

    [offtopic]

    @DanF5771


    I don't know if you log in often (I think not often), so I am posting this to make you know before it is too late.
    I PMed you, just log in to know the content.
     
  10. AutomatedTeller

    AutomatedTeller Frequent poster

    Joined:
    Jan 25, 2006
    Messages:
    7,540
    Location:
    Medford, MA
    there may be other reasons, like distance to the cap, overlap, random number.

    There are very few spots on a civ map where there isn't at least one resource, so if there isn't one there, there probably will be one.
     
  11. jihe

    jihe Prince

    Joined:
    Dec 19, 2006
    Messages:
    376
    Case closed! Thanks Dan.

     
  12. vranasm

    vranasm Deity

    Joined:
    Feb 2, 2002
    Messages:
    6,437
    Location:
    Czech Rep.
    ok by the amount of smilies I guess it was a joke...i hope...
     

Share This Page