is Morocco's UA a joke?

Status
Not open for further replies.
I came to the same conclusion as many of you. Morocco's UA is pathetic, I'd take +1 sight from America any day. Morocco's UU is lackluster, and you can easily skip building the kasbah. Morocco's only real advantage is their desert start bias but they lack any faith bonus so getting desert folklore is more about rolling the dice than anything else. I'd take Ethiopia over Morocco any day.
 
I came to the same conclusion as many of you. Morocco's UA is pathetic, I'd take +1 sight from America any day. Morocco's UU is lackluster, and you can easily skip building the kasbah. Morocco's only real advantage is their desert start bias but they lack any faith bonus so getting desert folklore is more about rolling the dice than anything else. I'd take Ethiopia over Morocco any day.

Morocco doesn't have a desert start bias. I just started a game this morning with a complete jungle start. Literally not a single production tile until the third ring, which was a forest tile. Horrible.

Combining Rationalism + Commerce (yet another one people deride endlessly) makes a Moroccan trade empire possible. Yes, if you start with only a couple civs nearby, it's not going to be as good. Many UA's are situational, I don't consider that a mark against it.

I guess there's no point in trying to convince you guys that you've got it all wrong concerning Morocco- it's your loss. I'm just glad I didn't read too much of all the negative reviews before trying it out for myself.
 
The benefit on trade routes out is underwhelming, but the raw number of trade partners you get if you get a rich centralized city established is pretty sexy. I've only played one game with them, to be fair, and I found the same thing about the out trade routes to be true. But in that game I played with them @turn100 40% of my science was from the trickle in from trade routes, because so many people established trade networks. A key hidden bonus is it helps on diplomacy more than even Venice's trade, since many neighbors will wants to keep their strong routes with you and go conquering in another direction instead.
 
i.e., for a given player, check whether the change in gold income from losing trade with that player (iCurrentTradeValue, defined in an earlier section of the code, and modified by various context-dependent modifiers related to AI personality and relationship status) will result in gpt income falling below 0, when it was previously equal to or above 0 (iGPT>=0). If so, the code then adds a penalty that increases the chance of declaring war.

I specify this in detail here, because the original thread Aristos posted goes into some detail discussing the explanatory note the designers added, but not the actual code section itself which says the same thing.

First, thank you for proving that you were indeed drawing conclusions while understanding the code upside down.

Second, you are distorting the facts about what I go into detail in the other thread. Anyone that visits those postings can see that, so I do not understand how you can say something like that without blushing. I go into as much detail as I can to share what I saw in the code, explaining how the vector works, and many other details, and only citing the comment a few times, more like an anecdote.

Why are you misinforming?


Some examples of the posted information in the other thread (please accept my apologies for quoting myself, I hate to quote myself, but I hate misinformation even more...) :

viApproachWeights[] is a vector of weights defining how each AI will "approach" any other player... whatever is inside the brackets is the index of the vector, and there is an index for each of the possible approaches (WAR, HOSTILE, FRIENDLY, DECEPTIVE, etc). The diplomacy code is truly complex, and takes into account many different factors (and even more now with all the new systems). In the case of the piece of code being analyzed, MAJOR_CIV_APPROACH_WAR is the index that points to the "cell" of the vector that holds the weight of the "WAR" decision (approach); each of these weights is modified by many actions/situations/history/treaties/etcetcetc, and the modification is stored in the corresponding cell.

So, in this case, whenever the GPT of the AI is positive, and the GPT without the trade routes to that target is negative, then the weight for the approach WAR is reduced by that amount (summed but is a negative value according to the IF condition). In simple numbers, say the GPT of the AI is 100, and the total gold of the trade routes to/from the target is 120, then the weight for the WAR decision will be reduced by 20.

Later on, the vector gets sorted by highest weight, so that the highest weight at the end of the calculations is chosen. If the highest weight corresponds to the index MAJOR_CIV_APPROACH_WAR, then WAR is the decision. More or less, that is how it works.


EDIT: all that has been extracted and affects this calculations can be seen/edited inside the file GlobalDiplomacyAIDefines.xml. To analyze the specific war decision, every variable that starts with APPROACH_WAR is related in some way to the algorithms that modify the weight of index MAJOR_CIV_WAR_APPROACH. The file is located in


...\Steam\steamapps\common\Sid Meier's Civilization V\Assets\DLC\Expansion2\Gameplay\XML\AI


OK, here is something for all you warmongers that want to burn the world in 3000 BC... :)

I may have found a way for you to try to get some more wars without touching the dll code. If my understanding is correct, and I am not missing something else, this may work for you but will need some testing. Look at the following piece of code:

Code:
////////////////////////////////////
	// MODIFY WAR BASED ON HUMAN DIFFICULTY LEVEL
	////////////////////////////////////

	if(GET_PLAYER(ePlayer).isHuman())
	{
		HandicapTypes eHandicap = GET_PLAYER(ePlayer).getHandicapType();
		int iWarMod = 100;

		CvHandicapInfo* pHandicap = GC.getHandicapInfo(eHandicap);
		if(pHandicap)
			iWarMod = pHandicap->getAIDeclareWarProb();

		viApproachWeights[MAJOR_CIV_APPROACH_WAR] *= iWarMod;
		viApproachWeights[MAJOR_CIV_APPROACH_WAR] /= 100;
		viApproachWeights[MAJOR_CIV_APPROACH_DECEPTIVE] *= iWarMod;
		viApproachWeights[MAJOR_CIV_APPROACH_DECEPTIVE] /= 100;
	}

This block is the last before the approach weights vector gets sorted; the code in the file runs for every turn, and apparently in strict order. In other words, after all modifications to the weights have been done, the Difficulty level of the human player is fetched, and one specific value is used to adjust the final weight for MAJOR_CIV_WAR_APPROACH and MAJOR_CIV_DECEPTIVE. That value is read from the Civ5HandicapInfos.xml file inside

...\Steam\steamapps\common\Sid Meier's Civilization V\Assets\DLC\Expansion2\Gameplay\XML\GameInfo

The value read is the variable <AIDeclareWarProb> </AIDeclareWarProb> for the corresponding difficulty level; if you read that file, you will notice that the value increases from zero (Settler) to 100 (Prince and above). The value is then applied as a product to the weight for WAR, and divided by 100 (percentage). In other words, in Prince and above the weight that resulted from all the modifications stays the same, and below Prince it gets reduced to a certain percentage (and is zero for Settler, thus Settler has no AI war declarations :) ). That is the iWarMod argument in the code above.

Now, if this is correct and it works as I think it does, then you just need to adjust the values of <AIDeclareWarProb> </AIDeclareWarProb> for King and above in your HandicapInfos file to something bigger than 100. I cannot guarantee any result from that, but if you miss war so much it is worth trying. I would recommend the following:

1) COPY your original file first as backup.
2) Increment the value in 10 points per dif level and see what happens
3) If nothing happens, add some more (15 per level?)
4) Report back.

I will not test it as I am still fine with how it is working for me, and if I decide to change something I would work on the dll. But this approach, if it works, is really fast and simple enough for anyone to modify their own game without waiting for magic.

Test it, and let us know if it works and how. I would expect imbalances as a result (for example, you may have more early wars, but the mid-end game might become a troll festival), but it should make for a fun experiment (with very little risk).



Stop misinforming please. And make your hands dirty, if you want to contribute something meaningful. Thank you.


...
 
No, and this is exactly the point. The code is saying nothing at all about Morocco. It is doing nothing more than setting out conditions under which an AI will factor economic considerations into a declaration of war. There may be hypothetical situations in which the gold an AI is receiving from the Moroccan UA will affect that decision, but in practical terms these will be rare if they occur at all, and more importantly are wholly outside the Moroccan player's control. My key point - that you can't evaluate the value of the Moroccan UA based on a possibly illusory diplomatic modifier - remains.

"There may be hypothetical situations in which the gold an AI is receiving from the Moroccan UA"

how can u agree with me but not agree. :( the rarity of this event is affecting the ai is up for debate, but im assuming (as thats all i can do at this point as im not reading the code myself) that the +2 extra from trade sent to Morocco will be added into the equation when deciding to go to war. This all snowballing into a indirect diplomacy affect early game due to the rarity of gold income. yes its outside ur control as a Morocco player but more so directly build into there ua
 
No, the key issues are thus: If you're Morocco, you've got a numerical advantage over other potential trade partners. Thus each AI is more likely to have given you multiple TRs (making the cost of war with you much higher than other civs). So, no, again, the paltry sums of gold/culture from the UA aren't the real benefit.

As I've noted, that depends partly on other elements of the code that determine which trade routes an AI will favour. It may be a simple numerical calculation, but it may also involve a calculation of relationship status; once again, anecdotally civs with poor relations, or that my intrigue reveals are plotting against me, tend to avoid trading to begin with.

However, even if your point were granted unconditionally, that still requires a loss of trade to drive a civ to negative GPT. Unless the AI, with its love of going wide, plays substantially differently from humans economically, that simply won't be the case most of the time - it doesn't matter if the majority of trade routes are with Morocco if a civ can lose all its trade routes and still have positive GPT, because the next stage of the algorithm is simply never triggered, either to favour or disfavour war. Which is exactly what you tend to find with wide civs with large numbers of city connections, and indeed is also what you tend to find merely looking at an AI civ's income. In a game I had to quit because it kept crashing at the same spot, Shaka was under embargo, with a huge army, and Standing Army Tax in operation. While being at war with him I couldn't see his GPT, however he had a consistent science lead so was apparently not far, if at all, in the negative.

I have anecdotes of my own going in the exact opposite direction, though, so we only have the code to rely on, and right now, it heavily favors the argument I'm making. Not that I'm the only one.

The code still has nothing to say in that regard - all the code does is set a context-dependent trigger condition. You can speculate that the AI is more likely to establish additional trade routes with Morocco, but the available section of the code is wholly silent in that regard as well.

how can u agree with me but not agree. the rarity of this event is affecting the ai is up for debate, but im assuming (as thats all i can do at this point as im not reading the code myself) that the +2 extra from trade sent to Morocco will be added into the equation when deciding to go to war.

A hypothetical situation is not one you can rely on. The code doesn't quite work as you're assuming: it has two stages. Rather than being a 'sliding scale' in which more gold = less likelihood of going to war, the code first performs a binary test: is its gpt without trade equal to or less than 0? If the answer is no, everything else is irrelevant because the next part of the code doesn't trigger. You would be right if the AI calculation directly factored the value of gold earned from trade into its diplomacy calculation, but the code makes clear that it doesn't do that.

Take an example: If an AI civ has an income of 25 gpt, say, and it has a trade route with Russia that provides 20 gpt and an identical one with Morocco that provides 22 because of the Moroccan UA, then it can go to war with either Russia or Morocco without going into negative gold, and the fact that Morocco's earning it more money won't affect its decision at all. It may seem counterintuitive because a human wouldn't make a decision that way, but it's the way the AI works. The Moroccan UA would only have an effect on whether a war decision is triggered in this case if the AI was earning 21-22 gpt. If it's earning less, then losing trade from either Russia or Morocco would trigger the next step.

In this case, if Morocco was the target, its UA would favour it slightly because the extra gold Morocco provides is factored into the "About to War" modifier, however it seems the code works on a case-by-case basis - it runs this analysis if the AI is considering a war with X, it doesn't run it against every civ and decide who to go to war with based on who will cost it the least. So you wouldn't have the AI simultaneously calculating that it should war against either Russia or Morocco, but Russia's the better target because Morocco gives it more money.

The only case in which it could make a substantive difference in this scenario is, indeed, if the AI calculates that it should trade more with Morocco than with everyone else because it will earn more money that way; I haven't seen the code that determines whether this is the case posted, so this appears to be purely speculative. Be clear that I'm not criticising speculation in itself, only speculation being presented as evidence.

Morocco doesn't have a desert start bias. I just started a game this morning with a complete jungle start. Literally not a single production tile until the third ring, which was a forest tile. Horrible.

As far as my own experience is any guide, Morocco appears to have no start bias at all. I've started a few Moroccan games and only got a single desert start (as in, more than one tile of desert in the vicinity), but I've spawned on tundra, in jungle and in grassland.
 
This post has been reported for its libelous content. I gave a warning on a different thread about this kind of unacceptable behaviour, and I don't make empty threats - this has gone straight to the moderators.

Second, you re lying about what I go into detail in the other thread. Anyone that visits those postings can see that, so I do not understand how you can say something like that without blushing. I go into as much detail as I can to share what I saw in the code, explaining how the vector works, and many other details, and only citing the comment a few times, more like an anecdote.

This effort at misdirection is as feeble as it is offensive. It is explicit in my citation of a specific piece of code - and the reference to your analysing the explanatory note relevant to that piece of code - that I'm referring to the code governing a decision to trade vs. go to war. All you analyse in the posts you quote is the system of "approach weight" modifiers applied to the original "traderouteincome" calculatiom, a separate part of the code. The one case in these quotes where you do describe how the code itself works:

So, in this case, whenever the GPT of the AI is positive, and the GPT without the trade routes to that target is negative, then the weight for the approach WAR is reduced by that amount (summed but is a negative value according to the IF condition). In simple numbers, say the GPT of the AI is 100, and the total gold of the trade routes to/from the target is 120, then the weight for the WAR decision will be reduced by 20.

is not only made without reference to the specific code elements I'm discussing; indeed double-checking the thread it's made at the start of a post rather than in a discussion of a quoted section of code. I missed it on a first skim-through looking for it specifically just now, so it's understandable that I didn't pick it up while reading the thread for comments on specific sections of code. An omission, certainly, but assuming deliberate dishonesty for missing a section of a post is wholly unacceptable conduct.

If you hate misinformation I suggest you refrain from perpetrating it. Above all, however, you will refrain from accusations of dishonesty when you are fully aware - as indeed you noted in an earlier post (not to mention the first line of this post) - that misunderstanding is a possible explanation.
 
This post has been reported for its libelous content. I gave a warning on a different thread about this kind of unacceptable behaviour, and I don't make empty threats - this has gone straight to the moderators.



This effort at misdirection is as feeble as it is offensive. It is explicit in my citation of a specific piece of code - and the reference to your analysing the explanatory note relevant to that piece of code - that I'm referring to the code governing a decision to trade vs. go to war. All you analyse in the posts you quote is the system of "approach weight" modifiers applied to the original "traderouteincome" calculatiom, a separate part of the code.

If you hate misinformation I suggest you refrain from perpetrating it. Above all, however, you will refrain from accusations of dishonesty when you are fully aware - as indeed you noted in an earlier post (not to mention the first line of this post) - that misunderstanding is a possible explanation.

You are truly amazing. Have a nice weekend.

Oh, and congratulations. You are inaugurating my ignore list, a tool that I never felt the need to use in 12 years of being in this community (and others). Good bye.
 
Status
Not open for further replies.
Top Bottom