AI Equalizer

Discussion in 'Civ5 - Mod Components' started by Buckets, Jan 19, 2011.

  1. Buckets

    Buckets Warlord

    Joined:
    Dec 4, 2002
    Messages:
    119
    Location:
    6ix
    Available on Mod Browser.

    Edit: V.2 now available.

    The intention of this mod is to simply expose the AI all bare naked in hopes that it will help the community identify weaknesses and help improve the game.

    This is also for those who enjoy observing AI behaviour and aren't concerned with having a supreme challenge in the game.

    In other words, for learning and for fun. Enjoy!

    Edit:
    Wanted to further clarify what this mod does and why. First, as stated in the details below, there's an issue with the normal game where the AI receives bonuses intended for the player at chieftan(2) level. This mod removes those bonuses form both the player and the AI. It goes further to remove happiness bonuses on King(5) and higher levels that the AI also receives, as well as bonus starting units and techs.

    It's not clear whether the AI is supposed to have those player bonuses or if it's a bug, but it goes against my own philosophy in 2 ways: First, in this type of game, I feel that the AI should play by the same rules and have the same incentives and limitations as the player. That's not to say the AI shouldn't have bonuses, but it should not be able to ignore an entire aspect of gameplay (happiness). Secondly, I feel that the player should be rewarded for learning the rules. For one thing, increasing difficulty level shouldn't mean that the player needs to learn a whole new set of rules all of a sudden ("Why do I suddenly have less happiness?"). And secondly, if the player learns a mechanic it should not be negated simply because the opponent is the AI (such as pillaging luxuries to cripple happiness).

    And finally, I'm working on a gameplay mod that builds off these changes to the Handicaps. Stay tuned for that.

    Details:
    Spoiler :
    AI no longer receives :c5happy: Happiness (and other) bonuses.

    There's an issue with the normal game where the AI receives bonuses designed for the player on Chieftan(2) setting. This mod removes those bonuses for both the player and the AI. That means on Prince(4) both the AI and player now play by the same rules - no bonuses and no penalties.

    On all levels both the AI and player receive no bonus: science, happiness, culture/policies, starting units, or starting techs. Bonus vs barbarians is set to 20% on all levels. AI has a 50% discount to upgrade costs on all levels.

    On Settler(1), Chieftan(2), and Warlord(3) the AI receives penalties to: Growth, and Building (units, buildings, wonders, great people, projects).

    On King(5), Emperor(6), Immortal(7), and Deity(8) the AI receives a bonus to: Growth, Building (units, buildings, wonders, great people, projects), and Maintenance.

    *Please note that this mod may make winning easier on all levels.

    V2:
    - Gave back AI growth bonus on King(5) and higher levels.
    - Gave bonus to AI building wonders, great people, and projects on King(5) and higher levels.
    - Improved documentation.
     

    Attached Files:

  2. Shiggs713

    Shiggs713 Immortal

    Joined:
    Mar 11, 2007
    Messages:
    2,361
    Location:
    Indianapolis
    sounds good, now if we can just make the AI more intelligent, we'd be set.
     
  3. aelfwyne

    aelfwyne Chieftain

    Joined:
    Dec 30, 2005
    Messages:
    20
    Location:
    Beaumont, TX
    EDIT: Nevermind. Appears to be something else.
     
  4. Gamewizard

    Gamewizard Emperor

    Joined:
    Jan 24, 2011
    Messages:
    1,234
    Great mod, I've played a couple small games with it and Thal's Balance Mod and found it effective.

    It would be nice to know exactly what % bonus the AI is receiving on each level however. What is the difference between emperor and immortal?

    Also, I'm not entirely opposed to the AI receiving a tiny happiness bonus on, say, emperor and above...just in case the growth bonus is hurting their expansion. Agreed though that the vanilla happiness bonus is way ridiculous.
     
  5. Buckets

    Buckets Warlord

    Joined:
    Dec 4, 2002
    Messages:
    119
    Location:
    6ix
    Glad to hear it's meshing with Thal's mods. I find that although I need to up the difficulty, once I do the game is much more enjoyable. It's nice to know when the AI pulls ahead it's because it did something right (or I did something wrong), not because it had a head start.

    I'm wary of giving AI back any % happiness bonus because things get extremely wonky as population and cities get more numerous. You could actually gain happiness by increasing your population and cities (like in old vanilla ICS.) I'd rather keep Happiness the limiter on expansion it's supposed to be. Also, I find at higher levels the AI reacts to it's unhappiness pretty well - I've rarely seen it hit -10.

    Anyway, to answer your question, here are the bonuses and penalties you can expect from the AI:

    Code:
                    S(1)	C(2)	W(3)	P(4)	K(5)	E(6)	I(7)	D(8)
     	     	---	---	---	---	---	---	---     ---
    Growth%	        160	130	110	100	90	85	75	60
    Train%	        175	130	110	100	85	80	65	50
    Worldtrain%	160	130	110	100	90	80	70	60
    Construct%	160	130	110	100	85	80	65	50
    WorldConstruct%	160	130	110	100	90	80	70	60
    Create%	        160	130	110	100	85	80	65	50
    WorldCreate%	160	130	110	100	90	80	70	60
    BuildingCost%	100	100	100	100	85	80	65	50
    UnitCost%	100	100	100	100	85	80	65	50
    UnitUpgrade%	50	50	50	50	50	50	50	50
    DeclareWar	0	75	85	100	100	100	100	100
    WorkRate	0	0	0	0       20      50	75	100
    AdvStart%	100	100	100	100	120	135	150	170
    UnitSupp%	0	0	10	20	30	30	40	50
    
    The first bunch pay % according the the table (50 means the AI pays 50% normal cost):
    Growth%: Cost of growing cities.
    Train%: building units.
    Worldtrain%: great people (probably).
    Construct%: City Buildings.
    WorldConstruct%: Wonders.
    Create%: Projects.
    WorldCreate%: World projects.
    BuildingCost%: Building maintenance.
    UnitCost%: Unit Maintenance.
    UnitUpgrade%: Upgrades.

    DeclareWar: % of normal chance to declare war.
    WorkRate: Bonus percentage for workers jobs.
    AdvStart%: Tries to give better start locations at higher levels.
    UnitSupp%: Unit supply (extremely unimportant).
     
  6. Gamewizard

    Gamewizard Emperor

    Joined:
    Jan 24, 2011
    Messages:
    1,234
    Excellent, much appreciated!
     
  7. alpaca

    alpaca King of Ungulates

    Joined:
    Aug 3, 2006
    Messages:
    2,322
    The AI by default plays on chieftain level, did you address this in some way?
     
  8. Buckets

    Buckets Warlord

    Joined:
    Dec 4, 2002
    Messages:
    119
    Location:
    6ix
    Yes, this is the main reason why I made this mod. Everyone mistakenly believes the AI has no bonuses on Prince level (I think even Firaxis has stated something to that effect).

    So, as you obviously know, by default the AI plays on Chieftan, getting 12 base happiness, 1 extra per luxury, 40% discount on all unhappiness, 50% raod maintenance, 33% off units, buildings, and policies, and 5% off science. What i've done in this mod is rather than change the level the ai plays (seems to be not possible), I've changed the bonuses the human player gets. The Player gets no bonuses = the AI gets no bonuses. So base happiness is 9 on all levels, no bonus production, science, etc. On lower difficulties the AI gets penalties to production and higher gets bonuses. The player gets the same mechanics at every level, which I think is a good thing anyway.

    I'm afraid that sounds confusing. I hope it makes sense. :crazyeye:
     
  9. Gedemon

    Gedemon Modder Super Moderator

    Joined:
    Oct 4, 2004
    Messages:
    10,635
    Location:
    France
    sound really good, I'll test that on my next game... with the emigration mod ! ;)
     
  10. alpaca

    alpaca King of Ungulates

    Joined:
    Aug 3, 2006
    Messages:
    2,322
    I see. Actually, it's possible to change, the AI uses the STANDARD_HANDICAP post define. However, the change will only become active if you start a game, go back to the main menu, then start a second game.

    Personally, I prefer player bonuses and penalties over AI bonuses. There are four simple reasons for this:

    1) Players are a lot better at coping with different rulesets than the AI will ever be, so changing player instead of AI difficulty makes a lot of sense.

    2) You only have to create an AI for one set of AI rules.

    3) Players actually feel the difficulty difference rather than just indirectly seeing it. This makes the balancing process much easier and more spot-on.

    4) It means difficulty settings (handicaps) have more sense in MP.
     
  11. Buckets

    Buckets Warlord

    Joined:
    Dec 4, 2002
    Messages:
    119
    Location:
    6ix
    Yeah, that's just not user friendly enough for a public mod. Not one I'd release anyway.

    Respectfully disagree, but I see your point. The ideal solution would be to have handicaps seperate for each player (and AI) rather than blanket 'Difficulty'. But that's just what-if'ing and not currently possible. :sad:
     
  12. alpaca

    alpaca King of Ungulates

    Joined:
    Aug 3, 2006
    Messages:
    2,322
    Yeah it's pretty annoying there's no "re-resolve post defines" option.
     
  13. He-Who-Hunts

    He-Who-Hunts 2nd Legionary Cohort

    Joined:
    Jul 9, 2005
    Messages:
    265
    Gender:
    Male
    Location:
    Earth
    have the AI bonuses you added in King and above always been there? (the boost to growth, build, mait, etc) or did you add them in with your mod?
     
  14. PieceOfMind

    PieceOfMind Drill IV Defender Retired Moderator

    Joined:
    Jan 15, 2006
    Messages:
    9,319
    Location:
    Australia
    Thanks to He-Who-Hunts for making me aware of this mod from the thread in gen discussions.

    I'll be following this mod with much interest. By the way I pretty much completely agree with your design goals/philosophy. :goodjob:
     
  15. Txurce

    Txurce Deity

    Joined:
    Jan 4, 2002
    Messages:
    8,280
    Location:
    Venice, California
    I just played my first game with this mod, along with the BC supermod, WWGD and Free Research. The potential behind it - that you even out the happiness buffs (and a few others) then balance from there - appeals to me. The mod worked seamlessly with all the others, and the results mirror the earlier posts.

    On Immortal, the AI handles the happiness hit without a hitch, mostly keeping its levels between -5 and +15. Naturally its pop was lower - in a game without a runaway civ, the highest city total was 14, highest pop 16.7M at 1800. Where the difference shows is in gold. The AI has a lot less, so RA's are much less frequent with FR, and - in a game where successful early wars left me with a larger early pop - the Inca's cost savings let me control all of the surviving Maritime and Cultural CS. I was challenged only once, doubled down, and moved on. Because it was only one game, I can't be sure if my gold-driven tech lead was earned, or a result of Immortal being easier.

    I would recommend trying a game with the AI Equalizer. It helped create the terrific sense of rational process that this game had. And I would encourage Buckets to think about elaborating on what he's started here, perhaps in league with one of the other modders, to see if this can serve as one of the main platforms to a game where the AI behaves much more similarly to the human.
     
  16. He-Who-Hunts

    He-Who-Hunts 2nd Legionary Cohort

    Joined:
    Jul 9, 2005
    Messages:
    265
    Gender:
    Male
    Location:
    Earth
    ^^ Agreed

    I play with mods:
    -all builds are on quick speed (I play a standard speed)
    -All science is increased (0,5,10,15,20,25%) respective to each age
    -No research agreements (they're cheesy!)

    I also put on
    -no goody huts
    -raging barbs
    -7 Civs ( with 14 CS's) on a standard map

    The result makes the game seem much more real IMO. due to no goody huts and raging barbs the beginning feels alot more isolated, and you're forced to spend time and production simply surviving, not pouring out some high level strat and scouting out as many huts as possible. But you dont worry about the AI running off with the game because they're in the same predicament as you! adding in the one less civ on top of this on a standard map helps this too, the map doesnt get eaten up by 0 AD.

    The slow science and high building also makes wars feel much more period based, you get to have epic classical and medieval battles without worrying that Rifles might show up. The AI equalizer again ensures that, on diety, the AI wont run away with the game while you're immersed in a war. However the huge increase to production means you'll always be facing a massive, easily replenished army.

    Seriously, in my last game I took the heart of India's empire, it had maybe four 3 tier cities left when after our peace treaty expired it attacked me with 4 muskets and 1 crossbow! Very cool I thought, usually on lower levels where I find the AI more manageable you never get this kind of effort!

    Has anyone tried this with the tech diffusion mod? I think it would make it even greater!
     
  17. Txurce

    Txurce Deity

    Joined:
    Jan 4, 2002
    Messages:
    8,280
    Location:
    Venice, California
    I thought I had TD checked off, but noticed I didn't get any free techs early in the game, when beelining usually means I do. But I can say that the two civs I reduced to a couple of cities apiece by around 1 AD stayed pretty even to the other AI in tech, never being more than an era behind.
     
  18. He-Who-Hunts

    He-Who-Hunts 2nd Legionary Cohort

    Joined:
    Jul 9, 2005
    Messages:
    265
    Gender:
    Male
    Location:
    Earth
    Sweet!

    So it didn't interfere with the mod? hopefully it wont screw around with the extended research mod I have as well.

    Oh well only one way to find out!
     
  19. Buckets

    Buckets Warlord

    Joined:
    Dec 4, 2002
    Messages:
    119
    Location:
    6ix
    Yes. Everything but Worldtrain, WorldConstruct, and WorldCreate is as it was in vanilla.

    Glad to hear the feedback! Sorry it took me a while to get back. It's been busy times.
     
  20. rhammer640

    rhammer640 Russian Monk

    Joined:
    Aug 9, 2010
    Messages:
    386
    any early indication of what we might expect from this gameplay mod? :)
     

Share This Page