Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

9 Ways that 4X AIs disappoint us

flyingjohn

Arcane
Joined
May 14, 2012
Messages
2,961
Personally what i hate in most 4x games ai is that it can't deal with the player or other ai's emerging as the dominant superpower of the game.
There really needs to be some form of threat level assigned to each fraction in the game where the other ai will start to scheme it's downfall.
For example:Fraction A is the dominant production powerhouse(with it's technological level being let's say a second rank) and it starts raising it's military rapidly.
There should a flag being raised by the other ai's that is going to lead to big trouble and they should respond either by diplomacy(economic isolation ,bribing others to war or making alliances with other strong factions.) or just attacking before the superpower is ready to steamroll everybody.
I know this would probably lead to getting attacked by everybody but the alternative is you or the runaway ai just steamrolling everybody else which is much more boring.
This way you would need to be careful of being exposed as threat before you are actually ready to just kill everything.
Most 4x games the ai just focuses on the wrong target or just you and the game is just a one sided affair from there onward.

Also why is there no troll ai personality for factions that have no chance in winning the game(stats can easily predict is there a chance) in any 4x game?
Imagine this:Faction R is behind in every demo,in a typical 4x game it will just continue doing normal things and loose.
But what if it can become a annoying asshole that will declare war on stronger player and raid trade caravans,diplomatically screw others over(especially if there is a council/un mechanic) and other annoying things.
It would make the 4x genre more interesting.

I know all of this probably impossible to implement properly but a man can still dream.
 
Last edited:

RayF

Arcane
Patron
Developer
Joined
Aug 6, 2015
Messages
324
Personally what i hate in most 4x games ai is that it can't deal with the player or other ai's emerging as the dominant superpower of the game.
There really needs to be some form of threat level assigned to each fraction in the game where the other ai will start to scheme it's downfall.
For example:Fraction A is the dominant production powerhouse(with it's technological level being let's say a second rank) and it starts raising it's military rapidly.
There should a flag being raised by the other ai's that is going to lead to big trouble and they should respond either by diplomacy(economic isolation ,bribing others to war or making alliances with other strong factions.) or just attacking before the superpower is ready to steamroll everybody.
I know this would probably lead to getting attacked by everybody but the alternative is you or the runaway ai just steamrolling everybody else which is much more boring.
This way you would need to be careful of being

The way I deal with this is Remnants is to measure this kind of threat by the number of systems controlled. If it gets too large (based on galaxy size and total number of empires), then empires will begin seeing you as a threat and start turning against you. Even your allies will get nervous and need to be constantly pacified.

Checking industrial, technological and military strength is already very possible and seems like a better leading indicator than controlled systems. I think it's more complicated, however, because of the risk of false positives. Going by controlled systems makes it undeniable what is going on.
 
Joined
Mar 3, 2010
Messages
8,865
Location
Italy

RayF

Arcane
Patron
Developer
Joined
Aug 6, 2015
Messages
324
it shows. you complain about stuff which europa universalis fixed already years ago and that meanwhile even civ4 mods got it right.
so what's your next groundbreaking project? civilization? master of orion 2?

I keep thinking about playing a Paradox title but everyone keeps saying wait until the next patch.

Also, I have played Civ 4. You know what the biggest problem with the Civ 4 AI is? Civ 5.
 
Joined
Jul 4, 2014
Messages
1,563
EU IV where AI navies don't take attrition damage, because the mechanic is too diificult for it to handle.

Paradox games are bad RTS games with interesting themes. Why even bring them up? Quake 3 also had great AI players.
 

rezaf

Cipher
Joined
Jan 26, 2015
Messages
652
Personally what i hate in most 4x games ai is that it can't deal with the player or other ai's emerging as the dominant superpower of the game.
There really needs to be some form of threat level assigned to each fraction in the game where the other ai will start to scheme it's downfall.

While I understand where you're coming from, I hated this approach since at least Civ1. I'd often leave other civs alive constrained to their capital or other last city by a ring of fortrified units, kinda like in a reservation. Even if I did so for centuries, and they'd be stuck with chariots while I guarded them with MechInf, they'd sometimes chose to "sneak attack", and only my benevolence prevented me from just waltzing into their city almost unopposed.
Later civs made it much more difficult to have such a degree of dominance over other players, and it also became almost impossible to constrain another player in such a fashion, but the basic problem never went away. By the time the other players decided to gang up on you, you were already so powerful that this was just a vain, suicidal act.
I realize we're talking about games here, but ... did the rest of the world gang up on the soviet union or the united states?
I forgot who, but a famous saying about the US is that nobody can bring about their downfall safe for themselves. That's how big empires in 4x games should be - there ought to be mechanics cutting them to size.
Of course, nobody has come up with a solution that doesn't frustrate players in the process, so it'd of course more than a bit unfair to ask RayF to do just that.

With this in mind, I like you list Ray and how you decided to tackle the problems presenting themselves for the most part. A lot of the things I'd like to see addressed in a 4x game didn't make your list - but rightfully so. Again, we can hardly expect some indie to tackle problems even big players failed to come up with a decent solution to in decades.
 

RayF

Arcane
Patron
Developer
Joined
Aug 6, 2015
Messages
324
With this in mind, I like you list Ray and how you decided to tackle the problems presenting themselves for the most part. A lot of the things I'd like to see addressed in a 4x game didn't make your list - but rightfully so. Again, we can hardly expect some indie to tackle problems even big players failed to come up with a decent solution to in decades.

Well, as I often say, I am not an indie game developer... I am a professional software developer who has just decided to make a game that he's gotten tired of waiting for game companies to make (a modernized MOO1). Most of my 30 years of so of programming experience lies in a lot of fairly complex engineering applications. And to be perfectly frank, all of the AI issues I listed in my post are fairly trivial to fix. I think the real problem is not their difficulty, but that solving these problems is not a priority for game companies since there's very little return on investment for it. In addition, the constant market pressure to reiterate games as new versions (Civ 3, CIv 4, Civ 5, Civ 6) almost always resets the AI for these franchises back to their starting point which means we always see the same problems.

What I listed are problems I have noticed in my gameplay and that I notice other players complaining about to this day. I'd certainly welcome input on other AI problems that players run into. If I have a list of problems, I can fix them and then open up the code for anyone else in the future.
 

Severian Silk

Guest
A space combat game with dynamic world would be neat.
 

RayF

Arcane
Patron
Developer
Joined
Aug 6, 2015
Messages
324
A space combat game with dynamic world would be neat.

Please elaborate. There may be two schools of thought on this... there's the "galaxy simulation" mode where events just happen regardless of player actions. Stellaris is a great example of this, where events happens so frequently that most are farily inconsequential and there for flavor. Generally these events are driven by actors usually below the view of the empire, such as citizens.

The other school is that the player and other space-faring empires are the protagonists and that dynamism in the galaxy comes as a direct result of their actions. For example, 20-year war between the Klackons and Mrrshan (of which the player was no part of) qualifies as an event.
 

Severian Silk

Guest
No, no empires. Just you and your ship in a dynamic/reactive world where your actions matter.
 

RayF

Arcane
Patron
Developer
Joined
Aug 6, 2015
Messages
324
No, no empires. Just you and your ship in a dynamic/reactive world where your actions matter.

oh, my bad. You mean kind of like a space survival game. I wonder of No Man's Sky is eventually going to try and get to that point.
 

rezaf

Cipher
Joined
Jan 26, 2015
Messages
652
Well, as I often say, I am not an indie game developer... I am a professional software developer who has just decided to make a game that he's gotten tired of waiting for game companies to make (a modernized MOO1).

I hope you didn't ready my post as trying to belittle you. But professional or not, I'd say seasoned development houses putting a dozen (or more) programmers on the job are still a different beast.

Many things I'd like to see have been partially covered by your list (sometimes across several of it's points), but I'm not sure about the particulars.
For example, the last point about personality makes it sound like the same innane demands will be uttered, but with more style. Of course, in an earlier point you said AI players will have a memory, which may or may not improve the situation significantly.
It might be cool for the AI to have an agenda depending on the personality chosen. Civ has made a token effort in this regard, but I don't think it really works.
In the background, this might work kinda like the cards you can draw in a Risk game. Pursue rocket technologies. Try to conquer all gaia planets. Strive to be friends with everyone. Be good and never tolerate other players doing evil things. Play imperialistic. Things like that.
Another nice recent token effort in this area was Stellaris' democracies electing new rulers with different priorities every few years. It isn't nearly as impactful as it could be, and authoritarian governemnts' rulers (priorities) are immortal, but it's at least something...
 

Severian Silk

Guest
No, no empires. Just you and your ship in a dynamic/reactive world where your actions matter.

oh, my bad. You mean kind of like a space survival game. I wonder of No Man's Sky is eventually going to try and get to that point.
Well, maybe something like several 4X factions battling each other in the background, and you get to choose sides and help one of the factions. Of course, how much difference can a single pilot really make in a few hundred hours and still have the game feel like it makes sense/is realistic? 4X games are too abstract to accomplish this, possibly. Maybe if you limit the game to a single system it will make more sense.

Battle Brothers and Space Rangers sort of have dynamic universes, but I think they are very primitive. OTOH, Jagged Alliance 2 has basically no economy (and is highly asymmetric), but feels gud.
 
Last edited by a moderator:

RayF

Arcane
Patron
Developer
Joined
Aug 6, 2015
Messages
324
Well, as I often say, I am not an indie game developer... I am a professional software developer who has just decided to make a game that he's gotten tired of waiting for game companies to make (a modernized MOO1).

I hope you didn't ready my post as trying to belittle you. But professional or not, I'd say seasoned development houses putting a dozen (or more) programmers on the job are still a different beast.

No, I didn't take it that way at all! The counterpoint that I was making was that I actually have a shit ton of technical software development experience and with applications that are probably as challenging, if not moreso, than what a lot of professional game developers deal with. Different technical skills, to be sure, but those can be learned or mitigated (as I have done by focusing on 2D graphics). I have yet to become intimidated by any of the AI or other data problems I have encountered so far. On the contrary, in fact, since some of them appear straightforward to solve. My only conclusion is that game devs are not simply given the opportunity to focus on AI improvements.

It might be cool for the AI to have an agenda depending on the personality chosen. Civ has made a token effort in this regard, but I don't think it really works.
In the background, this might work kinda like the cards you can draw in a Risk game. Pursue rocket technologies. Try to conquer all gaia planets. Strive to be friends with everyone. Be good and never tolerate other players doing evil things. Play imperialistic. Things like that.
Another nice recent token effort in this area was Stellaris' democracies electing new rulers with different priorities every few years. It isn't nearly as impactful as it could be, and authoritarian governemnts' rulers (priorities) are immortal, but it's at least something...

Keep in mind that there are 6 AI 'personalities' in MOO: Honorable-Ruthless, Aggressive-Pacifist, Diplomatic-Xenophobic. Those will affect how individual AIs react to events and how willing they are to engage in particular actions.
 

Ludovic

Valravn Games
Developer
Joined
Mar 7, 2016
Messages
71
Location
The Cold North
I think as a 4X / Grand Strategy developer it is important to realize we are not creating AI to simulate a human opponent, we're creating entertainment for the player by making the game challenging and interesting. This means creating the illusion of personality and competence - not an illusion as in cheating to gain an advantage, but making the AI perform actions that the player can ascribe to an agenda.

Some developers who accept they can't create "real" AI go into the completely other direction and make it unintelligent by design, in order to create an artifically hostile world for the player. An AI which stubbornly refuses to accept peace with the player even when defeat is unavoidable, in order to create a grind for the player, is annoying. AI that declare wars they will obviously lose are annoying. AI that never take advantage of player weakness are annoying. AI that will throw 200 turns of alliance and friendship away if the player conquers a planet from some evil empire because of arbitrary "warmonger" penalties are annoying.

Too many developers use AI as a progress roadblock and balancing mechanism, rather than as a tool to create interesting stories and personalities. It's ok that AI cannot optimize strategies like a player - that's not annoying. But making the AI dumb on purpose, in order to create artificial difficulty, is in my opinion a mistake. That's something that might be relevant as an optional setting, but not as the core principle of the AI. Good players will get ahead of the AI - but those players deserve their crushing victory, and can use opt-in handicap/AI cheat or asymmetrical starts to even out the balance.

It's super difficult, no doubt about it. But I'll take a dumb AI with personality over a mediocre AI which is stupidly hostile and uncooperative. We can win against either, but the latter is not fun.
 

RayF

Arcane
Patron
Developer
Joined
Aug 6, 2015
Messages
324
I think as a 4X / Grand Strategy developer it is important to realize we are not creating AI to simulate a human opponent, we're creating entertainment for the player by making the game challenging and interesting. This means creating the illusion of personality and competence - not an illusion as in cheating to gain an advantage, but making the AI perform actions that the player can ascribe to an agenda.

I agree completely with this! To me, the point of the AIs is to create both an immersive and challenging experience for the player. I believe that it's possible to accomplish both of those ends without cheating.

It's why I mentioned in my blog post that my theory about AI design is simply "Don't do stupid things" because those are exactly the actions that break immersion for the player and remind him that he's playing against a piece of code. The AI doesn't have to be truly smart (i.e. an actual AI), but just 'not dumb' enough to fool the player -- to create that "illusion of personality and competence" that you mentioned and what I think most players want.
 

kyrub

Augur
Joined
Aug 13, 2009
Messages
347
First, thanks for this thread and thinking, Ray!

What I like/dislike in AI creation:
  • FORMULAIC ai. After playing the game X hours, you realize that the AI always reacts to the move A with a move B. It's easy to use, then: you play A exactly when you need the AI to follow with B. The AI becomes "a piece of code", as you wrote. This happens to almost every game eventually, but some great games are hard to break. In HoMM3 you can block AI opponent in a castle during a siege with one weak unit - that is what we found at last. You can cheat it with separated units' attack etc. But HoMM3 AI remains the hallmark of the genre, because X was quite long. SOLUTIONs - a) insert RNG that shuffles AI behaviour a bit. It is hard to get the "a bit" right. AI behaviour can become sub-optimal or erratic, especially if "a bit" is too much. I still find the solution better than formulaic approach. b) Make AI decisions complex and intertwined to the point, that it is hard to understand the formula behind it. Well. This is THE great path of AI, really hard to do, although some complex games (Civ series) try to. c) Make AI play optimal, to the point that even formulaic means "formulaic, but hard to beat". This could actually happen with games with simple and clear rules (like MoO) but it's hard.
  • Along with avoiding dumb things as you wrote, give AI a few SMART MOVES. Remember Galactic civilizations, who were celebrated as the great AI game? Part of the fame was due to excellent diplomatic tricks. In almost any review, you could read that the opponent encircled by your troops and facing certain death suddenly gives all his last colonies and troops - to your biggest rival! Simple and great idea to spice up things. But one could go further: what if the AIs can orchestrate (from time to time) a premeditated sneak attack on many fronts - especially if the human opponent is getting away? What if they secretly prepare rebellion on several adjacent planets of your empire and give the signal once you enter the war? What if they face losing on a planetary council but a year before they rebel a few planets... go imagine. - Could two enemies attacking your empire exchange two planets to have better reach and more targets? Could they share a desing of a dangerous ship to harm you? Let's have more fantasies like this.
  • Can we have more diplomacy options? My favourite is PAX ROMANA: you are winning a war against smaller opponent when your big rival comes knocking and asks you to end war and useless bloodshed... or they would have to intervene. What do you choose? The other one is TRUCE: let's have a settled time when we promiss to not use weapons against each other. This way many wars ended in history. Alpha Centauri model, and it worked perfectly. It is a third way to enter in relation besides Treaty and War. It creates great tension.
  • What I find acceptable: AI cheating. Really, why can't we give AI more money? Only dumb players cry that it is not fair. We are plaing against a code, how is that fair? As far as omniscient AI goes, it is less clear, because it usually harms game mechanics (detection, spying). I would try to avoid omniscient, or give it as an extra option in difficulty...
  • ...which is my last reccomendation: make an extra option for difficutly: AIs knows, AIs exchange tech wherever possible, yes, even the "AIs dislike human player". Let us choose how aggressive and advantegous opponent we want. Because we will break the AI, sooner or later, and then we need this option badly.
 
Last edited:

mondblut

Arcane
Joined
Aug 10, 2005
Messages
22,230
Location
Ingrija
I realize we're talking about games here, but ... did the rest of the world gang up on the soviet union or the united states?

soviet union and united states had other things to do beyond painting the map.

4x is about running the Third Reich as Ghenghiz Khan.

That's how big empires in 4x games should be - there ought to be mechanics cutting them to size.

Yeah yeah yeah :roll:

If you can't expand because muh realism, you do what exactly?

Anyway, all those complains about AI tend to forget the AI is not buying your games. He is only there to entertain the player by losing gracefully.
 

RayF

Arcane
Patron
Developer
Joined
Aug 6, 2015
Messages
324
FORMULAIC ai. After playing the game X hours, you realize that the AI always reacts to the move A with a move B. It's easy to use, then: you play A exactly when you need the AI to follow with B. The AI becomes "a piece of code", as you wrote. This happens to almost every game eventually, but some great games are hard to break. In HoMM3 you can block AI opponent in a castle during a siege with one weak unit - that is what we found at last. You can cheat it with separated units' attack etc. But HoMM3 AI remains the hallmark of the genre, because X was quite long. SOLUTIONs - a) insert RNG that shuffles AI behaviour a bit. It is hard to get the "a bit" right. AI behaviour can become sub-optimal or erratic, especially if "a bit" is too much. I still find the solution better than formulaic approach. b) Make AI decisions complex and intertwined to the point, that it is hard to understand the formula behind it. Well. This is THE great path of AI, really hard to do, although some complex games (Civ series) try to. c) Make AI play optimal, to the point that even formulaic means "formulaic, but hard to beat". This could actually happen with games with simple and clear rules (like MoO) but it's hard.

I agree. Some randomness needs to be thrown in to keep the AI from being too predictable. This is even done for the AIs in very deterministic games, such as chess

Along with avoiding dumb things as you wrote, give AI a few SMART MOVES. Remember Galactic civilizations, who were celebrated as the great AI game? Part of the fame was due to excellent diplomatic tricks. In almost any review, you could read that the opponent encircled by your troops and facing certain death suddenly gives all his last colonies and troops - to your biggest rival! Simple and great idea to spice up things. But one could go further: what if the AIs can orchestrate (from time to time) a premeditated sneak attack on many fronts - especially if the human opponent is getting away? What if they secretly prepare rebellion on several adjacent planets of your empire and give the signal once you enter the war? What if they face losing on a planetary council but a year before they rebel a few planets... go imagine. - Could two enemies attacking your empire exchange two planets to have better reach and more targets? Could they share a desing of a dangerous ship to harm you? Let's have more fantasies like this.

I understand your point, but I think that what we consider "intelligence" is just really 99% "don't be stupid" and 1% "be smart". Most of our IRL intelligence is just avoiding dumb things.... don't run with scissors... don't play with fire... don't drive like a maniac... don't mouth off to cops... The really smart things that people do are actually pretty uncommon.

This is why excising all of the dumb behavior is a priority, because that's what everyone would notice. Really smart behavior like you suggested would be great, but no one would notice if it didn't exist.

Can we have more diplomacy options? My favourite is PAX ROMANA: you are winning a war against smaller opponent when your big rival comes knocking and asks you to end war and useless bloodshed... or they would have to intervene. What do you choose? The other one is TRUCE: let's have a settled time when we promiss to not use weapons against each other. This way many wars ended in history. Alpha Centauri model, and it worked perfectly. It is a third way to enter in relation besides Treaty and War. It creates great tension.

"Pax Romana" sounds interesting... demanding that Empire A end its war against Empire B. Of course, that implies that the player is an ally of Empire B, so maybe Empire B should have already asked the player to intervene.

"Truce" sounds a lot like the Peace Treaty option.

What I find acceptable: AI cheating. Really, why can't we give AI more money? Only dumb players cry that it is not fair. We are plaing against a code, how is that fair? As far as omniscient AI goes, it is less clear, because it usually harms game mechanics (detection, spying). I would try to avoid omniscient, or give it as an extra option in difficulty...

I think AI cheating is acceptable once you have ensured it is not doing stupid things and you need to give the player a greater challenge. An incompetent AI that cheats is understandably infuriating to a lot of players because it reeks of laziness by the developers.

...which is my last reccomendation: make an extra option for difficutly: AIs knows, AIs exchange tech wherever possible, yes, even the "AIs dislike human player". Let us choose how aggressive and advantegous opponent we want. Because we will break the AI, sooner or later, and then we need this option badly.

Well, the game will be open-sourced so I have no doubt people will be forking the repo and making their own custom changes to it.
 

Ludovic

Valravn Games
Developer
Joined
Mar 7, 2016
Messages
71
Location
The Cold North
Very good point about avoiding stupidity being essential. I'll add another point which I find extremely annoying:

X. The AI plays by very different rules.

Now, giving the AI higher income, lower upkeep, etc. is a kind of cheating that players expect at higher difficulties. It's brawns making up for the lack of brains to optimize fully. But when the AI just ignores mechanics completely (such as the attrition someone mentioned) or get free units/armies constantly, it becomes annoying. If the enemy can replenish an almost annihilated army into a full doomstack, in your territory and in a turn or two, that is just annoying, not challenging. This kind of cheating robs the player of reaping the rewards of good play. It also encourages gaming the AI to work around such tricks.

If AI cheating means that the player has to avoid actions that without cheating would be good (ie defeating an enemy army), the game becomes twisted and the actual mechanics lose their significance.
 

vonAchdorf

Arcane
Joined
Sep 20, 2014
Messages
13,465
The average player doesn't like if the AI is too good (a.k.a. acting like a human opponent would), e.g. backstabbing even with high diplomatic relations.
 

RKade8583

Novice
Joined
Mar 2, 2017
Messages
30
Location
Wa.
How is the AI better in civ 4 with mods? Which mods? Can I use them with Realism Invictus? Is one of them Realism Invictus?

Also, now I want to play your game. It sounds similar to what Galciv3 was supposed to be.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom