Announcement

Collapse
No announcement yet.

Trading luxuries: good idea?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    On topic, since the AI normally pays almost half a gold per turn per happy face for the luxuries you sell them, it's almost always going to be worth it.
    I only wouldn't if I were tying to maintain a balance of power between AIs.

    In any case, a lot of the time what's good for an individual AI is good for me.

    Comment


    • #17
      Happy Face: Lux Slider vs. Lux Trade

      I'm not sure if Soren is still around but it's worth mentioning anyways.

      On the issue of luxury slider, the concern was that the AI could get used to it and not trade for other luxuries. I wonder if it would be possible to build in a calculation routine that would sold this- an incremental "shadow price" analysis.

      When luxury trades are available with other AI or human players and the AI is using the slider, it simply compares the relative worth of both options and goes for the cheaper one.

      ie: If obtaining a luxury would net 100 happy faces for the entire civilization and it will cost the AI 500 gold (This is assuming it convert tech trades into a gold value) then you have 200/100 or a ratio rating of 2. Or it costs 2 gold for 1 happy face.

      The AI then compares it to its current status. If luxury slider > 0 then it attempts to decrease the slider by one increment. The happy face reduced would constitute the "shadow" or incremental price. Let's say that by reducing the slider by 10%, the AI loses 90 happy faces in all of its cities but gains 230 gold. 230/90 = 2.56 or it costs the AI nearly 60% more to keep its luxury slider at its current level. The optimal strategy would be for it to lower its slider increment and attempt to obtain the luxury.

      There are constraints of course. The AI may simply not be able to afford the luxury, in which case, maintaining the luxury slider would be the optimal option for the AI. But I'm assuming Soren's concern was that it would avoided trading even when it can afford it.

      I can see a key objection that could be raised

      --This method may cause the AI to dumbly go for the cheapest happy faces disregarding effect. For example. It may cost the AI 2 gold to obtain 1 happy face. But it may only have a net gain of 50 faces. On the otherhand, the AI would gain 60 happy faces at a cost of 3 gold per face if it were to set the slider up by one increment.

      The optimal strategy here is not clear. The AI may need 60 happy faces to keep all cities out of revolt or in WLTKD. So while it may obtain the 50 happy faces through trade is cheaper, it loses 10 happy face and opportunity gold in lost income from revolts and WLTKD.

      There are various solutions that I can see

      1) The shadow price calculation can be extended to measure the net effect of losing happy faces. If I loose 60 happy faces by reducing luxury slider by 1 increment and gain 50 happy faces by trading, what is my net gain?

      Well, perhaps the AI may have a net gain in income of 30 gpt. It then multiplies the 30 by 20 turns (the life of the luxury trade) = 600 . This amount is then deduced by the net loses. 10 happy face lost. How many cities will go into revolt or loses WLTKD? Calculations here could get tricky, and I don't pretend to know how to solve this efficiently. But Soren might.

      2) An alternative would be a far simpler method used in linear programming and goal programming. Simply constrain the decision.

      I'm assuming the AI will always know how many happy faces and content faces it needs to keep "status quo" level of production. I say "status quo" because I am also assuming there are already behavioural constraints in place to prevent the AI from doing something really strange when it has only "maximize X or Y" to go by-- like reducing research to 0 because it has to maximize gpt income. By default then, status quo is suboptimal for the individual dimensions (gold income, production, food) but is hopefully optimal taken as a whole.

      The AI could then constrain its decisions. Even if it is cheaper to obtain happy faces through a luxury, if it fails to generate enough happy faces, the decision is rejected. Perhaps an algorithim could be put in place where the AI can mix and match trades. Perhaps there are two luxuries avaible? or 3? If may try to obtain all three, calculate an AVERAGE COST for each happy face generated and compare it to the current "status quo".


      Thoughts?
      AI:C3C Debug Game Report (Part1) :C3C Debug Game Report (Part2)
      Strategy:The Machiavellian Doctrine
      Visit my WebsiteMonkey Dew

      Comment


      • #18
        Addendum to my previous post:

        I wan to add a clarification.

        The "status quo" I talk about assumes the current state is the "best" or "preferred" state for the AI. This may not be the case. War weariness may have set in for the AI civ and the current "status quo" is infact not as good as the previous state.

        Again, I don't know how the AI makes its decisions when it comes to maintaining happiness, but I can only assume that it has a goal, either hardwired or based on some formula running in the background. In that case, the status quo would be the initial happiness goal the AI civ has set for itself and not the current state of the Civ.
        AI:C3C Debug Game Report (Part1) :C3C Debug Game Report (Part2)
        Strategy:The Machiavellian Doctrine
        Visit my WebsiteMonkey Dew

        Comment


        • #19
          Trading luxuries... continued

          I'd like to add a clarification too:

          I'm playing mostly builder games, so this will probably not apply that much to the warmongers among you...

          I usually go for all happiness wonders as a priority (Sistine chapel, J.S.Bach...), which give you an overall production boost in the sense that you have less unhappy people and need to play less with entertainers or the luxury slider.

          The AI then only has luxuries and the standard buildings left to fight against unhappiness - not really very effective. In this case, trading luxuries can be a HUGE benefit for them, depending on whether they have built a marketplace in their cities:

          Without a marketplace:
          Each luxury gives you 1 happy face. This means that even in each city without a marketplace, 1 (if any) unhappy citizen will become content, and start producing if there are city tiles left to work on.

          With a marketplace:
          It works like this: (first number is the amount of luxuries you have, the second the amount of happy faces you get for that luxury, and the total happy faces)
          1 => 1 => 1
          2 => 1 => 2
          3 => 2 => 4
          4 => 2 => 6
          5 => 3 => 9
          6 => 3 => 12
          7 => 4 => 16
          ...

          So let's say you're dealing with a civ that has two luxuries in its luxury box (use diplomaxy / spies to find out how many they have), trading them a third will give them 2 more happy faces in every city with a markeptlace, and 1 more in all others.

          That's more than even wonders can do... And it gives a whole new dimension to trade embargoes.

          My point in this was originally that for what the other civ gets, you only get peanuts. And hagling doesn't really take you very far at all.

          (Cort Haus)
          You have a point that the enemy can benefit more than you, so that's a case-by-case decision per civ per trade and not a matter of global policy when playing civ. So your conclusion is mistaken - you might instead conclude that there are occasions when a trade is not worth it.
          I agree - but when I'm willing to trade, I'd like to get a little more out of it. I usually only do it to keep the other civs happy, but it doesn't really make me any richer... at some point, you've just had your fill of world map trades.
          "Give me a soft, green mushroom and I'll rule the world!" - TheArgh
          "No battle plan ever survives contact with the enemy." - Murphy's law
          Anthéa, 5800 pixel wide extravaganza (french)

          Comment


          • #20
            Re: Trading luxuries... continued

            Originally posted by AeonOfTime
            My point in this was originally that for what the other civ gets, you only get peanuts. And hagling doesn't really take you very far at all.
            This need not be true. As I've said before if the AI has the cash, it will pay almost 10 gold per happy face in a 20 turn luxury deal. I know because I've tested it:Partial and pointless formulae: resource cost

            In a city where the happiness is needed, the AI can put entertainers to work at a cost of 2 happy faces per tile (Although an entertainer only produces 1 happy face, they're naturally content whereas another labourer would be born unhappy.)

            So the AI is paying you almost 1 gold per turn per tile .worked where the happiness is needed.

            Generally, unhappy cities will have less improvements often because they are more corrupt. Uncorrupt cities with marketplaces are likely to already be happy.

            Suppose for instance that an AI empire has equal numbers of core and fringe cities, that the core cities have marketplaces and cathedrals and so are not unhappy and fringe cities are all unhappy and have no marketplaces. Suppose they already have 3 luxuries and you can trade them 2.

            For each extra tile worked in a fringe city, the AI is paying you 1 gold per turn for the 2 extra happy faces in the fringe city and 2.5 gpt for 5 unnecessary unhappy faces in the core city.

            If the tile is reasonably good, it will produce 2 food, 2 production and 2 commerce. No more settlers are needed at this stage and if the city gets bigger, there will just need entertainers so the food is almost irrelevant. The fringe city is corrupt and has few improvements. Let's say it's only 25% corrupt, has a library but not a university ( I've already said it doesn't have a marketplace.) and certainly doesn't have a factory. Let's say 50% tax and 50% science.

            Then for each slightly under 3.5 gold you gain, the AI gets 1.5 production, 1.125 beakers and 0.75 gold. If all these were worth 1 gold, then the AI is actually losing out!

            This model is a bit extreme but even in a reasonable situation, you should be able to get more than peanuts. Even if you're only getting a quarter of what they're getting, if there were more than 4 AIs or this civ was less of a competitor than average or even that you could make better use of the gold then it would be worth it.

            Comment


            • #21
              The AIs will be more reluctant to trade luxuries with you depending on the more Marketplaces Banks and Stock Exchanges you have in your cities.. usually I only bother trading luxury for luxury when I'm playing against other human players
              I contend that we are both Atheists. I just believe in one fewer god then you do. When you understand why you dismiss all the other possible gods, you'll understand why I dismiss yours.

              Comment


              • #22
                Re: Re: Trading luxuries... continued

                Originally posted by Nor Me


                I know because I've tested it:Partial and pointless formulae: resource cost
                Thanks, Nor Me - that clarifies thing quite a bit (although it took me some time to get into your writing style ).

                Then for each slightly under 3.5 gold you gain, the AI gets 1.5 production, 1.125 beakers and 0.75 gold. If all these were worth 1 gold, then the AI is actually losing out!
                Oh - then I was way off the mark from what I thought they owed me for what I was willing to give. I guess I'll have to review my trading expectations just a little

                Thanks a lot for the great info!
                "Give me a soft, green mushroom and I'll rule the world!" - TheArgh
                "No battle plan ever survives contact with the enemy." - Murphy's law
                Anthéa, 5800 pixel wide extravaganza (french)

                Comment

                Working...
                X