r_rolo1
King of myself
Nice var name
.....
iDagger is the "backstabbing" variable, right?
.....iDagger is the "backstabbing" variable, right?
.....
. Anyway that strategy_hash function alone is longer than ai_dowar, i just list the return vars from it i think, see if they really matter.Nice var name.....
iDagger is the "backstabbing" variable, right?
[SIZE="3"]int iWarMemory = GET_PLAYER((PlayerTypes)iI).AI_getMemoryAttitude(getID(), MEMORY_DECLARED_WAR);
if (iWarMemory > 0)
{
//they are a snake
iParanoia += 50 + 20 * iWarMemory;
break;
}[/SIZE]
[SIZE="3"]int iDefensivePower = (GET_TEAM((TeamTypes)iI).getDefensivePower()[B][COLOR="Red"] * 2) / 3[/COLOR][/B];[/SIZE]
/57
= 24% (HUSP = (USP-7)/3 = 5) and 2-city-Pacal with 2
/4
= 50% (HUSP = 14) (note: foreign trade is not taken into account!). So they should consider a total war 6 / 15 times as often, but Pacal's power is probably much to low to actually find a valid victim.
I still have to see how the AI handles diplo in events and AP votes ( both can lead to insta war and I'm not sure that diplo is taken in account when making that decision )
. Looks very good, glancing over it it confirms what i found myself (and more). I've done some research myself mainly by writing vars like iwarrandthreshold, ihighunitspendpercentage ea to disk for monarch vs deity (save 2 of the ultimate challenge pt II in fact.). While on monarch this i warrandthreshold was always 0 (meaning the RNG has to throw a 0 for war to be considered). On deity iwarrandthreshold went up to 6 (meaning 0,1,2,3,4,5,6 means checking for war) some turns with Gilgamesh due to enormous spending on units(very high ihighunitspendpercentage). I think this answers the question as to why deity ais declare so early, they're able to raise the iwarrandthreshold by ihighunitspendcount, in simple english, they build so much units that going to war becomes a very attractive proposition for them.
while his total costs are something like 5
. Although the absolute values are ridiculous, the USP = UnitSpendingPercentage is 40%. So HUSP=11 will lead to a DoW-likelihood increased by factor 12
!!! Maybe the absolute values should be taken into consideration here somehow.Has Niklas done that, or do you mean my pseudo code snippet collection spreadsheet? I don't consider this an article but more some material to start from writing one. IMHO this topic absolutely deserves to be framed into a nice article for the articles sub-forum. But I'm not much of a writer, so if you should feel inclined (or anybody else) to create one, please copy and paste what ever you like from it.Well the article has been written...
) and only refered to Vanilla ( where the financial war does not exist, for a example of the diferences )........
That is why I asked 
@ Aelf. I like to play my games with a sort of realistic theme. Backstabbing "Friendly" AI's is very rare for me. There are only a few times i will do it.
That will be only possible if the Ai is taught to defend it self properlyI think the game should be modded so that AI does NOT get bonus on military units before 2000 BC. After that you can try to match them with chopping/whipping etc, so it's a more fair game. They should still get their bonus on non-military units, buildings, and techs, because all these gains can be overcome in the long term with a good play.
However, an early military advantage has just too much short term benefit denying the human player of any reasonable counter in most cases (well, we still have the power to reload but that's not fun).
If you take archers for the AI ( not even removing extra units, just replace archers per warriors ) you can warrior rush a emperor AI easily.....Sure agree that modding is needed, i'm slowly working at getting a grasp of C++ but i'm easily distracted by the temptation of just playing another game. It'd be very interesting to work on a team such as the one that's programming a better ai right now but it sure takes a lot of time too.Very interesting.
I was always under the misconception that power rating of 0.5 somehow helps avoiding war. Apparently it is way too low and doesn't really matter if it is 0.5 of 0.1 at that stage.
It does make some games randomly un-winnable unfortunately.
There is also quite a lot of gamble with land blocking - essential on higher levels, but increases the chance of war.
I think the game should be modded so that AI does NOT get bonus on military units before 2000 BC. After that you can try to match them with chopping/whipping etc, so it's a more fair game. They should still get their bonus on non-military units, buildings, and techs, because all these gains can be overcome in the long term with a good play.However, an early military advantage has just too much short term benefit denying the human player of any reasonable counter in most cases (well, we still have the power to reload but that's not fun).
[SIZE="4"]int iDefensivePower = (GET_TEAM((TeamTypes)iI).getDefensivePower() * 2) / 3;
int iOurPerceivedPower = (iOurPower * ((iPass > 1) ? AI_maxWarDistantPowerRatio() : AI_maxWarNearbyPowerRatio())) / 100;
if (GC.getGameINLINE().getSorenRandNum(100, "AI Power Deterrence") >= (iDefensivePower * 100) / iOurPerceivedPower - 30)
... (valid target)[/SIZE]
to all who analyzed the AI DoW mechanics... especially DanF for the spreadsheet and details...I think it's in CvPlayerAI::AI_targetCityValue, or it's at least a good point to start from.Any thoughts on where I can find where this is actually coded?
Every AI player chooses a set of strategies according to its personality and the current situation in the game. There are 20 different strategies, iiuc they mainly determine what the AI chooses to build in its cities, how it adjusts its sliders and how it behaves when it comes to starting wars:What is Dagger strategy exactly and how does the AI decide to use it? Do only specific AIs apply this strategy, or anyone can depending on some conditions?
the UU is stronger than the replaced unit (WarChariot, Vulture, Praetorian, Cataphract, East Indiaman, no penalty for Jaguar) Does dagger mean that there is no WHEOOH message before the war?