Latest / CyberSecurity Summary / AI for Games
Transcript
- 0:00Speaker 1: Okay, So let's stick into something that it's way more
- 0:02Speaker 1: fascinating than just making you know, bad guys shoot straight
- 0:06Speaker 1: in games, we're talking about artificial intelligence, but specifically in games,
- 0:11Speaker 1: that kind of hidden intelligence that makes the world's feel alive.
- 0:16Speaker 2: Rights, the stuff making characters seem like they're thinking or
- 0:19Speaker 2: moving believably.
- 0:20Speaker 1: Exactly, and sometimes, let's be honest, it leads to those
- 0:23Speaker 1: glitches that are just hilariously memorable.
- 0:27Speaker 2: Yeah, it's that invisible layer, isn't it, ye, shaping so
- 0:30Speaker 2: much of how you experience the game, making it feel reactive,
- 0:33Speaker 2: not just static.
- 0:34Speaker 1: Totally, and to really get our heads around how it
- 0:37Speaker 1: all works. We've gathered a whole stack of material. We're
- 0:40Speaker 1: talking algorithms, techniques, some history. It's pretty deep stuff.
- 0:44Speaker 2: You can get technical.
- 0:45Speaker 1: Yeah, but our mission here for this deep dive is
- 0:47Speaker 1: to sort of cut through that jargon. We want to
- 0:49Speaker 1: find the really cool, important ideas and give you listening
- 0:53Speaker 1: now a short tut to understanding what's going on behind.
- 0:56Speaker 2: The scenes, like lifting the curtain a bit, Yeah.
- 0:58Speaker 1: Uncover some surprises, maybe have a few aha moments along
- 1:02Speaker 1: the way.
- 1:02Speaker 2: So think of it like getting a peek under the hood,
- 1:05Speaker 2: looking at the simulated brains, making everything tick, your opponents,
- 1:09Speaker 2: your allies, even the whole world sometimes.
- 1:12Speaker 1: Okay, so where do we start. The sources actually bring
- 1:15Speaker 1: up an interesting point about the history. Back in the
- 1:17Speaker 1: mid nineties, AI was actually like a selling point on
- 1:22Speaker 1: the back of the box.
- 1:23Speaker 2: Oh yeah, I remember that era. Beneath a Steel Sky
- 1:26Speaker 2: is a good example.
- 1:27Speaker 1: Right, It promised virtual theater. What was that supposed to be?
- 1:30Speaker 2: Well, the idea, the ambition was for characters who weren't
- 1:34Speaker 2: just puppets. They'd move around, do their own thing, make
- 1:37Speaker 2: the world feel lived in. Virtual theater. Sounded grand, but
- 1:42Speaker 2: the reality, the reality is the sources kind of point
- 1:44Speaker 2: out was maybe a bit less revolutionary. Often it just
- 1:47Speaker 2: met characters pacing back and forth on pretty fixed paths. Still,
- 1:51Speaker 2: it was an early.
- 1:52Speaker 1: Attempt, a bit underwhelming then maybe, But then something came
- 1:55Speaker 1: along that really shifted things, didn't it, gold enneye double
- 1:58Speaker 1: O seven.
- 2:00Speaker 2: Yeah, that was definitely a game changer for a lot
- 2:02Speaker 2: of people's perception of AI.
- 2:03Speaker 1: What did it do differently?
- 2:04Speaker 2: It wasn't just pre programmed patterns. I mean, yes, the
- 2:07Speaker 2: guards us simple state machines, that's true, But the key
- 2:10Speaker 2: thing was this basic sense simulation.
- 2:12Speaker 1: They added sense simulation.
- 2:14Speaker 2: Yeah, characters could essentially see their buddies. If one guard
- 2:17Speaker 2: saw another get taken out, they'd react, maybe investigate, maybe
- 2:21Speaker 2: raise the alarm. It wasn't super complex, but that idea
- 2:24Speaker 2: of awareness of perceiving the world a change things big time,
- 2:28Speaker 2: and that whole concept simulating senses, site, sound, it became
- 2:32Speaker 2: absolutely central to stealth games.
- 2:34Speaker 1: Later on, like Thief or Metal Here sawid.
- 2:38Speaker 2: Exactly Thief, Metal Gear, splinter Cell. The core gameplay loop
- 2:43Speaker 2: often revolves around exploiting or avoiding the AI senses how
- 2:47Speaker 2: guards react to a noise or a shadow or seeing
- 2:50Speaker 2: something suspicious.
- 2:51Speaker 1: So this points to a fundamental cycle that seems to
- 2:54Speaker 1: run through all the material we looked.
- 2:55Speaker 2: At pretty much. Yeah, you can boil a lot of
- 2:57Speaker 2: it down to perception leads to decision making, which leads
- 3:00Speaker 2: to action.
- 3:00Speaker 1: Per section decision action.
- 3:02Speaker 2: Okay, the AI gathers info for the world, decides what
- 3:05Speaker 2: to do about it, and then actually does something, move, shoots, hides, talks.
- 3:08Speaker 1: Whatever, right, and to actually do those actions. Especially back then,
- 3:12Speaker 1: developers were always fighting against hardware limits, weren't they.
- 3:15Speaker 2: Oh, absolutely huge constraint. Early days, you had maybe one
- 3:19Speaker 2: CPU doing everything. Now we've got multiple cores, powerful GPUs.
- 3:23Speaker 1: PPUs are more for graphics though.
- 3:24Speaker 2: Mostly Yeah, they're built for massively parallel stuff, tons of
- 3:27Speaker 2: simple calculations at once, which is perfect for graphics, but
- 3:31Speaker 2: it does influence AI. Sometimes. If you can break an
- 3:34Speaker 2: AI task into lots of small independent bits, maybe you
- 3:38Speaker 2: can leverage the GPU. But CPUs are still king for
- 3:41Speaker 2: that complex, sequential thinking part of AI.
- 3:45Speaker 1: So it's always a trade off performance versus complexity.
- 3:47Speaker 2: Always has been, always will being gamed of.
- 3:49Speaker 1: And it's not just consoles and PCs anymore. You've got phones, tablets, iOS, Android,
- 3:55Speaker 1: AI has to run everywhere.
- 3:56Speaker 2: Now, Yeah, the rise of mobile is huge, and that's
- 3:59Speaker 2: where engines like Unreal, Unity, godot are so important. They
- 4:03Speaker 2: provide this layer of this framework.
- 4:04Speaker 1: So you can write the AI once.
- 4:06Speaker 2: Pretty much, write at once, deploy it on PC, console, mobile,
- 4:12Speaker 2: maybe with some tweaks, but the core logic can often
- 4:15Speaker 2: be reused. That definitely shapes how you design the AI
- 4:18Speaker 2: systems in the first place.
- 4:19Speaker 1: Okay, so keeping that cycle in mind, perception, decision, action,
- 4:23Speaker 1: and let's talk about the action bit, specifically movement. How
- 4:27Speaker 1: do AI characters actually you know, get around because unless
- 4:31Speaker 1: it's maybe an economic sim they need to move.
- 4:34Speaker 2: Movement's fundamental. Yeah, an AI character has a position, maybe
- 4:38Speaker 2: an orientation, physical properties. Yeah, and the movement algorithms figure
- 4:42Speaker 2: out frame by frame where they need to go next
- 4:44Speaker 2: to reach their goal.
- 4:45Speaker 1: But you don't want them just snapping between locations. Right,
- 4:48Speaker 1: has to look physical exactly.
- 4:50Speaker 2: That's where kinematics comes in. It's basically applying physics Newton's laws. Really,
- 4:54Speaker 2: even in a simple way. Velocity can't change instantly right inertia. Yeah,
- 4:59Speaker 2: So the algorithms don't teleport the character. They consider its
- 5:02Speaker 2: current speed and direction and use acceleration to make the
- 5:04Speaker 2: movement smooth and believable. No instance stops or starts.
- 5:08Speaker 1: And the sources talk about these things called steering behaviors
- 5:11Speaker 1: like building blocks for a movement.
- 5:13Speaker 2: They are think of them as simple reactive urges. Seek
- 5:17Speaker 2: tells a character to move towards a target. Flea tells
- 5:20Speaker 2: it to run away. Very basic, but you build on those,
- 5:23Speaker 2: you combine them. So pursue isn't just seek. It tries
- 5:27Speaker 2: to predict where a moving target will be and seeks
- 5:29Speaker 2: that point. Collision avoidant steers away from obstacles. Often these
- 5:34Speaker 2: more complex behaviors work by delegating to the simpler ones
- 5:38Speaker 2: seek the target, but also flee from that wall that's
- 5:41Speaker 2: getting too close.
- 5:42Speaker 1: The material mentioned a potential issue with a simple wander behavior,
- 5:45Speaker 1: something about rotational jerkiness. What does that look like?
- 5:48Speaker 2: Imagine a character just randomly picking a new direction every
- 5:52Speaker 2: single frame. They kind of twitch and spin around unnaturally.
- 5:54Speaker 2: It looks terrible. Uh so simple wander needs smoothing. Maybe
- 5:58Speaker 2: you pick a random point on a circle slightly ahead
- 6:01Speaker 2: of the character and steer towards that. Updating it less
- 6:03Speaker 2: frequently makes it look more like they're meandering, not having
- 6:06Speaker 2: a seizure.
- 6:06Speaker 1: Gotcha. So steering handles the how of moving smoothly, But
- 6:11Speaker 1: how does the AI figure out the where? Especially in
- 6:14Speaker 1: a big complex level. That sounds like pathfinding.
- 6:17Speaker 2: That's exactly what pathfinding is for finding a route a
- 6:21Speaker 2: sequence of steps from point A to point B that
- 6:23Speaker 2: avoids opticles like walls, pits, whatever the level design are
- 6:27Speaker 2: put in the way.
- 6:28Speaker 1: It's the how do I get there from here? Problem?
- 6:31Speaker 1: Precisely the source of mentioned classic algorithms Dykstra's algorithm. I
- 6:36Speaker 1: think I remember that from a computer science class.
- 6:38Speaker 2: Yeah, dykstras is fundamental graph theory, it's guaranteed to find
- 6:42Speaker 2: the absolute shortest path from your start point to every
- 6:46Speaker 2: other reachable point in the graph, representing.
- 6:48Speaker 1: The level every other point.
- 6:49Speaker 2: That sounds like a lot, it can be, and that's
- 6:52Speaker 2: the catch. For games. Usually you only care about the
- 6:55Speaker 2: past to one specific goal. Calculating the shortest path to
- 6:58Speaker 2: everywhere else is often effort.
- 7:00Speaker 1: So games tend to use a more A.
- 7:03Speaker 2: Star A is generally the go to. Yeah. Yeah, it's
- 7:05Speaker 2: smarter about searching, how so it uses a heuristic think
- 7:09Speaker 2: of it as an educated guess or a rule of
- 7:11Speaker 2: thumb to estimate the distance remaining to.
- 7:13Speaker 1: The goal, like as the crow flies distance.
- 7:16Speaker 2: Often yeah, or Manhattan distance. In grid based worlds, Igelegan
- 7:21Speaker 2: combines the actual cost traveled so far with this estimated
- 7:25Speaker 2: future cost. This lets to prioritize exploring paths that seem
- 7:29Speaker 2: to be heading more directly towards the goal.
- 7:31Speaker 1: Ah, so it doesn't waste time exploring paths that are
- 7:33Speaker 1: clearly going the wrong way, even if they look short initially.
- 7:36Speaker 2: Exactly, it focuses the search, makes it much faster than
- 7:40Speaker 2: Diikstra in most typical game scenarios. Now there's a small
- 7:43Speaker 2: trade off mentioned. Oh, if you're heuristic, your guess is bad. Specifically,
- 7:49Speaker 2: if it overestimates the actual cost to the goal, then
- 7:53Speaker 2: a might not find the absolute mathematically shortest path. It
- 7:58Speaker 2: might find a path that looks shorter based on the
- 8:00Speaker 2: bad gas.
- 8:01Speaker 1: So developers might accept a path that's like ninety nine
- 8:03Speaker 1: percent optimal if it means the calculation is way faster.
- 8:06Speaker 2: That's the aha moment right there, exactly. Performance often trump's
- 8:10Speaker 2: perfect optimality. In real time games, good enough, fast enough
- 8:13Speaker 2: is often the.
- 8:14Speaker 1: Mantra makes sense. So for A or diestra to even work,
- 8:17Speaker 1: they need a map, right, but not the full three
- 8:19Speaker 1: D graphics geometry.
- 8:20Speaker 2: Where they need a simplified representation of the navigable space.
- 8:22Speaker 2: You can't search through raw triangles.
- 8:24Speaker 1: Like navigation meshes. I've heard that.
- 8:26Speaker 2: Term nav meshes are super common. They basically represent all
- 8:29Speaker 2: the walkable surfaces as a set of connected polygons like
- 8:33Speaker 2: piles on the floor. The AI path finds across these polygons.
- 8:37Speaker 1: How does that work with the algorithm? Are the polygons
- 8:39Speaker 1: the nodes?
- 8:40Speaker 2: Sometimes the center of the polygons, but often it's the
- 8:42Speaker 2: edges between the polygons. The edges as nodes approach is mentioned.
- 8:46Speaker 2: Path finding becomes finding a sequence of edges to cross
- 8:50Speaker 2: to get from the starting polygon to the goal polygon.
- 8:52Speaker 1: Okay, but what about huge open worlds. Those nav meshes
- 8:56Speaker 1: must get enormous.
- 8:57Speaker 2: They do, and that's where hierarchy pathfinding comes into play.
- 9:01Speaker 2: Layers kind of you group areas together, like maybe this
- 9:04Speaker 2: whole building is one high level note and that neighborhood
- 9:07Speaker 2: is another. The AI first finds a path between these
- 9:10Speaker 2: big regions, like planning a trip using major highways. Then
- 9:14Speaker 2: once it enters a region, it does a more detailed
- 9:17Speaker 2: pathfind within that smaller area, figuring out the local streets.
- 9:21Speaker 1: That seems way more manutable. Okay, so characters can move
- 9:24Speaker 1: realistically with steering, and they can find paths with pathfinding,
- 9:27Speaker 1: But how do they decide decide where to go, whether
- 9:31Speaker 1: to fight or hide or talk. That's the decision making
- 9:34Speaker 1: part of the.
- 9:34Speaker 2: Cycle, right, This is the core intelligence, the brain making
- 9:37Speaker 2: the choices. It determines what the character intends to do.
- 9:40Speaker 1: The sources mentioned decision trees as a common technique, simple
- 9:43Speaker 1: if thin stuff.
- 9:44Speaker 2: Pretty much, they're like flow charts, a series of questions
- 9:47Speaker 2: usually yes no, leading down branches to an action is
- 9:50Speaker 2: the enemy visible? Yes? Do I have AMMO? Yes?
- 9:53Speaker 1: Shoot?
- 9:53Speaker 2: No reload back up the tree is the endy visible?
- 9:57Speaker 2: No patrol.
- 9:58Speaker 1: They sound fast and easy for designers to work with.
- 10:00Speaker 2: They are very fast, execute, modular, easy to build and tweak,
- 10:04Speaker 2: use for tons of stuff from simple reactions to choose
- 10:07Speaker 2: the animations.
- 10:08Speaker 1: What about state machines those seem classic too.
- 10:10Speaker 2: Finite state machines yeah, FSMs. You define distinct states. The
- 10:16Speaker 2: AI can be in patrolling, investigating, attacking, fleeing, and transitions
- 10:21Speaker 2: between them. If you're patrolling and you hear a noise,
- 10:24Speaker 2: the transition condition you switch to the investigating state.
- 10:28Speaker 1: Sounds neat, but maybe it gets messy. If you have
- 10:30Speaker 1: lots of states.
- 10:31Speaker 2: It can become a spaghetti diagram really quickly if you're
- 10:33Speaker 2: not careful, lots of arrows criss crossing. That's why higer
- 10:37Speaker 2: Arsenill state machines.
- 10:37Speaker 1: Were developed, so states within states exactly.
- 10:40Speaker 2: Your combat state might contain substates like taking cover, firing, reloading.
- 10:45Speaker 2: It helps organize complexity, and you can have transitions that
- 10:48Speaker 2: jump across levels, like a sudden loud noise pulling you
- 10:51Speaker 2: out of reloading right back to a top level alert state.
- 10:54Speaker 1: Now The material really highlights behavior trees as being super popular. Now,
- 10:59Speaker 1: what's the deal with them?
- 11:00Speaker 2: Behavior trees are very powerful and crusely very intuitive for designers.
- 11:05Speaker 2: They structure tasks in a tree like way. The AI
- 11:08Speaker 2: executes the tree usually depth first, trying branches until it
- 11:12Speaker 2: finds an action or sequence that succeeds.
- 11:14Speaker 1: Can you give an example?
- 11:15Speaker 2: Sure, a root node might be engage enemy. It has
- 11:19Speaker 2: children like is enemy visible? If yes, it goes down
- 11:22Speaker 2: the attack branch. If no, it tries the search for
- 11:25Speaker 2: enemy branch, which might have subtasks like go to last
- 11:27Speaker 2: known position, then scan area. It feels logical, like how
- 11:31Speaker 2: a person might approach a problem.
- 11:32Speaker 1: Again, they're reusable, hugely reusable.
- 11:35Speaker 2: You create nodes for common actions, move to play, animation,
- 11:38Speaker 2: check condition, and assemble them into trees. You can make
- 11:40Speaker 2: a complex take cover behavior and just drop it into
- 11:43Speaker 2: different AI characters. Trees engines often have visual editors like
- 11:48Speaker 2: Lego for.
- 11:48Speaker 1: AI like al prefabs.
- 11:49Speaker 2: Okay, that makes sense exactly that concept.
- 11:51Speaker 1: Are there other ways? The sources mention things like utility
- 11:54Speaker 1: based systems. Yeah, goal oriented behavior.
- 11:57Speaker 2: Yeah, those are a different philosophy instead of pre defined
- 12:00Speaker 2: logic flows. The AI has goals or motives hunger, thirst, safety, curiosity,
- 12:06Speaker 2: each with a current insistence level.
- 12:08Speaker 1: How much it wants it.
- 12:10Speaker 2: Basically, yeah, the AI looks at all the actions it
- 12:12Speaker 2: could do and evaluates how well each action would satisfy
- 12:15Speaker 2: its most insistent needs. It picks the action that leads
- 12:18Speaker 2: to the lowest overall discontentment.
- 12:20Speaker 1: Sounds more adaptive, maybe less predictable, it can be.
- 12:24Speaker 2: The big challenge is often calculating the utility of an action.
- 12:29Speaker 2: How much will eating this apple reduce my hunger? How
- 12:32Speaker 2: long will it take to pathfind to the apple? Often
- 12:35Speaker 2: requires good estimation heuristics.
- 12:37Speaker 1: Again, seems complex to set up right.
- 12:40Speaker 2: It can be more work up front than say, a
- 12:42Speaker 2: state machine. Rule based systems are another alternative mentioned, using
- 12:46Speaker 2: if then rules like if player is visible and health
- 12:49Speaker 2: is low, then find cover. But writing good comprehensive rule
- 12:53Speaker 2: sets is really hard.
- 12:55Speaker 1: The knowledge acquisition bottleneck they called it.
- 12:57Speaker 2: Right, So while powerful in theory, they're less common in
- 13:00Speaker 2: practice for moment to moment character AI compared to trees
- 13:04Speaker 2: or state machines.
- 13:05Speaker 1: Okay, individual decisions covered. What about coordinating groups or making
- 13:09Speaker 1: bigger strategic plans?
- 13:10Speaker 2: Yeah, moving beyond single characters, that's tactical and strategic. AI
- 13:14Speaker 2: tactical is about local coordination soldiers using cover fire, flanking maneuvers.
- 13:19Speaker 2: Strategic is the big picture, deciding which continent to invade
- 13:22Speaker 2: in a global strategy game, or managing an economy in
- 13:25Speaker 2: an RTS.
- 13:26Speaker 1: For tactics, the sources mention tactical waypoints, not just points
- 13:30Speaker 1: to walk to, but points with extra info.
- 13:33Speaker 2: Exactly, a waypoint might be tagged as good cover spot
- 13:36Speaker 2: versus north or ambush point, but just relying on static
- 13:40Speaker 2: points placed by a designer has limits. What if the
- 13:44Speaker 2: situation changes.
- 13:45Speaker 1: So run time analysis.
- 13:46Speaker 2: Yeah, better systems analyze the environment dynamically, calculating lines of sight,
- 13:51Speaker 2: checking actual cover effectiveness based on where the enemies are
- 13:54Speaker 2: right now.
- 13:54Speaker 1: The frag maps idea sounded cool learning from where players die.
- 13:58Speaker 2: It's a neat example of simple tactical learning. Basically, areas
- 14:02Speaker 2: on the map build up a danger value. If AI
- 14:05Speaker 2: units keep getting killed there, future AI might then learn
- 14:08Speaker 2: to avoid those spots or be more cautious.
- 14:10Speaker 1: But they need to unlearn it too, right, so they
- 14:12Speaker 1: don't avoid a place forever after one unlucky death.
- 14:15Speaker 2: Exactly, a decay factor or unlearning bias is important and.
- 14:18Speaker 1: For strategy, Like in an RTS, how does the AI
- 14:21Speaker 1: decide whether to build more units or research tech.
- 14:24Speaker 2: Often with multi tiered AI, you have layers. A top
- 14:27Speaker 2: level strategic layer makes broad decisions we need more resource
- 14:31Speaker 2: income or prepare for an attack on their.
- 14:33Speaker 1: Base, and that gets passed down right.
- 14:35Speaker 2: A mid level tactical layer might translate attack their base
- 14:38Speaker 2: into a simple strikeforce alpha A coordinates x y and
- 14:42Speaker 2: proceed along route Z. Then the lowest level AI, the
- 14:46Speaker 2: individual unit AI, handles the actual movement in shooting based
- 14:50Speaker 2: on those orders.
- 14:51Speaker 1: So the player is often the top strategic layer in
- 14:54Speaker 1: an RTS.
- 14:55Speaker 2: In many cases, yes, the player sets the goals and
- 14:58Speaker 2: the AI executes the details, though some games have high
- 15:01Speaker 2: level AI opponents making strategic choices.
- 15:03Speaker 1: Too, and tactical pathfinding came up again. Path cost isn't
- 15:06Speaker 1: just distance, right.
- 15:08Speaker 2: It's about the quality of the path caxically speaking. Is
- 15:11Speaker 2: it exposed to enemy fire? Does it offer good ambush opportunities?
- 15:15Speaker 2: A path might be longer but much safer, so tactical
- 15:17Speaker 2: pathfinding would prefer it.
- 15:19Speaker 1: Okay, The big one learning Can game AI actually learn
- 15:23Speaker 1: like you know? Learn learn?
- 15:25Speaker 2: The sources definitely cover learning, but with a crucial caveat
- 15:28Speaker 2: for games, the goal isn't just effective AI. It's AI
- 15:32Speaker 2: that results in good gameplay. An AI that learns an
- 15:34Speaker 2: unbeatable exploit isn't fun.
- 15:36Speaker 1: That's a really important distinction. So what kinds of learning
- 15:39Speaker 1: do they use?
- 15:40Speaker 2: Some simple stuff like parameter modification basically tweaking numbers like
- 15:44Speaker 2: if the AI keeps losing, maybe slightly increase its accuracy.
- 15:48Speaker 2: Parameter uses optimization techniques like kill climbing. Then there's action prediction,
- 15:53Speaker 2: trying to guess what the player will do next based
- 15:55Speaker 2: on past behavior using techniques like n grams.
- 15:58Speaker 1: And reinforcement learning. That's the hot top AI. Generally trial
- 16:01Speaker 1: and error.
- 16:02Speaker 2: Exactly the AI tries ashs, gets rewards or penalties from
- 16:06Speaker 2: the game, find treasure, reward, fall in lava, penalty, and
- 16:10Speaker 2: learns over time which actions lead to good outcomes in
- 16:13Speaker 2: different situations or states. Q learning is a common example mentioned.
- 16:17Speaker 1: What's the challenge there? For games?
- 16:18Speaker 2: Defining the state? Real game worlds are incredibly complex and continuous.
- 16:23Speaker 2: Trying to break down every possible situation, player, position, enemy health,
- 16:28Speaker 2: ammial count, time of day into discrete states for the
- 16:31Speaker 2: algorithm can be really.
- 16:32Speaker 1: Hard and neural networks. Deep learning.
- 16:35Speaker 2: Neural nets are powerful pattern recognizers. They learn by adjusting
- 16:38Speaker 2: connections between artificial neurons. They were used historically in things
- 16:42Speaker 2: like checkers programs or td GAMIN for evaluating board positions.
- 16:46Speaker 2: Deep blue used complex evaluation, possibly including n ends.
- 16:50Speaker 1: But are they used for deciding if a guard should
- 16:52Speaker 1: open a door?
- 16:53Speaker 2: Less so, according to the sources, for general character behavior logic,
- 16:58Speaker 2: things like behavior trees are often more press tactical, easier
- 17:00Speaker 2: to design, debug and control. Neural nets are great for
- 17:04Speaker 2: specific tasks like image recognition or maybe complex evaluation, but
- 17:08Speaker 2: maybe overkill or too inch of a black box for
- 17:11Speaker 2: typical moment to moment decisions.
- 17:13Speaker 1: Right now, So, traditional methods are still really dominant for
- 17:16Speaker 1: a lot of character AI for.
- 17:18Speaker 2: The actual decision logic very much so. The complexity, data
- 17:21Speaker 2: needs and training time for deep learning for general flexible
- 17:25Speaker 2: character behavior are still pretty significant hurdles compared to more
- 17:28Speaker 2: established techniques.
- 17:30Speaker 1: Okay, wow, so we've got movement, pathfinding, decisions, tactics, strategy,
- 17:35Speaker 1: even learning. How does all this stuff actually run inside
- 17:39Speaker 1: the game, and how does the AI even know what's
- 17:42Speaker 1: happening in the world. This is the.
- 17:43Speaker 2: Plumbing right exactly, The implementation details Yeah, super important. First off, scheduling,
- 17:49Speaker 2: you might have hundreds of AI characters. You can't afford
- 17:53Speaker 2: to run every single AI calculation for every character every
- 17:57Speaker 2: single frame. Your game would grind to a halt.
- 18:00Speaker 1: So you need to manage who thinks.
- 18:02Speaker 2: When precisely you schedule AI updates. Maybe important enemies nearby
- 18:06Speaker 2: update every frame, but background characters only update every few
- 18:09Speaker 2: seconds or when something relevant happens. High archo of scheduling
- 18:13Speaker 2: helps manage this complexity.
- 18:15Speaker 1: And anytime algorithms what are they?
- 18:17Speaker 2: Those clever algorithms design so you can interrupt them part
- 18:19Speaker 2: way through their calculation and they can still give you
- 18:21Speaker 2: a usable, even if not perfect result.
- 18:24Speaker 1: Ah. So the AI doesn't just freeze for three seconds
- 18:27Speaker 1: while it calculates the perfect path exactly.
- 18:29Speaker 2: You can get a rough path, quickly, start moving, and
- 18:31Speaker 2: maybe refine the path in the background if it gets
- 18:33Speaker 2: more processing time later. Avoids that deer in headlights.
- 18:37Speaker 1: Lack that can level of detail for AI similar to graphics.
- 18:40Speaker 2: Yep, same principle. AI complexity scales with importance usually distance
- 18:44Speaker 2: faraway AI runs simpler logic, closer AI runs the full simulation.
- 18:50Speaker 2: Behavior Compression is mentioned as a way to smoothly transition
- 18:53Speaker 2: between these levels. So the change is in jarring.
- 18:55Speaker 1: Okay, how does the AI get its info? How does
- 18:58Speaker 1: it perceive the world state?
- 19:00Speaker 2: Good question. The simplest way is polling. The AI just
- 19:04Speaker 2: asked the game can I see the player? Is there
- 19:06Speaker 2: a wall in front of me? Whenever it needs to know?
- 19:09Speaker 1: Sounds simple, but maybe slow if everyone's asking all the.
- 19:12Speaker 2: Time, it doesn't scale well exactly. Imagine hundreds of AIS
- 19:16Speaker 2: constantly querying the world state. Very inefficient.
- 19:19Speaker 1: So what's better?
- 19:20Speaker 2: The event passing is much more common in complex games.
- 19:23Speaker 2: The game generates events sound created at location X, player
- 19:26Speaker 2: spotted by camera, Y, door Z opened. There's usually a
- 19:29Speaker 2: central manager, oh, like a dispatcher, Yeah, an event manager.
- 19:32Speaker 2: AI components listen or subscribe to events they care about.
- 19:36Speaker 2: When an event happens, the manager notifies only the relevant listeners.
- 19:41Speaker 2: Much cleaner, more modular, easier to debug.
- 19:44Speaker 1: That makes way more sense, and.
- 19:45Speaker 2: This ties back nicely to the sophisticated sense management we
- 19:48Speaker 2: talked about earlier. Simulating how information actually propagates.
- 19:52Speaker 1: Not just line of sight sound, bouncing, smell.
- 19:55Speaker 2: Exactly, using sense graphs or similar structures to model how
- 19:59Speaker 2: a sound travels around corners gets muffled by walls. Maybe
- 20:02Speaker 2: how a smell lingers or travels with airflow. That's how
- 20:05Speaker 2: you get really deep stealth gameplay. The AI isn't cheating,
- 20:09Speaker 2: it's reacting to information propagated through a simulated sensory system.
- 20:13Speaker 1: That's how a guard hears you from another room.
- 20:15Speaker 2: Maybe right, they didn't see you, but the sound event
- 20:18Speaker 2: reached their ears through the sense graph. Triggering an investigate
- 20:21Speaker 2: state adds huge depth.
- 20:23Speaker 1: Okay, last piece, Maybe the tools developers aren't just writing
- 20:28Speaker 1: C plus plus for everything right. Designers need ways to
- 20:31Speaker 1: interact with this stuff.
- 20:32Speaker 2: Oh, tools are absolutely critical. Level designers need to place
- 20:36Speaker 2: path finding nodes, or to find clever points or paint
- 20:38Speaker 2: areas the AI should avoid. AI designers need ways to
- 20:42Speaker 2: build and tune behaviors.
- 20:44Speaker 1: Can some of that be automated, like generating the navmesh?
- 20:47Speaker 2: Some can, Yes, initial navmesh generation is often automatic, but
- 20:51Speaker 2: designers almost always need tools to tweak it, fix errors,
- 20:54Speaker 2: add metadata like this area is dangerous and for behavior.
- 20:58Speaker 1: Logic, visual editors like for behavior trees exactly.
- 21:02Speaker 2: Visual editors for state machines or behavior trees are invaluable.
- 21:05Speaker 2: They led designers who might not be hardcore programmers build
- 21:08Speaker 2: complex AI logic visually. Tools like Behavior Designer were mentioned,
- 21:12Speaker 2: and scripting languages are huge too, Lua, Python custom languages
- 21:16Speaker 2: allowing rapid iteration on specific character behaviors.
- 21:18Speaker 1: Gotcha, Okay, we've gone through the whole pipeline. Basically, how
- 21:22Speaker 1: does this all come together? In specific game genres?
- 21:24Speaker 2: Quick examples sure shooters heavy on movement pathfinding for complex
- 21:29Speaker 2: levels decision making often behavior trees or state machines for
- 21:33Speaker 2: combat logic like flanking using cover and robust perception systems
- 21:37Speaker 2: are key. Think Halo's AI using behavior trees or Golden
- 21:41Speaker 2: eyed early sense simulation. Driving games big focus on movement
- 21:45Speaker 2: AI obviously sophisticated steering behaviors for realistic car handling, collision avoidance, drafting,
- 21:51Speaker 2: racing lines.
- 21:52Speaker 1: Artist games must be in Nightmare.
- 21:53Speaker 2: They're definitely demanding large scale pathfinding for potentially hundreds of units,
- 21:58Speaker 2: group movement, streetrategic decision making AI for base building and
- 22:02Speaker 2: resource management, tactical AI for unit formations and battles, lots
- 22:06Speaker 2: of layers, lots of units to manage efficiently.
- 22:08Speaker 1: And then some games are about the AI.
- 22:10Speaker 2: Yeah. AI center genres, creature training games maybe using neural nets,
- 22:14Speaker 2: or reinforcement learning or simulation games where the core is
- 22:17Speaker 2: an ecosystem driven by AI agents following rules, maybe a
- 22:20Speaker 2: food chain where player interaction is about influencing that system.
- 22:24Speaker 1: Wow. Okay, so we've really covered a lot of ground,
- 22:26Speaker 1: from basic movement back in the nineties all the.
- 22:29Speaker 2: Way to complex layered decisions, tactical reasoning, learning systems, and
- 22:34Speaker 2: the nitty gritty of how it's implemented.
- 22:36Speaker 1: We've kind of peeled back the layers on that hidden intelligence. Yeah,
- 22:39Speaker 1: that perception, decision action loop, how characters navigate, how they
- 22:43Speaker 1: choose what to do.
- 22:45Speaker 2: Hopefully you've got a much clearer picture now of the
- 22:48Speaker 2: smarts and the engineering that goes into making game characters
- 22:52Speaker 2: feel believable or challenging or sometimes just playing alive.
- 22:57Speaker 1: Yeah, it's definitely not just simple scripting most of the time.
- 22:59Speaker 1: It's some serious computer science and clever design work.
- 23:03Speaker 2: Absolutely hopefully gives you a new appreciation next time you play.
- 23:06Speaker 1: Okay, so here's something for you to chew on listening
- 23:09Speaker 1: right now. Think about a game you've played recently, an
- 23:12Speaker 1: enemy that felt really smart, or maybe an NPC that
- 23:15Speaker 1: did something unexpected but believable.
- 23:17Speaker 2: Base on what we talked about. What techniques do you
- 23:20Speaker 2: think might be driving that behavior? Was it reacting to
- 23:23Speaker 2: sound because of sense simulation? Did it seem to follow
- 23:26Speaker 2: a logical plan maybe from a behavior tree?
- 23:28Speaker 1: Could you see hints of prioritize steering when it dodged
- 23:31Speaker 1: while still trying to get somewhere, or maybe hierarchical pathfinding
- 23:35Speaker 1: letting it cross a huge map without getting lost.
- 23:37Speaker 2: What kind of Aha moment might you be having right
- 23:39Speaker 2: now about how that character actually worked. Next time you
- 23:43Speaker 2: play Keep an Ear Out, Keep an Eye Out, you
- 23:46Speaker 2: might start noticing the subtle signs of the AI mind
- 23:48Speaker 2: at work. It's fascinating stuff once you know what to
- 23:51Speaker 2: look for.