Logo Platform
logo amplifiers simplified

AI, Difficulty Settings, and Fame

Reply
Copied to clipboard!
6 years ago
Oct 12, 2019, 8:56:07 PM

I watched an interesting video recently called AI and Difficulty in 4X Games.  Some key points from the video:


*The bonuses that the AI receives to make up for their suboptimal play can be so large on the highest difficulty setting that it forces players to play a certain way to combat these bonuses.  This reduces the number of viable strategies, which makes the play experience less flexible/fun.

*It’s difficult to combat snowballing in 4X games and the endgame can become boring after you have snowballed, especially if you are going for a peaceful victory condition.

*How do you combat the player snowballing against the AI without frustrating the player?

*A couple interesting ways to combat the player snowballing against the AI and creating a boring endgame:

  1. There are mods for Civ VI and Endless Legend that increase the bonuses the AI gets as the game progresses rather than give a constant flat rate from the beginning.  This gives the player more flexibility in how they play the game as the bonuses the AI receives aren’t so big from the start.

  2. Adaptive Bonuses: Once the player starts to snowball, the bonuses the different AI receive depend on the type of game they’re playing (a military focused AI might receive a reduction in cost to making units, etc.) 

*Should the point of the AI be to beat the game themselves, or to provide the player with a good experience?


I assume the Fame mechanic was designed in part to help combat some of the issues described above, as it helps to simplify the problems.  Having a single victory condition  (apart from wiping everyone out I assume) should make it more clear for both the AI and the player on the kinds of things they should be focusing on to win the game.  


It seems like adaptive bonuses would be easier to program for a 4X game with one victory condition.  For instance, if the player starts to snowball against the AI in Humankind, perhaps the threshold for getting Era Stars could be lowered for the AI, allowing them to possibly catch up.  


As far as the question of: Should the point of the AI be to win the game or to provide a good experience for the player?  I feel like on Normal it should probably be to provide a good experience, making the game more accessible.  Whereas on higher difficulty settings, the AI should be able to crush players who play suboptimally.

0Send private message
6 years ago
Oct 12, 2019, 10:27:27 PM

We already had this kind of discussion in the internal forums. My take on it:


  • High difficulties are for the most experienced players. The space of viable strategies always gets smaller, the more competitive you play, its the same when playing against human players. Not everyone needs to play on the highest level.
  • I think adaptive bonuses are not a good solution to the "human player snowballing problem". This holds especially true, if its implemented as a rubber banding mechanism like you proposed. It feels bad if you get "punished" for doing well. I also think its a bit lazy, because:
  • The reason why many 4x AIs struggle in the lategame, is because they dont recognize a snowballing player correctly and use diplomacy in a sensible manner to combat that. In any FFA-Game - doesnt matter if its 4X, RTS, FPS or 2d-Shooters like Invisigun - the meta typically revolves around teaming up to stop snowballing players. Even if the game doesnt allow for formal alliances, this kind of thing happens - often without players being able to communicate. If you teach the AI to do this in a somewhat sensible manner, lategame suddenly becomes way more interesting, even if the player is in a good spot to win. Its one of the main reasons, why the ELCP AI is better in the late game.
  • AIs should ideally do both, provide flavor and a "good experience", but also have at least have some drive towards winning the game. How strong that drive is can ofcourse be dependant on the difficulty setting
0Send private message
6 years ago
Oct 13, 2019, 3:34:33 AM
LeaderEnemyBoss wrote:
  • The reason why many 4x AIs struggle in the lategame, is because they dont recognize a snowballing player correctly and use diplomacy in a sensible manner to combat that. In any FFA-Game - doesnt matter if its 4X, RTS, FPS or 2d-Shooters like Invisigun - the meta typically revolves around teaming up to stop snowballing players. Even if the game doesnt allow for formal alliances, this kind of thing happens - often without players being able to communicate. If you teach the AI to do this in a somewhat sensible manner, lategame suddenly becomes way more interesting, even if the player is in a good spot to win. Its one of the main reasons, why the ELCP AI is better in the late game.

That definitley does sound like a better solution.  It woud just appear that type of solution is hard to pull off historically, at least in the 4X genre.  Here's hoping they can make it happen in Humankind :)

0Send private message
6 years ago
Oct 14, 2019, 10:13:10 AM

Hello everyone,


That's a very interesting subject you taking on here.
As LeaderEnemyBoss pointed out, relying on bonuses can feel really lazy and unrewarding for the player. As an AI dev I am also concerned about the fact that it can also "hide" some of the AI's bad behaviours behind its profusion of resources, and that's something we would like to avoid as much as possible.


Snowballing in a 4x is quite common, and experienced players will often reach that critical point before any AI can get "big enough" to oppose a decent challenge through the late game. Although we are doing our best to make each AI empire a worthy challenge for the player, we are also preparing for "that" moment where a player is snowballing, and the main tool at our disposal is, as LeaderEnemyBoss said, diplomacy.

We still haven't exactly figured out what we want to do on this subject, and are discussing the impact of such AI behaviours:

- If the behaviour gets too mechanical, you would see two sworn enemies allying each other to fight you because you are getting really strong.

- If the behaviour gets locked by "diplomacy state", you would see empires you're at peace with do absolutely nothing as you steamroll to victory

- Should AIs focus the player with most fame ? Even if he doesn't present any threats currently ?

- Should AIs be biased towards the player ?

- Should the difficulty setting only affect the AI's diplomacy with the player ? Or with every other empire ?


So many points that we are still discussing and testing internally, and we would love to have your thoughts and ideas on these :)


What I can say right now is that our goal is to give an experience as authentic as possible, and having AIs with "understandable" trails of thoughts.

We've already built the foundation of our diplomatic AI with such behaviours in mind, so we hope we can achieve something really sweet in terms of lategame diplomacy.


Cheers

0Send private message
6 years ago
Oct 14, 2019, 12:25:22 PM

I can offer some ideas how I would tackle each of the mentioned examples:


- If the behaviour gets too mechanical, you would see two sworn enemies allying each other to fight you because you are getting really strong

Not everything needs to be solved with open alliances (see FFa games that dont offer them). In your example I would not just "force" the sworn enemies to ally each other. I would just increase their likeniness to stop warring each other/decrease the likeliness to declare war on each other. They should be able to recognize the temporarily greater threast that is the human player (or any player that is leading, its not just a human player specific problem). This also has the benefit that the leading player can anticipate this behavior and maybe bribe one of the AIs to attack the other one to get some breathing space - making the player feel smart in the process ;).


Note: this doesnt need to be a binary thing (if player wins in 20 turns, switch to super angry state!), it can start early with minor influences on the AI behavior, and can grow larger the closer a given snowballing empire is to winning the game)


 If the behaviour gets locked by "diplomacy state", you would see empires you're at peace with do absolutely nothing as you steamroll to victory

Im not sure what diplomatic states are possible in HK yet, but assuming its similar to what we know from EL (there is peace, there is alliance, and there is a possibility of "shared victory"), and AI empire that is at peace with a snowballing human empire should either try to establish an alliance (to get that sweet shared victory) or try to back away from the current peace state ...maybe with increasingly ridiculous demands, seeking alliances with other empires with the end goal to declare (joint) war if possible.


Should AIs focus the player with most fame ? Even if he doesn't present any threats currently ?

My initial idea would be to take the current fame and the average fame gain of the last X turns to extrapolate, how likely each empire is to win the game. There have to be exceptions ofcourse - if the AI is in a war that it cant win, the focus shifts towards that enemy.


Should AIs be biased towards the player ?

In 95% of cases no. In ELCP I made some special case behaviors where AIs treat each other differently than players (in order to promote diplomatic deals amongst each other for example), but it is important that the AI in general does not treat the human player differently than other empires. Being a weak player and witnessing small AIs banding together in order to fight a large AI empire feels very "organic" and fun. If the AI hates on the human player, even if they are not a threat currently, its feels bad.


Should the difficulty setting only affect the AI's diplomacy with the player ? Or with every other empire ?

I'm actually unsure if difficulty settings should influence AI diplomacy at all. I would rather make that a different setting all together (similar to how stellaris does it). But if you go that route again I think it should affect all empires, but it needs to be done with care. One thing I didnt like in Vanilla EL on higher difficulties is, that there is no "block building" going on. You dont see empires banding together into two or three power blocks that fight each other, every one is just hating on everyone. This was very easy to exploit as a player and also boring.


EDIT:

After thinking about it, AI diplomatic behavior should at least in some cases be influenced by difficulty. This mainly goes for "willingness to backstab", as it can be very frustrating for newcomers/casual players, that mostly want to cruise through the game.

Updated 6 years ago.
0Send private message
6 years ago
Oct 14, 2019, 2:58:11 PM
Chocossimo wrote:

Hello everyone,


<snip>


So many points that we are still discussing and testing internally, and we would love to have your thoughts and ideas on these :)


What I can say right now is that our goal is to give an experience as authentic as possible, and having AIs with "understandable" trails of thoughts.

We've already built the foundation of our diplomatic AI with such behaviours in mind, so we hope we can achieve something really sweet in terms of lategame diplomacy.


Cheers

One thought is that maybe the shift in AI diplomatic behaviour should take place over a couple of steps, not just one.  The flip from "normal AI" to "AI is trying to stop me from winning" can be jarring and immersion breaking if it happens all at once. 


I could see four possible stages, though there may be room for improvement on this:

  1. Normal AI behaviour
  2. We are concerned: reduced willingness to co-operate/trade with the leader
  3. You are a threat: increased willingness to take aggressive action against the leader
  4. You are THE threat: the AI co-operate together against the leader

Ideally, individual AI civs will move into these stages at different times. Neighbouring civs may be more sensitive, and move up the scale faster.  Civs that are closer to you in Fame/military strength may be slower to react than civs who have fallen further behind.


As to whether this should be based on Fame or threat level, it's very difficult to opine without understanding better how the Fame system will work.  However, if the idea of Fame is such that it, in itself, doesn't snowball, then in theory a civ that generated a lot of Fame in past eras isn't a threat to do so again this era.  If that's true, then the AI might be better served focussing on earning it's own Fame, and the above diplomatic system could be focussed exclusively on traditional snowballing metrics of empire size and military strength.

0Send private message
6 years ago
Oct 14, 2019, 4:38:51 PM
Chocossimo wrote:


We still haven't exactly figured out what we want to do on this subject, and are discussing the impact of such AI behaviours:

- If the behaviour gets too mechanical, you would see two sworn enemies allying each other to fight you because you are getting really strong.

- If the behaviour gets locked by "diplomacy state", you would see empires you're at peace with do absolutely nothing as you steamroll to victory

- Should AIs focus the player with most fame ? Even if he doesn't present any threats currently ?

- Should AIs be biased towards the player ?

- Should the difficulty setting only affect the AI's diplomacy with the player ? Or with every other empire ?



In terms of the behaviour getting too mechanical, one way that might make for sense for the AI to suddenly declare war or leave an alliance could be espionage.  For instance if you have a high enough level spy within an empire maybe you could do a False Flag operation. 


In terms of AI focusing on players with most fame, I think one thing you'd want to avoid is if it ever made sense for the player to purposfully stay slightly behind in the Fame race to avoid heat from the AI.  I assume that wouldn't be a fun way to play Humankind anyway.


I definitely agree with LeaderEnemyBoss that the AIs shouldn't be biased towards the player, as to me it makes the game world feel more alive.  I always like when an empire I haven't even met yet suddenly gets taken out of the game as it makes me think woah, what happened there? I hope whoever took them out isn't next to me.



0Send private message
6 years ago
Oct 14, 2019, 9:10:32 PM

If you do want to have this kind of AI, please make this either an opion, or make it conditional on victory conditions being turned on, and allow us to turn victory conditions off. I want to feel immersed in a world, not in a game that I'm trying to win (because I'm not; I care about enjoyment, not about winning).

0Send private message
6 years ago
Oct 14, 2019, 9:15:56 PM
nlspeed wrote:

If you do want to have this kind of AI, please make this either an opion, or make it conditional on victory conditions being turned on, and allow us to turn victory conditions off. I want to feel immersed in a world, not in a game that I'm trying to win (because I'm not; I care about enjoyment, not about winning).

Even without victory conditions you need some motivations for the AIs to band together. For example: If you are a war monger and begin to conquer one AI after another, you would expect that the others are starting to band together. Them just watching passively as you do your thing would be the opposite of immersion in my book.

0Send private message
6 years ago
Oct 14, 2019, 9:36:19 PM

I agree with TravlingCanuck that you want an AI roleplaying as its current civ initially. But they should gradually warm up to the fact that there is a runaway that needs to be dealt with by cooperative action. 

0Send private message
6 years ago
Oct 14, 2019, 11:54:25 PM
TravlingCanuck wrote:


As to whether this should be based on Fame or threat level, it's very difficult to opine without understanding better how the Fame system will work.  However, if the idea of Fame is such that it, in itself, doesn't snowball, then in theory a civ that generated a lot of Fame in past eras isn't a threat to do so again this era.  If that's true, then the AI might be better served focussing on earning it's own Fame, and the above diplomatic system could be focussed exclusively on traditional snowballing metrics of empire size and military strength.

I second this. It depends on how many of the fame gaining strategies are based on aggressive behavior, whether that is military, ganging up on someone diplomatically, wonder races, and how many are based on just maximizing your own culture. Which of them are engine builders, and which are engine stealers. I think the exact strategy in each era should be based on what their current strength is, as well as what they were in past eras. An aggressive civ, whether militarily in other areas, will of course want to team up to attack the strongest player if they already have a fame lead, but even more passive ones may be able to enter alliances with the aggressive ones, basically sacrificing things like money or tech in exchange for an attack dog. They could chose to point their ally at either a snowballer or someone who is beating them at their own goals for the era.

0Send private message
6 years ago
Oct 15, 2019, 4:40:33 AM
LeaderEnemyBoss wrote:
nlspeed wrote:

If you do want to have this kind of AI, please make this either an opion, or make it conditional on victory conditions being turned on, and allow us to turn victory conditions off. I want to feel immersed in a world, not in a game that I'm trying to win (because I'm not; I care about enjoyment, not about winning).

Even without victory conditions you need some motivations for the AIs to band together. For example: If you are a war monger and begin to conquer one AI after another, you would expect that the others are starting to band together. Them just watching passively as you do your thing would be the opposite of immersion in my book.

If you are a (recent, aggressive, offensive - not defencive) warmongerer, sure, then they could band up because they feel threatened. Or they could suck up to you because they feel afraid.

If you are not a warmongerer, then no.


Just look at the real world; do we all gang up on the USA (which I would uphold as an example of a warmongerer, in this game's terms)?


I don't want civilisations to lose their personality just because this is a game where you can win or lose. I don't care about that, I care about an immersive experience, with personalities. Not 'players', not 'winners', 'personalities'. And so some might indeed gang up - great! And others might feel afraid - great! And others might just do nothing, because why would they? This is, in their eyes, the real world, after all, not a game.

Updated 6 years ago.
0Send private message
6 years ago
Oct 15, 2019, 5:11:54 AM

One of the reasons I'm so excited about this game is the notion that the journey matters more than the destination. And in reliving human history, I'd like it to be as realistic as possible.


The fact that the AI changes its behavior depending on if you're winning is, to me, a potential threat on the immersion.


The way I would go about difficulty (making a lot of assumptions about other game design elements) is by introducing two dimensions to it and then allowing the player to choose from any combination of those two for further customization of gameplay experience.


The first dimension would be the "goalpost", which increases the total fame the AI has at the end of the game by a multiplier. That way the player has to up their game in higher difficulties as they have to generate more fame to beat the AI, but they would not be "at a disadvantage" regarding their ability to generate fame throughout the game.


The second dimension would be "hardships", which would be the traditional AI has bonuses / is more aggressive approach. It is this dimension that would determine if the AI reacts or not to your performance.


I think this way you would be able to satisfy players like me who believe the AI shouldn't break the fourth wall and other types of players who believe the AI shouldn't let the player win as easily.

0Send private message
6 years ago
Oct 15, 2019, 11:37:00 PM
afarteta93 wrote:

<snip>


The way I would go about difficulty (making a lot of assumptions about other game design elements) is by introducing two dimensions to it and then allowing the player to choose from any combination of those two for further customization of gameplay experience.


The first dimension would be the "goalpost", which increases the total fame the AI has at the end of the game by a multiplier. That way the player has to up their game in higher difficulties as they have to generate more fame to beat the AI, but they would not be "at a disadvantage" regarding their ability to generate fame throughout the game.


The second dimension would be "hardships", which would be the traditional AI has bonuses / is more aggressive approach. It is this dimension that would determine if the AI reacts or not to your performance.


I think this way you would be able to satisfy players like me who believe the AI shouldn't break the fourth wall and other types of players who believe the AI shouldn't let the player win as easily.

I view the purpose of the AI similarly.  re your first point, I call that "pace car": how fast you have to go in order to win.  Your second I call "speed bumps": how frequently you need to react to the game/AI, rather than just going on auto-pilot with your pre-determined strategy.  Both should increase (fairly steeply) as difficulty level is increased, so that players on low difficulty levels get a very different game experience from those who choose the higher settings.  I'd consider our discussion here to be part of the "speed bump" (or "hardships"), and presumably it could be limited to higher difficulty levels.


The other aspects of the AI (creating interesting opponents to play against and differing the game experience based on who you start beside) can be fairly consistent across all difficulty settings.

0Send private message
5 years ago
Jul 10, 2020, 3:03:40 PM
Chocossimo wrote:

Hello everyone,


That's a very interesting subject


we are also preparing for "that" moment where a player is snowballing, and the main tool at our disposal is, as LeaderEnemyBoss said, diplomacy.

- If the behaviour gets too mechanical, you would see two sworn enemies allying each other to fight you because you are getting really strong.

- If the behaviour gets locked by "diplomacy state", you would see empires you're at peace with do absolutely nothing as you steamroll to victory

- Should AIs focus the player with most fame ? Even if he doesn't present any threats currently ?

- Should AIs be biased towards the player ?

- Should the difficulty setting only affect the AI's diplomacy with the player ? Or with every other empire ?


So many points that we are still discussing and testing internally, and we would love to have your thoughts and ideas on these :)

So I was looking for a thread on AI and couldn't find any recent ones. So....

ARISE FROM YOUR GRAVE!!

Yeah, um. A bit of foreword. AI is one thing that has me a bit nervous. Nearly all 4X out there, like you're probably painfully aware, get criticized for bad AI. It's kind of a staple of the genre and for some reason this stepping stone is insanely hard to overcome. I know, I know, it's due to the massive complexity of the games. However good the reasoning, it makes for frankly pretty lousy gameplay when your opponent doesn't know how to use flying units or can be exploited infinitely in bad trade deals etc etc.

I know you know this is an issue but I really want to empasize, put some effort to the AI. I'd rather have a few less features in the game with a decent, competitive AI (in the sense it has "brains") than a hollow, hardscripted zombie bot rival army with a bazillion systems ranging from five-tier espionage and subterfuge to eighty-seven religions with six weighted faith factors, separate naval, air, ground combat with half the dev resources poured to getting the combat just right, culture, diplomacy, influence, historical marks, culture-meld combos, yadda yadda.

Less is more, sometimes. I'll be happy to buy those DLC once things get properly tested and fleshed out. Of course the base game has to have a good amount of meat on the bones, given that it's going straight up against the current sovereign, daddy Sid's creation. Like it or not, comparisons will be drawn and initial reception will be absolutely critical.

So, back to the AI. First and foremost I'd suggest as per above
1) Don't fall in to the feature-bloat trap -> less features, easier time to get the machine brain up to snuff
But also
2) Take a fresh approach to the difficulty and competition -> the power player will be a threat to himself

What do I mean? Why, it indeed is immersion breaking to have your centuries old pals go ballistic on you the moment you reach some arbitrary critical score mass and all of a sudden the historical simulations turns into a ye good olde board game.

Instead of pushing the diplomacy route as a way to spice up the challenge, how about you'd design ways for the snowballer to become fragile/dependent on certain things and/or creating problems from within.

So in practice:
Super industry -> you'll pollute a lot and cause unhappiness and riots + the local fauna will suffer and deplete tile yields
Super economy -> you'll be a prime target for every manner of crooked thieves and shifty bureucrats, corruption runs amok and influence drops, you're not seen as reliable trade partner
Super science -> you're engaging in wild experiments and that'll upset every traditionalist/moderate and backlash can trigger erased techs, assassinated scientists, general detachment from other (less advanced) societies due to radical worldview differences
Super food -> you're draining the soil and causing major natural disasters as butterfly effect will magnify the droughts and fertilized-polluted waters carry on

Stuff like that. Make the player bear a burden for getting ahead in a meaningful way so there'll be tough choices to make.
-Do I want to mega-pump this food to get more population with the cost of destorying that Fish Tile after 10 turns?
-Do I want to max out my markets for some money to maintain my army with the cost of getting -15% Influnece and diplo penalties for the foreseeable future?
-Do I want to go for tech leader and cause the religious and traditionalist neighbours to cut off all communications, especially with a risk of my own people hanging the top scientists for those hair & body cosmetic experiments?
-Do I want to run cookie cutter 4X ultra foundry-blacksmith-mill-forge-hammer-production route and make my people miserable wage slaves and kill off all our furry little forest friends as we need fuel for the fires while at it?

I guess you get the point.

In addition you could make the snowballer fragile along with these "threats from within"/"a price to pay"-sort of elements.
For example the industry could rely on Metals and Wood, or just Resources in general. Maybe those Resources could be sabotaged (hostile AI actions) and the whole production machine would suffer. What's a few forest fires or mine explosions between friends, no?
Same with food. Poison the rice fields!
Economy? Bribe the corrupted politicians, should be easy enough.
Science? Sabotage a few experiments by altering the equipment/test conditions and watch the target get half the world (and his own people) after him after the "famous sleep experiment" goes horribly wrong.

So. Specializing in any area would be putting your eggs in one basket. High risk & reward.

The benefit of an approach as something like this would be to ease pressure from building a super efficient and Big Brain AI I'd like to think. Now don't get me wrong, I want a great AI as much as the next guy but with a development effort on something like this, it would shift the gameplay focus maybe a little bit from "the whole wide world" into a bit more "me and my kingdom / empire".
I'd like to think this could be beneficial for HK generally speaking. It's a fresh approach, gives a bit less of that '4X is always a complicated wargame'-feel and would probably go well with the idea of cultural merging that you've going on.

And finally, my take on the actual (mostly) questions in the original quote:

- If the behaviour gets too mechanical, you would see two sworn enemies allying each other to fight you because you are getting really strong.

-> In a way and in some situations this would actually make sense. Banding together to fight a greater evil is something humans tend to do. So I wouldn't mind these types of events, but ofc there should be a decent weighting (really big threat) for this to happen.

- If the behaviour gets locked by "diplomacy state", you would see empires you're at peace with do absolutely nothing as you steamroll to victory

-> To keep things interesting, friendly empires wouldn't necessarily need to go all out on you. Like in real world, they would probably engage in covert operations, secret alliances and diplomacy to undermine your rule. Open warfare would be the last resort. Your "friends" would smile and compliment you while you're pulling hair with riots popping up left and right for no real reason.

- Should AIs focus the player with most fame ? Even if he doesn't present any threats currently ?

-> If Fame is the one and only key to victory, yes. But again, not necessarily all out on every front. If you're pumping out Wonders for high Fame, maybe they could start to race you on the architecture front to keep you on your toes. That, or if you're not posing any threat indeed, they could sieze the opportunity and stab you in the back. Nice lands you got there neighbour, just what I needed, you know.

- Should AIs be biased towards the player ?

-> Absolutely not. In an ideal world the AI would treat all forces equally and only react to growing threats step by step. Being biased against the player kills immersion really fast, makes for frustrating diplomacy, illogical AI moves (as in, unintuitive -> "why would he all of a sudden move all his troops to MY side in his empire even though I'm not advancing"), and makes the game feel gamey.

- Should the difficulty setting only affect the AI's diplomacy with the player ? Or with every other empire ?

-> I guess all empires to keep things balanced. Would look, again, unimmersive and a bit silly if all AI's would live mostly happily with each other while sending death threats nonstop your way.

0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message