introduction to ai in computer games

Download Introduction to AI in computer games

Post on 05-Dec-2014




2 download

Embed Size (px)


This slides was presented in a workshop at Iran Game Development Institute. It is only an introduction and starts from academic view and continues with techniques that are using in game industry. In the workshop I also shared some of our experiences in developing AI and its tools, some screenshots also included.


  • 1. 1Fanafzar Game Studio
  • 2. How do you think about AI? What is AI 2Fanafzar Game Studio
  • 3. 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 What is AI 3Fanafzar Game Studio
  • 4. The Imitation Game (1950) A man (A), a woman (B), and an interrogator (C) who may be of either sex. Turing Test 4Fanafzar Game Studio
  • 5. The Imitation Game We now ask the question, What will happen when a machine takes the part of A in this game? Turing Test 5Fanafzar Game Studio
  • 6. 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 Turing Test 6Fanafzar Game Studio
  • 7. 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. Chinese room 7Fanafzar Game Studio
  • 8. Chinese room 8Fanafzar Game Studio
  • 9. Searle argued that software could pass the Turing Test simply by manipulating symbols of which they had no understanding. Searle concludesthe Turing Test cannot prove that a machine can think. Chinese room 9Fanafzar Game Studio
  • 10. According to Strong AI, the correct simulation really is a mind. In 1931, Kurt Gdel proved that it is always possible to create statements that a formal system (such as an AI program) could not prove. Strong AI 10Fanafzar Game Studio
  • 11. 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." Weak AI 11Fanafzar Game Studio
  • 12. 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. Alien intelligence 12Fanafzar Game Studio
  • 13. 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 Machine Learning 13Fanafzar Game Studio
  • 14. Classification Machine Learning - Supervised 14Fanafzar Game Studio
  • 15. Clustering We dont know number of classes Machine Learning - Unsupervised 15Fanafzar Game Studio X Y 12.37 15.64 22.8 7.8 34 17 91 50 11.9 17 44 19 80 45 21 9 33.31 16.5 79 39
  • 16. Clustering Machine Learning - Unsupervised 16Fanafzar Game Studio
  • 17. 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 Machine Learning - Reinforcement 17Fanafzar Game Studio
  • 18. 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 Evolutionary Computing 18Fanafzar Game Studio
  • 19. Individual = Chromosomes Mutation, Selection, and Crossover. Operating on dynamic data sets is difficult Tendency to converge towards local optima Randomness Genetic Algorithm 19Fanafzar Game Studio
  • 20. Simplified models of neural processing in the brain Neural Networks 20Fanafzar Game Studio
  • 21. Multilayer Perceptrons Neural Networks 21Fanafzar Game Studio
  • 22. 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 Neural Networks 22Fanafzar Game Studio
  • 23. A good book about GA and NN in games Neural Networks 23Fanafzar Game Studio
  • 24. Do we really need AI in computer games? What we expect from game AI? 24Fanafzar Game Studio
  • 25. Efficiency Ease of Debugging (randomness) We dont need general problem solver Believability We dont 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) What we expect from game AI? 25Fanafzar Game Studio
  • 26. 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 What we expect from game AI? 26Fanafzar Game Studio
  • 27. Agent cycle Agents as NPCs 27Fanafzar Game Studio THINKSENSE ACT
  • 28. Agent cycle Agents as NPCs 28Fanafzar Game Studio MAP GEOMETRY ENTITIES . . . THINK ACT
  • 29. Agent cycle Agents as NPCs 29Fanafzar Game Studio REMEMBER REASON BEHAVE SENSE ACT
  • 30.