AIs available gold: how does that work?

BornInCantaloup

Agent of Chaos
Joined
Feb 9, 2010
Messages
2,916
Location
Cantaloupe Island
Here's an odd sequence I ran into, in the Immortal University Bismarck. I played it three times to be sure the result wouldn't change. Any hindsight would be highly appreciated, because I really can't get my head around that.

Here it is:

1- Suryavarman has 440 gold available for trade:
Spoiler :


2- We clear his gold and have him revolt into anarchy:
Spoiler :


3- Suddenly, his gold available for trade is up by a tremendous amount:
Spoiler :


How in the world did that happen? Pretty sure it's not a bug but it certainly is perplexing.
There's no way Sury makes -910gpt at 100% research, which, to me, would explain why that amount wasn't available for trade earlier... Why weren't those 910gold available earlier? What is it that changes when he switches into anarchy?
Were the hidden 910 gold the amount of gold that he had and that he needed to reach his next tech? Only explanation I can come up with.

Thanks in advance. Save is attached.
 

Attachments

AI never shows whole amount of gold they have to trade with. Not sure with the ratio (and don't cite me on it), but very vaguely remember something like 50% being thrown around - and totally not sure if relations influence this

the reason why suddelny 900 gold next turn... dunno maybe fail gold?
 
What happens if you trade him Music for 440g and do not get him to change civics?
 
I'll load your save when i get home and see if i can find any info in debug mode.
 
In Anarchy he probably thinks he needs much less gold for research, and when you start next turn he he might still not have adjusted because you moved first, maybe.
Should be back to normal in 2 turns, Ais def. hold back some reserve gold.
 
Thank you, all :) I sure hope the 900 available gold will last until next turn... Or I just might wait a turn to make the trade (additional tech).
I think we need to bold the name for Tachywaxon to notice.
 
Thank you, all :) I sure hope the 900 available gold will last until next turn... Or I just might wait a turn to make the trade (additional tech).
I think we need to bold the name for Tachywaxon to notice.

Phew, it's a while I haven't played the untouched BTS (in fact Civ4 overall...time is dwindling). Let's take everything step by step.

One thing I recall with ensurance is the AI treasury is never shown entirely to the player for an obvious reason: preserve the AI economy from human abuses.

And the treasury shown is proportional to the AI population. Bigger empires certainly offer better gold margins.

Now, what you asked is something I have seen multiple times (as I made this assertion: anarchy=gold possibilities) but never tried to explain. The AI is such a complex mess. Still, I have a faint hunch towards the theory anarchy triggers financial troubles for the AI (let imagine some GPT towards another nation) and that affect deeply the science slider towards the alternative gold slider and that way it changes gold in bank. It is just like giving some GPT and suddenly the AI refuses to trade them away; that is caused by a change of slider.

Anyways, I bend towards a change of slider to be a reason behind some gold changes.

Pure coincidental I have seen this thread. Already got short of time.
 
Anyways, I bend towards a change of slider to be a reason behind some gold changes.

As in... during Anarchy, the AI's science slider drops to 0, its deficit drops extra low as well (or even it starts gaining gold due the resources it sells) and most of its gold becomes available.

Thanks, that already clears a lot of things. That mechanic is, to say the least, open for abuse :rolleyes:


@Kossin: alright, so that leaves Sury with 80 gold hidden. I guess those 1430 gold have been the prime cause for my surprise. Huge amounts ensuing.
 
Wow this is very new to me, I think I might have to start abusing forced anarchy for massive gold gains. Good find BiC.
 
I love how TMIT was somewhat shunned as a cheater for his reintroduction of "gold fleecing," for gpt, but now everyone here seems excited at this prospect!
 
I think there's a difference between being interesting in learning how the AI works and then choosing whether or not to abuse that knowledge.
 
I love how TMIT was somewhat shunned as a cheater for his reintroduction of "gold fleecing," for gpt, but now everyone here seems excited at this prospect!

If I recall he later posted in that same thread after actual testing that it was not all that effective.
 
Wow this is very new to me, I think I might have to start abusing forced anarchy for massive gold gains. Good find BiC.

This might work if you've got a bunch of throwaway EP points. In this case it looks like all that extra gold wasn't worth more than the tech it cost to trade for the civic switch.
 
Does this happen when the ai goes into revolt voluntarily? because i havnt noticed, and i frequently check the trade screen. It seems like this is a screwy thing that happens only when you force them to, otherwise it would be much more noticable.. I often check for fail gold on wonders etc and i imagine this is some sort of bug or something :P
 
Wandering into uncomfortable territory here, so please bear with it :p

I'm guessing this is governed by AI_maxGoldTrade right? If so could this be the reason
iResearchBuffer = -calculateGoldRate() * 12;
It looks like its suggesting a buffer for 12 turns of research.
iMaxGold = std::min(iMaxGold, getGold() - iResearchBuffer);
And this would explain the gold availble for trade in anarchy as the costs/turn will fall to negligable levels.

Fortunately this seems to work for BICs game at least.
Initially Sury is willing to trade 440 of his 1430 gold with a 82 gold defecit. 1430-12*82=446
and after removing the gold he was willing to trade and putting him into anarchy he has 990 gold and 6gpt costs, 990-6*12=918.
I don't know what happens to the 6 and 8, but I have a feeling its rounded down. Also giving him GPT does make him willing to give more gold up to all of it if you cancel his defecit.

Theres potential for abuse on the last point too, as giving entering a 1GPT deal frees up 12 (rounded down) gold for immediate trade..... :backstab:
Honestly never exected it to be so simple :confused:
 
Good job. You got the exact explanation. I made another example out of just trading Music for a pure anarchy and he was willing to trade 1350 gold. Following your reasoning, [1430-6*12]=[1358]=1350.

I'm impressed. You are dubbed Sir Code Diver Ghpstage. You did the effort I did not purvey.

 
Back
Top Bottom