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

rezaf

Cipher
Joined
Jan 26, 2015
Messages
650
Yeah yeah yeah :roll:

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

When you're not busy expanding in a 4x game, you should be busy exploring, exploiting or exterminating I guess.

That said, I hate for example Paradox' tendency to put in artificial barricades to limit player expansion. Such methods are annoying and idiotic, imo.

What I meant was there ought to be some point when expanding further is only worth it for the galactic equivalent of geopolitics - you'd not get a significant ROI. And at some point, it should be in your best interest to let go off some of your control.
The best example I can think of is again from Paradox, in the vassal politics in CK2. You have a limit on how large your core are can be. You can go over that limit, but at a significant premium. Eventually, you WILL delegate some of your power - and once you grow big enough, there'll be quickly more power that you have delegated vs. power you directly control. This can lead to some pretty challenging situations in case of crisis - in CK2 this is usually the death of your ruler.
The CK2 system isn't perfect (and I totally think there should be a game option disabling vassal disloyalty alltogether for people preferring to paint the map their color), but it's a solid start.

Eventually (in space 4x terms), your advances should just propel you into a different ballpark. Say, early game you'd usually strive for a big populace with fertile planets to sustain them, with loads of people staffing your farms and research labs. Eventually, you'd develop AIs that'd research better than all your scientists ever could, and self replicating nanites that make all your factories obsolete. But maintaining all of that would require the output of powerful stars. Systems without planetary bodies worth colonizing would suddenly be extremely appealing, whilst all those planets with backwards people would lose a ton of their value. You'd want to delegate the busywork of managing them to AI governors, and a game should make you care little if those populations eventually are conquered or break away.
And so on and so forth.

I realized this is not the topic of this thread at all, so I'm putting this in a spoiler tag.
 

RayF

Arcane
Patron
Developer
Joined
Aug 6, 2015
Messages
324
I wrote this last night kind of as a way to codify some of the significant 4X AI problems I've identified and tried to tackle.

https://remnantsoftheprecursors.com/2017/03/01/9-ways-that-4x-ais-disappoint-us/

I would appreciate input or any other common problems that I've missed as well.
Does your AI pwn you?

You'd be surprised how little time I have to play the game. Most of what I do is have it play my empire on auto where it is controlled by an AI. Then I watch what it does and look for stupid things. Currently, it doesn't time transport attacks to land simultaneously (which is getting fixed before the next release) and it doesn't handle empire reserve at all for making new colonies grow faster. It's really good (better than me, imo) at exploring and expanding efficiently as well as getting its colonies built up.

It updates its ship designs fairly well (a strategic point in MOO1) but doesn't comprehend some of the more esoteric ship specials yet. This is because the ship combat AI is rudimentary since I will not start on that part of the game until after the next release. It spies maybe too aggressively and doesn't pick its sabotage targets well. It's fine at espionage, though. For research, it evaluates most of the techs fairly well and shoots up the ladder appropriately. It also knows not to value worthless techs and will also trade fairly with the player (the trade requestor is always at a slight disadvantage, though).

I have a long list of small things to improve in the AI.
 
Last edited:

mondblut

Arcane
Joined
Aug 10, 2005
Messages
22,205
Location
Ingrija
Yeah yeah yeah :roll:

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

When you're not busy expanding in a 4x game, you should be busy exploring, exploiting or exterminating I guess.

Except that exploring is typically over in first 5-10% of a map playtime and exploiting means filling a queue with the same list of buildings to construct and forgetting about the place forever. Instead of all those retarded "AI assistants" what 4x games need is just a button to save a default queue once then to use it everywhere. As for exterminating, past a certain point (again, some 15-20% into the map) it is what expanding is all about.

Paradox thinks watching the paint (on the map) dry for hours and occasionally picking an answer to the same fucking random event that pops up all the time while waiting for another "claim" to appear or truce counter to expire is "fun". Nope. Their screensavers might entertain as time-wasters once in a while, but that's despite them trying everything they can to prevent it. Then again, watching defrag repaint hdd blocks has similar effect.
 
Last edited:

Norfleet

Moderator
Joined
Jun 3, 2005
Messages
12,250
Another thing with the AIs: They have very little understanding of what things annoy human players in general, or even SPECIFIC human players. There is no way to communicate your displeasure with something the AI has done. The AI certainly doesn't comprehend that it has done something that will inevitably lead to war. Leading offender? Border Gore. AIs do not grok border gore at all. They don't grasp that a player is unlikely to start a war if it will result in border gore, will be displeased by actions that cause border gore, and are definitely not interested in ending a war on terms that will result in border gore.
 

octavius

Arcane
Patron
Joined
Aug 4, 2007
Messages
19,184
Location
Bjørgvin
Interesting article, and kind of funny that it uses Master of Orion as an example, since I think MoO1 is one of the few TB strategy games with a decent AI that keeps providing a good challenge for experienced players.

If I should add to your list it would be 10) AI can't use the same resources as the human player. This is most glaring in the Age of Wonders games. In AOW2 the AI can't even use ships. In AOW:SM it can't use things like Quest Stones and recruiting sites.

I think the clue to making a good AI is to not make the game too complex with too many options, at least on the strategic level.

And for single player games I think it may be better to intentionally make the factions not balanced. This creates a better dynamic and less predictability.
 

Norfleet

Moderator
Joined
Jun 3, 2005
Messages
12,250
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.
It seems to me that the Space Empire genre misses out on a very huge advantage of Space: The effective infiniteness of the map. Space Empire games are always treated, essentially, as being the same as a World Empire game: You have a map, which, instead of being a "World" is a "Galaxy", you have a bunch of pre-fixed AI sides spawned within it at around the same time you exist, and then the AI tries, probably poorly, to keep up with the player.

It doesn't have to be this way. What if the map is simply of infinite size and chunks are simply procedurally generated as the player explores it, and eventually the player will encounter a rival power, which can thus be generated to be at an appropriately interesting level and composition on the spot, instead of having to micromanage how it got there. Therefore, the AI can entertain the player by making mistakes from that point on, instead of having its profusion of early mistakes bury it or its early advantages turn it into a waiting game until the mistakes bury it. After all, if a tree falls on a mime in a forest and nobody sees, does anybody care?

Except that exploring is typically over in first 5-10% of a map playtime and exploiting means filling a queue with the same list of buildings to construct and forgetting about the place forever. Instead of all those retarded "AI assistants" what 4x games need is just a button to save a default queue once then to use it everywhere. As for exterminating, past a certain point (again, some 15-20% into the map) it is what expanding is all about.
This is what happens when the actual act of having an empire isn't interesting. If you can make a game that's interesting to play even after the player has painted the map in his color and there are no further enemies to conquer or map to paint, then you'll have resolved this problem. You may notice how in the real world, most countries are not terribly interested in conquering their neighbors because they really have their own shit to worry about and don't need more shit to deal with.
 

GarfunkeL

Racism Expert
Joined
Nov 7, 2008
Messages
15,463
Location
Insert clever insult here
Paradox hasn't really fixed any of these problems. Paradox AI cheats and ignores certain mechanics - attrition for naval units in EU and range for naval units in HoI being great examples. To prevent player from becoming too big, they had the BadBoy score, that artificially made everyone attack you once it reached high enough level.

What Norfleet said about procedural generation to truly create a properly large galaxy is a great point. Even the largest galaxy maps in 4x games are tiny compared to the actual Milky Way. Aurora does this well - Non Player Races have a chance to be created at the moment player jumps into a system with a planet suitable for habitation. Then that NPR can range from pre-space travel to up to 2 tech generations ahead of player, with a similarly randomized fleet size. It can't create multi-star empires but the NPR will get active and start exploring/exploiting its system and nearby systems as well. Of course, the AI in Aurora is seriously lacking due to being programmed in VB6 and there's hardly any diplomatic system in the first place but it does show that such a system can work.
 

mondblut

Arcane
Joined
Aug 10, 2005
Messages
22,205
Location
Ingrija
It seems to me that the Space Empire genre misses out on a very huge advantage of Space: The effective infiniteness of the map. Space Empire games are always treated, essentially, as being the same as a World Empire game: You have a map, which, instead of being a "World" is a "Galaxy", you have a bunch of pre-fixed AI sides spawned within it at around the same time you exist, and then the AI tries, probably poorly, to keep up with the player.

It doesn't have to be this way. What if the map is simply of infinite size and chunks are simply procedurally generated as the player explores it

:mrpresident: How come nobody has ever thought of that? :|


at an appropriately interesting level

That would kind of defeat the purpose of procedurally generated infinite space though. It literally begs for encountering everything from stone age tribals to enslave and exploit, to spectral aliens from 9th dimension that would vaporize you in 3 turns if you are unlucky to meet them. "everyone starts at the same time on same conditions" is another Civilization throwback that makes absolutely no sense in space.

This is what happens when the actual act of having an empire isn't interesting. If you can make a game that's interesting to play even after the player has painted the map in his color and there are no further enemies to conquer or map to paint, then you'll have resolved this problem.

Infinite space seems much more doable, sorry. At best, you are going to get a SimCity multiplied by a thousand of planets, but thing is, people who like SimCity and people who like world conquest are very different target auditories, and SimCities still have a huge advantage in not having to waste shitload of resources and manpower on, well, everything else beside SimCitying. So, not gonna happen.

You may notice how in the real world, most countries are not terribly interested in conquering their neighbors because they really have their own shit to worry about and don't need more shit to deal with.

In real world, politicians run their countries because it's their jobs they get paid a lot of hooker money for, and a workday when nothing happens whatsoever is the best. Games need to be more entertaining than that.
 

RayF

Arcane
Patron
Developer
Joined
Aug 6, 2015
Messages
324
What Norfleet said about procedural generation to truly create a properly large galaxy is a great point. Even the largest galaxy maps in 4x games are tiny compared to the actual Milky Way. Aurora does this well - Non Player Races have a chance to be created at the moment player jumps into a system with a planet suitable for habitation. Then that NPR can range from pre-space travel to up to 2 tech generations ahead of player, with a similarly randomized fleet size. It can't create multi-star empires but the NPR will get active and start exploring/exploiting its system and nearby systems as well. Of course, the AI in Aurora is seriously lacking due to being programmed in VB6 and there's hardly any diplomatic system in the first place but it does show that such a system can work.

The end problem with procedurally generated galaxies has to do with size. At some point, there will be too many stars & civilizations for your computer to handle.

I've worked quite a bit on memory management in Remnants and plan to allow the creation of galaxies with up to 10,000 systems. While I understand that 10K is not galactic size, it's still far more vast than any other space 4X game and frankly unrealistic to expect anyone to complete. It's there for me to do performance and memory tuning (which no one seems to do any more).

Keep in mind that a true AI has its own view of those 10,000 systems, so 20 AI races means 20 views x 10K stars. You can see how quickly it multiplies if you don't optimize.
 

MilesBeyond

Cipher
Joined
May 15, 2015
Messages
716
I mean, the unfortunate reality is that the best way to get good AI is to continually update it over the game's lifecycle to reflect shifting metagame and strategy and the gap between how the game is expected to play and how it actually plays, which involves a lot of unpaid hours. Patches go so far, but obviously there's usually so much they need to cover in terms of bug and balance fixes that the amount of time that can be devoted to improving the AI (on top of the amount of time required to teach the AI new or fixed features) is not going to be a huge amount.

There's also the divide between competitive AI and immersive AI. AI personalities, for example, play a huge part in AI quality, often negatively. Giving the AI personalities makes the game feel more alive and causes it to seem like it has more character, but it also means that various personalities are going to be better suited to playing the game than others (this is almost always the the miltaristic and expansionist ones, while builder-type personalities almost inevitably get left in the dust). I'm trying to remember, I think it might have been something Kyrub said he tried but never implemented, but in SMAC the AI became substantially more competent once all AI leaders were changed to share Yang's personality. Obviously this is boring, especially in a game like SMAC where the leader personalities are such a fundamental part of what makes the game, but it was effective. Really it comes down to whether the player sees a 4X as a strategy game or as SimEmpire - some are going to have fun by finding the best strategies to beat intelligent, competent AI, while the others are going to have fun building the type of empire they want and AIs that feel like other emperors to interact with rather than players competing for an (often arbitrary) goal.

In other words, good AI is almost always going to be game-y AI. This isn't necessarily a bad thing, but more an acknowledgement that 4X fans can be pretty diverse in what they enjoy in their games. Well, that's true of all genres, really. But you know what I mean.
 

RayF

Arcane
Patron
Developer
Joined
Aug 6, 2015
Messages
324
I think it's very possible to develop a 4X AI that will absolutely crush human players. Given that, it's then possible to tone that down and create competitive AIs that have variation based on personality. Besides 90% of personality is just dialogue, not action, so a good writer will do wonders for that.
 

Norfleet

Moderator
Joined
Jun 3, 2005
Messages
12,250
When was the last time a country actually bothered to conquer another one? We haven't had any major wars of conquest in 70 years.

The end problem with procedurally generated galaxies has to do with size. At some point, there will be too many stars & civilizations for your computer to handle.
Sure, but that's a sliding problem. What is too many today is tomorrow's not-that-large-at-all. Declare the player has won after he controls all the computational capacity in the galaxy.
 

MilesBeyond

Cipher
Joined
May 15, 2015
Messages
716
Besides 90% of personality is just dialogue, not action, so a good writer will do wonders for that.

Hmm, that's an interesting point. I don't know that I've ever seen a game where AIs all acted the same but had different personalities conveyed through dialogue alone. Could be pretty cool
 

kyrub

Augur
Joined
Aug 13, 2009
Messages
347
I think it's very possible to develop a 4X AI that will absolutely crush human players. Given that, it's then possible to tone that down and create competitive AIs that have variation based on personality. Besides 90% of personality is just dialogue, not action, so a good writer will do wonders for that.

Excuses are coming in advance? "It is possible to create a crushing AI, but good writer will do." Oh dear.

Create a very good AI and tone it down for simpletons or gamey people! But donť fool yourself that the AI part is somehow easy and clear. It's pretty damned hard to do and it requires a professional as well. That is how HoMM3 difficulty levels were conceived. And that should be standard.

[you have that "Whitemage" fellow over at Realmsbeyond, the guy is a teacher of AI programming on university and offered help - why don't you ask him]
 
Last edited:

barker_s

Cipher
Patron
Joined
Mar 1, 2007
Messages
806
Location
Poland
Codex 2016 - The Age of Grimoire Grab the Codex by the pussy RPG Wokedex Strap Yourselves In Codex Year of the Donut
Sure, but that's a sliding problem. What is too many today is tomorrow's not-that-large-at-all. Declare the player has won after he controls all the computational capacity in the galaxy.

One way around it would be to increase the operational scale as you reach certain "milestones". At first you could play in a local star cluster, which would be your standard 4X experience, but as your computer starts choking on the calculations, your whole map gets "compressed" into a small "province", one of many on the galactic map. It would mean that you'd have to design a separate game for each "zoom level" (because you shouldn't be bothered with colonizing each individual planet, when there's billions of them in the galaxy), but it might be worth the effort.

Earth%27s_Location_in_the_Universe_VERTICAL_%28JPEG%29.jpg
 

RayF

Arcane
Patron
Developer
Joined
Aug 6, 2015
Messages
324
I think it's very possible to develop a 4X AI that will absolutely crush human players. Given that, it's then possible to tone that down and create competitive AIs that have variation based on personality. Besides 90% of personality is just dialogue, not action, so a good writer will do wonders for that.

Excuses are coming in advance? "It is possible to create a crushing AI, but good writer will do." Oh dear.

Create a very good AI and tone it down for simpletons or gamey people! But donť fool yourself that the AI part is somehow easy and clear. It's pretty damned hard to do and it requires a professional as well. That is how HoMM3 difficulty levels were conceived. And that should be standard.

I'm not making excuses; I'm giving you my opinion. The difficulty of writing an AI relies on the complexity of the game as well as the stability of its feature set.

Anyway, it's never been my goal to make a hardcore AI for Remnants. I'd rather make an immersive AI that will give casual players a challenge. Hardcore players will never be pleased with the AI, imo, so that's where open-sourcing the game comes in.

But as far as examples, look at the work that was done with Pandora. The guy who buffed up the AI in that guy did such a great job that fans started assuming it was cheating and gave bad reviews. The company had to subsequently tone down the AI in a later patch. Was the AI unbeatable? Probably not to the most hardcore, but it was enough to start turning away gamers.

That same guy is doing the AI for Dominus Galaxia and, unlike me, they are trying to make a hardcore AI. We'll see how their games turn out.
 

Renegen

Arcane
Joined
Jun 5, 2011
Messages
4,062
I would appreciate input or any other common problems that I've missed as well.
i have the feeling you never played europa universalis.

That is correct.
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?
Can you provide any examples of the EU4 AI that's so advanced? I played the hell out of Paradox games but I don't see from a programming point of view what's different.
 
Joined
Mar 3, 2010
Messages
8,819
Location
Italy
1) it plays quite well between every nation's boundaries, they do what they're supposed to do and it often preys on a weak enemy.

2) every decision it takes for or against you it's pretty clear to understand

3) it rarely enters a war it can't win

4) after a mandatory short time, it's fast to accept white peaces or small losses if its army took a beating.

we're halfway through and the so often trashed eu4 is still above all these points, but let's see more

5) absolutely not. the player is treated as any other opponent

6) it knows all to well how to concentrate attacks. when it loses army its first directive is to rebuild and reassemble. in fact the only way to win against large nations is to have larger/much better armies and then after the first victory play pest control or it'll rebuild fast.

7) no way to bribe the ai. do you want to befriend france as austria? fuck off.

8) there's no such thing as "short-term memory", every action is registered and takes years for its effect to wear off. most of the times declaring a rivalry is for ever.

9) every leader has a personality which determines its behaviour and its diplomacy. do you want to make a free city of that militarist nation? fuck off.
 

RayF

Arcane
Patron
Developer
Joined
Aug 6, 2015
Messages
324
a) EU's AI code is not public, meaning that 4X developers have to write their own code to solve these problems
b) Modern 4X developers are clearly not doing this as evidenced by continuing player complaints

I still don't understand your original criticism, which is why I treated it as borderline trolling. Is it your position that solutions should not be proposed for these problems because they are already solved in an existing game?
 

a cut of domestic sheep prime

Guest
I often wonder how much of bad game AIs are:
1. Bad/lazy mechanics - see Crusader Kings 2's massive world-wide alliances that form against the player instantly if he declares war too often. Because Catholic nations and Muslim nations are really good friends and can just telephone eachother whenever they have a problem. :roll:
2. Lazy AI design
3. Lack of processing power

As for the article, I can agree with most of those points. Particularly the last one is handled with varying degrees of quality in games. Alpha Centuari handled AI interactions fairly well. I really felt like the opponents were distinct with unique personalities and different playstyles - though granted still not perfect. But all the civ games that came after it did not.


MadMaxHellfire, yeah, not with you here. Your initial argument amounts to "Simpsons did it!".



Maybe some games have solved these issues, but that doesn't mean other designers aren't constantly making these mistakes still. Good to see a developer focusing on AI design and trying to improve on past mistakes. Maybe if you framed your initial posts as a suggestion to play EU and learn from specific design decisions instead of just trolling the guy, it would have been better.
 

Ludovic

Valravn Games
Developer
Joined
Mar 7, 2016
Messages
71
Location
The Cold North
Processing power is not the issue, but it is an oft-used excuse. It is true that at the cutting edge of chess/poker/backgammon/etc AI, a lot of processing power is needed. But you can get some really good chess AI with very limited computing power - and even then, computer strategy games are nothing like those games. It's a completely different kind of AI.

However, it is difficult, time-consuming and requires good project management (as per the first point in the original article - you cannot write the AI if the mechanics keep changing) to write good AI, so in a lot of game projects, it's a task that gets a very low allocation of resources. If you have projects managers or producers who are either casual gamers or don't really play strategy games at all, it is incredibly difficult to get AI prioritized. They'd much rather spend that money on hiring Sean Bean as a voice actor for every single piece of fluff text in the game. It is very convenient for such companies that most people think AI requires cutting edge research, supercomputers and special technology from Google, Nasa or other such nonsense. Sometimes you even see companies hyping their AI and then when it turns out to be bad, they just play the "AI is rocket science and requires supercomputers" card. But that's mostly an RPG/adventure game kind of thing.

To repeat myself: AI requires good programmers with solid knowledge of the game mechanics, lots of testing and iterative changes. Studios prefer to push AI as a technological obstacle, when it is very much a $$$ / project management issue. True, it can be a symptom of crappy or lazy programmers, but if the rest of the game is functional and polished, odds are the problem lies elsewhere.
 

a cut of domestic sheep prime

Guest
Processing power is not the issue, but it is an oft-used excuse.
Citation needed?

This could be fair. Honestly, I have no idea as I've never worked on an AI.
and even then, computer strategy games are nothing like those games.
Exactly. Chess is a substantially more simple game than your average 4x. They're chess with dozens of times more pieces, different rules and boards that are everchanging.

Just program an AI with all the grandmaster games and you'll have a better AI than most novice players can cope with. Even an old gameboy could handle that.
It is very convenient for such companies that most people think AI requires cutting edge research, supercomputers and special technology from Google, Nasa or other such nonsense.
I don't think that. But I do recognize that the need to manage so many factors in real-time could be an issue. I remember back in the day Civ-type games used to take forever for the AI to think during the late-game and that was turnbased.
They'd much rather spend that money on hiring Sean Bean as a voice actor for every single piece of fluff text in the game.
And they'd much rather spend processing power on graphics etc. Stellaris for example already chugs in the late game and its AI is largely pathetic.
 
Last edited by a moderator:

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