hi I'm mark brown and this is game makers took it whenever people talk about good AI they invariably come back to the same three examples I'm talking about the replica soldiers in the original fear the various aliens in the Halo series and the Marines in the first half
like them and yes these games do have some really clever behaviors and halo too and fear actually pioneered some new AI technologies are still being used in games today but one other thing these games have in common is that they all feature particularly aggressive enemies who actively try
to hunt down and kill the player and also have a lot of health points so they can stick around for longer and this is something that makes these enemies feel a lot smarter but don't take my word for it this is something that Bungie knew all the way
back in the first Halo game during development it set up a play test with two versions of the game with the exact same enemy AI on both but on one machine the aliens didn't do much damage and died quickly and on the other they did more damage and
had more hit points the number of players who thought the enemies were very intelligent jumped from 8% to 43% when playing against more resilient enemies but the thing is aggressive enemies just don't work for every type of game this is something that it's software found out during the
development of dune 2016 it started with enemies that would chase you down but this made players acts defensively we'd end up in these situations where you would instantly start backing up said director Marty Stratton instead the studio told the enemies to hold their ground a bit more and
let the player be the one who's pushing forward so just like everything else in game design AI must fit the game's intended experience which means while aggressive AI fits the xenomorph in alien isolation it would be wildly out of place in Batman Arkham Asylum no one gets the
drop on Batman after and this all means that there must be more to good AI than just enemies who can kill the player and that's exactly what I'm going to talk about in this video with everything from good general practices to examples of truly ambitious and ingenious AI
good AI lets the player cheat just not in ways that the player will actually notice like how you can put a bucket on a shopkeepers head in Skyrim and rob them blind so hopefully in more subtle ways like how in the Uncharted games when you pop out of
cover enemies will start with a zero percent chance to hit Drake giving you a chance to take a few shots in the Far Cry games only a few enemies will be allowed to shoot at you at once to improve your odds of winning the fight and in the
arkham games enemies are told not to turn around during the predator sections so batman can sneak up behind its prey these are things that the player should never really notice but you would definitely feel their absence if they weren't there it's all about making the game feel more
fair even if most games are actually biased wildly in the players savor good AI tells you what it's thinking this is most often done through short to vocal clips known as box we're patrolling guards say things like and must be nothing but this can also be expressed through
animation and body language or with more gamey elements like vision cones light and noise sensors and those ghostly images that show you where the enemy last saw you I will talk about how much of this stuff you want to surface to the player and how much you want
to keep a bit fuzzy when I talk about stealth games in a future video a different way to achieve this is to give AI characters distinct personalities like the colored ghosts in pac-man or the different leaders in civilizations single-player modes who all have their own unique clerks developers
have actually found that this stuff makes AI characters seem smarter to players because if an AI has complex decision-making and perception skills like being able to notice that a door along their patrol path has been opened the player may never know that the guard is capable of such
a thought if they don't open their mouth and say you have won but this is also critical feedback that the player can use to understand what the AI is doing or is about to do and can plan accordingly which brings me onto this next one good AI is
predictable which sounds odd but hear me out in 2004 halo tech lead Chris butcher said the goal is not to create something that is unpredictable what you want is an artificial intelligence that is consistent so that the player can do things and expect the AI will react in
a certain way this allows you to play a game with intentionality which Far Cry 2 designer Clint Hocking defined as the ability for the player to devise his own meaningful goals through his understanding of the game dynamics to break that down a bit when you play a game
you start to build up an understanding of how different things were like you shoot a red barrel it explodes and now going forward you know that every time you see a red barrel you can shoot it to create an explosion and can use this to your advantage but
this applies to AI behavior too if guards always return dropped guns to crates and turning off a generator will always make an enemy come check it out you can then use this information to create plans by versions and traps without predictable behavior the player can't create satisfying plans
halo man butcher gave the example of sneaking up behind a grunt and the grunt running away it would be bad if they only ran away half of the time because then the player can build a plan that will only work half of the time instead Bungie went for
predictable actions but unpredictable consequences the grunt will always run away said butcher you don't necessarily know where he'll run away – so predictability certainly doesn't mean easy take a game like spelunky where every enemy acts in an almost completely scripted fashion which would make them effortless to avoid
or kill until the enemies start appearing in big groups begin to navigate different environments and start interacting with other characters now it's spelunky good AI can interact with the game's systems this is like how an enemy ingress of the wild doesn't just walk up to link and start
wailing on him but will run off and pick up dropped weapons set their wooden clubs alight kick away bombs and even throw their fellow monsters at you or that's gotta hurt again this has the added benefit of making an AI character seem smart an enemy in Bioshock who
runs to a health dispenser midway through a fight looks like he is aware of his surroundings is interested in self-preservation and feels like he has similar abilities to the player but it also means you can screw them over by putting a trap on the health dispenser by exposing
an AI to the game systems we can provide loads of interesting ways to deal with foes in a more roundabout fashion like making an enemy fight for you in prey or tricking an enemy into attacking a cuckoo so this happens by the way I propose we call this
chicken boning and enemy good AI reacts to the player this can be as simple as guards becoming more frightened as you take out their buddies in the Batman games or something as complex as shadow of Mordor in that game special orc captains are randomly generated with names abilities
and relationships and will then remember their interactions with the hero if you run away from a battle for example the orc might reference this next time they see you hi well then you run eek I'm gonna baby shake this is a great way to create memorable and very
personal stories for the player your death will bring me before glory attacking the player can also be used to adapt the way the AI works this doesn't need to be as clever as the shadow fighters in the new killer instinct or the drive ATAR system in the Forza
Games where Microsoft tracks the way you play and can create AI doppelgangers to race or fight for you really it can be as simple as something like in Metal Gear Solid 5 where enemy's track things like how often you perform headshots take out bases without being seen or
infiltrate during the dark and then change to different behavior like wearing helmets laying traps or using night-vision goggles these are all things that the AI has been told how to do it's not actually learning but it just won't do them until the player hits a certain threshold and
the intended effect is stopping the player from using the same boring strategy for every base in Afghanistan a similar system is used in alien isolation where the alien unlocks new abilities as the game goes on to make it look like the xenomorph is learning from the player and
to keep the game interesting as the hours tick by adapting the AI to the player is also used to build a good mood or drive the game's pacing the most famous implementation of this is certainly the AI director in left4dead this clever system tracks the well-being of each
player based on their health and run-ins with the special infected and if the team is cruising along the intensity of the zombie horde is increased before the AI director eases off to give the team a chance to relax but this tech isn't as new as you might think
and something similar was actually used in pac-man designer Torah or attorney said I felt like it would be too stressful for pac-man to be continually surrounded and hunted down so I created the monsters invasions to come in waves so in the game ghosts swap between chasing the player
and just wandering off into the four corners of the maze good AI has its own goals beyond kill the player I mean this game is reine world by the way where other animals in the game are hunting for food and will end up in territorial scraps with rivals
sometimes it's best to just let them get on with it but also how stalker shadow of Chernobyl works or is supposed to work bandits make plans and then wonder about the wasteland alone or in groups to enact those plans meaning you could come across a raging battle that
only occurred because two rival factions happen to accidentally run into one another the AI is a bit buggy though and you will need to install mods if you want the AI to be doing stuff outside of your immediate location but stalkers a life system sure was ambitious and
we certainly need more games like it or maybe more games like waking Mars a captivating sci-fi indie game about increasing biodiversity in the belly of the Red Planet when you figure out how different plants and animals react to one another you can forge self-sufficient ecosystems where AI critters
can live and breed even while you're exploring a completely different part of Mars finally good AI isn't just about enemies and we need better friendlies because even in games with great combat encounters the good guys can be as some assert hello now some developers just cheat and make
their AI companions invincible like Elizabeth in BioShock Infinite who can't get hurt during combat probably a wise decision given the tumultuous history of escort missions and games but there are other uses for friendly characters than just defenseless girls who follow the male hero around in the Last Guardian
you were for the giant beast called Treecko who can take care of enemies the Treecko is nervous around stained-glass windows that you can smash this means the player and the AI must work together something which can get a bit frustrating when Treecko has been specifically told to ignore
the player's instructions about half the time in an attempt to make it seem more like an animal in event zero developer Ocelot society was inspired by Internet chat BOTS to make a game where you can talk with an artificial intelligence and work with it to solve puzzles on
a derelict spaceship I've got much more on that game in an earlier video and then in Final Fantasy 15 one of your roadtrip buddies Prompto is capable of snapping instagram shots during your adventure at specific triggers or just when Prompto feels like it you'll automatically take a picture
and later present you with an album full of snaps to sift through damn this is a really good shot I make sure I got the regalia's good say this has basically no gameplay value but is a lovely way of preserving your personal experience with the game and adds
tremendous amounts to prompt those character now none of this is to say that we don't want simply better AI stupid enemy decisions can pull a straight out of an experience and players derive little satisfaction from beating and obviously unintelligent opponent okay maybe it is quite satisfying but developers
should always be trying to make further advancement in AI tech and create more nuanced behaviors for enemies but it's important to remember that AI isn't just a technical problem it's also a design problem and every game should approach the subject in a slightly different way sure we do
need more games that are about fighting a tactical squad of aggressive enemies because something's clearly not quite right when most modern shooters are still lagging behind a campy 13-year old game but it's important not to lose sight of the real goal in uncharted 4 Naughty Dog experimented with
complex AI behaviors before settling on enemies who were according to designer Matthew kau and spread out in a layout looking human and smart and moving in ways that are mildly predictable so the player has some ability to sneak up behind them because a patrolling guards goal isn't to
find the player it's to present interesting gameplay hey thanks for watching game makers toolkit is powered by most 2000 patrons which is absurd they're also invited to a private discord server to chat about games game design and our game club it's actually a really nice atmosphere very very
cozy anyway I'd like to recommend the YouTube channel AI and games which is run by tommy thompson and is a great resource for finding out about the AI technology behind your favorite games oh and links to all the articles and videos mentioned in this video are in the
description below the doobly-doo as I believe it is called and finally which games do you think have interesting entertaining or just particularly good artificial intelligence please leave your thoughts in the comments below