1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

They need to hotfix AI agression now

Discussion in 'Civ5 - General Discussions' started by godman85, Jul 11, 2013.

  1. dexters

    dexters Gods & Emperors Supporter

    Joined:
    Apr 23, 2003
    Messages:
    4,182
    Gender:
    Male
    Location:
    Canada
    I'm all for strategic variety.

    But if the AI is ALWAYS expected to attack early, is it a challenge?

    I was fine if early wars are associated with warmonger civs with early UUs like Monty, china, zulus, Attilia and Mongolia.

    That's how it used to work IIRC.
     
  2. starstx

    starstx Chieftain

    Joined:
    Mar 11, 2010
    Messages:
    48
    My 1/2 game sample size that I haven't even finished yet has me as Portugal and I started very isolated, Standard speed, Large map, scaled back to Prince. Crazy map with a mountain range extending down the whole continent with the Iroquois on the other side far way to the right. To my left ... Ocean with Japan on the other side. I played peaceful diplo and just hit the tipping point of longswordsman to Musketman and cannons. No wars except Mongolia took over 2 CS but failed to take a 3rd CS between him and Japan that Japan was protecting. Iroquois going for SV while many other nations going culture diplo from what I can tell.

    The Iroquois slowly expanded all the way over to my border with one tiny gap in the mountains. Brought an army of muskets, crossbows, and a cannon. Our open borders ended right when he got there. He asked for Open Borders and I declined wanting to box them in and keep them from getting across my territory. 1 turn later he asked for Open Borders again and I refused. 2 turns later he backstabbed and declared War (He was showing friendly the whole time.) Now if I left Open Borders I am not sure he would of attacked but in my half game the AI attacked me the first opportunity really given on Prince. I have a weak military right now. I wish he would of just shuffled enemies on my border.
     
  3. eric_

    eric_ Emperor

    Joined:
    Nov 29, 2005
    Messages:
    1,725
    Location:
    Riverdale, MD
    I'm not 100% sure if you're agreeing with me or not, dexters. FWIW, I feel that the AI should prioritize winning, not warring with the human player. If warring with the human player increases its odds of winning, it should war, if it doesn't, it shouldn't.

    I don't think it should war with the human player simply to be a spoiler, except *maybe* if it's a warmongering civ in close proximity to the human player. Even then, it should be a possibility, not a foregone conclusion.
     
  4. Razor Rex

    Razor Rex Chieftain

    Joined:
    Jul 18, 2013
    Messages:
    19
    I've lurked here a while and thought I'd drop in my two cents.
    I'm a new player to Civ (less than 100 hours, I think... Maybe not now!)
    I have been taking my time with BNW -- I play on Warlord,
    Normal Start, Ancient Era, Earth Map, 26 City States, 12 CIV's. I am
    playing as Japan.

    All was going as the OP stated in my game... No wars, buildup of units but
    never an attack. Then around turn 250 I finished off Portugal. Cue everybody
    and their aunt and uncle disowning me. Brazil made it a point to really pick at me.
    So I start a major military campaign to put Brazil down...

    At this point Rome declares war on me and invades with a very large force. Brazil fights my
    expeditionary force to the brink of defeat and starts bearing his military down on me.

    As for this game, aggression isn't even a question.
     
  5. Nickel_lion

    Nickel_lion Warlord

    Joined:
    Jul 1, 2013
    Messages:
    102
    Why didn't anybody noticed this before!?? I believe this is the main intention devs had making AI behave this way... And damn I like it, and think that it's great.
     
  6. Ryoga

    Ryoga King

    Joined:
    Oct 12, 2010
    Messages:
    993
    I think when it comes to games you always end up having the need to compromise with different aspects.
    For example you want to make the game realistic but you also want it to be playable and more importantly "fun".
    You want the game to be challenging but you also don't want it to be too frustrating.

    So from one side it only makes sense that the AI doesn't start a war on someone who isn't an easy mark, but if no one ever DoW on the player the game becomes boring.

    Just like you I tend to build my army to deter attacks from the AI, so I do expect the AI to not attack me carelessly. But if I plan my defenses, build an army and prepare for an attack the whole game and that attack never comes, isn't that underwhelming and disappointing?

    I don't think the AI should target the human player specifically but if it never was at war for a long time it should consider the option to find an enemy and attack it, only extremely peaceful civs should never go at war no matter when.

    Choosing weakly civs make sense from one side but from the other side you are just leaving alone the most dangerous civs, so in the end they will win while you did nothing to stop them.

    In my opinion the AI should act like this:

    Ancient era: focus on expansion and development
    classical era: attack bordering civs if existing. Prioritize the best territory for land and resources. In this era civs shouldn't be too smart and they shouldn't shy from war even against strong enemies.
    medieval era: attack religious competitors if religious or like above if not. Again religious fervor should work against better judgement.
    Renaissance era: Stronger focus on exploration. Settle on land rather than conquer, if land available. Prioritize weaker civs for conquest. Religion should still play an important role but a bit less than before.
    Industrial era: Religion doesn't matter anymore. Avoid war with strong enemies, prioritize weak enemies and expansion on unsettled lands.

    From this point onward AI should act depending on Ideology

    Freedom: Focus on peaceful victories but when someone starts a war they should build armies and attack them as their top priority. They should liberate cities rather than annexing whenever possible.
    Order: Focus on production and development, they should have a medium tendency to start wars against civs with other ideologies but never among themselves.
    Autocracy: Focus on amassing huge armies, attack without fail the enemy that they hate the most or the weakest one. They should attack even when their chances of victory aren't high.


    I think this would ensure a more varied gameplay and a better chance of getting into wars followed by phases of relative calm if you built your civ strong enough, then going on a world war scenario once you get into the late game.
    And all this while still retaining a fairly high chance to create strong and durable alliances (In G&K and Vanilla you simply couldn't trust anyone and that was also wrong.)
     
  7. Kordanor

    Kordanor Warlord

    Joined:
    Sep 4, 2010
    Messages:
    210
    From following the discussion here I think what lots of players don't get is that the AI should take opportunities.
    It's not like we want the AI to start random wars just for the sake of it. We want them to start wars when this is their best opportunity to gain an advantage.
    If the AI has 20 units, including canons and musketeers and I just have one Crossbowman defending a couple of cities, they should take the opportunity and try to take the cities.
    In our last game we had the danish, celts france and hiawatha as opponents.
    Hiawatha expanded like crazy as usual. Paris went for the cultural victory. The danish and celts? Well, they seemed to go for a military victory without attacking anyone, which didn't work out that well for them. They had like all their tiles filled with troops doing exactly nothing.

    The AI is now reduced to a matter which is only there to provide opportunities to the player, to establish trade routes, to provide cities you can take over, to show a score you can perform against.
    I remember playing Civ 4 where you closely had to watch your military power compared to the power of the AI. As soon as the AI saw a chance of crushing you in Civ4 it took the opportunity. I'd love to see that in Civ 5.

    Also the AI is extremely cheap to buy out. While it would not attack a player in 200 turns you can make the AI just do that by giving them like a luxury ressource and a gold for 30 turns and they will happily attack another player.
    It's now so absurd that when I play Civ with a friend we have the houserule to not "buy" the AI into war and only make them join the war from the discussion screen without trade.
    Before we did that we even had one situation when we both talked to montezuma into war with each other at the same time. And guess what happened? He declared war on both of us (seriously!).
     
  8. dexters

    dexters Gods & Emperors Supporter

    Joined:
    Apr 23, 2003
    Messages:
    4,182
    Gender:
    Male
    Location:
    Canada
    I'm undecided. I like variety, and I was perfectly fine with what it was like before where if you saw a certain Civ has spawned on the map that a war is almost guaranteed around the time they get their UU. The AI routinely aimed to build an army around their UU in civ5.

    More broadly, We have to assume AI doesn't know who the human player is on the grand strategic level and calculates DoW decisions based on military/score and other considerations.

    If that is the case, the AI like the human will have imperfect information.

    I asked this earlier, do we want certain AI civs to just be warmongers, and expected to start wars early based around the strength of their UU, (Monty, WuZeTian etc.) or do we want a more neutral flavour where the AI, even if it is agressive, may opt out of an early war it cannot support economically due to the reduced early game income.

    I think it all comes down to income. How can the AI rationally want to war if all the cities have no improvements, and they barely have a GPT income?

    If the aim is to produce AI that plays the long game, rather than going for the suicidal and economically ruinous early war with a chance of success, then we have to look at Civs with early UUs. Does this negatively impact Civs with early UUs and perhaps these civs should simply have those early UUs marginalized and rebalanced with a universal warring buff? (ie: all ranged units from China receives a bonus while their UU is downgraded back to single fire ; Montezuma can build all war units more cheaply and so on etc.)
     
  9. Ryoga

    Ryoga King

    Joined:
    Oct 12, 2010
    Messages:
    993
    @Kordanor
    Did you check if those AI had DoF with the civs they wanted to conquer? The AI has the bad tendency to DoF too easily and then it doesn't want to get the penalty for attacking a friend.
     
  10. BluegrassGeek

    BluegrassGeek Warlord

    Joined:
    Apr 23, 2013
    Messages:
    140
    Location:
    Kentucky, USA
    That seems to be the real crux of the problem. Early game, it's typically better for the AI civs to establish trade routes, because they can't afford a strong military right off the bat. And DoFs allow for better trade opportunities.

    Once production ramps up, though, the AI may have built a substantial military... but the costs outweigh the benefits. If the AI could beat the crap out of you, but still has a DoF up and multiple trade routes through your territory... well, it better be damn sure it's going to win. Otherwise, it's better off keeping the peace.

    That may be a reason for the "army shuffle" we're seeing. The AI wants your territory, and sets up for war, but there's just too many penalties for them if they declare war themselves. The diplomatic and economic ties that helped the early game makes it much more painful to declare war later on. So they wait until other civs are backing them against you, or the trades & caravans dry up enough to make it worth going to war. Or you piss them off by converting their cities to your religion. :D

    Probably the best tweak would be to make the AI learn to let DoFs, trade agreements and caravans drop without renewal, if they want to go to war. They may be in a loop where "I want his territory, this trade for Spices ended, but that caravan is worth too much gold," so it renews the trade for Spices... then the caravan route ends, and "I want his territory and the caravan has ended, but that Spice deal is too good to lose..." Wash, rinse, repeat. :shifty:
     
  11. eric_

    eric_ Emperor

    Joined:
    Nov 29, 2005
    Messages:
    1,725
    Location:
    Riverdale, MD
    That right there is an excellent question...and, if the new early-game GPT mechanics do essentially preclude capitalizing on early UUs, then affixing mitigating attributes to those UUs (or, the attributes of the parent civ, its UB, etc.) also makes sense.

    Well, as I said I spend a lot of time actively avoiding DoWs, so for me that would feel like a great success ;). But, if it felt too easy, it would get boring, for sure...in which case I suppose I'd up the difficulty a level.
     
  12. dexters

    dexters Gods & Emperors Supporter

    Joined:
    Apr 23, 2003
    Messages:
    4,182
    Gender:
    Male
    Location:
    Canada
    @bluegrassgeek Pretty sure the civ5 AI does not live turn to turn but rather follow long multi turn plans. I doubt unit shuffling has any relationship to the AI wanting to attack with the odd exception of a war being called off after they had already sent their army marching.
     
  13. Bisqit

    Bisqit Warlord

    Joined:
    May 12, 2012
    Messages:
    140
    Location:
    U.S.
    The ai starts wars all the time with me. It depends on which country and the situation. For example in my game as Poland Indonesia eventually stomped me and capture much of my territory. They declared war because in this situation i was clearly going against them. Indonesia declared war on Portugal. I cam to Portugal's aid being their friend and all. We weren't able to hold off Indonesia and he destroyed Portugal. After a tentative peace I built up and army and declared war in an effort to liberate my long lost ally of Portugal. I captured one city and it was soon recaptured by Indonesia. Fearing my luck had run out I began to pull back and within 15 to 20 turns Indonesia was at the gates of my city that was closest to them. Lacking resources and troops he was able to swiftly steamroll it. To my further suprise he attempted (and succeeded) in a naval invasion of my capital. Suddenly 5 to 6 ships appear out of nowhere. My economy crippled and military in disarray there was no way I could him off. I soon lost my capital. My other coastal city came under fire 5 turns later as well. He would take that city soon but I decided to resign at that point. All was lost and it eas roughly July of 2030. I threw in the towel. This was on prince difficulty. I think it's safe to say, based on my experience at least, that the ai is not only a more intelligent tactician but a much better competitor. The ai is leaps and bounds better than it used to be. They declare war for good reason, they fight when they have a chance and beg for mercy when they know they're losing. Certain leaders declare war to expand, others declare war for ideological differences. The ai is alright in my book. I feel like a lot of you guys are just expecting random, arbitrary wars like before. Certain ai are agressive others are not.
     
  14. Buccaneer

    Buccaneer Deity

    Joined:
    Nov 2, 2001
    Messages:
    3,562
    Those are good questions. I believe the human player should be a special target - just take a look all of the players winning on prince, king and emperor without much of a fight. But I also believe that no AI should sit back and lose. Even if they may not win, they should go down fighting with whatever means they could take advantage of military or not). That makes for a far more interesting game and not a boring one.
     
  15. SirPepsi

    SirPepsi Warlord

    Joined:
    Jun 7, 2013
    Messages:
    180
    Location:
    United States
    With the implementation of trade routes, war is less profitable, and biding one's time and building up is both more realistic and more fun.

    On King and below, all you really had to do in G&K to win was get an early head start and become a runaway. You did that by beelining construction, spamming CBs, and attacking in a swarm.

    Now, instead of using exploiting this trick and playing the same early game time and time again, in BNW, one has to prioritize Gold, Happiness, and Growth to become successful in the late game. Early war is less profitable, sacrificing the 20+ GPT and 6+ Science for a city is no longer feasible or even doable!

    I, for one, like the new mechanics of BNW - I think it takes CiV to a whole new level, bringing it depth it hasn't had before.
     
  16. dexters

    dexters Gods & Emperors Supporter

    Joined:
    Apr 23, 2003
    Messages:
    4,182
    Gender:
    Male
    Location:
    Canada
    These are all contradictory requirements; I think AI that targets human players is a very lazy and bad road to travel to. AI should be able to make its high level decisions on its own without special consideration.

    Also an AI that targets human players and wins at all costs creates a problem where it can cause games where the AI is excessively agressive.

    People want friendly/malleable AIs, they want AI that wars and challenges them.
    Those are very different objectives.

    There should be a middle ground. If a game has 10 AIs, 2-3 can be the keeners who will win at all costs, 2-3 warmongers, 2-3 friends. But single flavour AI surely is a recipe for discontent.

    Finally the AI needs to be malleable enough to change its objective. You NEVER EVER want to be in a position where the human player starts next to an AI, tries to cultivate a relationship but fails and gets DOW on early/late/all the time (even if its the right thing for it to do) because they happen to roll an AI that is designated 'win at all costs'. I foresee people quitting the game entirely if that happens.

    This issue is more challenging than a hotfix or tweaking AI aggression; it's a balancing act between providing a narrative challenge for the roleplayers and challenge for the challenge players, and I have no doubt there are a lot of players who are now quite happy with these changes who aren't posting here.

    I'd even go so far as saying there's no consensus for any changes to increase aggression, only consensus that AI could be improved to provide a more varied experience.
     
  17. Maxym

    Maxym King

    Joined:
    Feb 20, 2011
    Messages:
    973
    Location:
    Canada
    It doesnt matter how strongly they benefit by trading, only if they can have a reasonable chance of winning the war? If so trade should be sacrificed to gain lasting advantage, yes meybe losing friends will hurt them but they don't need friends to trade just not war. If they have large, technologically superior army and player has three archers not attacking him is plain silly.:confused:
     
  18. Aristos

    Aristos Lightseeker

    Joined:
    Dec 11, 2001
    Messages:
    3,575
    Gender:
    Male
    Location:
    Deep inside...
    While some just talk and complain, some of us look through a telescope and through a microscope ;), to try to find an explanation:

    Code:
    ////////////////////////////////////
    	// Are we getting money from trade with them
    	////////////////////////////////////
    	int iCurrentTradeValue = GetPlayer()->GetTrade()->GetAllTradeValueFromPlayerTimes100(YIELD_GOLD, ePlayer) / 100;
    	if(iCurrentTradeValue > 0) // todo: add thresholds
    	{
    		// todo: constant/XML
    		viApproachWeights[MAJOR_CIV_APPROACH_WAR] -= 5;
    		viApproachWeights[MAJOR_CIV_APPROACH_HOSTILE] -= 5;
    		viApproachWeights[MAJOR_CIV_APPROACH_DECEPTIVE] += 5;
    		viApproachWeights[MAJOR_CIV_APPROACH_GUARDED] -= 1;
    		viApproachWeights[MAJOR_CIV_APPROACH_AFRAID] -= 1;
    		viApproachWeights[MAJOR_CIV_APPROACH_FRIENDLY] += 5;
    		viApproachWeights[MAJOR_CIV_APPROACH_NEUTRAL] -= 2;
    
    		// sanity check - if we will go negative from war with this player, don't go to war
    		int iGPT = GetPlayer()->calculateGoldRate();
    		int iDeltaGPT = iGPT - iCurrentTradeValue;
    		if (iGPT >= 0 && (iDeltaGPT < 0))
    		{
    			viApproachWeights[MAJOR_CIV_APPROACH_WAR] += iDeltaGPT;
    		}
    	}
    
    That block of code comes from the BNW CvDiplomacyAI.cpp, and is one of the most relevant changes in that file as compared to G&K. It may explain a lot of what is being reported by some here. We may agree or disagree on this particular approach, but look into the code, and the comments ("sanity check" :) ) and draw your own conclusions.

    Now first thing that seems calling for testing is to play without having any trade route with neighbours, and see what happens then... did anyone test that particular scenario?

    EDIT: carefully consider iDeltaGPT. For the less inclined to C++ endeavours, basically what that formula says is: "the more negative the balance will become if I loose these trade routes with this particular potential target, the less likely I am to go to war".
     
  19. eric_

    eric_ Emperor

    Joined:
    Nov 29, 2005
    Messages:
    1,725
    Location:
    Riverdale, MD
    Buccaneer, I guess what's kind of crystallizing for me via this debate is, the priorities of winning by whatever means and of targeting the human player may very well come into conflict. Unless you are deemed to be either a significant threat to their chance of winning or a critical piece of the puzzle that is their victory, an AI programmed to win would need to ignore you. Even if you are one of those two things (a perceived threat or a possible pawn), if you have positioned yourself well, the AI may determine that it can do nothing to curtail your progress or to exploit you without undercutting itself, possibly fatally.

    I know it's happened to me in many games where I know diverting all of my resources to deal with an ascendant AI will a) probably fail and b) expose me on other fronts.
     
  20. dexters

    dexters Gods & Emperors Supporter

    Joined:
    Apr 23, 2003
    Messages:
    4,182
    Gender:
    Male
    Location:
    Canada
     

Share This Page