Announcement

Collapse
No announcement yet.

The value of trade routes

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

  • The value of trade routes

    I have not seen any posts here about how the value of trade routes is calculated, so I decided to do some research myself. My conclusions so far contain too many special cases for them to be the final rule, but they are a good guideline and a starting point for discussion. Hopefully others can add their own observations and we can get closer to a complete understanding.

    So, my observations:
    • The minimum value of a domestic trade route is 1, the maximum is 2.
    • The minimum value of a foreign trade route is 2. There is no (meaningful, at least) upper limit.
    • If you have a harbor, the value of a foreign trade route is half the size of the foreign trading partner city, rounded down, provided your own city is at least size 15.
    • If your city is smaller than size 15, the value is half the size of the foreign city, rounded down, minus one.
    • There may be additional bonuses if cities are very large. In my limited selection of savegames to study, I have one size 25 city trading with several other size 20+ cities, and all its trade routes are half the size of the foreign city plus two. More data points are needed.
    • Occasionally, a few trade routes (less than 10%, I would say) are worth one point less. I have only seen this happen in cities at exactly size 15.
    • If you don't have a harbor, the value of a foreign trade route is approximately one third of the size of the foreign city. This would be consistent with the Harbor tooltip saying that it increases trade route yield by 50%.
    • The facilities (harbor or not) of the foreign city do not matter, nor does it matter if it is inland or coastal.
    • Other facilities in your own city do not appear to have any effect. Airports give you an extra route, but do not change the values.
    • If distance is a factor at all, it is a very minor one, possibly reducing the value of very short trade routes.
    • Trade is a one-way thing. It does not matter if your trading partner is running Mercantilism, as long as you have open borders. It also does not matter (to you) if he does not yet have the tech to open trade routes with you across ocean, as long as you have it. Conversely, although resource trades can be initiated with someone overseas if they have Astronomy and you do not, you will not get any trade routes with them before you have Astronomy yourself.
    • In general, your largest city trades with the largest foreign cities, and so on down the list. I have only seen major deviations from this in one single game, but there it is significant, with some size 20-21 foreign cities trading with one of my backwater size 8 cities.
    • It seems that any city with a harbor trades before any city without a harbor, regardless of size. But I have too little data to say for sure.
    • It is not entirely clear what is used as a tiebreaker when several cities are the same size. It is not based on other commerce generated.

  • #2
    Looks good, nicely complements what DeepO and I did quite a while back. (can't be bothered digging up the link, something about unappreciated harbors)

    * The minimum value of a domestic trade route is 1, the maximum is 2.
    I've seen 3, with an improbably large capital.

    It seems that any city with a harbor trades before any city without a harbor, regardless of size. But I have too little data to say for sure.
    This isn't the case. See below.

    It is not entirely clear what is used as a tiebreaker when several cities are the same size. It is not based on other commerce generated.
    This may not be exactly right, but it's very close to how it works:
    Trade preference is determined by city population, if a city has a harbor, double the population. Rank the cities by that (modified) population, the biggest cities get assigned the best trade routes.
    Ties are decided by age, oldest cities first. I MAY be wrong on this one, but I do know for sure the capital is favored, I speculate that's because it's the oldest city, but it may be the capital status. (note: I've only ever moved my capital once, making it safe to assume I'm saying the original capital - the founding city)

    The harbor doubling population effect is pretty large - that's why you could be led to believe that harbor cities are always prefered. But on an Oasis/Great Plain map or something it's possible to have like a size 18 landlocked capital and only one size 9 coastal city, the capital will take precedence until the coastal city grows to size 10.

    edit: And you're right that no real work has been done on determining the value of trade routes. I've done quite a lot of observation on the trade-ranking though, especially on how harbors rearrange trade routes.

    edit2: More on the age-bias thing. At a bunch of other places the oldest cities take precedence, for example when chopping a tile equidistance between two cities, it goes to the oldest city. I imagine they did this to make it deterministic in a somewhat logical way; I’d be extremely surprised if trade ranking doesn’t use the same principle.
    Last edited by Blake; February 12, 2006, 22:39.

    Comment


    • #3
      This is a useful analysis, but it doesn't quite work. In the attached save, there are routes from Cumae to three size 12 cities giving different trade values - 6, 5 and 5. Also two size 13 cities are ignored (Memphis and Heliopolis). These two cities are both inland and on the same continent - could that be significant?

      I tried a small scale experiment a while back and concluded that without harbours, there was an increase in the size of a trade route when the foreign city was size 10.

      RJM at Sleeper's
      Attached Files
      Fill me with the old familiar juice

      Comment


      • #4
        I think there is some kind of distance factor, like on Terra maps my new world colonies often have higher yield trade routes. It usually seems to be a matter of + 1-2.

        Comment


        • #5
          I've seen 3, with an improbably large capital.
          You are right. I even had that in one of my studied games, but had overlooked it.

          To make up for my sins, I decided to look into when it happens. A size 9 city with harbor gets +3 from a size 18 city, provided it is more than about 18 squares away (19 was OK, 17 was not; these values are for a Large Continents map and may scale with map size). A size 13 city gets it from at least size 17 and 16 as well; possibly lower, but I had too many size 16-17 cities to find out. A size 7 city gets +3 from a size 20. However, it is not a simple population sum = 27 thing; 11+16 does not work, for example.


          Trade preference is determined by city population, if a city has a harbor, double the population. Rank the cities by that (modified) population, the biggest cities get assigned the best trade routes.

          This seems to be close, but not exact. I have a game where a size 8 city with harbor gets preference over its neighboring size 17 inland city (and a size 16 inland and a size 15 coastal city without harbor), but not over my size 18 capital. Further studies are needed.


          Ties are decided by age, oldest cities first.

          This seems correct, although what actually matters is the time you first (or last? I rarely lose then regain cities with significant delays) controlled the city, not the founding date. Enemy capitals do not take priority over your own early cities. In other words, it follows the same order as the F1 city list if it is sorted by population, but with the effect of harbors also taken into account.

          Comment


          • #6
            Originally posted by rjmatsleepers
            In the attached save, there are routes from Cumae to three size 12 cities giving different trade values - 6, 5 and 5. Also two size 13 cities are ignored (Memphis and Heliopolis). These two cities are both inland and on the same continent - could that be significant?
            Actually, it is trading with two size 12 cities and one size 10, and getting 5, 4 and 4. The only value that deviates is the +4 from Thebes, but it is only 7 squares away from Cumae. Heliopolis is actually ignored by all your cities, in spite of being the largest available trading partner, but it is only 4, 6 and 7 squares away from them.

            However, it is not impossible to trade with it. If you cancel the open borders with Mali, so you only have the Egyptians as trading partners, Rome starts trading with Heliopolis at +3. (Size 13, distance 7. Memphis at size 13, distance 10 is +4.) Previously it preferred to trade with the more distant Malinese cities of Djenne and Kumbi Saleh, though these also give only +3.

            So there is a distance factor involved, but it seems to be pretty small. I suspect the actual algorithm goes something like this:

            1. Rank your own cities, according to size, harbor presence and age.
            2. Rank the trading partners by trade value (not size!), individually for each city, taking into account size, harbor presence (in your own city) and distance (very short routes are worth less).
            3. Take the highest value trade routes. Ties are broken in probably one of two ways:
            4a. By distance, selecting the most distant city. This might give other cities in your empire a chance to trade with a city without a distance penalty, and thus increase total commerce. It might also account for the rare cases where two cities in your empire both have some trade routes at +6 and some at +5.
            4b. Perhaps more consistently, by the age of the foreign city. In this particular game, I am not sure if Heliopolis (Egypt's third city, I think) is younger than Kumbi Saleh (Mali's third). If it is older, this alternative is ruled out.
            5. Go back to 2. for the next ranked city.

            Blake, if you have some examples of a distance bonus to international routes (rather than a penalty) please attach them here.

            Comment


            • #7
              Originally posted by Tau Ceti

              Actually, it is trading with two size 12 cities and one size 10, and getting 5, 4 and 4. The only value that deviates is the +4 from Thebes, but it is only 7 squares away from Cumae. Heliopolis is actually ignored by all your cities, in spite of being the largest available trading partner, but it is only 4, 6 and 7 squares away from them.
              Whoops - sorry! The 6, 5 and 5 were before I ended the open borders agreement with Frederick in order to look at the changes.

              So it looks as if there is a short distance penalty of -1 which applies somewhere between 7 and 10.

              Your algorithm looks plausible. If the game has to check every possible trading route for all of your cities every turn, that's a lot of calculations. If there are many more algorithms like that one, I'm not surprised that the game slows down at the end.

              RJM at Sleeper's
              Fill me with the old familiar juice

              Comment


              • #8
                Re: distance

                If you get the circumnavigation bonus, does this affect trade? If so, how?
                Dom 8-)

                Comment


                • #9
                  Great work! I'm often left wondering whether to build them or not, but I play mostly Pangea maps, where there's less water. As expansive, I build them. Here's a link to the DeepO thread.

                  Comment


                  • #10
                    I've gotten 5 on a domestic trade route, land map. Both cities were 20+ pop.
                    Fight chicken abortion! Boycott eggs!

                    Comment


                    • #11
                      Yeah, I've also seen 4's and 5's on huge cities.

                      Comment


                      • #12
                        I wonder if they're more of a mid game building. For a long time I seem to have only +1 trade routes, but by late game they're +5 in the larger cities. So, maybe it's something to build in the mid game, when they're about +2 or more? Depending on if you're expansive and maybe some other factors, such as becoming very large by comparison to the AI, such as in a domination game. I'm always torn between building improvements and building military, so at some point you have to stop making buildings and pump out units.

                        Also, many times mercantilism is being run by everyone, so doesn't this shut down foreign trade, making trade routes cap at +2, since they're local?

                        Comment


                        • #13
                          Originally posted by Shaka II
                          I wonder if they're more of a mid game building. For a long time I seem to have only +1 trade routes, but by late game they're +5 in the larger cities. So, maybe it's something to build in the mid game, when they're about +2 or more? Depending on if you're expansive and maybe some other factors, such as becoming very large by comparison to the AI, such as in a domination game. I'm always torn between building improvements and building military, so at some point you have to stop making buildings and pump out units.

                          Also, many times mercantilism is being run by everyone, so doesn't this shut down foreign trade, making trade routes cap at +2, since they're local?
                          It does not hurt you if merc is being run by everyone else, you can still trade with them, they just can't trade with you.

                          Comment


                          • #14
                            Has anyone done any work recently on the impact of distance on trade routes?

                            RJM
                            Fill me with the old familiar juice

                            Comment


                            • #15
                              There is a thread in Strategy Articles over at CivFanatics which has an attempt at a formula. I have never got correct results with it (it is usually off by 1, in my experience), but it is not so far off. According to that, the value of a city is the smaller of its size and distance. This value is then modified by a number of factors to reach the final trade route value.

                              Comment

                              Working...
                              X