SGOTM 07 - Smurkz

Actually, VoiceOfUnreason says the opposite: if both reasons are true, you get the "we don't want to start trading" pop-up. So it could be the Hanging Gardens.

Edit: Ack, not thinking straight. The monopoly issue would still have to be true. Very, very interesting!
 
:eek: I just realized it's far worse than that. He of course doesn't count himself and he doesn't count us when doing the comparison. That means he must have 3 (!) contacts that we don't! 2 / 0.3 is still > 6, so he must have 7 contacts excluding us!

Hmm, Asoka is at 20%. We know he knows 2 with Maths, and 2 / 0.2 = 10. So we know he doesn't have 10 contacts apart from us. Not surprising.

Anyone up for a quick scout? :crazyeye:
 
Just to make sure that I'm not seeing phantoms here, please confirm that my reasoning is sound:
Code:
iKnownCount = 0;
iPossibleKnownCount = 0;

for (iI = 0; iI < MAX_CIV_TEAMS; iI++)
{
	if (GET_TEAM((TeamTypes)iI).isAlive())
	{
		if ((iI != getID()) && (iI != eTeam))
		{
			if (isHasMet((TeamTypes)iI))
			{
				if (GET_TEAM((TeamTypes)iI).isHasTech(eTech))
				{
					iKnownCount++;
				}

				iPossibleKnownCount++;
			}
		}
	}
}

iTechTradeKnownPercent = AI_techTradeKnownPercent();

iTechTradeKnownPercent *= max(0, (GC.getHandicapInfo(GET_TEAM(eTeam).getHandicapType()).getTechTradeKnownModifier() + 100));
iTechTradeKnownPercent /= 100;

if ((iPossibleKnownCount > 0) ? (((iKnownCount * 100) / iPossibleKnownCount) < iTechTradeKnownPercent) : (iTechTradeKnownPercent > 0))
{
	return DENIAL_TECH_MONOPOLY;
}
 
And for quick scout, probably not, because this guy will be less prone to wfybta-ing us.
 
Doh looking at the code this is indeed less clear since the inner loop has 2 exclusion conditions. Mmmm I should think before writing I think.
 
Niklas, any chance to get a clearer view of what the GC.getHandicapInfo and GET_TEAM(eTeam).getHandicapType() are all about ?

Right now I do not see a place where there could a distinction between AIs and human player (difficulty level). I may be wrong, but that seems to be the best place.

Where did you get this from by the way ? Any chance I grab these too ?
 
It looks to me that you are reading it right, Niklas.

iPossibleKnownCount counts the number of teams that are alive and that the selected team knows, excluding the team "eTeam".

iKnownCount counts the subset of teams that also have the selected technology.

Assuming that the lines
Code:
iTechTradeKnownPercent = AI_techTradeKnownPercent();

iTechTradeKnownPercent *= max(0, (GC.getHandicapInfo(GET_TEAM(eTeam).getHandicapType()).getTechTradeKnownModifier() + 100));
iTechTradeKnownPercent /= 100;
compute the percentages that are in the spreadsheet (40% for Lizzy and so on), then the calculation is as Niklas suggested, and Capac needs 7 contacts besides us (so 4 we do not have), 2 of which have Maths, in order not to trade the technology to us.
 
eTeam is the team potentially traded to, in this case us. getHandicapType() would return Deity for us, and getTechTradeKnownModifier() would return 0 for Deity. This factor means that AIs are more prone to trading on lower difficulty levels, but on Deity their willingness is decided only by AI_techTradeKnownPercent(), which will return iTechTradeKnownPercent from the XML file, 30 for HC.

Hmm, of course this means that the AIs are more open to trade among each other, since getHandicapType() won't return Deity for any of the AIs, so we can't assume that Lizzy won't trade Alpha away. What is the AI handicap level on Deity anyway?

Anyway, the way I'm reading the loop is that for all teams alive in the game, excluding the AI itself (iI != getID()) and the one potentially being traded to (iI != eTeam), count the number of contacts (isHasMet(iI)) who know the tech (iKnownCount) as well as the total number of contacts (iPossibleKnownCount). That would mean that the fraction is taken between those who know the tech and all contacts excluding the one potentially traded to (us). EDIT: x-post with zyxy.

Please, do grab the files and look! The cpp files can be found in the CvGameCoreDLL folder inside your Civilization IV installation. This particular code is taken from CvTeamAI.cpp, from the definition of function CvTeamAI::AI_techTrade.
 
Btw, a smaller note while I remember it - since HC is out of the freezer we could and IMO should go for OB with him.
 
I'll look in the cpp files later.
Just to be sure, we do have a math issue here. 5 AI are known to us. If we stick with this, that's 4 contacts for all AIs (assuming for now no others).

Capac knows 2 other AIs with Math (Liz, Asoka). Let's assume ("best" case) no other AI (unkown to us has it). Call N the number of contacts Capac has:
we know that 2*100/N < 30 (rounded first). 200/6=33 which would be fine, 200/7=28 which denies us trading.

So Capac has 3 more contacts, none of them with math. If some of them have math, then it becomes tougher to gather.
math knowing AIs (excluding him) -> Capac contacts
2 -> 7
3 -> 11
4 -> 14
5 -> 17 not possible.

Since Asoka is willing to trade he has (same notation):
2 -> 11 would deny us trade so Asoka has 10 contacts or less
3 -> Anything (since that would be 16 contacts, more than doable).

So we know that Capac has at least 3 more contacts. We cannot go further really since if there is another AI with Math Asoka would trade all the time.

Niklas how do you upload images right now ? Made a spreadsheet explaining myself much better :blush:
 
No big deal, zyxy already has the same answer than I do, so no time for demonstration ;)
 
I had to spend the night completing my NotW game, so precious little time was left over for this I'm afraid. Tomorrow I have a bit of work to do, but in the evening I'll be able to give this some time again.

What we need before I continue to play is clearly a decision on Maths vs Poly. Trading for Maths is in some sense the "safe" thing to do, we get the more expensive tech at the cost of a few turns delay on GLib. Trading for Poly would be to roll the dice and hope the chance for Maths comes again, getting the optimal game out of it if it works. I'm torn.

In any case, we would need spreadsheets that detail the situation where we research Poly ourselves, to see how big the difference would be really. It's actually not totally inconceivable that we can get GLib on the same turn anyway, thanks to the higher yield from the chops. It would be hard though, but we need sheets to compare. I've attached the latest version of the sheet, which requires a trade for Poly to work. Please, if you have the time, have a look and see what you can do with the alternative. I'll do what I can tomorrow evening.
 

Attachments

  • CIV startup planner.zip
    24.6 KB · Views: 63
I'll take a look at it tomorrow, but I don't know if I'll beat you to it. It's bedtime now. zzzz
 
Not sure what it says about me that a NYer goes to bed about the same time I do...
 
complicated computing going on, nice to see.
I'd like to trade your Maths knowledge, hmm I know Japanese writing! hahaah:lol:

Agreed on the IW is a must to build power.

How many chopps are we planning for the GR-LIB?

GNE
 
Ok, I think I have a plan where we research Polytheism and still get to the GL on turn 73. It assumes we keep the furs for at least the next two turns and whenever we're at size 8, because it skips revolution to Judaism. If we lose the furs after the next two turns but do get Judaism before size 8, we're ok, we just lose a turn in anarchy. If we lose the furs and don't get Judaism in time, it'll require some major re-working and we lose probably several turns on the GL. But that was always the case.

I need to check it over again when I have some time without distractions, probably a couple of hours.
 
Ok, I have a question: how come if you scroll over Polytheism in the city screen, it says that we have 0 of 143 beakers? We should have some carryover, right? And actually if you look at the research bar, it does already show bright green for part of it. Can anyone explain the discrepancy? I was just trying to double-check that all our assumptions are correct for the current turn.
 
Top Bottom