Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Miscellaneous > Archive > Civ3-General-Archive > AI - human trade revisited
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
theNiceOne is offline theNiceOne
Warlord

Dec 2002
time: 06:25
  Old Post 20-01-2003 01:57
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
AI - human trade revisited Support Apolyton, buy Alpha Centauri

Hi. This is a rewritten version of the post in the AI - human trade revealed thread, as it turned out that my first version didn't cover the whole thruth. It wasn't wrong, but I had found only one of the three aspects that affected the AI-human trade bonus. Many thanks to Nor Me for pushing me in the right direction.

(Disclaimer: This is found using the 1.29 patch, but my guess is that nothing is changed for PTW.)

First, the AI-AI trade bonus that can be found in the editor does not affect AI-human trade in any way. The AI will demand, or accept the same price in a trade regardless of whether the AI-AI bonus is 110 or 200.

Second, there is a formerly unknown (at least to me) AI-human difficulty related trade bonus, which AFAIK is not found in the editor, but is hardcoded.

This AI-human trade bonus is dependant on three factors. Those are:
1) Diffiulty setting
2) AI aggression level (as found in the editor). Hereafter called AL.
3) The AI's attitude towards you. Hereafter called AA.

On chieftan, the AI-human trade bonus is 0%. So the AI is willing to pay exactly as much as it would demand for a goods. As an example: If you both ha he same number of cities and no marketplaces, the AI will agree to trade luxury for luxury. On chieftan, 2) and 3) does not matter at all.


On warlord, the same is true, if the AI's aggression level (AL) is 1 or 2. On AL 3, 4 and 5 the AI-human trade bonus is 1%, 2% and 3% respectively.

This means that if an AI with AL3 would demand 100 gold on chieftan, it will demand 101 gold on warlord. An AI with AL4 will demand 102 gold.
Note that at the first AL where the bonus kicks in, it is 1%, and then increases with 1% for each AL (this is the start of a pattern).

On regent, the bonus kicks in earlier, on A=2, and it starts with a bonus not of 1%, but with 2%, and it increases with 2% for each AL. So A=3 means bonus = 4%, AL4 means bonus = 6% and A=5 means bonus=8%.

On monarch, the bonus still kicks in on AL2, but now it starts with (did you guess it?) 3%. And AL3 means bonus=6%, AL4:bonus=9% and AL5:bonus=12%

On emperor, the bonus kicks in already at AL1, and then with 4% and increases with 4% for each AL increase, for a total of 16% on AL4. BUT it does not increase again for AL5 where 20% was expected, but stops on 16%.
So on emperor, for a luxury worth 100 gold the human must pay 112 to an AI with AL3 and 116 to an AI with AL4 or 5.

On deity, the story is exactly the same as on emperor, except that the bonus starts on 5% and increases with 5% for each AL (but alse here with no increase from AL4 to AL5).
So the most you have to pay for the value 100 luxury is 120 gold on deity if the AI has AL4 or AL5.


Then there is the third factor, the AI's attitude towards you. All I've written above is correct if the AI's attitude is below polite, but if it is polite or gracious, the AI-human trade bonus may be reduced by 1 or 2 %.

The rule is this: If the AI-human trade bonus is 8% or higher, it may be reduced once, by 1%. If the bonus is 15% or higher, it may be reduced twice, each time by 1%.

So on deity, if the AI is very gracious, the following will happen, dependant on AL:
AL1: 5% - no change.
AL2: reduced from 10% to 9%
AL3: reduced from 15% to 13%
AL4/AL5: reduced from 20% to 18%

Unfortunately, the two attitude thresholds where the bonus is reduced by 1% is not the same as when the AI goes from cautious to polite and polite to gracious, but a bit higher. I.e., an AL5 AI that is just polite (but close to cautious) will not give you a better deal, but if polite and almost gracious it will reduce the bonus by 1%. It will still only reduce it by 1% after just having passed into gracious, but if it gets pleased just a bit more to get even more gracious, it will reduce the bonus by another 1%.
The two attitude threshold isn't necessary the same for different AL/difficulty settings: If two civs are equally polite, but with different AL, the one with highest AL (and thus highest bonus) may reduce the bonus with 1% while the other need to be gracious to reduce it at all.

To sum this up, I'll make a table showing the possible AI-human trade bonuses:


-----AL1-----AL2-------AL3--------AL4--------AL5

Ch. 0-0-0---0-0-0----0--0--0----0--0--0----0--0--0

Wl. 0-0-0---0-0-0----1--1--1----2--2--2----3--3--3

Rg. 0-0-0---2-2-2----4--4--4----6--6--6----8--7--7

Mn. 0-0-0---3-3-3----6--6--6----9--8--8---12-11-11

Em. 4-4-4---8-8-8---12-11-11---16-15-14---16-15-14

Dt. 5-5-5--10-9-9---15-14-13---20-19-18---20-19-18

The three columns for each AL is for the three attitude levels.

Note that the biggest gap by far is between monarch and emperor.

Two examples: You want to buy a resource that is worth 100 gold on chieftan. If you play on Monarch vs a civ with AL4 that is cautious, you must pay 109 gold. If the civs becomes gracious, it will reduce its demand to 108 gold.
If playing on deity vs a civ with AL3, you must pay 115 gold, but by getting it gracious enough, you get the cost down to 113.

Note that no AI will demand more if falling below catious. An annoyed AI will still not demand more.


If you are selling the goods, then you can divide by 1+the bonus.
Ex: You're selling a luxury worth 100 gold to a catious civ, AL4 on monarch. It will pay 100/1.09 = 92 gold.



With techs, things gets a bit more convoluted. First, take a simple tech like currency. The base trade price is dependant on the human player's research cost, and then modified by the above-mentioned AI-human trade bonus.

(The base trade price is also dependant on number of known civs and number of civs that already has the tech, but this isn't affected by difficulty settings and can therefore be ignored in this article).

I.e. if the human player's research cost (modified by civs having the tech) is 1000 on chieftan, then an AI with AL3 will demand 1040 for the tech on regent, but it will demand more than 1060 on monarch - it will actually demand 1177 for the tech. The reason for this is that on monarch and higher, the human player's research cost is divided by the AI's cost factor (as found in the editor) which is: Monarch 0.9, emperor 0.8, deity 0.6.

So, to find the price the AI will demand, take the base (1000), divide by the cost factor (if this is below 1) and add the AI-human trade bonus. So on deity (AL3), the AI will demand 1000 / 0.6 * 1.15 = 1917 gold. Quite a sum and quite a handicap for the human.

But the table turns a bit if you're doing the selling. The AI will still pay 1000 on chieftan, 992 on warlord and 962 on regent, but on monarch it will actually begin to pay you higher prices again. The formula is: base / cost factor (if below 1) / AI-human trade bonus. On the three higher difficulties (still AL3), this becomes:
Monarch: 1000 / 0.9 / 1.06 = 1049
Emperor: 1000/ 0.8 / 1.12 = 1116
Deity: 1000/ 0.6 / 1.15 = 1450

What this effectively means is that if you manage to get a tech lead on the higher settings, then you actually get an additional bonus. Now the AI will pay more for the tech than it will cost it to reserach it by itself. This really gives a merit to the tactic of selling a tech for gross amounts of gpt so that the AI cannot keep up the research rate. Not only do you get the money instead of the bank, but the AI pays you more. :goodjob:


The above formulas are mostly correct, but when a tech gives access to some other benefits, like a wonder, the formula must be slightly modified. The trade price for tech Monarchy consists of three parts: The reseach cost, the government bonus and the wonder bonus. It turns out that the government bonus is handled as described above, but the wonder bonus is not. When calculating the cost, the wonder bonus is added after having divided by the cost factor. So the formula for buying from the AI on deity (AL3) becomes:
[(value for research and government) / 0.6 + (wonder value)] / 1.15

This doesn't affect the formula much, as the wonder value is very low compared to the other values. As a real world example, a game with only one AI at AL3, the AI will demand the following for monarchy:
Chieftan: 694 (if wonder can be built)/684 (if wonder is already built)
Warlord: 700/690
Regent: 721/711
Monarch: 815/803
Emperor: 968/956
Deity: 1321/1308

After having found out all this I was satisfied, so I didn't bother to check whether the added cost for new resources and new units is divided by the cost factor (like government cost) or not (like wonder cost). It doesn't make much difference though.

Note that in the actual game there is no floating point math, but all numbers are truncated after each math operation, so the actual number may vary from the calculated with a gold or three. Nothing sigificant though.

Final remarks: I've done at least hundred loads of a (each time) slighly modified scenario to find this out. What I also concluded was that the following factors does not affect the trade cost at all:
*Relative culture
*Relative military strength
*Culture group
*Favourite/shunned government
So an AI with much higher culture, much higher military strength that belongs to a differet culture group and shuns your government will not demand more gold than a the total opposite.

Nor Me is offline Nor Me
Prince

Oct 2002
time: 05:25
  Old Post 20-01-2003 02:57
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Help yourself to an AD-FREE life

Impressive. Now, that's more interesting.
It's good to know I was right in thinking that the aggression level was much more important than attitude. The unimportance of attitude was the thing that everyone seemed to argue with me about. Now I can quote 2%.

On a side note, I cannot get reasonable results out of an AI-AI trade test. The Iroquois appeared to keep on selling the French aluminium for 1 gold. I don't think the AI is supposed to have an over 8000 times advantage on regent. A different formula may be used. (Yes, I tried giving the Iroquois a stack of MAs.)

EDIT: removed edit

Last edited by Nor Me on 28-01-2003 at 20:08

vmxa1 is offline vmxa1
Deity
Oviedo, Fl
Nov 2001
time: 21:25
  Old Post 20-01-2003 04:21
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

First congrats on the hard work. Second it is purely academic to me as two of the three factors are not changable after the game starts, so there is nothing I can do with that info.
The thrid is sort of out of my control at the point of the trade talks. I mean I have either tried to keep a good relations or not and I either succeeded or not. I am not going to be able to do much differently, with out a complete style change.
So I do not really care about the why and where fores of the trade, only what is on the table.

Hurricane is offline Hurricane
Warlord
Arctic Hill
May 2001
time: 07:25
  Old Post 20-01-2003 11:50
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Good info about the attitude. I have also for a long time suspected that it has almost no effect on trade, since even civs that are furious at you happily will trade everything. I also suspected that AL might have something to do with it, since India and other peaceful civs always seem to offer the best deals.

theNiceOne is offline theNiceOne
Warlord

Dec 2002
time: 06:25
  Old Post 20-01-2003 13:12
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Browse Apolyton AD-FREE

vmxa1: I agree that this information is mostly academic, as it's not much to do about it in-game. It may make a difference to know that when you're going to sell a tech, you should start selling it to the most peaceful civs first, when the base value is highest. Similarily, buy things from the most peaceful civs if you have a choise. You don't have the choise too often though.

Hurricane is offline Hurricane
Warlord
Arctic Hill
May 2001
time: 07:25
  Old Post 20-01-2003 15:08
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Got spare money?

Also good to note is that there is nothing random about trade costs. Thus, a deal won't get better (or worse) just because you battle a little and change the PRNG.

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:25.
Apolyton Time is 00:25.
    top of page
Rate This Thread:
archivepost
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0376 seconds (76.63% PHP - 23.37% MySQL) with 31 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net