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.

Sid Meier's Civilization: Beyond Earth

tuluse

Arcane
Joined
Jul 20, 2008
Messages
11,400
Serpent in the Staglands Divinity: Original Sin Project: Eternity Torment: Tides of Numenera Shadorwun: Hong Kong
Writing game AI is an extremely challenging and thankless task. They aren't allowed to use machine learning or any other cutting edge AI techniques for performance reasons - players wouldn't have the patience to sit still while it learned from its mistakes and used your GPU to build predictive models of your future actions. AI in games can't really be called AI at all, the programmers are only permitted to use decision trees and hard coded fitness functions with predetermined responses. These are techniques that were the cutting edge of AI in the 60s. Trying to exhaustively enumerate every 'common sense' action one can take in an even moderately complex game and hard code the exact conditions under which it should be executed is a nightmare. TD lambda could be applied, but becomes prohibitively expensive in huge state spaces. Chess can be played exhaustively 7-ply (7 moves in advance) to crush human players because there are so few possible moves.

In short, the difficulty of creating a good game 'AI' increases exponentially with the complexity of the game, the kinds of techniques amenable to solving those problems sensibly are at the forefront of computer science research, and you wouldn't put up with the maintenance required for a genuinely intelligent game.
You can heuristics to vastly reduce the number of moves and you can use machine learning during the development process and beta testing (and honestly during down time and collected data from players.

Strategy game AI doesn't suck because of computing power, it sucks because it's poorly designed and there's limited demand for a well designed AI.

It doesn't occured to them that there is something seriously fucked up with such approach?
Paradox have glitchy and twitching but at least somehow working AI in their games. CivV was completely unplayable on release.
Grand strategy and 4x aren't really comparable. If the AI had to create all the provinces in a Paradox game during expansion I'd bet you'd see an equally broken AI.
 

sser

Arcane
Developer
Joined
Mar 10, 2011
Messages
1,866,858
Writing game AI is an extremely challenging and thankless task. They aren't allowed to use machine learning or any other cutting edge AI techniques for performance reasons - players wouldn't have the patience to sit still while it learned from its mistakes and used your GPU to build predictive models of your future actions. AI in games can't really be called AI at all, the programmers are only permitted to use decision trees and hard coded fitness functions with predetermined responses. These are techniques that were the cutting edge of AI in the 60s. Trying to exhaustively enumerate every 'common sense' action one can take in an even moderately complex game and hard code the exact conditions under which it should be executed is a nightmare. TD lambda could be applied, but becomes prohibitively expensive in huge state spaces. Chess can be played exhaustively 7-ply (7 moves in advance) to crush human players because there are so few possible moves.

In short, the difficulty of creating a good game 'AI' increases exponentially with the complexity of the game, the kinds of techniques amenable to solving those problems sensibly are at the forefront of computer science research, and you wouldn't put up with the maintenance required for a genuinely intelligent game.

I'd bet GalCivII's reputation as a game that has amazing AI - whether true or not - has sold more copies than any other quality about the title. Gamers are extremely appreciative of good AI.

I'm sure AI is challenging as fuck to program to be fun, but at the same time that's kinda why it's important. What I think matters is how the AI is structured within the gameplay elements. For example, the Civilization series.

Games like Civilization almost need two different kinds of AI, tactical and strategical. IMO, Civ5's strategic AI actually isn't half bad. It understands the victory conditions and generally seems to understand that to win it might have to stop others from winning first. The problem is that it can be exaggerated to the extreme (you go to war with them, or wipe someone out, and you're unlikeable forever; their city placements can often times be desperate and half-cocked). And, sometimes, there's really no measurement of what the fuck is actually happening diplomatically speaking. Friends and enemies aren't really 'made' in any sense which, IMO, has always made Civ5 feel like it has so little personality. Civ4 had very clear indications of diplomatic issues and there was little question of what was going on. AI's had patterns likes Civ5, but they were also governed by very clear diplomatic modifiers in religion, borders, trade, etc.

Tactically, Civ5 is utterly lost. Zero challenge. Truly. And its tactical stupidity ends up trivializing its strategic passability. Civ4's tactics weren't that great, but the simplicity of the squares and doomstacks still made it dangerous if you were unprepared. The gameplay structure - squares, doomstacks - helped overcome, or even hide, the AI's faults. Civ5's large health bars, 1UPT, hexed tiles, etc., makes it insanely easy to just run circles around enemies. When my girlfriend first started playing Civ she'd get invaded by a huge army while only having an archer or two and she'd freak out. But I'd explain to her that the AI is fucking retarded and to just play smart. Now Montezuma comes over the border with his dumbfuck troops and she's like whatever. Civ4 you'd get like 20units in a single stack and you'd shit your pants because they were a fucking spearpoint, an unstoppable train whose primary opposition was pure attrition - a very easy aspect for AI to understand - and you either had that attrition force or not. A preparation very tied to your strategic competence (and a gameplay mechanic upon which almost the entirety of Sid Meier's Colonization ran, by the way). Sure, this left very little 'tactical' though in play, but the idea of tactics having nearly as much importance as Civ5 pretends to give them is, inherently, pretty fucking silly anyway. Civ4's handling of conflict seems a little more wide, like two large stacks of doom hitting each other until annihilation is achieved. Pretty historical, in some regard, and just seems more 'at home' in the passage of time Civ tends to depict. Civ5 feels extremely odd with its minutiae of cleverly moving troops through the treelines and hills while, in the greater scope of things, thousands of years are passing by. Civ5 tried to make the combat something it probably shouldn't have been and the AI got exposed because of it.

A lot of AI taking advantage of the surrounding gameplay elements can be seen in first-person shooters. Take F.E.A.R., for example. The levels were designed to facilitate the AI, and vice versa. It really shows, too. So I can imagine, in part, a Civ AI programmer being told to create an AI that handles strategic levels of international diplomacy while at the same time crafting tactical aptitude at a level that seems fragmented from the general passage of time that the strategic aspect uses, and his response is just what the fuck. And I can easily imagine that the guy who did Creative Assembly's AI was probably shaking his head with a stupid, incredulous grin on his face when tasked with doing AI for strategic and battlemaps, both of which encompass land and sea. Which is why I'd think, by this point, developers would be putting more manpower and resources into the AI. But I'm no engineer. Maybe it's usually done by one person because more than that would cause confusion, I dunno, but I'm constantly scratching my head at developers who put so much time and effort into a game, and then just short-change the AI. It's like they built this hotrod of a car, and then put a copper crusted battery from 1969 in the engine block before taking it to the show. And then you get to see the car and it revs up and promptly dies, and you're like fuck, that's a nice looking car, too bad we didn't get to see it do anything cool.
 

Redlands

Arcane
Joined
Mar 23, 2008
Messages
983
Another reason why AIs tend to not be great in games is that, if you were good at programming AIs, you'd probably earn far more money working on automating cars at Google or working for defense contractors than you'd ever get working for a game company (where there's a decent chance of you getting laid off at some point in the process).
 

Destroid

Arcane
Joined
May 9, 2007
Messages
16,628
Location
Australia
Another reason why AIs tend to not be great in games is that, if you were good at programming AIs, you'd probably earn far more money working on automating cars at Google or working for defense contractors than you'd ever get working for a game company (where there's a decent chance of you getting laid off at some point in the process).

I don't know about that, quite a few notable AI developers have been hired from the community (they made AI mods first) I think people who are capable of making good AI are quite rare and in demand. Not every country has big military contractors doing that kind of stuff.
 

spectre

Arcane
Joined
Oct 26, 2008
Messages
5,590
From what I recall, the usual justification for the last few decades was: it's ok for the AI to suck because multiplayer.

Casuals don't care if the AI is poor (unless it's utterly broken a casualfag will still be challenged by it, or will just go away after 20 mins of watching purdy graffix and thus won't care),
whereas people who want a challenge will actually play with real people.

Yeah, fuck multplayer.
 

Destroid

Arcane
Joined
May 9, 2007
Messages
16,628
Location
Australia
Ironic that the big multiplayer focused genres (FPS, RTS) for the most part have pretty competent AIs. Dunno what MOBA AI is like, I'd imagine it could play well because the game is quite simple.
 

Random Word

Arbiter
Joined
Mar 14, 2012
Messages
320
MCA Project: Eternity
And in the general sense, couldn't the machine learning part be done in house with testers, then just apply those learnings to every copy of the game?

Definitely. No development team has ever been authorized to do this in the history of game development, though. This would take a team of machine learning engineers with access to the completed game [or at least some sort of balance-locked version], a large pool of testers to provide a huge amount of play data, and a server cluster to hothouse the AI playing against itself billions of times. The next time a balance patch went out, the process would have to be repeated, but it wouldn't take quite as long because you'd have a partial model that would only have to adapt to the new parameters. The expense would be quite impressive - probably 1-2 million dollars per year for a team of five engineers and all the support staff and equipment they would need. Not impossible by any means for a AAA video game, but nothing any video game studio has ever attempted. It would be an enjoyable problem to solve, and a job I'd consider doing, but I've never seen a posting for it and don't expect to any time soon. Google, Amazon, Netflix, Facebook, etc all do this all the time. To them, it's well worth the cost.

Strategy game AI doesn't suck because of computing power, it sucks because it's poorly designed and there's limited demand for a well designed AI.

You underestimate the level of computing power I'm talking about. The kind of AI that performs well on these problems takes weeks to train on high powered clusters. To make an analogy you might have heard of, Watson was a toy example of what a modern natural language processing, text analytics, and information retrieval system can do when the hardware is sufficiently scaled up. You can't run Watson on your bitchin' gaming rig, no matter how much water cooling you have and how far you've overclocked your GPU. Watson is, admittedly, more power than would be needed to play CiV well, but playing CiV competitively is on roughly the same order of difficulty. Certainly well above Chess, Backgammon, and Go.

I know you intuitively assume that coming up with the correct heuristics for any arbitrarily complex game ought to be a straightforward problem of putting enough smart and motivated people in a room and letting them go at it for a few years. A lot of very intelligent people agreed with you for decades, but we've discovered that many problems simply can't be solved that way. The famous anecdote is Marvin Minsky's well intentioned but ultimately woefully misguided assignment to his undergraduate student Sussman over the summer of 1969: 'Hook a camera up to a computer and have it describe what it sees'. No matter how many clever people you stick in a room, you're never going to be able to write an exhaustive list of heuristics and fuzzy logic that solves that problem.

I'm not discounting that some sets of heuristics are much better than others, but you're always going to find problems with it if you look hard enough, and we all do when playing a strategy game. Unless it's a very constrained and simple system, there will be something 'obvious' you can do that will make the system fall apart, and you'll always be able to point to the programmer and wonder why they didn't think of that case. No one's doing a 7-ply analysis of CiV, because exploring an alpha-beta tree for all of the reasonably sensible things you can do during a turn would make the turn timers for unpatched CiV look like a blink of the eye, and planning only 7 turns in advance would be useless for the strategic AI.

Really glaring errors like the inability to launch naval invasions stand out because they seem so simple to us. If the AI has a strategic objective across a body of water, just gather a bunch of units in a port, bring a transport fleet, load them up, screen them with a combat fleet, and ship them over, right? Alright, so first we have to detect when an objective is over a body of water. Simple, let's do A* from any unit that's assigned to that objective with a heavy penalty for water, and if the shortest path is still over a body of water have them use A* to find the closest port to all of the selected units and meet there. Except if the units selected are on different continents or islands, then we need to set up sub-tasks to transport them to some central port, or coordinate multiple simultaneous naval invasions. Perhaps a threat level heuristic? If we think we have a stronger navy, don't bother uniting first. Okay, so let's make a unit graph with djikastra's and find out which graphs are connected to determine which groups of units are on each land mass. Or for efficiency's sake during map generation we could tag each tile on each land mass with the number of its land mass and search that way, but the effect is the same. Now let's make sure we haven't selected a port with any enemy units nearby that might interdict us, aren't abandoning any strategically important positions or breaking our defensive lines, and that our naval transports have enough range to reach the destination from the port we've selected. They don't? Do we have a friendly port we can move to that is within range? No? Okay, new strategic subobjective to capture an enemy port that is closer to our true objective and within range of at least one of our ports. Okay, recheck all of our units to find out who still even needs to be transported to get there, whether we've assigned enough forces to accomplish this subobjective, and while we're at it let's repeat all the above steps. There's an airbase near that port? We should probably suppress that first. Units take attrition while at sea? Let's compute the route that keeps our troops loaded for the shortest amount of time. The subobjective port we've selected can't ship enough supplies to support our invasion group? Should we pick a different one, or invade several nearby ports at once? How close is close enough for splitting our forces to be worthwhile? Do we have enough forces for each of these new subobjectives? Could we use air supply to cover the difference? Can we paradrop the port just before our invasion arrives? Did we remember to bring troops that aren't awful in amphibious landings and deliver them first? We probably should have built some of those years ago when we noticed a strategic objective was across a body of water from our capitol. Let's add that, devoting an amount of resources based on how valuable this objective is as a function of the total value of all of our objectives. Wait, what were we doing to begin with, again?
 
Last edited:

KoolNoodles

Arcane
Joined
Apr 28, 2012
Messages
3,545
Speaking of AI and Go, they still haven't made one that plays competently with high level players, because the game can be so nebulous. If board game nerds can't do that with a 2,000 year old game that has the same basic parameters every time, then no wonder a game like Civ falls flat to humans. Think of the strategy games that have been compelling AI-wise(not counting RTS where an AI can simply brute force moves a second). They've probably been much more like Chess than Go.
 

Johannes

Arcane
Joined
Nov 20, 2010
Messages
10,669
Location
casting coach
Writing game AI is an extremely challenging and thankless task. They aren't allowed to use machine learning or any other cutting edge AI techniques for performance reasons - players wouldn't have the patience to sit still while it learned from its mistakes and used your GPU to build predictive models of your future actions. AI in games can't really be called AI at all, the programmers are only permitted to use decision trees and hard coded fitness functions with predetermined responses. These are techniques that were the cutting edge of AI in the 60s. Trying to exhaustively enumerate every 'common sense' action one can take in an even moderately complex game and hard code the exact conditions under which it should be executed is a nightmare. TD lambda could be applied, but becomes prohibitively expensive in huge state spaces. Chess can be played exhaustively 7-ply (7 moves in advance) to crush human players because there are so few possible moves.

In short, the difficulty of creating a good game 'AI' increases exponentially with the complexity of the game, the kinds of techniques amenable to solving those problems sensibly are at the forefront of computer science research, and you wouldn't put up with the maintenance required for a genuinely intelligent game.
Decision trees and the like, while not great, can still be done much, much better than what the standard for game AI's is now.
 

Norfleet

Moderator
Joined
Jun 3, 2005
Messages
12,250
Really glaring errors like the inability to launch naval invasions stand out because they seem so simple to us.
Actually, the ability to launch naval invasions is pretty non-trivial even for humans. We haven't exactly DONE this all that often, and more often than not it has gone quite badly and succeeded purely by brute force. The AI, though, has a bigger, unaddressed question, one that is far more solveable: "Why did you start this war on the first place?". The AI is inordinately fond of declaring wars on people that it has no clear plan for invading or clear purpose for why it should want to. It then naturally fails at any naval invasion because it never had a plan for why it would even WANT to. Plus, I've seen games where AIs have successfully executed naval invasions before, so this is hardly an unsolved problem.

There is simply no reason or excuse for why things should regress when the problem has previously already had a solution.
 
Self-Ejected

Ulminati

Kamelåså!
Patron
Joined
Jun 18, 2010
Messages
20,317
Location
DiNMRK
Writing game AI is an extremely challenging and thankless task. They aren't allowed to use machine learning or any other cutting edge AI techniques for performance reasons - players wouldn't have the patience to sit still while it learned from its mistakes and used your GPU to build predictive models of your future actions. AI in games can't really be called AI at all, the programmers are only permitted to use decision trees and hard coded fitness functions with predetermined responses. These are techniques that were the cutting edge of AI in the 60s. Trying to exhaustively enumerate every 'common sense' action one can take in an even moderately complex game and hard code the exact conditions under which it should be executed is a nightmare. TD lambda could be applied, but becomes prohibitively expensive in huge state spaces. Chess can be played exhaustively 7-ply (7 moves in advance) to crush human players because there are so few possible moves.

In short, the difficulty of creating a good game 'AI' increases exponentially with the complexity of the game, the kinds of techniques amenable to solving those problems sensibly are at the forefront of computer science research, and you wouldn't put up with the maintenance required for a genuinely intelligent game.
Decision trees and the like, while not great, can still be done much, much better than what the standard for game AI's is now.

I did some studies into this back at university in conjunction to some friends thesis work on neural networks. We reached the conclusion that while several models exist that could vastly improve game AI behaviour, the computational/memory/manpower requirements to implement them would mean they'd lose out to shinier graphics every time. A compelling AI just doesn't sell as manu copies as slightly higher polycounts on mountain tiles and lens flares.

If I were to implement just one of the models though, I'd go for a 'danger map'. IE: an overlay for the AI where it maps danger zones in terms of where it lost units, with the danger of an area decaying over time. When determining how to approach an objective, it can then route units around danger hotspots, which would make it less suspectible to getting lured into bottleneck kill zones. It could be extended to track kill causes as well, so that if a spot was marked dangerous because landmines killed its units, it could still fly planes across. If it was SAM sites, it'd know to bring artillery etc. In terms of how much apparent intelligence it would add to computational requirements, it was one of the best candidates we looked at.
 

Space Satan

Arcane
Vatnik
Joined
May 13, 2013
Messages
6,379
Location
Space Hell
shit hits the fan
https://www.youtube.com/watch?v=Kj90R0RWvdQ
06:55 AI naval fight-suicide

https://www.youtube.com/watch?v=bzu8u3jPt10
09:26 taking shots on naval units which will not fire back
16:29 taking shots on naval units which will not fire back
33:46 AI naval fight-suicide

When I saw MadDjinn naval fight in Pre-release build Kavithan Protectorate, I couldn't believe it.....???
AI can not move and shoot ??? AI BUG - again ???.... after 4 years, two expansion packs, and brand new game...?
And there is a mod which repaired that same bug for Civ 5 out there...???
Not to mention all other AI problems... I know that AI coding is very hard, so I did not expect much, BUT THIS ???
And ships have low defensive strength so you can kill them with one shoot after they move near you...???
WTF ? Is this a joke ???
As always, game looks great, but AI is the most important part of the strategy game. Apparently guys from Firaxis games don't agree....
Luckily there is a multiplayer...Without multiplayer this game would be a junk...
 

tuluse

Arcane
Joined
Jul 20, 2008
Messages
11,400
Serpent in the Staglands Divinity: Original Sin Project: Eternity Torment: Tides of Numenera Shadorwun: Hong Kong
You couldn't play Civ5 multi with mods installed. Of all the problems I had with the game, this ruined it the most.
 

Space Satan

Arcane
Vatnik
Joined
May 13, 2013
Messages
6,379
Location
Space Hell
It's much worse, there's actually people on the forums, advocating the cumbersome and retarded UI, preaching that popups every turn with "X like you", "You made a deal with Y, we like that" is a great achievement and if you don't like it - go make you own game!
It's like a biodrones minus Social Justice
 

KoolNoodles

Arcane
Joined
Apr 28, 2012
Messages
3,545
You couldn't play Civ5 multi with mods installed. Of all the problems I had with the game, this ruined it the most.

That is true, and pretty damn sad, because the Civ5 combat system between humans is actually pretty great(at least in the games I played after they implemented true turn-based and "hybrid" games).
 

Multi-headed Cow

Guest
All preloaded up and ready to go. Gameplan is to play Space America because the espionage system looks fun, and ideally go purity because big fat tanks and power armor. Haven't got my heart completely set on it though so I'll see how the resources pan out.

Looking forward to initially enjoying myself and then realizing that the game becomes a horrendous slog because BE encourages going wide and has a fuckton more trade caravans to deal with than in Civ 5.

:kfc:
 

cvv

Arcane
Patron
Joined
Mar 30, 2013
Messages
18,846
Location
Kingdom of Bohemia
Codex+ Now Streaming!
Looking forward to initially enjoying myself and then realizing that the game becomes a horrendous slog because BE encourages going wide and has a fuckton more trade caravans to deal with than in Civ 5.

More like initially enjoying yourself and then realizing the game needs at least another year of expansions, patches and mods to be taken seriously.
 

Multi-headed Cow

Guest
I don't really see them doing expansions for BE. They'll probably knock out a few more leaders in DLC but I doubt it'll get a Gods and Kings or Brave New World. It's fairly obvious they don't consider it to be a proper full Civ anyway, just look at the victory conditions. Basically everything boils down to science and military, except domination which is straight military. Even contact victory most likely will require military since the AI will probably jump you once you start building shit for it. No culture win, no diplo win, possibly not even a score win. Civ BE is a space wargame more than a good'n proper 4x.

Basically I'm heading into this not expecting a new Alpha Centauri, I'm more expecting a new Deadlock.
 

bonescraper

Guest
Of course there will be expansions. Can you colonize oceans? No. There you go, here's your first expansion.

Even XCOM got an expansion.
 

Drakron

Arcane
Joined
May 19, 2005
Messages
6,326
There are 5 types of Victories.

Conquest - Destroy all other Civs
Contact - Build Beacon
Emancipation - Build Portal to Earth and send Military units
Promised Land - Build Portal to Earth, get settlers from Earth you have to protect.
Transcendence - Build Mind Flower

Conquest and Contact are common, you can be Purity and build the Beacon to contact with the Xenos as the other 3 seem to be affinity locked but I wonder how much, Emancipation and Promised Land seem to be the same deal, except in one case you defend the Portal and spend military units until you win as the other is just having a Outpost pop-up and defend it until its a city.

I think there will be a expansion because factions are boring banal shit, there are no unique units outside affinity and the space layer isnt exactly trilling either ... I kinda hoped they had a actual strategic value by having orbital drop pods stations and spaceships that could wreck stuff on the ground instead of just the Orbital Ion Cannon thats not really interesting at all.

Plus they need to fix the freaking Trading system into something that inst having to go over a list for each of all 60 trade routes we likely have at endgame.
 

Thane Solus

Arcane
Joined
Apr 29, 2012
Messages
1,686
Location
X-COM Base
Day 1 DLC Announced - Unity Leader anda new Faction:


john_riccitiello.0_cinema_640.0.jpg



:troll:
 
Self-Ejected

Ulminati

Kamelåså!
Patron
Joined
Jun 18, 2010
Messages
20,317
Location
DiNMRK
No diplomatic/cultural victory, huh? There is no peace among the stars. Only an eternity of carnage and the laughter of thirsting gods!
 

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