Cs 380: Artificial Intelligence Game Ai

Cs 380: Artificial Intelligence Game Ai

CS 380: ARTIFICIAL INTELLIGENCE GAME AI Santiago Ontañón [email protected] ArtiFicial Intelligence We propose that a 2 month, 10 man study of artiFicial intelligence be carried out during the summer of 1956 at Dartmouth College in Hanover, New Hampshire. The study is to proceed on the basis of the conjecture that every aspect of learning or any other feature of intelligence can in principle be so precisely described that a machine can be made to simulate it. An attempt will be made to find how to make machines use language, form abstractions and concepts, solve kinds of problems now reserved for humans, and improve themselves. - Dartmouth AI Project Proposal; J. McCarthy et al.; Aug. 31, 1955. ArtiFicial Intelligence We propose that a 2 month, 10 man study of artiFicial intelligence be carried out during the summer of 1956 at Dartmouth College in Hanover, New Hampshire. The study is to proceed on the basis of the conjecture that every aspect of learning or any other feature of intelligence can in principle be so precisely described that a machine can be made to simulate it. An attempt will be made to find how to make machines use language, form abstractions and concepts, solve kinds of problems now reserved for humans, and improve themselves. - Dartmouth AI Project Proposal; J. McCarthy et al.; Aug. 31, 1955. ArtiFicial Intelligence What is Game AI? • ArtiFicial Intelligence For Computer Games • DiFFerent From traditional AI Traditional AI: Optimality, eFFiciency Game AI: Fun, artiFicial “stupidity” What is Game AI? • Intersection of games and AI: Games AI • Two (three) main communities working on it: • Academics: • ArtiFicial Intelligence community: how can games help us have better AI (AI centric) • Computer Game scholars: how can AI help us have better/more interesting/new Forms oF games? (Games centric) • Game industry: • Their goal is to make games that sell more units (games centric) Outline • Structure oF the course • Intro to Game AI • Examples of Game AI • Course Scope • Projects Examples oF Game AI “Pac-Man” (1980) First ever video game to Feature AI AI: Finite state machine Examples oF Game AI “Pac-Man” (1980) First ever video game to Feature AI AI: Finite state machine First Ever Game to Feature AI? First Ever Game to Feature AI? • Dr. NIM From the 1960s? https://www.youtube.com/watch?v=9KABcmczPdg First Ever Game to Feature AI? • Dr. NIM From the 1960s? https://www.youtube.com/watch?v=9KABcmczPdg • “El Ajedrecista”, 1921 (Leonardo Torres y Quevedo) Examples oF Game AI Board Games AI needs to provide a collection oF diFFiculty levels. Only the hardest mode falls into the realm of traditional AI. Examples oF Game AI “LeFt 4 Dead 2” AI Director adjusts game pace to ensure desired dramatic eFFects Examples oF Game AI “Black & White” Uses machine learning to simulate a learning creature Examples oF Game AI “StarcraFt II” Strategy, planning, path- finding, economics, etc. Types oF Game AI • Inside the game: • Character control • Director (drama management) • During game development: • Help in behavior/content design • After game deployment: • Analysis oF game data First-Person Shooters • We all know what a FPS is. But do you know which one was the First? • http://www.youtube.com/watch?v=7chDIySXK2Q (1979) • http://www.youtube.com/watch?v=PoEpgFTtUYg (1984) • http://www.youtube.com/watch?v=C00n4rDUMNo (1992) • http://www.youtube.com/watch?v=yr-lQZzevwA (1993) • http://www.youtube.com/watch?v=d_kfZSsArCM (2004) • https://www.youtube.com/watch?v=SCenq-HHDMc (2016) AI Requirements in FPS • The two basic needs in all FPS are: • Movement • Firing • With those two you can already have a basic FPS running like: • WolFenstein 3D (For which you most likely only need movement, since there are no projectiles, and thus Firing is just line-of-sight testing) • Doom • But you need way more than that For a modern FPS! Game Engine Character AI Game Rendering State World Interface Collision Physics (perception) Movement Firing Input User Game Engine Character AI Game Rendering State World Interface Collision Physics (perception) At this point we Movement Firing already have the AI for “WolFenstein 3D” Input User (It had no pathfinding) AI Requirements in FPS • In Modern FPS you don’t expect: • Enemies to get stuck behind a wall (enemies in old games like WolFenstein do) • To stand still while you kill their comrades (they do in WolFenstein and Doom!) • To be trapped just because you closed a door! • To move independently oF each other • etc. Path-finding • Not all enemies are given path-finding capabilities: • Path-finding makes characters look smart, the ones that should not look smart should not have path-finding • Representation oF the navigation graph: • Navigation meshes is the most popular • Embedded navigation: • Annotate links in the navigation graph with the action required to traverse it (walk, crawl, climb, open door, etc.) • Characters look smart knowing they have to perForm those actions, but it’s all hand annotated or precomputed Game Engine Character AI Game Rendering State World Interface Collision Physics (perception) Path-finding Movement Firing Input User Game Engine Character AI Game Rendering State World Interface Collision Physics (perception) Path-finding Movement Firing At this point we Input User already have the AI for “Doom”! Decision Making • Decision Making in FPS controls what characters do at a high level: do they attack? Do they retreat? Do they execute other actions? • Classic games: Finite-state machines • Modern games: Behavior Trees • Some exceptions: • F.E.A.R.: Goal-oriented behavior • Characters have a set oF goals, and each goal associated with an FSM, the most relevant goal takes control and its FSM is executed. Game Engine Character AI Game Rendering State Decision Making World Interface Collision Physics (perception) Path-finding Movement Firing Input User Group Control • Coupled with better decision-making, this is the largest diFFerence between classic and modern FPS AI. • In old games (Doom, etc.) enemies always rush! • Modern games use group tactics: • Simplest is “kung-fu style” (one enemy at a time) • Complex attack tactics where some characters attack, while others cover Group Control • Can be deFined also using behavior trees • Most common approach: • Each tactic deFines a set oF “roles” • A role is Filled by one character • Each tactic has a behavior tree that executes it • For example: • A “Flank” tactic can have 3 roles For “leFt attack”, “Front attack”, and “right attack” • Only 3 enemies will execute it at once (iF there are more, they will wait, kung-fu style) • Enemies look smart, but do not crazily over-power the player Game Engine Character AI Game Rendering State Tactics (Group Behavior) Decision Making World Interface Collision Physics (perception) Path-finding Movement Firing Input User Game Engine Character AI Game Rendering State Tactics (Group Behavior) Decision Making World Interface Collision Physics (perception) Path-finding Movement Firing At this point we already have the AI Input User for “HalF-LiFe”! Game Engine Character AI Game Rendering State Tactics (Group Behavior) Decision Making World Interface Collision Physics (perception) Path-finding Movement Firing At this point we already have the AI Input User for “HalF-LiFe”! But there is more… Drama Management / Directing • Premise: • DiFFerent players have diFFerent preFerences • Each player enjoys a diFFerent subset oF the elements oF a game • Problem: • How can a game automatically adapt to match the current player? • Maintain the dramatic arc expected by the game designer • Prevent the players From dealing with parts oF the game not appealing to them • Adjust diFFiculty level, etc. • Solution: • Drama Management / Experience Management / AI Director Drama Management Game Evaluation Adaptation Function Drama Manager Player Game Engine Drama Management Examples • Façade: • http://www.youtube.com/watch?v=GmuLV9eMTkg • Left 4 Dead: • http://www.youtube.com/watch?v=VVIdHPG0wYI • AI Director controls: spawning enemies and items, music, map (can block or open paths) • Not random spawns: AI Director has a set oF predeFined patterns with parameter ranges, and selects the appropriate pattern with the appropriate parameters. Game Engine Character AI Game Rendering State Tactics (Group Behavior) Decision Making World Interface Collision Physics (perception) Path-finding Movement Firing Input User Drama Management Game Engine Character AI Game Rendering State Tactics (Group Behavior) Decision Making World Interface Collision Physics (perception) Path-finding At this point, we have the AI of “Left 4 Dead 2” Movement Firing Input User Drama Management Intelligent Camera Control • Recent games have an emphasis on story telling • Camera control is an essential component in story telling, since it provides focus • A lot oF recent work on automatic camera control: • Example: http://www.youtube.com/watch?v=8G0xFyDGLsk&Feature=related NPCs and Camera Control • What iF you put a lot oF work in NPC AI, but player never “looks” to NPCs? NPCs and Camera Control • What iF you put a lot oF work in NPC AI, but player never “looks” to NPCs? • Example: Elizabeth in Bioshock Infinite NPCs and Camera Control • The Game predicts the path • What iF you put a lot oF work in NPC AI,the but player player needs never to take to “looks” to NPCs? get to the next “goal”. • Then, makes Elizabeth be in • Example: Elizabeth in Bioshock Infinitethat path in order to make sure she is on the camera. • Otherwise, iF she was just following, she would always be behind, and the player would need to “turn around” to see the NPC. Game Engine Rendering Character AI Game State Camera Control Tactics (Group Behavior) Decision Making World Interface Collision Physics (perception) Path-finding Movement Firing Input User Drama Management This is a complete state Game Engine of the art AI architecture for a modern FPS (or RPG) game Rendering Character AI Game State Camera Control Tactics (Group Behavior) Decision Making World Interface Collision Physics (perception) Path-finding Movement Firing Input User Drama Management Game Engine Rendering Character AI Game State Camera Control Tactics (Group Behavior) Some speciFic platForms Decision Making World (e.g.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    44 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us