introduction to ai in computer games n.
Skip this Video
Loading SlideShow in 5 Seconds..
Introduction to AI in Computer Games PowerPoint Presentation
Download Presentation
Introduction to AI in Computer Games

Loading in 2 Seconds...

play fullscreen
1 / 97

Introduction to AI in Computer Games - PowerPoint PPT Presentation

Download Presentation
Introduction to AI in Computer Games
An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Introduction to AI in Computer Games HojjatJafary Fanafzar Game Studio November 2012 Fanafzar Game Studio

  2. What is AI • How do you think about AI? Fanafzar Game Studio

  3. What is AI • The field of AI research was founded at a conference on the campus of Dartmouth College in the summer of 1956 • “The science and engineering of making intelligent machines” -- John McCarthy 1956 • The study and design of intelligent agents -- Russell & Norvig Fanafzar Game Studio

  4. Turing Test • The Imitation Game (1950) • A man (A), a woman (B), and an interrogator (C) who may be of either sex. Fanafzar Game Studio

  5. Turing Test • The Imitation Game • We now ask the question, What will happen when a machine takes the part of A in this game? Fanafzar Game Studio

  6. Turing Test • Turing conjectured that, by the year 2000, a computer with a storage of 10^9 units could be programmed well enough to pass the test. • The Turing test does not directly test whether the computer behaves intelligently • Some human behavior is unintelligent • Some intelligent behavior is inhuman • Real intelligence vs. simulated intelligence Fanafzar Game Studio

  7. Chinese room • The Chinese room is a thought experiment by John Searle which first appeared in his paper "Minds, Brains, and Programs", published in Behavioral and Brain Sciences in 1980. Fanafzar Game Studio

  8. Chinese room Fanafzar Game Studio

  9. Chinese room • Searle argued that software could pass the Turing Test simply by manipulating symbols of which they had no understanding. • Searle concludes—the Turing Test cannot prove that a machine can think. Fanafzar Game Studio

  10. Strong AI • According to Strong AI, the correct simulation really is a mind. • In 1931, Kurt Gödel proved that it is always possible to create statements that a formal system (such as an AI program) could not prove. Fanafzar Game Studio

  11. Weak AI • According to Weak AI, the correct simulation is a model of the mind. • Can machines think? • boats and submarines do move through the water but we do not call that swimming. • Stuart Russell and Peter Norvig write: "AI researchers have devoted little attention to passing the Turing test." Fanafzar Game Studio

  12. Alien intelligence • The way computers "think" is vastly different from the way a human thinks. --James Martin • AI is faster and has a larger capacity for storage and memory than any human. • The largest nerves in the brain can transmit impulses at around 90 meters per second, whereas a fiber optics connection can transmit impulses at 300 million meters per second, more than 3 million times faster. Fanafzar Game Studio

  13. Machine Learning • “A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E.” --Tom M. Mitchell • REcognition, classification • Online and Offline learning • Supervised, Unsupervised, Reinforcement Fanafzar Game Studio

  14. Machine Learning - Supervised • Classification Fanafzar Game Studio

  15. Machine Learning - Unsupervised • Clustering • We don’t know number of classes Fanafzar Game Studio

  16. Machine Learning - Unsupervised • Clustering Fanafzar Game Studio

  17. Machine Learning - Reinforcement • The goal of a reinforcement learning agent is to collect as much reward as possible. • Highly related to dynamic programming techniques • Most famous technique is Q-learning • Reinforcement Learning in First Person Shooter Games • IEEE TRANSACTIONS ON COMPUTATIONAL INTELLIGENCE AND AI IN GAMES, VOL. 3, NO. 1, MARCH 2011 • High-level Reinforcement Learning in Strategy Games • International Conference on Autonomous Agents and Multiagent Systems Fanafzar Game Studio

  18. Evolutionary Computing • A simple idea: use the theory of evolution as an algorithm. • A Population of Individuals • Swarm intelligence • Ant colony optimization • Particle swarm optimization • Bees algorithm • Cuckoo search Fanafzar Game Studio

  19. Genetic Algorithm • Individual = Chromosomes • Mutation, Selection, and Crossover. • Operating on dynamic data sets is difficult • Tendency to converge towards local optima • Randomness Fanafzar Game Studio

  20. Neural Networks • Simplified models of neural processing in the brain Fanafzar Game Studio

  21. Neural Networks • Multilayer Perceptrons Fanafzar Game Studio

  22. Neural Networks • How to train • Black box • Over fitting • Computationally expensive • Evolving Neural Controllers using GA for Warcraft 3-Real Time Strategy Game • 2011 Sixth International Conference on Bio-Inspired Computing Fanafzar Game Studio

  23. Neural Networks • A good book about GA and NN in games Fanafzar Game Studio

  24. What we expect from game AI? Do we really need AI in computer games? Fanafzar Game Studio

  25. What we expect from game AI? • Efficiency • Ease of Debugging (randomness) • We don’t need general problem solver • Believability • We don’t need human level intelligence • It doesn't really matter how NPC intelligence is achieved, as long as the creatures in the game appear believable.(weak AI) Fanafzar Game Studio

  26. What we expect from game AI? • Video games provide a rich test bed for artificial intelligence methods • Designers need to control the behavior of NPCs • Explicit control • Implicit control • It is very genre specific • Avoid artificial stupidity Fanafzar Game Studio

  27. Agents as NPCs • Agent cycle SENSE THINK ACT Fanafzar Game Studio

  28. Agents as NPCs • Agent cycle THINK ACT MAP GEOMETRY ENTITIES . . . Fanafzar Game Studio

  29. Agents as NPCs • Agent cycle SENSE ACT REASON BEHAVE REMEMBER Fanafzar Game Studio

  30. Agents as NPCs • Agent cycle SENSE THINK ANIMATE NAVIGATE . . . Fanafzar Game Studio

  31. Rule Based • Rule : if (condition) then action • Production Rule System comprised of a database of rules, each rule consists of an arbitrarily complex conditional statements. • They are fairly uncommon approach. Fanafzar Game Studio

  32. Goal Oriented • Search Methods, discovering a sequence of actions or states within a search space that satisfy some goal • Goal-oriented behavior is still fairly rare in games. Fanafzar Game Studio

  33. Introduction to Path planning • Everything in game world is triangle • In door / Out door • Path finding still is a problem • Some pathfinding bugs(Video) Fanafzar Game Studio

  34. A*/Dijkstra • Graph Theory – shortest path • Single Source shortest path • All pairs shortest path – Floyd • Store the result • Heuristic F(n) = D(n) + H(n) Fanafzar Game Studio

  35. Hierarchical Pathfinding • Near-Optimal Hierarchical Pathfinding, • A. Botea, M. Muller, and J. Schaeffer, Journal of Game Development, Volume 1 Fanafzar Game Studio

  36. Reviewing some pathfinding methods • Grid/Tile Base • Fast • Easy to develop • Memory Inefficient • 2D and strategy games Fanafzar Game Studio

  37. Reviewing some pathfinding methods • Waypoint graphs • Manual Fanafzar Game Studio

  38. Reviewing some pathfinding methods • Waypoint graphs • Automated : Point of visibility Fanafzar Game Studio

  39. Reviewing some pathfinding methods • Worlds require a ridiculous number of waypoints • Difficult dynamic obstacle avoidance, if not impossible • Is not shortest path – not optimal • Impossible to do path-smoothing • ZigZag path Fanafzar Game Studio

  40. Reviewing some pathfinding methods Inefficient Fanafzar Game Studio

  41. Reviewing some pathfinding methods • Convex Polygons • Manual/Automated Fanafzar Game Studio

  42. Reviewing some pathfinding methods • Shortest path - Optimal • Smaller Search Space Fanafzar Game Studio

  43. Reviewing some pathfinding methods OK, But how to implement? Fanafzar Game Studio

  44. Reviewing some pathfinding methods • Mesh simplification • Rendering techniques • Flood filling with AABBs (UDK) • Voxelization • Check MikkoMonone’s work, RecastNavigation • Fanafzar Game Studio

  45. Navigation mesh generation process • The general process is as follows: • Voxelization • Generate Regions • Generate Contours • Generate Polygon Mesh • Generate Detailed Mesh Fanafzar Game Studio

  46. Navigation mesh generation process 1. Voxelization Fanafzar Game Studio

  47. Navigation mesh generation process 1. Voxelization Fanafzar Game Studio

  48. Navigation mesh generation process 1. Voxelization Fanafzar Game Studio

  49. Navigation mesh generation process 1. Voxelization Fanafzar Game Studio

  50. Navigation mesh generation process 1. Voxelization Fanafzar Game Studio