Presentation is loading. Please wait.

Presentation is loading. Please wait.

Yingcai Xiao Artificial Intelligence in Game Development Yingcai Xiao.

Similar presentations


Presentation on theme: "Yingcai Xiao Artificial Intelligence in Game Development Yingcai Xiao."— Presentation transcript:

1 Yingcai Xiao Artificial Intelligence in Game Development Yingcai Xiao

2 Non-player character (NPC) / non-person character / non-playable character: any game character that is not controlled by a player, usually controlled by AI. AI in games controls NPCs to simulate intelligence behavior. Artificial Intelligence in Game Development

3 First AI games created in 1951. NIM and Checker Pac-Man (1980) added personalities to enemies. Garry Kasparov defeted by IBM's Deep Blue computer in 1997 Watson: an artificially intelligent computer system capable of answering questions posed in natural language, Pac-Man (1980) added personalities to enemies. Pac-Man (1980) added personalities to enemies. Examples

4 Examples Halo: Intelligent aliens will retreat after their leader killed. Sims: smart objects that can go hungry, bored, tired,... Black & White: belief-desire-intention, god overseeing little people.

5 AI Algorithms LOS (line of sight): avoid of being shot. Graph Theory and Routing: maze games. BF/DF Searching Algorithms: board games. FSM (Finite State Machine): state of mined games. Genetic Algorithms: evolutionary computing based on adaptation and survival.

6 AI Algorithms Decision Trees: hierarchical graph to make decisions based on conditions. Fuzzy Logic: make decisions based on vague information. Cellular Automata: a grid of cells with each cell value being updated constantly by its neighbor’s values.Cellular Automata

7 AI Algorithms: Flocking Flocking: crowd behaviors.Flocking: crowd behaviors Starling murmuration: https://www.youtube.com/watch?v=eakKfY5aHmYStarling murmuration: https://www.youtube.com/watch?v=eakKfY5aHmY Reynolds, Craig W. (1987). "Flocks, herds and schools: A distributed behavioral model.". ACM SIGGRAPH Computer Graphics 21 (4). pp. 25–34. Batman Returns (1992): flocking bats and The Lion King (1994): wildebeest stampede.

8 Flocking Craig Reynolds: http://www.red3d.com/cwr/http://www.red3d.com/cwr/ Reynolds, Craig W. (1987). "Flocks, herds and schools: A distributed behavioral model.". ACM SIGGRAPH Computer Graphics 21 (4). pp. 25–34. Authored the OpenSteer libraryOpenSteer Won 1998 Academy Scientific and Technical Award for pioneering contributions to 3D computer animation for movies. Uses procedural models to simulate complex natural phenomenon.

9 The Flocking Algorithm The algorithm Implementation in Unity3D Building a Unity package for reuse Building a flocking library in a game engine

10 The Flocking Algorithm Craig Reynolds’ Boids: artificial objects follow natural flocking behavior Unity Implementation: http://black-square.github.io/BirdFlock/ JavaScript implementation: http://gpolo.github.io/birdflocking/http://gpolo.github.io/birdflocking/ OpenGL implementation: http://www.navgen.com/3d_boids/http://www.navgen.com/3d_boids/

11 The Flocking Algorithm Tutorial: http://www.vergenet.net/~conrad/boids/pseudocode.html Unity Code Explanation: http://wiki.unity3d.com/index.php?title=Flocking

12 The Flocking Algorithm Craig Reynolds’ Boids: artificial objects flow natural flocking behavior. 3 Basic Rules: cohesion - to move toward the center of the mass of the flockmates separation - to avoid flockmates alignment – to steer towards the flock direction

13 Flocking Code C# code at http://wiki.unity3d.com/index.php?title=Flocking (1)Create the flock at the BiodController::Start() (2)Update animation parameters in BiodController::Update () (3)Control the animation in BoidFlocking::BoidSteering ()

14 Flocking Code (1)Create the flock at the Start() Flock Size Boids Array Position Direction

15 Flocking Code (1)Create the flock at the Start() Bounding box Global and local transformation The Controller

16 Flocking Code (2) Update animation parameters in Update () Center of Mass Average Direction The Controller

17 Flocking Code (3) Control the animation in BoidFlocking::BoidSteering () This is the script for each boid. Separation is taking care of by rigidbody. Cohesion is to follow the CoM. Alignment is to follow the Average Direction

18 PA5 Coding / Flocking http://www.cs.uakron.edu/~xiao/game/igd5.htm The Theory / Rules: cohesion - to move toward the center of the mass of the flockmates separation - to avoid flockmates alignment – to steer towards the flock direction

19 PA5 Coding / Flocking The Example: Holistic Game Development with Unity By: Penny de Byl http://proquest.safaribooksonline.com/book/programming/ga me-programming/9780240819334 Section 5.6: a flock of seagulls flying against wind in small groups. http://proquest.safaribooksonline.com/book/programming/ga me-programming/9780240819334/chapter-5-character- mechanics/ch5_6_006_9780240819341_web_ch05_html

20 http://AIGameDev.com http://www.GameAI.com http://en.wikipedia.org/wiki/TechnoSphe re http://AIGameDev.com http://www.GameAI.com http://en.wikipedia.org/wiki/TechnoSphe re https://obsproject.com http://AIGameDev.com http://www.GameAI.com http://en.wikipedia.org/wiki/TechnoSphe re Resources


Download ppt "Yingcai Xiao Artificial Intelligence in Game Development Yingcai Xiao."

Similar presentations


Ads by Google