• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

AI: Why does it still suck in games?

KidJr

Member
Genetic algorithms? Neural networks? Super systems?

All of the above, I'm a search consultant/head hunter that basically gets assignments from companies who want people who are machine learning, NLP, data mining experts. I guess their is a huge push around neural networks and which is why Google and others have been snapping up AI start ups (deep mind is an interesting company to look at). I find that skill sets are pretty transferable from industry, a lot of quant researchers go to health care/e-commerce etc and can apply similar techniques to different problems and usually generate results.
 

coastel

Member
It's not a derail, its the damn answer to the question.

What do people expect human like ai that shit wont happen to many variables to humans thinking. As for decent ai well, just turn up the difficulty if its to easy. If you want the same as human ai you need a balance between pro and decent player and a shit cunt. More the latter I suppose and good luck with that.
 

DocSeuss

Member
What do you mean by suck?

Game AI is designed to be fun. Are you saying the current AI is not fun? If not, why? What can be done to make it more fun?

Simply saying it sucks doesn't make sense. If you want smarter AI that wins all the time I don't see how that will be fun.

Game AI is not particularly fun in many games, from the OP's mention of rubber-banding to games like Uncharted or Call of Duty where enemies always know where you are all the time and will turn the game into a shooting gallery.

Too many people take this to mean that AI should be "more human-like" but that's not really what people want in games. We want AI that feels 'fun' to play. AI that does things we don't expect, that does things we can tell other people about, stuff like that. Not AI that hides behind rocks to pop out and shoot directly at us to the point where their laser sights are lined up for a perfect headshot even when we're behind cover.

Game AI seems to have peaked with FEAR and Halo. :(
 
If you want an AI the equivalent of humans, here is what you do, play against other humans.

AI isn't going to be improved because a good AI is design to not ruin the game for you.
 
This is a short term-focused industry.
You'd think that pushing online and games-as-service would extend their thinking a bit.

AI isn't going to be improved because a good AI is design to not ruin the game for you.
Its a mistake to conflate better AI with more difficult AI. AI that makes mistakes, has some sense of self preservation, has multiple states besides running-at-you and dead, reacts to its group, can make more complicated multi-step plans, has actual senses and can be fooled, and has some variety within its class instead of thug #1 and thug #2. Its about more states, not harder. Harder AI is trivial because it has access to cheats. Responsive, mutable AI with personality would be 'better' AI.
 
I feel like everyone saying good ai would be too hard are missing the point. It's not just about the ai being able to kill you easier (you can just tweak damage values for that), it's about it having more believable behaviour that's more fun to fight. Little things like trying to flank or retreat rather than sitting in one place making you play whack a mole.
 
It's extremely resource intensive to design and implement a legitimate AI for not much benefit.

I think the benefit depends on the game. I can't imagine F.E.A.R., with its claustrophobic office levels, being nearly as successful or fun to play without its AI being so dynamic and unpredictable. The AI alone made every encounter far more exciting and intense than those in games with braindead enemies that either blindly charge forwards or stand perfectly still. I also recall numerous professional reviewers and players alike pointing out the advanced AI as one of the game's best features.
 

entremet

Member
Game AI is not particularly fun in many games, from the OP's mention of rubber-banding to games like Uncharted or Call of Duty where enemies always know where you are all the time and will turn the game into a shooting gallery.

Too many people take this to mean that AI should be "more human-like" but that's not really what people want in games. We want AI that feels 'fun' to play. AI that does things we don't expect, that does things we can tell other people about, stuff like that. Not AI that hides behind rocks to pop out and shoot directly at us to the point where their laser sights are lined up for a perfect headshot even when we're behind cover.

Game AI seems to have peaked with FEAR and Halo. :(

I feel like everyone saying good ai would be too hard are missing the point. It's not just about the ai being able to kill you easier (you can just tweak damage values for that), it's about it having more believable behaviour that's more fun to fight. Little things like trying to flank or retreat rather than sitting in one place making you play whack a mole.

Exactly.
 

coastel

Member
I feel like everyone saying good ai would be too hard are missing the point. It's not just about the ai being able to kill you easier (you can just tweak damage values for that), it's about it having more believable behaviour that's more fun to fight. Little things like trying to flank or retreat rather than sitting in one place making you play whack a mole.

So basically harder.
 

Wavebossa

Member
When I read something like "AI should be better" I translate it to "AI should do what I would have done in that situation."

The problem is, what you would have done would not have been the optimal decision. It would have to include very many sub-optimal actions mixed in there to represent a more human experience. Problem being, this is a bit of a time sink for pretty much no reward.

I know people who dont even play the single player modes in rts/fps/fighting games. And those games would "benefit" the most from a more human like AI.

CoD faithfuls with thousands of hours under their belt cant tell you the first thing about the single player mode. Trust me it happens.
 
So basically harder.

Not necessarily. That could be a side effect though. It's possible to have whack a mole enemies that kill you in one hit or flanking enemies that barely damage you. There are many factors that make something difficult. More interesting ai behaviour doesn't have to translate into being killed more often.
 

laxu

Member
Apparently alien isolation has great Ai

While the AI is generally more aware to sound than in other games, it is a pretty basic roaming AI for most of the time. I've had situations where I've been hiding under a table for a long time with the AI just wandering past me many many times. What makes the Alien AI challenging is that it's unpredictable but this can also cause it to roam an area for ages while you wait in a closet or around the corner. The Alien generally rubber bands to you in certain areas for gameplay reasons.

I'm sure there are a bit more finer things to it like it apparently might learn if you hide in the same places a lot. The trouble with AI is that you don't necessarily notice it until it fucks up. That constant roaming of the same areas is one of those things and it removes some of the illusion. It's still a hair-raisingly intense game and you do really get to fear the Alien.

Good AI consists of several things:
  • Good path finding. AI characters should be able to navigate the world in a believable manner. There are plenty of fairly simple path finding routines to make characters follow the player or flee or navigate around objects. This is basic stuff for most games nowadays. Good path finding isn't an easy programming task but there are a number of popular algorithms and techniques for it.
  • Able to do enough to appear believable. If there are not enough actions programmed or animations done the AI can appear dumb. In open world games this becomes even more important to be able to create a believable environment. Otherwise scripted events are usually sufficient. Alien Isolation actually could use more things for the Alien to do - it generally either roams the vents or roams the floors, sometimes stopping to wait in a vent above. The more different states and animations available the more real an AI NPC will appear.
  • Able to react to the player in a believable manner. In games like GTA the cops are usually the ones that are lacking in this area as their response changes from "nothing to see here" to "kill this guy" in an instant. They need more "investigate and question" actions to appear as something other than trigger happy killers.

It's not really a question of it being smart enough but being varied enough. However one of the things that most games don't seem to implement is proper reaction time for the AI. It usually knows instantly where to search for the player rather than being confused and off-guard when meeting the player. There is little between the "just going about my business" and "let's kill the player" states.
 

coastel

Member
Not necessarily. That could be a side effect though. It's possible to have whack a mole enemies that kill you in one hit or flanking enemies that barely damage you. There are many factors that make something difficult. More interesting ai behaviour doesn't have to translate into being killed more often.

But it does and I do get what your getting at I just don't think it will be possible any time soon to replicate human thinking as it can lead to it being easy or to hard. maybe the way games are going will mean more human players rather than ai anyway.I just think like with many games I have played there'd always be a loop hole you can exploit with ai.
 
In order to be fun, the AI can never be made smarter than the average human player. Now consider the intelligence of the average human player...
















fake edit: A thousand apologies but after working retail and watching let's plays on Youtube, I really could not resist.
 

injurai

Banned
A lot of AI algorithms have really poor expected running times. Especially when many algorithms are used in conjuncture. Hell, some are NP time, which at best you can approximate. AI really isn't going anywhere I consumer processing power anytime soon, if ever.
 
People want games to provide a larger variety of AI behaviors without realizing that you actually have to implement said behaviors. You have to account for all of these different states and possible actions, while still keeping in mind how those will actually translate in gameplay. That's a lot of work for something that is typically not easily demonstrable.

No amount of better hardware will help the developer create all of that in the first place.
 

Harmen

Member
Hate on the TLOU A.I. all you want, but I'll be damned if the NPC's tricked me into believing I was playing a scripted encounter more than once in the way they behaved during my first playtrough (to my big suprise the second time around). I agree that the A.I. does some dumb stuff here and there (especially your companions in regards to stealth, which thankfully is not penalized), but TLOU was the first time since Killzone 2 that I was impressed with A.I. The humans can react very realistic sometimes and do some stuff that I have never encountered in a game before. Clickers and such are dumb offcourse, but that makes sense.

Also, doesn't Shadow of Mordor do new stuff on this regard? Let the NPC's grow with your playtrough? That is offcourse another aspect of A.I. (not the way they behave in combat), but it most certainly seems to make the enemies more believable/realistic.

I'd say the progress goes a bit slow, but there are certainly games trying new stuff here and there. I expect the good aspects of the A.I. shown in The Last of Us or Alien to be developed further in the coming years.
 
If this was the case we wouldn't be getting "why don't we have skynet lite on the ps4" threads being made this frequently.
You must think very highly of current AI if any improvement would amount to creating SkyNet (lite). I'm just going to keep on assuming that there's worlds of middle ground in between that and what we have now.
 
Game AI is not particularly fun in many games, from the OP's mention of rubber-banding to games like Uncharted or Call of Duty where enemies always know where you are all the time and will turn the game into a shooting gallery.

Funny you mention Uncharted when 2's enemies rely on line-of-sight and will approach the place they last saw the player.
 

EGM1966

Member
Developers tend to err on the side of caution when balancing between AI that is challenging and fun and AI that too many people would find too challenging and by extension not enough fun.

There's also the issue that people tend to assuming the game is cheating rather than believe the AI is good and outsmarted them.

Even games with better AI - Halo, FEAR, Half Life to name a few FPS examples - are still fairly simple for the most part, with very learn-able patterns to their behavior.

And look at Alien Isolation - it's pretty damn terrific and the Alien AI is pretty interesting but the fact they've dared to make it a little unpredictable and make it fairly punishing in hunting you out once spotted is clearly putting people off (that and the unbelievable tension and stress the game generates - I love it! - sorry off on tangent).

Bottom line is most developers and publishers believe its better for their bottom line for AI not to be too tough to learn and beat to make players feel good about their accomplishment in beating it.

I do wish they'd use difficulty levels better or even dare to have more than 3 or 4 - at least for games that are positioning themselves as being more tactical and/or strategic to play. I'd certainly love to see a Thief or similar stealth game with AI more unpredictable like Alien Isolation (although with less face chewing and constant tension).
 
You must think very highly of current AI if any improvement would amount to creating SkyNet (lite). I'm just going to keep on assuming that there's worlds of middle ground in between that and what we have now.

I don't think too highly of current video game AI at all, since it's really clear that most examples of those have just enough work put into them to make them functional. And that's the point.

AI in video games is not going to broadly improve by leaps and bounds over the course of time since it's a component that's almost entirely dependent on implementation. Improvements in hardware specs won't help a developer come with different actions in different states, and you can't standardize game logic and behavior across multiple types of games either.
 

autoduelist

Member
Which game has AI that is too good that is not a RTS game?.As far as I know at least in FPSs except for three or four games(HL,FEAR,KZ2,TLOU...) they are all in the end shooting galleries, being COD the worst offender.I, by the way, found the WTNO AI quite good/fun, reminding HL1 AI.

Well, I mean, there is chess AI that would make the game unfun for 99.99% of humanity. You can also optimize the AI for a game like backgammon to always pick the optimal move.

But I guess you're really asking for a 'modern' game? There's no real example, because the more complex a game is, the harder it is to code a good AI. The human mind is very versatile and capable of adapting to new situations quickly. Coding an AI to do that for a game is dangerous -- even if you were 99% successful, you might accidentally create a game where the computer is so busy 'changing its mind' that it doesn't commit to anything.

But we don't want fair fights in games. We want to kill all comers. We want to annihilate 20 enemies in a row while dodging bullets. Basically, the vast majority of people want 'shooting galleries' that are sussed up with pretty graphics and the illusion of challenge. We want to duel wield laser sniper rifles against 30 foot mechs that have a battalion of infantry to back them up.

Good AI is better than you. It has quicker reflexes, it has better multitasking, and it has better accuracy. It understands the games systems perfectly, it can activate all powers the milisecond a cooldown is over, it can min/max perfectly. It would annihilate most anyone in a fighting game. It's not necessarily fun.

What I think many of you want is more focus on the 'illusion' of free will in enemies. But even that will ultimately be exploitable. If you, for example, make enemies that recognize that they're in the line of fire and run for new cover, players will quickly learn how to trigger that reaction in the AI so they can nail them as they run away.

It's hard to make AI look like 'human' players because they're not human. And the investment of time and energy to simulate human behavior generally isn't worth it.


Question for smarter folks: Isn't what an AI does in a game by definition scripted? It's not like they learn, and even if they do, they are "scripted" to learn?

Well, it's a bit of semantics, but no.
Generally speaking, scripted behavior in games means the AI will always react the same way. For example, if you toss a grenade at an enemy and he always runs, that's essentially scripted behavior. If you toss a grenade at an enemy and they have a 70% chance of running, and a 30% chance of attempting to throw the grenade back (with, say, a 30% chance of sucess) then generally it's not called scripted (even though it's essentially a branching script).

As a simplistic example, a 'learning' AI might slowly learn the timing of grenades and refine it's algorithms to, over time, learn only to attempt to throw back grenades it knows it has time to get. But nobody is ever going to waste their time coding that when a simple branching script gets the same job done, and it's more fun for the player to see a grenade blow up in an enemies hand anyway.


I feel like everyone saying good ai would be too hard are missing the point. It's not just about the ai being able to kill you easier (you can just tweak damage values for that), it's about it having more believable behaviour that's more fun to fight. Little things like trying to flank or retreat rather than sitting in one place making you play whack a mole.

Here's the thing I think you're missing. Let's assume the devs are aiming for a difficultly level of X, where X means that Y% of people can beat it without getting frustrated. If you add stuff like flanking and other cooperative tactics (suppressive fire, grenades to force you from cover, etc) and do it really well, you've effectively made the game harder. So now you need to tweak down damage values to keep the game at the difficultly level you originally wanted. So now enemies die faster and hit weaker, but they do have the 'illusion' of better behavior.

More importantly, consider the AI itself.
To oversimplify, consider coding the AI for a bot. You need to code for every possible behavior (if enemy spotted, x% to call them out, y% to fire on them, z% to run for cover, a% to throw grenade, etc, etc). They need to know how to act if fired upon, if they're in the open, if they're already in cover, if they're injured already, if, if, if, if, if.

Now that's just to get a single AI player to act reasonably well. Now you want teamwork. You've just opened up a huge can of worms, because now those disparate AI entities need to work together in a way that looks and feels believable. If one wants to advance, the other needs to know to do suppressive fire. Flanking maneuvers need to be timed. And all those new variables could be bugged and create odd exploitable glitches.

It's all doable, within reason, but it's also very complex. Beyond some coders altogether, and certainly taxing to most any.

Consider the example of stealth someone complained about earlier, where they hated in Dishonoured that enemies would give up "guess it was just a breeze"... that's a reset state in the game so that players trying to stealth through the game don't have to restart the game every time they get spotted. That's in there on purpose to make the game easier/more fun... it's not bad AI, it's by design for better gameplay. Does it feel goofy when it happens? Sure, I guess. But imagine the frustration if every single time you got spotted an alarm went off and you had to restart? While that may be appealing to a few, most people would lose their minds in frustration.

I'm not trying to defend bad AI, nor defend bad design. Obviously there is some really bad AI out there (Crysis 2 comes to mind). But it's not as simple as some make it out to be. It's a very complex problem, and the solutions are very time intensive... and those solutions aren't always 'more fun' to begin with.
 
Thanks for the well thought out reply. You make some good points but I just disagree that better ai always has the result of making something more difficult. I gave the example of flanking but that kind of thing isn't all I mean. A good example is the grunts in Halo temporarily panicking when you kill their elite boss. That doesn't make the game harder at all but it does introduce some interesting strategy to the game. I suppose that's not particularly complex behaviour but it is more interesting than the norm. That's the kind of thing I'd like to see more in games. Interesting behaviours that go beyond whack a mole or rushing you suicidally. Good ai to me doesn't necessarily mean more effective in their strategies and up to a certain point I consider artificial stupidity to be a part of good game ai. No one wants aimbot like ai's that spot you across the map and ruthlessly slay you, just something that's more interesting to fight.
 

IvorB

Member
Funny you mention Uncharted when 2's enemies rely on line-of-sight and will approach the place they last saw the player.

Uncharted 3 is actually the last game I played with good AI. On hard the enemies are pretty ruthless and on point.

I don't think too highly of current video game AI at all, since it's really clear that most examples of those have just enough work put into them to make them functional. And that's the point.

AI in video games is not going to broadly improve by leaps and bounds over the course of time since it's a component that's almost entirely dependent on implementation. Improvements in hardware specs won't help a developer come with different actions in different states, and you can't standardize game logic and behavior across multiple types of games either.

I don't get what you are saying. Every part of video games relies on implementation. Yeah it takes work and some people are asking why developers don't put the work in. I'm actually surprised how many people are giving devs a pass like this is some unreasonable request.
 

danwarb

Member
AI is stuck. It's because of the games we play. How far can you push 1 of 10000 enemies to be killed easily enough not to frustrate?
 
I created an object called AI in C# the other day

public static void BeGood(int howGood){
this.setQuality(howGood);
//Some code that does the logic
}

However, when I call the method AI.ActHuman(10), it does not work. What is the problem?
 
Well, all shooting game devs should download that Fear AI document where they explain the basic routines and use that as a starting point! Why re-invent the wheel! :D

Fear used a great fake-smart ai that was really fun to fight against.
 
One thing.Why not even FEAR 2 had FEAR 1 like AI?.The code was not reusable?.only understandable by he writer?.With so many white papers about it i dont get why hasnt been used an identical method in other its not like Epic couldnt have written something similar in an Unreal Enine AI module.

Fear 1's level design was a big contributor to the AI. Fear 2's level design is different. You can take Fear 1's level design, change it, keep the same AI, and you will think the AI 'sucks'.

Also AI is very game dependent because it relies on factors such as character abilities, level design, and enemy abilities. The only thing that is probably reusable is pathfinding, but again that is still pretty game specific (FPS vs space combat sim, etc).
 

Mael

Member
I know there's one game where better AI would certainly improve the marketing of the game :
Monster Hunter.
Because you goddamn know that really would matter way more than just more shadder or going HD or whatever BS you can throw at it.

Why do people consider better AI only for games like FPS where the foes are pretty much humans?
If you're against a very large beast, it's better if it doesn't react like a dumb bot that is only there to be killed.
 

Moonstone

Member
I don't get what you are saying. Every part of video games relies on implementation. Yeah it takes work and some people are asking why developers don't put the work in. I'm actually surprised how many people are giving devs a pass like this is some unreasonable request.

I guess he's is trying to say that games don't use TRVE AI. Game AI is usually just a bunch of scripts. We are not talking about neural networks or knowledge based systems that can actually learn. Enemy behavior is not simulated in that way and it probably wouldn't work in games. It's designed around the player and to be fun. It's more important to feel "intelligent".
There are old games from 2000 that seem to have a better AI than modern games.
A good game-"AI" takes effort. But other things are usually more important. Raw power doesn't solve this problem.
 
Stick to human player for the best competitive gaming experience.
AI will never surpass human brain in term of gaming skills.
Online games, it is.
 
Red_Arremer_Ace.png


I wish his AI was dumber.
 
In an FPS, if you're facing a squad of enemies that had solid AI (flanking, suppressive fire, grenades to force you from cover, etc) it quickly would overwhelm most players. So instead we get enemies that sit in place waiting to get headshot, because that's more fun for most people.
Actually, that's a lot of fun in Wolfenstein The New Order, and I played it on the highest Uber difficulty. The game encourages a more run-and-gun, think on your foot style which I prefer to the regular stop-and-pop (CoD/Battlefield/Killzone) approach.
 

Snowman

Member
I think the more complex you make the AI, the more likely there are to be weird holes where people find exploits to abuse. It is weird how even in really big games these days, enemy AI is consistently kind of shitty and boring, stuff like Shadow of Mordor, AC, I haven't played a CoD in a while but I imagine that's still similarly bad.

I've been playing Lords of the Fallen just recently, and even the bosses in that are super scripted, "I have 3 or 4 moves that I'm gonna do randomly, kind of depending on how close you are to me, but I'm just gonna carry on with what I'm doing no matter what". It's still pretty much exactly the same as how bosses in like the 16 bit days worked.

I do wonder if there is room for a (I mostly mean singleplayer) game to come out and blow everyone's minds with actual interesting/more dynamic AI in enemies. It's weird to me that people are saying better AI wouldn't be fun because who wants to just lose to AI all the time - better AI doesn't necessarily make the game harder, you wouldn't want to make it perfectly react to everything, just make enemies a bit more reactive but so that they still make mistakes.

I think it could make for way more exciting/fun combat in games if done right.
 

The Argus

Member
I swear the bat AI in Spelunky is self aware. It's the only explanation of why they've killed me near 200 times.

I remember the Dreamcast had a big AI marketing push "It's like its thinking" or something like that. The only time AI ever really bugs me is in games like Civ V where their erratic actions are based on moves you made hundreds of turns ago.
 
http://downloads.bungie.net/presentations/gdc02_jaime_griesemer.ppt

This presentation from Bungie's Chris Butcher and Jamie Griesemer is just as relevant now as it was 12 years ago. Halo CE's AI was revolutionary for its time and hasn't really been bettered since. It doesn't need to be, for this sort of game.

Here's a good essay on AI, written by Jeff Orkin, an AI researcher at MIT, and a programmer on F.E.A.R. :
http://alumni.media.mit.edu/~jorkin/..._jeff_fear.pdf

Thanks loads for these. It's nice to read stuff from the devs of some of the most celebrated AI in shooters.

There was a follow-up n 2005 to the Bungie presentation by Damian Isla (Halo 2 AI Programmer) at Gamasutra:
GDC 2005 Proceeding: Handling Complexity in the Halo 2 AI
http://www.gamasutra.com/view/feature/130663/gdc_2005_proceeding_handling_.php

2008, talk of Objectives Systems by Damian Isla again. Good stuff in comments from Jeff Orkin and other experts:
Further Thoughts on Building Better Battles
http://www.ai-blog.net/archives/000142.html

Teaming Up with Halo’s AI: 42 Tricks to Assist Your Game (2007) by Alex J. Champandard, Killzone 2 + 3 AI Programmer:
http://aigamedev.com/open/review/halo-ai/

Who knew there were places just for AI discussion in games :)
 

KingJolly

Banned
Wolves hunt in packs arisen

Wolves hunt in packs arisen

Wolves hunt in packs arisen

What a gaf

In all seriousness, I hope next gen brings stellar ai.
 
Forget super PCs.HL1 AI is the best bar none and run in a Pentium 200.Is simple logic programming, you dont net neural networks.
Its a priorities problem.If reviewers gave more credit to AI in their reviews things would change.But you see, a new COD and better scores that WTNO...so, who gives a s...?.

Yep I agree. If we can even get HL1 level A.I in modern games I'll be happy. But devs have ignored the progression in A.I for the most part. Just look at this F.E.A.R test video

F.E.A.R A.I

The enemies at least fight for their lives and go after the player when appropriate. Just give us this level of A.I on harder levels.
 
Top Bottom