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

Unfavorable trade policies

Discussion in 'Civ4 - Unofficial Patches' started by GatlingGun, Jul 3, 2008.

  1. GatlingGun

    GatlingGun Warlord

    Joined:
    Feb 3, 2008
    Messages:
    273
    Location:
    Northwest USA
    I'm curious whether this is a bug or a feature...

    I'm playing a SG as Lincoln using the Firaxis 3.17 patch with some other folks and back in the BC times, we reduced Mehmed to a couple of cities on our island... he had no metals, axes or spears in his territory when we stopped but we couldn't keep going due to our lack of construction at the time.

    Later I notice that Mehmed has axes and spears... so I wonder how? The only other known AI (Justinian) won't trade metals to us and we have +11 diplo with him due to a shared admiration for the Buddha...


    On the other hand, Mehmed is Christian and only has +1 with Justinian; nevertheless, he is getting iron????? :crazyeye:


    How is it sane to make the AI behave in such a biased manner against the human player? Thoughts?

    The save can be downloaded from here:
    NCSG2-Lincoln 1500AD
     
  2. kazapp

    kazapp Emperor

    Joined:
    Apr 2, 2006
    Messages:
    1,058
    I can usually trade resources with AIs that are angry with me, refuse to open their borders and don't share techs.

    Why shouldn't this apply to the AI?

    Besides, put yourself in Justinians shoes:

    Why would he trade combat resources with his main rivals (friendly or not)? On the other hand, he can supply the Ottomans with Iron with no diplomatic penalties at all, and hopefully this will slow you down somewhat, which can only benefit him.

    So I would say he's learnt to play the game... ;)
     
  3. GatlingGun

    GatlingGun Warlord

    Joined:
    Feb 3, 2008
    Messages:
    273
    Location:
    Northwest USA
    So I'd say you've learned to accept the fact that the AI always plays against the player instead of playing against other AIs and the human player. The descriptive assumption in your comment seems to be that the AIs should always try to slow me down instead of playing against other AIs... when in fact, I'm not sure this is the way it should be. That is essentially the question I'm asking.

    The AI already gets bonuses against the human player in terms of teching, production, war weariness, unit upgrades, etc... I'm asking whether this should be expected or not.
     
  4. JujuLautre

    JujuLautre Deity

    Joined:
    Apr 9, 2007
    Messages:
    3,112
    Location:
    Kansai, Japan
    I really don't think that the AI is smart enough to know "I shouldn't trade this to my friendly rival but I may trade it to that Ottoman".

    Also, the message we get when an AI don't want to trade us something because of a bad diplomatic situation is "we just don't like you enough". "Surely, you must be joking" means something else, but I don't know what.

    --edit: got it. You already have iron, as well as all the resources for which he says "surely you must be joking". That's obviously the standard message for that.
     
  5. Psyringe

    Psyringe Scout

    Joined:
    Dec 7, 2001
    Messages:
    3,394
    Location:
    Berlin, Germany
    GatlingGun: Cut your own supply of iron and see whether Justinian will trade his iron to you afterwards. Justinian isn't shorthanding you because of any anti-human bias, he just realises (contrary to yourself, apparently ;) ) that you don't need any more iron. The message text is a bit misleading though.

    Also, how certain are you that relations between Justinian and Mehmed were better when the deal was struck (for example, one of the two could have changed his religion in the meantime, which could easily account for an 8 point drop in relations.)

    Still, trading a strategic resource for a luxury resource seems very generous from Justinian, but it's not totally out of the picture. Having a savegame from the turn before the two made theri deal would be great for further analysis.
     
  6. GatlingGun

    GatlingGun Warlord

    Joined:
    Feb 3, 2008
    Messages:
    273
    Location:
    Northwest USA
    I went into worldbuilder and erased both of our iron tiles and then waited for the next turn... this is no better...


    In short, the AI decided to give strategic resources to another AI at a significant discount even though their diplo relations are significantly worse than mine. If I ever get iron trades from another AI, I normally have to give up at least two other resources, plus some GPT. The most sane explanation for this is simply that the AI would rather help itself than me. So my question is should we expect this, or is this a bug...

    At one time, Mehmed was Buddhist, but this was long before he was getting iron from Justinian. He was Christian before he started getting iron from him... he has been Christian for at least a thousand years... see the save games below

    1400 AD - Before Iron Trade
    1450 AD - After Iron Trade

    EDIT:
    I narrowed this down to a single keypress... if you hit return in the 1405 AD save (below)... Mehmed's trade goes from giving Justinian Silver for Pigs... to giving Justinian Silver for Iron in 1410 AD.
     

    Attached Files:

  7. GatlingGun

    GatlingGun Warlord

    Joined:
    Feb 3, 2008
    Messages:
    273
    Location:
    Northwest USA
    It's still schizo behavior though... the AI tries to beg my iron from me all the time, even when they already have multiple sources for that resource... shouldn't I be able to do the same?
     
  8. Psyringe

    Psyringe Scout

    Joined:
    Dec 7, 2001
    Messages:
    3,394
    Location:
    Berlin, Germany
    There's still insufficient evidence to make this claim. We'd need either a savegame from the turn right before the deal takes place, or we'd need to recreate a situation in which the AI would make such a deal with another AI. Can you do this in your current game? For example, if you temporarily remove Justinian's iron (so that his iron trade gets canceled), and then give it back to him, will he again trade his iron to Mehmed for silver?

    As long as we can't reproduce the "AI to AI trade discount" effect you're describing, we can't be sure what triggered it, or whether it was a perfectly valid and fair transaction at the time and under the circumstances the deal was struck.

    We definitely shouldn't expect this, as the Civ4 AI (as far as I remember) was soecifically programmed *not* to have an anti-player bias in trades. And I agree with you about the price that usually has to be paid for iron; the AI values strategic resources very highly. I'm just not convinced that Justinian really gave another AI a discount as long as I don't know the circumstances of this trade, or we're able to reproduce such an effect, or we find a cause for it in the source code.
     
  9. DanF5771

    DanF5771 Emperor

    Joined:
    Feb 21, 2008
    Messages:
    1,194
    Do you have Vassals and Justinian hates them, because he should definitely like you enough to trade strategic resources to you when he is friendly towards you.
     
  10. GatlingGun

    GatlingGun Warlord

    Joined:
    Feb 3, 2008
    Messages:
    273
    Location:
    Northwest USA
    I just added the saves above... the iron trade to Mehmed happened between 1400 and 1450 AD, even though Mehmed had been Christian for over a thousand years and had very low diplo mods compared to our team.

    I understand and appreciate the Computer Scientist approach and provided sufficient reproducible evidence above.
     
  11. Psyringe

    Psyringe Scout

    Joined:
    Dec 7, 2001
    Messages:
    3,394
    Location:
    Berlin, Germany
    Thanks for the saves, I'll have a look at them when I get home (which, unfortunally, will be awfully late today, but perhaps someone else can give it a shot in the meantime?)
     
  12. DanF5771

    DanF5771 Emperor

    Joined:
    Feb 21, 2008
    Messages:
    1,194
    I'm afraid something is wrong with the BonusRefuseAttitudeThresholds. I can't get leaders to trade me bonuses when the threshold is set to CAUTIOUS even though they are friendly with me just like in your example --> NEW BUG???? S-O-L-V-E-R, HEEEELLLP!
     
  13. Minor Annoyance

    Minor Annoyance Deity

    Joined:
    Jun 27, 2007
    Messages:
    2,247
    Gender:
    Male
    Location:
    Hamilton, Ontario
    There are relations modifiers that are hidden. Like some leaders like fellow warmongers, or will like or dislike you depending on how high you are on the score list. So it's possible they tike you less than you think and the other civ more.
    I think someone modded those modifiers to have text for them but I don't know if he actually released it.
     
  14. Psyringe

    Psyringe Scout

    Joined:
    Dec 7, 2001
    Messages:
    3,394
    Location:
    Berlin, Germany
    With the 1400 AD save, I couldn't reproduce your findings, instead the following happens (reproduced 3 times):

    - 1400: Justinian trades Pigs to Mehmed for Silver, and Silk for Fur.
    - 1410: The Pigs for Silver deal gets canceled
    - 1415: Justinian now renews the Pig for Silver trade, but now trades Gems for Fur (so the silk-for-fur deal must have run out as well)

    With the 1405 AD save, I *can* reproduce your findings. Like you described, the trade switches from Pigs for Silver to Iron for Silver.

    I then went into the worldbuilder, saved the 1405 AD game as a scenario, reloaded it, went into the game as Mehmed, and offered Justinian Silver for his Iron. He said that this offer was an insult to his empire. However, the situation was not exactly the same than when Mehmed was an AI player, because the reload as a scenario apparently removed some positive diplo modifiers, and Justinian relation to me was at -3 now.

    This needs further research (which I can't do right now, but perhaps someone else wants to give it a try?)
     
  15. DanF5771

    DanF5771 Emperor

    Joined:
    Feb 21, 2008
    Messages:
    1,194
    I thought the hidden modifiers would only lead to differences between the visible attitude values (diplo glance screen) and the internal values which determine the actual attitude. So an AI might be CAUTIOUS towards me although I see a +5 in the glance screen which should actually make them PLEASED (>=3).
    However, the eventual attitudes (FURIOUS, ANNOYED, CAUTIOUS, PLEASED, FRIENDLY) should of course influence all game aspects consistently, so when the diplo screen tells me Justinian is FRIENDLY towards me (+15!), then he should definitely trade his strategic resources to me, since the XML says he does so, as long as he is > CAUTIOUS with me.

    I'm afraid something might be wrong with eAttitude = AI_getAttitude(ePlayer) in CvPlayerAI.cpp which seems to return ATTITUDE_CAUTIOUS although it should return ATTITUDE_FRIENDLY.
    I've run a few tests with different leaders and different thresholds as well as trying to trade maps. Maps work fine but here the code asks for Team-Attitude. This is all very strange, I hope I'm wrong!
     
  16. GatlingGun

    GatlingGun Warlord

    Joined:
    Feb 3, 2008
    Messages:
    273
    Location:
    Northwest USA
    I had similar results as you the first time I loaded from 1400AD and tried to reproduce... I was mostly hitting enter and ignoring what was happening though... then I stepped through exactly how that round was played as much as possible... there weren't many things involved... reworking a tile... chopping a tree, moving another worker to chop some jungle, building a longbow... perhaps a few others... and then I noticed that the trade was for iron in 1410AD.

    So perhaps it was somehow triggered by something we did... although you should notice that Mehmed already has axes and spears even in the 1400 save... so I'm inclined to believe that he got metals from Justinian at least one other time before this... There are no other AIs around to trade with.

    I'm on vacation and my laptop doesn't have BTS on it... I'll have to work on it again when I get back Sunday night (US time)... if someone can narrow this down further though I'd value the input on it. Our shared game thread is posted below... you should be able to follow post #183 and get similar results if it played out like it did for me.

    NCSG2 - Lincoln Team 2 Thread
     
  17. Psyringe

    Psyringe Scout

    Joined:
    Dec 7, 2001
    Messages:
    3,394
    Location:
    Berlin, Germany
    I haven't forgotten this problem, but currently don't have a good idea of how to further test / deal with it. DanF has started a related thread here, which I'm monitoring.
     

Share This Page