We don't want to start trading this technology just yet

Yamps

Deity
Joined
Aug 30, 2007
Messages
2,731
Location
Zagreb, Croatia
Hi!

I have a question about a well known AI deny. I'm very interested in the exact game mechanics, so I'm hoping for a good soul *cough* read c++ *cough* to help with this. :D

Anyway, AFAIK that's related to the ItechTradeKnownPercent in the XML and the percentage of civs knowing the tech in question. However, I'm constantly experiencing strange AI behavior regarding this, with AI trading sometimes when I don't expect them and not doing it while I think they should. The numbers don't always add up. I'd like to predict when they will start trading based on the number of civs knowing the tech...

I would greatly appreciate an answer on this, thanks in advance! :)
 
number of civs they know that know the tech. Also some techs like alpha and monarchy the AI can trade away even when they normally wouldn't
 
Thanks! I know about Friendly. I didn't know about Alphabet and Monarchy but I could swear I've seen some other peculiarities. I'll check to see if I still have the saves.

How are the contacts exactly counted? There was a nice text in SGOTM 7 Smurkz thread for Vanilla. IIRC, they don't count themselves and you, they count everybody else they know.
 
It seems to vary from leader to leader though: e.g. Mansa Munsa will trade anything with anybody at anytime while Tokugawa is the opposite. I've lost partly because of being on a continent with civs who were never willing to trade anything (which made me a fan of quasi-EE) while the other continent had leaders like mansa munsa and catherine (who both tech well and trade often).

Surely somebody has figured out the values for the leaders?
 
Great, I have a nice savegame if somebody is interested. :) So, I'm on a continent with Izzy, Zara and Sal. They are all Pleased at me, Buddhist love fest. They all have Construction but only Zara is willing to trade it to me. Izzy and Sal are giving the "We don't want to trade just yet" deny. Is that a special tech too, what am I missing here?

Since I abandoned that game when Izzy reached Liberalism, I've just opened world builder. They don't have the contact with other continent.

Btw, this was an attempt to play random deity. Not there just yet...Didn't mange to get the GP farm online fast enough, maybe next time...:D

@Tephros

That's what ItechTradeKnownPercent is for, Mansa has that number set to 0.
 

Attachments

  • trade_me_please.CivBeyondSwordSave
    186.2 KB · Views: 209
The values of the different leaders are in the xml...

No idea on why they won't trade, maybe there are extra stingy techs just as there are extra nice techs?
 
Hi!

I have a question about a well known AI deny. I'm very interested in the exact game mechanics, so I'm hoping for a good soul *cough* read c++ *cough* to help with this. :D

Anyway, AFAIK that's related to the ItechTradeKnownPercent in the XML and the percentage of civs knowing the tech in question. However, I'm constantly experiencing strange AI behavior regarding this, with AI trading sometimes when I don't expect them and not doing it while I think they should. The numbers don't always add up. I'd like to predict when they will start trading based on the number of civs knowing the tech...

I would greatly appreciate an answer on this, thanks in advance! :)
They're also less likely to trade away a tech that unlocks a wonder they're working on.
 
There are some techs the AI refuses to trade for some time. I think it is partly coded in, but those techs include, but are not limited to:

Construction
Corporation
Education
Metal Casting (especially if it was picked off the Oracle!)

Also, I think Monotheism is one of those rare techs that the AI trades to me if in isolationg (Tokugawa traded that to me once along with Alphabet recently).
 
I'm pretty sure I've had instances where Friendly AI's would refuse to trade non-Space techs. I'm not sure whether they were wonder techs unfortunately. AI's refusing to trade techs if they are trying to build important wonders makes sense, but then again they should still be open to trade - if they are fighting a war and I'm willing to trade Rifling to them they should just give up on that stinking wonder if I'm offering enough. Btw I play BTS 3.17 and recently with BUG Mod as well.
 
@DarkFyre99

There's no wonder associated to Construction. That would be the "we have our reasons deny". Although if possible, the "we don't want to trade... just yet" would take precedence according to the wfybta article.

@DMOC

Thanks! This was the main reason for me to start this thread, there are too many loose ends regarding this, at least for my taste. :)

@dankok8

Yes, they are giving the "we have our reasons" on Friendly but not "we don't want to trade... just yet".
 
Just a quick answer due to limited time right now ( the code is in CvTeamAI::AI_techTrade() ):
The AI will deny with WDWTST... if they are < Friendly AND "KnownPercent" < "ModifiedTechTradeKnownPercent".

KnownPercent (KP): percentage of met other players (not them and not you) who know the tech.
In your game this is 100% for Construction since all 3 (Izzy, Sal & Zara) know it.

ModifiedTechTradeKnownPercent (MTKP):
That is the leader's TKP from the xml, decreased for difficulties < Noble and modified for the leader's TechMonopolyValue (TMV) of that specific tech.
This is where all the pecularities come from, the code (incl. 2 minor bugs) is in CvTeamAI::AI_getTechMonopolyValue(). Techs that unlock powerful units (>50% of strength of best land unit currently in the game, effect increased if AI is in WHEOOHRN; Optics is pushed if circumnavigation is still available; ...) buildings and available wonders/projects get high TechMonopolyValue-modifiers.

Your Construction example:

TKP


TMV for Construction (no-one in WHEOOHRN):

Start -> TMV = 0

Units - enables War Elephants (+113) , Cats (+63)
TMV = 176
Buildings/Wonders - enables Colosseum, Odeon, Garden, Ball Court (unlike the procedure for units ALL UBs of other civs are also factored in here :crazyeye: (bug1?))
+ 30 for each -> TMV = 296 {available wonders would get an additional +50}
Projects - nada {world projects +100, others +50}


MTKP = TKP * 296/100

Only Zara's TKP = 30 will keep the MTKP < 100, Sal and Izzy give you WDWTST...

bug2? WHEOOHRN is checked with getAnyWarPlanCount(eTeam), your team ID is passed as an argument instead of the bool to ignore minor civs :crazyeye:
As long as there is no minor civ in the game this will have no effect, otherwise the human is at a disadvantage since all AIs will be in "WHEOOHRN against the minors".
 
So tkp should actually have been 206 right? This means lizzy will never trade construction, while sal actually should have traded it? How did you get the values for the different units?

Also why doesn't fraxisis pay you to fix all these bugs?
 
Ah, the Guru!:thanx:

Minor nations, those are barb cities right? So, they are less willing to trade techs when there are barbs to knock out.

Well, I guess that predicting AI trading behavior won't be that easy...At least they are not counting Ballista elephants. Not to mention the Amphibious ones. ;)
 
No not barbs. Minor nations are just in some scenarios(and tmit created maps :p).
 
What you're saying, basically, is that AIs won't usually trade Construction because of both the powerful units (176/296 = 60%) and the numerous UBs (120/296 = a whopping 40%) it unlocks.

I always wondered myself why they would'nt trade Construction when they seem happy to trade, say, Machinery, Military Tradition or Civil Service. Now I know :D
 
So tkp should actually have been 206 right?
That's what makes the most sense for me and would be consistent with the way units are handled (UUs of other civs are definitely ignored).
oyzar said:
How did you get the values for the different units?

The game checks whether the respective unit is at least half as strong as the strongest land unit (SLU) that has been built yet. In the save the strongest land units present are the Horse Archer and the Swordsman (both strength 6). The combat ratio (CR) is calculated. For the War Elephant this is CR = 8/6*100% = 133% (that's more than half ;) ). The TMV will be increased by this CR minus 40%, 133-40 = 93 (doubled for WHEOOHRN) and an additional +20 (+50 for WHEOOHRN) for the War Elephant's default unit AI UNITAI_ATTACK.

Catapult:
CR: 5/6*100 = 83; 83-40 = 43;
UNITAI_COLLATERAL: +20;
TMV += 63;

I checked these numbers with my debug dll and furthermore tested it by WB-giving me an Artillery which of course instantly becomes the strongest land unit (strength 18). CR will now be < 50% for the Cat and the jumbo so that these units will not alter the TMV --> everybody is willing to trade construction.
 
:lol: So, the moral of the story is: If you like to get some trading done, use the artillery. :D
 
Top Bottom