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

Scaling AI cheats (by game progress or player score)

Discussion in 'Civ4Col - We The People' started by raystuttgart, Jul 27, 2020.


Would you like "Scaling AI cheats" on player score comparison or game progress?

  1. No, I hate all AI cheats. I would never turn it on.

  2. Sounds cool, it should be Standard. No Game Option needed.

  3. I am ok with it, if it is a Game Option. Might try it out.

  4. Please do not waste time on this. Focussing on better AI instead would be much better.

  1. raystuttgart

    raystuttgart Civ4Col Modder

    Jan 24, 2011
    Stuttgart, Germany
    Hi guys,

    since it was already briefly discussed a couple of time, I now want to share some thoughts about "Scaling AI cheats".
    (I am interested in the general opinion on this.)


    Scaling AI cheats are actually quite common in many games. It is not a new concept to gaming industry.
    Especially in modern single player RPGs and single player campaign based strategy games it is wide spread.

    Usually though most companies try to not talk about AI cheats (although basically everybody still knows).
    They are pretty aware of the backlash it could cause to admit such cheats.

    The 2 most common approaches / alternatives:
    1) The stronger a player gets (XP Level), the more AI is cheating (additionally to GameDifficulty Settings).
    2) The further the player progresses (in campaign / main story), the more AI is cheating (additionally to GameDifficulty Settings).

    Something like that could easily also be applied for Civ4Col.
    (Currently it is not. Civ4Col has cheats of course, but they only scale by GameDifficulty.)

    Alternative A:
    We could simply scale AI cheats by Player Power Ratio. (Or other realtive comparisons.)
    (Compared to Human Player in SP games - with MP games it gets more difficult.)

    --> That way an AI would only cheat (additionally) if it is weaker than you.
    --> It is quite hard to predict for Human Players.
    --> It is probably the better alternative, but more difficult to implement and impacting performance more.
    --> It is also very difficult to balance by ingame testing.

    Alternative B:
    We could simply scale AI cheats based on turns played (also considering GameSpeed).
    (Pretty easy but "may feel really unfair" if Player gets behind by bad RnG or bad strategy.)

    --> That way all AIs would cheat (additionally) equally, depending on turns passed.
    --> It is easier to predict for Human Players.
    --> It is easier implement, easier to balance and would hardly impact performance.


    Most likely it would be Alternative A) if we do it at all.


    Would those cheats apply for Human Player as well?

    Simple answer: No. That is why it is called "AI cheats".


    Would those cheats apply for Natives and Kings as well?

    Natives and Kings will not really be affected. Wild Animals would probalby not be affected at all.
    (Simply because they do not use most of the features the scaling AI cheats would be applied to.)

    Most of the cheats will only affect AI Colonial Players.
    (Sales in Europe, Storage Overflow, Immigration from Crosses, ... - details see below.)


    Will it replace the current flat AI cheats (that mostly depend on GameDifficulty)?

    No, it will be implemented on top and still depend on GameDifficulty as well.
    It is meant to be a relatively soft and gradual "adjustment".
    It simply flattens out huge differences between Human Player and AI over the course of a game.


    Why even do something like that?

    Simply to keep the gameplay challenging throughout the complete game progress.
    Otherwise you often reach a point, where you basically already won and thus the game gets boring.

    Also, improving AI decision itself noteably is very difficult, often risky and does not always work as expected.
    Strong AI logic itself usually impacts performance much harder.

    With this concept we could get a stronger AI much faster and with less risks, than working on AI decision logic.
    AI cheats are simple and basically always work.

    But continuing to work on AI itself is also necessary!


    Would it be possible to implement it as a Game Option?

    Simple answer: Yes.
    This is not a feature everybody will like.


    Will it depend on GameDifficulty how fast and how much the AI cheats scale?

    Simple answer: Yes.
    The rate of increase and the maximum value of these scaled AI cheats will depend on GameDifficulty.


    Would the Human Player notice it?

    Well, you will of course know it. (Because you e.g. turned on the GameOption.)
    But it will be pretty hard to exactly identify how much and where AI is cheating.


    In which features and how much exactly and by which algorithm will AI cheat?

    That will stay a secret of the modders - in order not to ruin the illusion of a fair AI that does cheat only very little. ;)
    By checking the GameDifficultiy settings a player could of course figure out some of it (and destroy the illusion).
    For the rest he would need to check the algorithm in the source code.

    Most likely AI would get scaling cheats for:
    (Cheats that Human Player will have hard time to directly notice ingame.)
    • %-Bonus on Gold from Sales
    • %-Bonus on Gold from Storage Overflow
    • %-Bonus on Crosses generated
    • %-Bonus on Hammers produced
    • %-Bonus on Learning by Doing
    • Additional XP from Combats won
    • ...
    So what will it not do?
    (It will not give free presents regularly.)
    • Spawning Free Units for free
    • Giving AI huge piles of Gold for free
    • Giving AI huge amounts of FF-Points for free
    • ...

    How much effort is it?

    The implementation effort is ok - still considerable though.
    The balancing effort though is massive - lots of ingame testing needed.


    What are the risks?

    Well, there is a risk of worsening performance.
    (Especially if we calculate power ratios at the beginning of each turn. Using "turns played" could hardly impact performance.)

    Well, it requires a lot of small changes all around the place thus it could of course cause some bugs.
    None of them are dramatic or really difficult for themselves though.

    The biggest issue however is balancing.
    Even if we get it right, it could feel great in your game A and terrible in your game B.


    So again, what is the difference to the current AI cheats?
    (Please remember, the current AI cheats will still exist.)

    The difference to the current AI cheats with flat bonus and freebies is, that AI will cheat very little at the beginning of a game.
    It will however cheat more and more as you become stronger or the game progresses.

    The current AI cheats most often also give free presents from time to time.
    The scaling AI cheats will be %-Bonus orientated that increase gradually.

    Both current AI cheats and scaling AI will basically add up.


    Does this exclude to continue AI improvements (working on better AI logic)?

    Absolutely not, but it is considerable effort we would need to put into this.
    If we put effort into this, we will probably put less effort in other topics.


    Well, that pretty much explains the concept (high level).
    I would most likely really bore you when it comes down to technical concept.

    It may not sound like a big game changer.
    And in fact, in early game it is not.
    But most likely it will noteably change the feeling of midgame and endgame.

    If you activate the Game Option "Scaling AI cheats":
    You will experience much more challenging AI in midgame and especially endgame.
    In early game it will pretty much feel as now.

    Feedback? :)
    Last edited: Jul 27, 2020
    lethiel likes this.
  2. Tugboatspotter

    Tugboatspotter Warlord

    Dec 19, 2019
    I fully support this proposal.

    I know a lot of people are going to hate this idea, but for me it is absolutely the right thing to do.

    Also, I agree it should be an option, although calling it "scaling AI cheats" is going to put a lot of players off - just call it "scaling AI".
    Last edited: Jul 27, 2020
  3. raystuttgart

    raystuttgart Civ4Col Modder

    Jan 24, 2011
    Stuttgart, Germany
    Generally I do too.
    Although improving AI logic itself - making AI smarter considering its logic - is surely "better".
    This concept "Scaling AI cheats" is simply:
    • easier and faster to implement
    • more predictable and easier to test
    • less risky because it has almost no side effects
    • more performant (becaus AI logic itself will not need additional complex calculations)
    • ...
    • Cheats are easy to handle and will definitely help AI on stategical level
    • Really good AI logic (on strategical level) is one of the most difficult things to do in game programming
    I am quite certain of that, too.

    If this should ever have a chance to be accepted, it has to.

    That is basically "lying". :undecide:
    AI will not get smarter by using better / more sophisticated algorithms or game logic with this concept.

    A Human Player would hardly notice the difference ingame between "AI cheating" and "AI being smart" (if we implement the game concept well).
    The ingame result would be pretty much the same: AI will stay a challenge in midgame and endgame. (Because AI cheats will adjust to player performance.)

    But still everybody looking at the GameDifficulties or game logic would notice the difference instantly.

    Spoiler :

    When we talk about real "AI improvements" we actually try to make AI smarter and improve its logic.
    (devolution is working on that - it is actually one of his favourite topics. So this happens as well, but is not part of this concept.)

    AI in Civ4Col (Civ4BTS as well) always uses the same algorithms or game logic on all Game Difficulties.
    All that differs are the "cheats" / "advantages" that AI and Human Player get or do not get according to the Game Difficulties.

    Really good chess engines are capable of using smarter algorithms - because the amount of possible moves is quite limitted.
    A really good chess engine will simply calculate more possible moves & outcomes ahead in higher GameDifficulties.

    In this concept AI will simply get more advantages (bonusses that scale slowly according to player progress) that the Human Player does not get.
    That is basically what almost all modern RPGs or most campaign based strategy games do, to make it easy for players to start and keep it challenging during the game progress.
    Games that use this concept in different variations of course are e.g. "Pillars of Eternity 2" or "Command and Conquer" or ...
    Last edited: Jul 27, 2020
  4. lethiel

    lethiel Streaming Col at https://www.twitch.tv/lethiel01

    Jul 1, 2008
    Full support to this. Keep the option checkbox ticked on as default ;)
    I'm also a little divided between Alternative A vs B but I'm sure you guys would find the right solution.
  5. raystuttgart

    raystuttgart Civ4Col Modder

    Jan 24, 2011
    Stuttgart, Germany
    The big difference between A and B:

    Alternative A:

    AI cheats adjust to player performance. (Independend of turns played.)
    If Human Player is stronger AI will get more cheats to keep up.
    If Human Player is weaker AI will get less cheats or no cheats at all.
    • It usually "feels better" because it adjusts to the Human Player situation.
    • It is however also much more difficult to implement and balance well.
    • It impacts performance more heavily because it needs to calculate relative comparances of Players.
    --> This algorithm helps weaker AIs most.
    --> It is feels fairer for players that have bad start or bad RnG because AI will then get less (or no) additional advantages.

    Alternative B:

    AI cheats adjust to game progress - turns played. (Independend of player performance.)
    The later in game, the stronger AIs are.
    It does not care if Human Player is weaker than AI (or stronger).
    • It works well for "average games" but it sometimes "feels unfair" if you had a bad start.
    • It is however easier to implement and easier to balance.
    • It impacts performance only very little becaus it basically just needs to know turns played.
    --> This algorithm helps all AIs the same (and is thus objectively fairer).
    --> It feels better for players that have a good start or good RnG, because they can keep AI down before it gets too strong.
    Last edited: Jul 27, 2020
  6. Tugboatspotter

    Tugboatspotter Warlord

    Dec 19, 2019
    Agreed. I understand your argument that 'scaling AI' may be misleading, so I would suggest instead to call it "scaling AI bonuses"

    I'm sure most players recognize (when choosing difficulty level) that AI bonuses are technically cheats, so if a player chooses to enable scaling bonuses then it should be obvious what to expect.
    lethiel likes this.
  7. Will The Viking

    Will The Viking Chieftain

    Mar 16, 2013
    I really like this option. I've always wanted to have different difficulty setting for the natives and the AI colonies. Lets say, easy natives who do not go to war as often, but tough Europeans who might beat you to independence or might start a war against you.

    Is this even a viable option, or is it coded in such a way that means the difficulty for Europeans and natives are locked together?
  8. raystuttgart

    raystuttgart Civ4Col Modder

    Jan 24, 2011
    Stuttgart, Germany
    By the current system of GameDifficulties they are "locked" at least a little bit.
    • Natives get more aggressive and get a few tiny cheats (e.g. Growth)
    • King AI simply gets more REF
    • Real AI cheats are however applied to Colonial AIs (for Liberty Bells, Attitude, Combat, Immigration, Free Units ...)
    The "Scaling AI cheats" would generally almost only affect other Colonial Nations.
    • The features where these cheats would be applied are simply not used by Natives (or Kings)
    • The "Scaling AI cheats" are not meant to make any Nation more aggressive though


    Colonial AIs really cheat significantly (considering bonusses in features).
    (That is true for current Game Difficulties as well as the new suggested system of "Scaling AI cheats".)

    In current systems Native AI does not get a lot of cheats. It is just more aggressive.
    In "Scaling AI cheats" Native AIs would not get any new cheats either.
    (They simply do not have Europe Sales, Liberty Bells, Storage Overflow, Immigration, ...)

Share This Page