1 / 58

Existing and Possible Applications of Artificial Intelli gence in Computer Ga m es

Existing and Possible Applications of Artificial Intelli gence in Computer Ga m es. Ori Liel. In this lecture. A few words about the industry Current AI technologies applied in games “Fuzzy logic” Soar Quake-bot Interesting projects and possible future applications.

leena
Télécharger la présentation

Existing and Possible Applications of Artificial Intelli gence in Computer Ga m es

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Existing and Possible Applications of Artificial Intelligencein Computer Games Ori Liel

  2. In this lecture • A few words about the industry • Current AI technologies applied in games • “Fuzzy logic” • Soar Quake-bot • Interesting projects and possible future applications

  3. The computer (and console) game industry • Multi-Billion $ industry • Growing fast • Main trends: • Increasing # of games with multi-player options • Movement towards console games • Emerging trend - increasing investment in AI • Graphics and sound can’t make ground-breaking leaps • More CPU power available: • Hardware improvements • Graphics cards carry the burden

  4. Need for AI – different game geners • Action • Quake • IGI Covert Strike • Need Formidable opponents • Need good Support characters • Adventure & RPG • Mist • NeverWinter Nights • Need Believable NPC’s • Have beliefs, desires and intentions • Are able to formulate and carry out plans • New notion: plot management

  5. Need for AI – cont’d • Strategy • Civilization 3 • WarCraft 3 • Need enemies with ability to plan, react and learn • “God-games” • SimCity • Populous • Need Believable environments

  6. Need for AI – cont’d • Why are agents suitable? • For all the reasons which were mentioned before: • First of all: agents as a natural metaphor • Modularity • Decentralization • Changeability • Open environments

  7. Current State of AI in games • AI is not taken very seriously (yet…) • Budget goes to graphics • Usually put off until late in development • Not enough expertise in the industry • From an industrial point of view AI is a means, not an end.

  8. Current AI technologies applied in games

  9. Current technology - FSM • Finite State Machines: • States & transformation rules • Agent behavior: • deterministic • reactive • Can be improved by adding intelligent-looking scripted behavior

  10. Current technology – Flocking • Flocking algorithms • Simulate realistic movement in a group • Based on studies of flocks of birds, and schools of fish • Essence of algorithms: • Maintain a minimum distance from other agents • Move towards center of mass • Keep your alignment similar to other agents’ “follow the leader” flocking

  11. Current technology – others • Pursuit-evasion algorithms • AI character in pursuit • AI character escaping • Path-finding - A* algorithm • Used by units to find their way around in the environment

  12. “Fuzzy” logic (And it’s application in game AI)

  13. Fuzzy logic • Development of fuzzy logic: • Plato said it first: there is something between ‘true’ and ‘false’ • Since then • Three-valued logic [-1, 0, 1] • N-valued logic • Finally, infinite-valued logic

  14. Fuzzy logic – cont’d • The idea: • the universe is made of fuzzy sets. • “The fuzzy set of old people” • “The fuzzy set of red objects” • and a membership function ‘m’ m: STATEMENT  VALUE

  15. Fuzzy logic – cont’d • An example: • Jane is 70 years old. Is Jane old? Depends on who you’re asking. • Assume that membership in ‘old’ is defined as follows: mOLD(x) = {1 (if age(x)>100) } {0.01*age(x) otherwise) }

  16. Fuzzy logic – cont’d • According to this definition: mOLD(Jane) = 0.7 • Question: • What does this mean? • Answer: • Jane’s degree of membership within the set of old people is 0.7 • Not to be confused with probabilistic approach

  17. Fuzzy logic – cont’d • Basic definitions (A and B are sets): • A is EMPTY  for all x, mA(x) = 0.0 • A = B for all x: mA(x) = mB(x) • A’ : for all x: m(x)A' = 1 – m(x)A • A is CONTAINED in B  for all x: mA(x) <= mB(x) • C = A ۷ B  mC(x) = MAX(mA(x), mB(x)) • C = A ۸ B  mC(x) = MIN(mA(x), mB(x))

  18. Fuzzy logic – cont’d • Examples of last two definitions: • mOLD(Jane) = 0.7 • mSMART(Jane) = 0.6 • What is the degree of membership of Jane in the ‘old-or-smart’ set? • m[OLD ۷ SMART](Jane) = 0.7 • What is the degree of membership of Jane in the ‘old-and-smart’ set? • m[OLD ۸ SMART](Jane) = 0.6

  19. Fuzzy logic – applications • Fuzzy-logic introduces a random element into decision-making • Opponent’s personalities in Civilization 3 are defined in this way: • m[aggressive] (Japan) = 0.7 • m[scientific](Japan) = 0.4 • m[expansionistic](Japan) = 0.6 • A probabilistic function uses these values (among others) to determine Japan’s next move, depending on Japan’s present state.

  20. Probabilistic Fuzzy-State machine goodwill < 85 ALLIED treaty = 0.8 assist = 0.8 COOPERATIVE treaty = 0.4 assist = 0.2 goodwill > 85 goodwill < 65 goodwill > 65 goodwill < 65 Neutral treaty = 0.1 attack = 0.1 assist = 0.05 goodwill > 85 30 < goodwill < 45 or gain > 60 goodwill < 50 and gain > 90 goodwill > 45 AGGRESIVE attack = 0.6 ceasefire = 0.3 peace = 0.8 HOSTILE attack = 0.95 ceasefire = 0.05 goodwill > 30 or gain > -50 gain >10

  21. The ‘Soar’ Quake-bot

  22. Quake II • Quake II – a first person shooter • The Quake II environment • Levels: sets of rooms and passages • Weapons: from knife to RPG • Power-ups • Quake II Death-Match

  23. Quake II - mods • ‘mods’ are modified versions of existing games • New game-play features • Altered laws of physics, changes to environment • Improved (or at least different) AI • Can be created by company or by players. • In Quake II, id software released some source code, and mods were created by players • Favorite use of code: The creation of “Quake-bots” for death-matches.

  24. Quake II - Quake-bots Bots simulate human perception

  25. The ‘Soar’ Quake-Bot • The Soar bot’s decision cycle:

  26. ‘Soar’ Quake-Bot – cont’d • Evaluation, proposal and operator selection take into account: • Internal state • Health level • Current weapon • Knowledge of map • Some pre-defined ordering among operators, which is unique to the version of the robot.

  27. ‘Soar’ Quake-Bot – cont’d • Operator application • Operators can be: • primitive actions (move, shoot) • internal actions (remember location) • abstract actions (collect power-ups) • If an abstract operator has been selected, it is immediately regarded as a goal

  28. Collect-Powerups Choose-best-item Get item Goto next room Get item in room Go through door Go to door Face item Stop moving to item Move to item Detect item missing Face door Align with door Record at door Move to door Slide to door Stop move to door Stop slide to door

  29. Collect-Powerups Choose-best-item Get item Goto next room Get item in room Go through door Go to door Face item Stop moving to item Move to item Detect item missing Face door Align with door Record at door Move to door Slide to door Stop move to door Stop slide to door

  30. Collect-Powerups Choose-best-item Get item Goto next room Get item in room Go through door Go to door Face item Stop moving to item Move to item Detect item missing Face door Align with door Record at door Move to door Slide to door Stop move to door Stop slide to door

  31. Collect-Powerups Choose-best-item Get item Goto next room Get item in room Go through door Go to door Face item Stop moving to item Move to item Detect item missing Face door Align with door Record at door Move to door Slide to door Stop move to door Stop slide to door

  32. Collect-Powerups Choose-best-item Get item Goto next room Get item in room Go through door Go to door Face item Stop moving to item Move to item Detect item missing Face door Align with door Record at door Move to door Slide to door Stop move to door Stop slide to door

  33. Collect-Powerups Choose-best-item Get item Goto next room Get item in room Go through door Go to door Face item Stop moving to item Move to item Detect item missing Face door Align with door Record at door Move to door Slide to door Stop move to door Stop slide to door

  34. Collect-Powerups Choose-best-item Get item Goto next room Get item in room Go through door Go to door Face item Stop moving to item Move to item Detect item missing Face door Align with door Record at door Move to door Slide to door Stop move to door Stop slide to door

  35. Collect-Powerups Choose-best-item Get item Goto next room Get item in room Go through door Go to door Face item Stop moving to item Move to item Detect item missing Face door Align with door Record at door Move to door Slide to door Stop move to door Stop slide to door

  36. Collect-Powerups Choose-best-item Get item Goto next room Get item in room Go through door Go to door Face item Stop moving to item Move to item Detect item missing Face door Align with door Record at door Move to door Slide to door Stop move to door Stop slide to door

  37. Collect-Powerups Choose-best-item Get item Goto next room Get item in room Go through door Go to door Face item Stop moving to item Move to item Detect item missing Face door Align with door Record at door Move to door Slide to door Stop move to door Stop slide to door

  38. Collect-Powerups Choose-best-item Get item Goto next room Get item in room Go through door Go to door Face item Stop moving to item Move to item Detect item missing Face door Align with door Record at door Move to door Slide to door Stop move to door Stop slide to door

  39. ‘Soar’ Quake-Bot – Anticipation • Robot anticipates player’s moves by: • Forming an internal model of player • Player status • Health • Weapon level • Player’s beliefs (current perception of the world) • Projecting its own behavior on player

  40. ‘Soar’ Quake-Bot – Anticipation (cont’d) • Why should anticipation be used? • Ambush • Hunt (pursuit-evasion) • Deny power-ups • When should anticipation be used? • Not all the time • Requires lots of CPU for reasoning. • May interfere with regular mechanisms • Should be used when • Sensing enemy (some knowledge of enemy state) • Enemy is far away and not facing the bot

  41. ?

  42. His Distance: 1 My Distance: 1

  43. His Distance: 2 My Distance: 2

  44. His Distance: 2 My Distance: 2

  45. His Distance: 3 My Distance: 1 (but hall)

  46. His Distance: 4 My Distance: 0 Ambush!

  47. * Bot remembers successful sequences (learning)

  48. Other interesting projects

More Related