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

Is there any logic to an AI DoW?

Discussion in 'Civ4 - Strategy & Tips' started by marstinson, Aug 6, 2008.

  1. marstinson

    marstinson Chieftain

    Joined:
    Jul 14, 2008
    Messages:
    68
    I'm in the midst of finishing up a game on the second run-through. I got stuck on a decent-sized continent with Ragnar and the other six civs sharing two bigger ones. The first time through I thought I was doing decently enough until he DoW'd and totally spanked me. Since I had slacked off on my military the first time, the second time through I made a serious effort to keep my power rating up and made really nice with him. I had him up at Friendly and kept him there (Open Borders, Brothers and Sisters of the faith, fair trade, helped us - the whole shootin' match). Not a single negative diplo aside from the usual borders penalty. The RNG actually behaved on the random events until late in the game when I got the jilted bride with Zara. Then a couple of turns later he just up and DoW'd me. As soon as he did, I checked to see if it might have been some other civ being an instigator, but I was the only civ he had contact with at that point. Does the AI just sit back and go, "Hmmm. It's 1300 AD and I haven't pillaged anyone yet. Think I'll go do something about that." Or is Ragnar just another psycho like Monty?

    The outcome of the second go-around was that I spanked and vassalized his hairy butt and left him with a couple or three cities out on some islands that it wasn't worth the hassle to take. If I can figure out how to get a foothold on their continent and take three or four good cities, I think I'll gift those to him and let him go after Zara and/or Augustus. But as it stands, I'll probably get a culture win before I can see whether that will work - bummer.
     
  2. PaulusIII

    PaulusIII Unholy Warlord

    Joined:
    Mar 13, 2008
    Messages:
    1,621
    Location:
    The Netherlands
    Ragnar is simply a psycho of Montezuman proportions.
     
  3. reverend oats

    reverend oats Chieftain

    Joined:
    Dec 18, 2007
    Messages:
    641
    Location:
    Uberwald
    Mayhaps he dropped to pleased for one measly turn and on that very turn decided to go to war with you. Even if he was bumped by up to friendly immediately afterwards, the decision was already made.
     
  4. azzaman333

    azzaman333 meh

    Joined:
    Apr 9, 2005
    Messages:
    22,877
    Location:
    Melbourne, AUS Reputation:131^(9/2)
    Ragnar and Shaka are much more dangerous than Monty. They both build a formidable army before attacking, Monty just attacks whenever he sees a fairly lightly defended city.
     
  5. TheMeInTeam

    TheMeInTeam Top Logic

    Joined:
    Jan 26, 2008
    Messages:
    24,567
    Whatever logic is used, it's flawed. I've seen AIs declare on other AIs with a fraction of their power (less commonly declare on me) and get stomped. Why would you declare with a tech deficit and a smaller army?
     
  6. URSExelcior

    URSExelcior Chieftain

    Joined:
    Sep 15, 2007
    Messages:
    135
    Well, the only logic behind a player DoW is "more land", even if it means betraying a friendly AI, so I'd be grateful that there's any logic at all behind AI DoW's and that AI's are at least semi-trustworthy.
     
  7. CLST

    CLST Chieftain

    Joined:
    Jul 17, 2008
    Messages:
    235
    Strangely enough I always get along with Ragnar.
     
  8. Rubbaduck

    Rubbaduck Artificial waterfowl

    Joined:
    Jul 11, 2008
    Messages:
    217
    Location:
    Helsinki, Finland
    Monty and friends declare war when the angle between the moon and a pickle jar is right.

    Others declare because they don't like you, and thus want you to come and kill them.

    That's the logic.
     
  9. Niklas

    Niklas Fully Functional GOTM Staff

    Joined:
    Dec 21, 2004
    Messages:
    10,290
    Location:
    57°47'55"N 12°09'16"E
    I had reason to look into this recently. If you're not a player in SGOTM07, you can click here to read about it. Once that game is officially over I may just turn it into a strategy article. :)

    EDIT: Caveat - this is all based on Vanilla, and may well have changed for BtS.
     
  10. r_rolo1

    r_rolo1 King of myself

    Joined:
    May 19, 2006
    Messages:
    13,818
    Location:
    Lisbon, Portugal
    Well:

    -Ragnar is a quite agressive dude. Not as much as Shaka or Monty, but his blood boils fast ( I would compare him to Napoleon ) and IIRC he can plan a war being pleased with the target.
    -You were his only possible target.

    What were you expecting? ;)

    And I see that you treted him accordingly :p
     
  11. TheMeInTeam

    TheMeInTeam Top Logic

    Joined:
    Jan 26, 2008
    Messages:
    24,567
    I think they have a bit. I was playing with my friend on monarch and we watched Sitting Bull DoW a technologically superior and CONSIDERABLY more powerful Peter. Neither of us bribed him, and the other remaining AIs didn't have anything they could have given him that I'm aware of. Nobody in the world was at war either so no dogpile threshold. Also, they were on separate continents. With Sitting Bull having a .6-.8 of Peters power rating if the functionality you describe in that thread were true he wouldn't have any chance of being the aggressor at all (though Peter might). That's why I was so surprised to see the weaker AI declare.

    In any event, not much happened in that war...couple sunk ships and eventually they ended it without a city captured on either side, but I think this suggests the code was tweaked in the expansions, or at least in BTS.
     
  12. Niklas

    Niklas Fully Functional GOTM Staff

    Joined:
    Dec 21, 2004
    Messages:
    10,290
    Location:
    57°47'55"N 12°09'16"E
    Interesting you should bring that up - it actually fits perfectly with what I described. Why? Because checking up the XML, Sitting Bull is an oddity:
    Code:
    		<LeaderHeadInfo>
    			<Type>LEADER_SITTING_BULL</Type>
    			{....}
    			<iMaxWarRand>200</iMaxWarRand>
    			<iMaxWarNearbyPowerRatio>130</iMaxWarNearbyPowerRatio>
    			<iMaxWarDistantPowerRatio>[B][COLOR="Red"]0[/COLOR][/B]</iMaxWarDistantPowerRatio>
    Apparently Sitting Bull has no qualms ever about attacking powerful overseas opponents. So there you have your reason. :)
     
  13. TheMeInTeam

    TheMeInTeam Top Logic

    Joined:
    Jan 26, 2008
    Messages:
    24,567
    Haha I see. So in BTS the code might not be different, but at least one BTS leader had his values set within it sufficiently to do erratic things. Makes sense then.
     
  14. Genv [FP]

    Genv [FP] Website Moron

    Joined:
    Apr 12, 2008
    Messages:
    1,104
    Who cares? Sitting bull is a rock.


    A 500 ton rock.


    Made out of concrete.



    RE-BAR concrete.


    Anchored to a landmass.
     
  15. sebsone

    sebsone Chieftain

    Joined:
    May 13, 2005
    Messages:
    20
    Location:
    Italy
    Situation: Monarch, Napoleon. Sharing continent with Cyrus, Alex and Montezuma. At the earliest turns, I declared war to Alex and Cyrus twice just to steal them two workers each, leaving them furious for the rest of the game if it wasn't for the fact that they became my vassals shortly later on. (That worker theft really weakened them bad, btw!!). I established my empire up north, sharing the continent with Montezuma, to whom I had been able to steal only one worker very early inthe sqame way.

    So now then: Montezuma never declared war on me ever again. Possible reasons are the following:
    - I defended my cities, and those of my vassals extremely well, including fortresses on hills​
    - I paid some tribute now and then​
    - I never ever opened my broders to him!!!​

    However, I have the feeling that there is a game modifier for Diplomacy that makes certain Leaders really appreciate only strength, rather than anything else. Being friendly with those leaders (Ragnar, Napoleon, Montezuma...) is of no particular meaning unless you've shown some strength earlier, or simply have a strong army now, only in which case their being friendly or pleased actually would mean something. God knows Gandhi would hardly attack you if he's pleased, regardless of your strength..that's not the case with those other "psychos".

    But Again, in my game, Montezuma turned out to be quite a predictable, pleased friend with the following circumstances given:

    - never opened borders​
    - declared war to him first​
    - decently defended border cities​

    I'm not sure if the "declared war to him first" factor exists in some hidden way, but the fact that I never opened my borders to him may well have played an important role, leaving him never too sure of how strong I really am.

    Conclusion: I believe showing mistrust to those psychos leaves them pleased with you. I really wouldn't be surprised if there's a computational implementation to this inthe game, since it is a frequent character trait in real politics: some leaders respect strength and realism, rather than idealsit optimism.
     
  16. sebsone

    sebsone Chieftain

    Joined:
    May 13, 2005
    Messages:
    20
    Location:
    Italy
    Situation: Monarch, Napoleon. Sharing continent with Cyrus, Alex and Montezuma. At the earliest turns, I declared war to Alex and Cyrus twice just to steal them two workers each, leaving them furious for the rest of the game if it wasn't for the fact that they became my vassals shortly later on. (That worker theft really weakened them bad, btw!!). I established my empire up north, sharing the continent with Montezuma, to whom I had been able to steal only one worker very early inthe sqame way.

    So now then: Montezuma never declared war on me ever again. Possible reasons are the following:
    - I defended my cities, and those of my vassals extremely well, including fortresses on hills​
    - I paid some tribute now and then​
    - I never ever opened my broders to him!!!​

    However, I have the feeling that there is a game modifier for Diplomacy that makes certain Leaders really appreciate only strength, rather than anything else. Being friendly with those leaders (Ragnar, Napoleon, Montezuma...) is of no particular meaning unless you've shown some strength earlier, or simply have a strong army now, only in which case their being friendly or pleased actually would mean something. God knows Gandhi would hardly attack you if he's pleased, regardless of your strength..that's not the case with those other "psychos".

    But Again, in my game, Montezuma turned out to be quite a predictable, pleased friend with the following circumstances given:

    - never opened borders​
    - declared war to him first​
    - decently defended border cities​

    I'm not sure if the "declared war to him first" factor exists in some hidden way, but the fact that I never opened my borders to him may well have played an important role, leaving him never too sure of how strong I really am.

    Conclusion: I believe showing mistrust to those psychos leaves them pleased with you. I really wouldn't be surprised if there's a computational implementation to this inthe game, since it is a frequent character trait in real politics: some leaders respect strength and realism, rather than idealsit optimism.
     
  17. r_rolo1

    r_rolo1 King of myself

    Joined:
    May 19, 2006
    Messages:
    13,818
    Location:
    Lisbon, Portugal
    ^^All of the above is not true. None of the default AI leader will plot a war vs another player if friendly. All the rest resumes to probabilities modulating diplo stats and actual strength ratios
     
  18. huerfanista

    huerfanista Chieftain

    Joined:
    Dec 25, 2006
    Messages:
    1,276
    :agree: (with rolo)

    I'm playing the noble's club Catherine game, and Ragnar DOWs me out of nowhere. He's completely boxed in by Shaka and Pacal, and I have the highest power rating and a tech lead. WTF:confused: Then it dawns on me: although all of them are pleased with me (I founded confucianism and everyone adopted it), they're all in HR and I'm in rep. Apparently the fav civic modifier trumps any sort of reasonable logic for these aggressive AIs (Pacal is very weak - Ragnar could have rolled over him with no problem at all). Now, I don't mean that fav civic BY ITSELF prevented him from DOWing Shaka or Pacal - obviously, it put him at friendly with them vs pleased with me. But that just seems like weak logic to me with regard to a psycho like Ragnar. I would think that the close borders modifier (with Shaka and Pacal) combined with Pacal's low power and my high power would make Pacal the more logical target. Obviously, it's not coded that way.

    At the time, I was just getting ready to take Shaka out, so Ragnar's DOW was an annoyance. Now I have all of their capitals and they're my vassals. :lol:
     
  19. Niklas

    Niklas Fully Functional GOTM Staff

    Joined:
    Dec 21, 2004
    Messages:
    10,290
    Location:
    57°47'55"N 12°09'16"E
    What rolo said. Check the link I posted earlier in this thread for the full story.
     
  20. Dirk1302

    Dirk1302 Chieftain

    Joined:
    Oct 5, 2006
    Messages:
    3,578
    Location:
    Netherlands
    ^rolo,indeed, it might be helpful to add:

    - Ais don't decide to declare at friendly, however they can declare at friendly in 2 cases that i know of:

    - They were not friendly with you at the time they decided to declare on you (wheooh).
    - You have vassal(s) toward whom they're not friendly, in this case they really have some averaged attitude towards you and the vassals, don't know the formula for this attitude.
     

Share This Page