Game playing in artificial intelligent technique


Published on

For further information and help contact me :

  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Game playing in artificial intelligent technique

  1. 1. By: Jojo naqvi
  2. 2.  Game artificial intelligence refers to techniques used in computer and video games to produce the illusion of intelligence in the behavior of non-player characters (NPCs)  Hacks and cheats are acceptable and, in many cases, the computer abilities must be toned down to give human players a sense of fairness. E.g racing and shooting 1
  3. 3.  AI has continued to improve, with aims set on a player being unable to tell the difference between computer and human players.  A game must „feel‟ natural ◦ Obey laws of the game ◦ Characters aware of the environment ◦ Path finding (A* algorithm) ◦ Decision making ◦ Planning 3
  4. 4.  Games are fun!  They are limited, well-defined rules  They are one of the few domains that allow us to build agents.  Studying games teaches us how to deal with other agents trying to foil our plans  Nice, clean environment with clear criteria for success  Game playing is considered an intelligent human activity.  AI has always been interested in abstract games.  Games present an ideal environment where hostile agents may compete. 4
  5. 5.  Machine Learning - also known as ML, is a field of artificial intelligence which focuses on developing algorithms that can learn to predict, classify, control, or solve problems.  Reinforcement Learning - Taking past data that the AI has recorded and using it to influence behavior and choices made in the future.  Waypoint Graph - is a collection of waypoints linked up to form the information about what areas of a level can be traversed by an actor during path finding. 5
  6. 6.  Game AI is about the illusion of human behaviour ◦ Smart, to a certain extent (Creativity) ◦ Non-repeating behaviour ◦ Emotional influences (Irrationality, „Personality‟) ◦ Body language to communicate emotions ◦ Being integrated in the environment  Game AI needs various computer science disciplines ◦ Knowledge Based Systems ◦ Machine Learning ◦ Multi-agent Systems ◦ Computer Graphics & Animation ◦ Data Structures 6
  7. 7.  Strategy Games ◦ Real-Time Strategy (RTS) ◦ Turn-Based Strategy (TBS) ◦ Helicopter view  Role-Playing Games (RPG) ◦ Single-Player ◦ Multi-Player (MMORPG)  Action Games ◦ First-Person Shooters (FPS) ◦ First-Person Sneakers  Sports Games  Simulations  Adventure Games  Puzzle Games 7
  8. 8. 8
  9. 9. 23-Mar-20009Artificial Intelligence - CMT310 9
  10. 10.  providing more multi-human gaming opportunities ◦ Teaming up with/against other humans ◦ Large environments ◦ Changing environments 10
  11. 11.  A* algorithm gives the shortest path from predator to prey in a tiled environment.  This can be used for chase/evade.  However, alternatives exist.
  12. 12. if (predatorX > preyX) { predatorX--; } else if (predatorX == preyX) { // do nothing } else { predatorX++; } if (predatorY > preyY) { predatorY--; } else if (predatorY == preyY) { // do nothing } else { predatorY++; } assuming tiled environment Predator is at coordinates (predatorX,predatorY). Prey is at coordinates (preyX,preyY). This algorithm will update predator coordinates. Algorithm for prey (evade) is just the opposite.
  13. 13.  This chase algorithm is not natural.  Suppose the prey and predator are at the coordinates below, then the algorithm will give the following path. prey predator
  14. 14.  Instead we want a more natural path like below. prey predator
  15. 15. What is Data Structure?  In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.  Data structures are used in almost every program or software system.  Data structures provide a means to manage huge amounts of data efficiently.
  16. 16. What is Chess?  Chess is a two-player board game played on a chessboard, a square checkered board with 64 squares arranged in an eight-by-eight grid. It is one of the world's most popular games, played by millions of people worldwide.  In computer chess, software developers must choose a data structure to represent chess positions on the chessboard
  17. 17.  In computer chess, software developers must choose a data structure to represent the chess board and chess positions. Several data structures exist, collectively known as board representations. Some are given below  Offset board representation  Bitmap board representation  Two-dimensional array representation  0X88 board representation  Huffman encoding technique for chess pieces
  18. 18.  horizontal lines are called “Ranks”  vertical lines are called “Columns” (column A, column B… column H)  Talking about indexes of array you can imagine an 8 x 8 chess board in this way:  The formula to calculate a square is:  Index = rank * 8 + column  where rank 1, rank 2,…, rank 8 and column A, column B,…, column H are 0,1,2…7; the index of square “e4″ is : 3 * 8 + 4=28 .
  19. 19.  Where c is a bit representing the color of the piece (1 = LIGHT, 0 = DARK)