Slashdot Mirror


Believable Stupidity In Game AI

Gamasutra is running a feature written by Mick West, co-founder of Neversoft, about creating game AI that is dumb enough to defeat, yet intelligent enough that its "mistakes" are similar to those a real player would make, thus preserving the illusion that the AI is not just throwing the game. "The simplest way to introduce stupidity into AI is to reduce the amount of computation that it's allowed to perform. Chess AI generally performs billions of calculations when deciding what move to make. ... The problem with this approach is that it decreases the realism of the AI player. When you reduce the amount of computation, the AI will begin to make incredibly stupid mistakes — mistakes that are so stupid, no human would ever make them. The artificial nature of the game will then become apparent, which destroys the illusion of playing against a real opponent. ... By reducing the amount of computation, we create an AI opponent that is trying to win, but has been crippled in a way that leads to unrealistic gameplay."

39 of 378 comments (clear)

  1. Cheating AI by Anonymous Coward · · Score: 5, Interesting

    Actually I don't have much issue with the quality of AI's used in games, but I don't like that so many of them cheat. A few games of gotten it right, but many AI's can track my movements through walls. In order to defeat the AI, I have to figure out how it works and so I'm constantly aware it has superhuman abilities and I find that very distracting from the realism.

    1. Re:Cheating AI by je+ne+sais+quoi · · Score: 5, Informative
      I ran into that problem just a few days ago playing Far Cry 2. I was sneaking into the airport to assassinate a character who was in a hanger... As I'm walking around the outside of the hanger towards the entrance, I hear pistol shots at the wall to my left. The AI detected me walked around outside the hanger while he was inside and with perfect accuracy, started trying to shoot through the wall at me. That's the sort of problem this article was about:

      In pool and in shooters, the computer AI is blessed with an omniscient accuracy. The shooter AI knows down to the billionth of an inch exactly where you are, and could shoot your hat off your head from five miles away. Similarly in pool, the AI knows the position of every ball and can calculate where every ball will end up before it takes a shot.

      The solution I found fascinating:

      The programmers of Fritz [a chess program] hit upon a solution that involved the AI deliberately setting up situations that the human player could exploit (with some thought) that would allow the human to gain a positional or piece advantage. Once the human player gained the advantage, the AI would resume trying to win. At no point here is the AI actually dumbed down. If anything, there is actually quite a bit more computation going on, and certainly more complexity.

      So the idea is that the AI needs to calculate precisely where you are, and then rather than hit you if the preferences are set to "hard" or miss you on the "easy" setting, probabilistically make a decision based on what a weaker or stronger human player would do. It's was a great read!

      --
      Gentlemen! You can't fight in here, this is the war room!
    2. Re:Cheating AI by patro · · Score: 4, Interesting

      The programmers of Fritz [a chess program] hit upon a solution that involved the AI deliberately setting up situations that the human player could exploit (with some thought) that would allow the human to gain a positional or piece advantage. Once the human player gained the advantage, the AI would resume trying to win.

      It's so humiliating, isn't it? We can only win if the machines let us. I for one welcome...

    3. Re:Cheating AI by Vectronic · · Score: 5, Interesting

      I think that's largely because AI is generally controlled as a group entity, so there is one main master pool of data that they get information from.

      When what should be done, is that each AI is IAI or something, individual artificial intelligence, which can be done with object masking, and an analysis of what the AI can see in it's perspective camera, or it's range to a sound, instead of all players and sounds being a dot on a grid, with no regard for obstructions and range.

      Little more on topic, I don't really mind figuring out how the AI is working, what I dislike, is like hard-coded faults, usually with waypointed bots in FPS type games, where they will always get stuck at the same spot on that same path. Because then I abuse it, i'll lead them there, wait for them to get stuck, and kill them... lotsa fun for 15 minutes, but the game gets really boring quickly, however I actually like the superhuman AI as long as they still have to abide by the rules I do (not shooting through walls I can't, etc), makes for great practice.

      I generally don't play games for realism, but rather for the lack of it, I can't go out collecting coins from trees, or shooting my neighbours "really"... excluding racing/flying simulators, but usually they don't have much problems with realistic AI because of how many variables there are to "fuck with", most, if not all of which can happen in reality, sudden gust of wind, punctured tire, blown engine, etc, perhaps thats what humanoid AI games need, is more variables to be more realistic. Different eyesights, hearing, reaction times, strength, etc, etc, then slightly randomized variations on them during the same match, so that even a hard-coded fault in the AI wouldn't come to the exact same result, humans don't play by constants, why should AI.

      Now that i'm rambling, I'll end with the fact that most games are multi-player now, so they spend more time working on the human interaction with the game, and the AI is just tossed in afterwards, probably carried over from v1.0, just so they can say it has that option, expecting people to want to play people. As a side note, maybe thats the logic behind some of them, make shitty AI, to try and force more people to buy+play the game so the game is useful.

    4. Re:Cheating AI by Nick+Ives · · Score: 5, Interesting

      FC2 was notorious for the enemies ability to see you through anything, they clearly didn't even attempt to solve the perfect aim / x-ray vision problem.

      The best shooter in this regard is Crysis. The enemy AI can only see you over long distances if they happen to look in your direction through either binoculars or a scope and if you can't see them they can't see you, even through bushes.

      --
      Nick
    5. Re:Cheating AI by Nick+Ives · · Score: 4, Interesting

      Really? I found that enemies tended to spray their fire more wildly when I disappeared into the bushes, then I would just turn on stealth and dash across open ground to alternative cover. From there it was generally a case of watching them circle in on empty ground and tossing in a grenade when they were all bunched up in my previous position! I rate it as the best AI I've seen in any FPS.

      They had scarily accurate aim even across long distances but I didn't find that too unrealistic: the enemies were all trained soldiers. Except the aliens. Crysis would've been far better without aliens.

      --
      Nick
    6. Re:Cheating AI by __aasqbs9791 · · Score: 4, Interesting

      Your mention of racing games makes me recall this racing game I was playing when I was a kid on an Atari ST called Hard Drivin' (IIRC) and I was almost beating the AI when we came up to the draw bridge jump. It was basically a ramp that automatically raised and lowered itself in a cycle, with a large tower in the middle. If you hit it when it was too low you smashed into the tower. If you hit it too high you'd overshoot the track, because right after the other side of the tower was a hard left turn. I could tell the AI was going to hit the jump at the wrong point and overshoot the whole thing, while I was going to hit it perfectly. So when I get to the other side I'm really ecstatic as I watch the shadow of the other car pass over me. I start to get less so when the shadow turns to the left and the AI car lands right in front of me, like nothing special had happened!

  2. Easy solution by L4t3r4lu5 · · Score: 4, Funny

    Have a PRNG have the outcome of 313373 cause the bot to either:
    - Fall on own grenade.
    - Rocket-jump at 25 health.
    - Hump the face of the nearest corpse.

    --
    Finally had enough. Come see us over at https://soylentnews.org/
    1. Re:Easy solution by Aladrin · · Score: 4, Insightful

      You're joking, but having realistic actions like teabagging a defeated corpse brings a lot more illusion of reality than a lot of the other stuff they do.

      As for the article, I saw a lot of 'dumbing down' and 'intelligent mistakes' ... But I saw absolutely nothing about 'personality'. -That- is what makes an AI seem real.

      Take the poker example. If you just create 3 levels of players, bad, good, and perfect... There's no personality.

      Instead, you make different players: Cardsharp, timid bets, reckless bets, etc. In other words, you model the AIs after real player types.

      In other words, you're trying to pass the poker Turing test with this AI.

      --
      "If you make people think they're thinking, they'll love you; But if you really make them think, they'll hate you." - DM
    2. Re:Easy solution by somersault · · Score: 4, Interesting

      Bah. It depresses me how bad the AI still is in FPS games after I made my own bots for CS years ago (when I didn't have a decent internet connection - when I got broadband I stopped making the bots). My bots had different personalities, can't remember if you specifically had to specify rusher/camper/whatever or if it was just a certain courage level, but you could specify obedience level (for responding to radio commands), weapon preferences, ability to use grenades, aiming skill (higher skill levels would use more controllerd fire and be more likely to HS you on the first shot, while lower ones would start at about chest level then just spray and pray), whether they were able to look sideways to check for enemies down side alleys as they were running along a path etc, all per bot so you could create awesome bots (modelled on myself and my friends :P), and noobs, etc. In the last incarnation they were starting to pick up knowledge of stuff like where they had killed enemies or died themselves which affected their 'courage' and how likely they were to start sneaking around or rushing (made a big difference because you can't hear walking enemies in CS and the bots respected that). Those were the days.. AI is fun, at least for games like Counter-Strike.. it's not quite so much fun for stuff like board games..

      If anyone still has CS 1.5 and wants to try them out they're called TEAMbot and one of the last releases is still up at http://www.planethalflife.com/teambot . I probably still have the latest version of the source on one of my old HDs..

      --
      which is totally what she said
  3. Interesting thought by JustNilt · · Score: 4, Interesting

    So, basically, we have to determine how many "calculations per second" equivalent an average human can manage. Then we have to allow a range on either side of that since not everyone has the same capacity. Once we manage that, game AI would start being more realistic, huh?

    Somehow I doubt it's that simplistic but still sort of interesting.

    --
    You know the thing about UDP jokes? I don't care if you get it or not.
    1. Re:Interesting thought by MBCook · · Score: 5, Informative

      That's not what I got out of the article.

      What I took away was have your opponent play it's strongest, but make exploitable situations for the player. Make a pool shot so they human starts in a good position. Make a chess move that, while beneficial, opening a big possible hole for the player to exploit. Make the FPS bot run for cover at the wrong moment, but not randomly/suicidally.

      (those are all from the article)

      Basically make the AI make human like mistakes (mistakes in strategy) instead of "computer like" mistakes (just lowering their accuracy, not looking far ahead, etc).

      --
      Comment forecast: Bits of genius surrounded by a sea of mediocrity.
    2. Re:Interesting thought by MobyDisk · · Score: 5, Informative

      Actually, he is saying the opposite. He is saying that by reducing the number of calculations per second, you create an unrealistic opponent. Instead, you must do additional calculations to model the mistakes that a human would make. Our problem is not that we don't do enough calculations, but that we make mistakes in our calculations. We are inaccurate, we jump to conclusions, we get excited, or calculate one branch of the tree very deeply while ignoring another one. Those types of things are tough for computers to do.

  4. This must be stopping Duke Nukem Forever by ndavis · · Score: 5, Funny

    This must be the problem facing the team creating Duke Nukem Forever.

    They needed the AI to be dumb enough so you could hear the comments all the time during the game.

    1. Re:This must be stopping Duke Nukem Forever by Em+Emalb · · Score: 4, Funny

      From what I understand, they're trying to model their AI after Forrest Gump but it keeps causing the AI to sit on a park bench and strike up conversations with random people.

      --
      Sent from your iPad.
  5. No human would ever make them... by hal2814 · · Score: 4, Insightful

    Oh, the humanity! Football games drive me nuts when the AI does stupid things no real person would ever do. Why the hell did my fullback just brush by the linebacker that's right in my RB's way?! Why can't I get my linebacker to stay in his lane on running plays?!

    I'd love to see the difference in difficulty in Madden being the difference between playing a Jerry Glanville-coached team vs a Tom Landry-coached team. Instead, all increasing the difficulty does is make your opponents more talented but no smarter. Even on the highest difficulty, FBs don't understand their blocking assignments.

    1. Re:No human would ever make them... by rickb928 · · Score: 5, Funny

      "Oh, the humanity! Football games drive me nuts when the AI does stupid things no real person would ever do. Why the hell did my fullback just brush by the linebacker that's right in my RB's way?! Why can't I get my linebacker to stay in his lane on running plays?!"

      Gee, you sound like a real life coach. Certainly like my High School coach.

      I'm thinking the AI is working like it should here. You got your disgruntled, not getting paid enough FB who isn't taking the hit, and your linebacker who thinks he's smarter then your Defensive Coordinator and is freelancing with visions of stardom in his head.

      Realistic this is, I think. Patience, padiwan. Trade you must. Draft you will. Beware of anger.

      --
      deleting the extra space after periods so i can stay relevant, yeah.
  6. Re:So stupid no human would do that? by hey! · · Score: 5, Funny

    Hmmm. Possibly this is a sign that TFA was written by an AI agent. Asserting that there are mistakes that are too stupid for for any human to make is a mistake that is too stupid for any human to make.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  7. AI leaps and bounds? by Gizzmonic · · Score: 5, Interesting

    Year after year, I read these kind of articles that report how game AI increases in leaps and bounds...and I still don't see it. Bad guys in GTA still seem to rush towards grenades, Halo/Gears of War enemies are either completely impulsive or avoidant. I'm not knocking the programmers...I think game AI must be very difficult to achieve, and even harder to detect for the layman (such as myself).

    Does anyone have an example of really good AI in action games (or any non-RPG, non-RTS games)?

    --
    (-1, Raw and Uncut is the only way to read)
  8. Re:Believable AI by haystor · · Score: 4, Interesting

    Fritz has a sparring mode which does a little better than that. It will find a route that sets up a position where the player can force a win of a piece or a pawn. Essentially it sets up a tactical middle game puzzle live in the middle of a game.

    The player doesn't know when it will do this or even if it will happen at all. But it is most likely to happen when the player puts the computer under pressure. This is great because it teaches the player to press the computer and coordinate pieces while also constantly keeping an eye out for the wins.

    The whole chessmaster series features near-perfect play alternating with just flat out dropping pieces.

    Even with Fritz though, "easy" mode is still well above beginner.

    --
    t
  9. This should be almost impossible. by Genrou · · Score: 4, Funny

    If it is so difficult to raise the computers to the level of human intelligence, it is probably impossible to reach the level of human stupidity.

  10. it's about the cpu-time by rillopy · · Score: 4, Insightful

    Unfortunately, the AI generally only gets a tiny slice of the CPU time. If it were to use as much as the graphics, etc, then sure: the extra processing required to make the AI believably stupid would be easy. The innovations are there, it's just they are too slow or processor intensive to be implemented in most games.

  11. No Human? by chrispycreeme · · Score: 5, Funny

    The problem with this approach is that it decreases the realism of the AI player. When you reduce the amount of computation, the AI will begin to make incredibly stupid mistakes -- mistakes that are so stupid, no human would ever make them.

    The author has obviously never played chess with me.

  12. Limited attention and experience by AlpineR · · Score: 4, Interesting

    My first rule of game AI is that the computer should have access to the same information and controls as a human player. I hate games where the computer knows about your units and buildings that it hasn't scouted.

    The big advantage that computers have is that they can micromanage every unit with 100% efficiency. One way to reduce skill could be to limit the amount of attention the computer can spend, maybe in the form of "actions per minute". For a game like poker that could be a limit on how precisely the computer player calculates odds. A more experienced human player has a better feel for the game, so a more skillful computer player could dig deeper into the nooks and crannies of probability.

    A way that computers often act too stupid is not accounting for how their interactions with one player will influence other players who aren't directly involved. For example, in a three-way game the computer player might throw everything against the strongest player, weakening them both and letting the third player win. Humans have millions of years of instincts for dealing with such situations. So the game AI might need to precompute some game theory and adapt to opponent reactions over a series of many games. Then it could be dumbed down by reducing its use of that experience and acting more like a newbie human player.

  13. Competing goals by olclops · · Score: 5, Interesting

    If you want an AI to make human like mistakes, you have to have at least a roughly human cognitive model. The simplest way to do this, it seems to me, is to give the AI competing goals. Rather than just have the AI "try to win", and then cripple its ability to do that effectively, you could give it multiple goals to strive toward, and then give it some degree of randomness in which goal it chooses to pursue. Victory vs. pain-avoidance, attack vs. finding time to recover, etc.

    1. Re:Competing goals by tnk1 · · Score: 4, Insightful

      I agree with this totally. One of the bigger reasons some players fail at a game is that they aren't actually playing the same game as everyone else.

      What I mean is illustrated by some post I read once where some jerk, who was also a rather good player, laid it out bare:

      Many people don't play the game. They invent their own little rules for what is "fair" or "better" or "morally right". This handicaps them. You win by playing the game and using all of your abilities and all of your assets to do so, no matter how "cheap" or "skill-less" they seem to you.

      If the game makes it so that some skill does more damage for less effort, but you prefer to use another skill because it seems "cool" to you, or you liked the animation or whatever, you deserve to lose.

      The one thing that this illustrates is that a computer also tends to have clarity of purpose. They are programmed to kill you. That is what they do. They aren't there to smirk or taunt you (unless that's in the script). They will not dance around or try and add finesse to their moves to look cool. They use the most efficient moves or actions to kill you. Or, sometimes, they only get a certain set of moves, but they are scripted to execute them in a certain manner.

      So, basically, by giving your NPCs a "personality" where their goals aren't to strictly kill you with Terminator-like focus, but perhaps to simply make you look bad, or use some moves that *they* think are cool, which really aren't all that useful, you can make them a bit more "human".

      The problem with most mobs is that you already know their motivation, so knowing what they will do next is actually rather easy to figure out. So, if you "cheat" with their AI, it becomes apparent to players that you either buffed or nerfed them artificially.

      If your mobs act in a manner where they are believably foolish, its a lot easier to handicap them and have a player believe that the handicapping is their lack of "skill", rather than you simply giving them less hit points or some absurd lack of resistance to one damage-type.

  14. Re:So stupid no human would do that? by cparker15 · · Score: 4, Funny

    Asserting that there are mistakes that are too stupid for for any human to make is a mistake that is too stupid for any human to make.

    HA! I see through your ruse!

    --
    Have you driven a fnord... lately?

    You must wait a little bit before using this resource; please try again later.

  15. Stupidity is a component of intelligent behavior. by hey! · · Score: 5, Insightful

    And vice versa.

    One thing that is stupid: trying the same things that failed in the past.

    This is a component of smart behaviors as well. If you don't know what to do, try something and watch very carefully how it fails. If you are in a desperate situation and you are going to definitely fail through inaction, then try an action which failed in the past and hope you get lucky. Or vice versa, when the action that usually works looks like its going to fail, try doing nothing.

    Animals freezing in the face of danger is an example of this. It's not much of a defense, but you might get lucky. Maybe the prey a couple animals down the line will get itchy and draw the predator's attention.

    On the other hand, smart behavior can be a component of stupidity. If the red button gets you a treat 80% of the time and the green one gets you a treat 20% of the time, the intelligently stupid thing is to push the red button 100% of the time. The stupidly intelligent thing is to try to work out the pattern of red/green rewards.

    If you want realistic model of stupidity, provide the NPCs with a range of decision making strategies, all of which work to some degree, but the better of which take more effort (computation). The NPC can choose between the strategies with a random function weighted towards the better strategies, but as time and "stress" come into play the function can shift towards the easy but less effective strategies.

    That's a pretty good model of human performance "choking".

    Evolution did not produce human stupidity because it was useless, after all.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  16. Re:Deep Blue by Evanisincontrol · · Score: 5, Interesting
    This has been mentioned before, but I think it's worth bringing up that Kasparov wasn't facing Deep Blue under fair conditions. Even ignoring accusations of cheating and whatnot, there's two very important facts to consider:
    • Normally when a grandmaster plays in a chess tournament, they are givens months of advance warning. The grandmaster will study hundreds of game transcripts, studying their opponent's style and looking for weaknesses. (The opponent will also be given the grandmaster's game transcripts). Deep blue was given Kasparov's transcripts, but Kasparov was given nothing.
    • IBM modified Deep Blue after Kasparov won his first match. This meant that, after finally learning how Deep Blue played (on the fly!), Kasparov basically had to play a brand new opponent.

    If this were a karate match, this would be the equivalent of the master having to fight someone he's never met before, but that person has studied the master's every move. Then, after the master wins the fight, he has to fight someone else who has studied his every move and acts differently. Not a fair fight.

  17. F.E.A.R. by A.+B3ttik · · Score: 4, Insightful

    F.E.A.R. is the only game to date that I've played and honestly felt like I was playing against human opponents. Honestly, they were as smart as or even smarter than playing against people online.

    They did this through heavy use of waypoints and scripted events. If that's what you have to do to make it realistic, then by all means, do it.

  18. NP-tard? by illegalcortex · · Score: 5, Funny

    Do we have programmers that are smart enough to program stupidity algorithms to be smart enough to be as stupid as humans?

  19. Here's what I'd like by vadim_t · · Score: 5, Insightful

    A computer that plays on equal terms.

    AIs often win in some games not by the virtue of being smarter, but by having an unfair advantage. Examples:

    • In RTSes, constant money injections. This pretty much nullifies attempts to attack resource collection -- they don't need it anyway.
    • Knowledge of the position of everything. In RTSes, they don't need to discover your position. It's useless to try to build an outpost and hide the real base somewhere behind it. In FPSes they know where you are, and can tell when you're sneaking from behind
    • Instant reaction time and all-encompassing awareness. In RTSes, the AI is capable of controlling every unit at once, and knows what's going on in the whole map at once. Meanwhile, the players are limited in the speed they can give orders, and only has a view of part of the world. Due to this, the AI can't be fooled by multiple attacks from different places, it will see all of them perfectly.

    My suggestion: An AI should be coded as a bot, within the constraints given to the player. If the player can only see a part of the battlefield (like in Starcraft) then the AI should have the same limit and need adjust its own viewport to gain awareness of an area. It should also be limited by the fog of war, and lack the ability to see out of the back of its head. To put in another way, a fair Starcraft AI would be one implemented with a camera pointed at the screen, controlling only the keyboard and mouse inputs.

    The idea is that I want to be beaten because the AI is indeed smarter, not because it's got a superior access to the battlefield I can never gain.

    Chess probably comes closest to the sort of thing I want -- the AI and human are fighting on very equal terms. I don't see the calculating millions of positions a second as a problem, that's simply an implementation detail.

  20. Re:Deep Blue by Evanisincontrol · · Score: 5, Informative

    Why did Kasparov agree to compete under those circumstances? Did IBM pull something nasty on him at the last second or did he just want to play Deep Blue badly enough that he agreed anyway?

    Well, I don't know Kasparov and I'm not a history expert, but I'm willing to bet that because he beat Deep Blue in 1996, he just figured he could do it again with no problem. He probably underestimated how much Deep Blue had improved, but that's just my speculation.

    I don't know Kasparov's motivations for playing Deep Blue at all, honestly. Beating Deep Blue wouldn't have won him any fame ("Oh look, he beat a computer. Computers suck at chess anyway."), but losing would look bad for him. He had nothing to gain and plenty to lose. I know after he lost the match, he demanded a rematch, but IBM refused and put Deep Blue out of commission. IBM had nothing to gain by beating Kasparov again, and their stocks had already started going up when the news got out that they had beaten the grandmaster (to their great pleasure, history did indeed forget the shady details I mentioned before, just as they hoped).

  21. Re:Deep Blue by Anonymous Coward · · Score: 5, Informative

    At the time that Deep Blue was being used, there was more of a focus on brute force search than tricky AI game play. Deep blue searched an average of 130 million nodes a second using a iterative-deepening alpaha-beta search, sometimes able to look 40 moves ahead. IBM declined a rematch after that game, but thanks to improvements in AI, a standard desktop PC running improved search algorithms is now a suitable match for even a grandmaster.

    Deep blue also contained an 'opening book' of 4000 positions and 700,000 grandmaster games indexed.

    Source: Artificial Intelligence A Modern Approach: Russell, Norwig

  22. Re:Deep Blue by Anonymous Coward · · Score: 4, Interesting

    i'm not involved into any of these activities, but i know Kasparov as a great mind and chess player because big blue won against him.
    and thats probably what the history will remind us.
    Eventually, a human would have been beaten anyway.

  23. Re:Deep Blue by stranger_to_himself · · Score: 4, Funny

    Kasparov had immortality to gain. In fact I'm fairly certain most people today remember him only as The First Person To Lose Against A Computer In Chess and have no idea who deep blue is.

    What! I was losing against my Sinclair Spectrum +2 as long ago as 1987.

  24. Re:Money by fooslacker · · Score: 5, Insightful

    Why is this debasement? Playing against a machine even in unfair settings is still a challenge. The goal isn't to pick only fights you can win but to test yourself and do something new and experience something new.

    As for it being "unfair" it wasn't touted as fair it was a computer v grandmaster experiment not a ranking test.

    The only shady part in my opinion is the refusal for a rematch. If the man is willing to play on uneven ground and give his time (even if paid) to your stunt then you should have the courtesy to let him challenge/redeem himself.

  25. Re:Deep Blue by josh61980 · · Score: 5, Interesting

    I read about in college. Kasparov did ask for the transcripts. However the Big Blue team told him no. Basically saying it would give Kasparov an unfair advantage because he could study Big Blue's moves and deconstruct the algorithm it used.

  26. Re:depends on the stupidity by skorch · · Score: 4, Insightful

    Sorry, but as you say I must almost completely disagree with your sentiment on scripted events in games. Scripted events are not good example of AI because there is no decision making, which makes them predictable and exploitable. So the only way to scale difficulty in a scripted scenario is to just pump up the AI's accuracy, damage, and health, which are not very interesting. Scripted events work fine for fairly linear narratives and setting up big cinematic set-pieces, but they don't make for interesting gameplay (mind you I did not say they don't make for "fun" gameplay).

    The events you describe in AvP are not necessarily examples of scripted scenarios, but sound more like a scripted set of responses to stimuli the player provides (would the AI react differently if you didn't rip off a soldier's head?). The trick for interesting yet realistic decision making is to allow the AI a range of responses that it can make, and then every time you present the same scenario to the computer you may get a different response. So when the AI is actually making decisions, rather than just following a pre-scripted path, this allows the player to make actual decisions in response, rather than just following their own memorized trial-and-error derived path to success.

    The key to a good scaling AI doesn't have to be that tricky, it can just be a matter of what range of choices you allow any given AI to make and what sorts of "mistakes" you throw in that pool of choices.

    When I face "easy" opponents in an FPS, I want them to use simple tactics (not just be unable to hit the broadside of a barn) like charging forwards blindly, or getting scared easily and retreating or even panicking, and being easily suppressed by heavy fire. When I face more advanced opponents, I want the range of their choices to move up the tactical scale to include flanking maneuvers, suppression fire, use of cover, and tactical retreats. A good mistake for an advanced AI would be to assume you're in the wrong position if you duck out of view and to attack that wrong position vigorously (as opposed to the omniscience a lot of AI's seem to have). They don't have to be any more accurate or need any more bullets to kill than an easy bot, but at least they could present more of a real challenge without artificially increasing their stats. Granted this is harder to do and would require actual programming rather than just increasing a few numbers, but that's the price for good AI in your game.