Artificial Intelligence in Game Design Problems and Goals.
-
Upload
karin-roberta-mckinney -
Category
Documents
-
view
215 -
download
1
Transcript of Artificial Intelligence in Game Design Problems and Goals.
![Page 1: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/1.jpg)
Artificial Intelligence in Game Design
Problems and Goals
![Page 2: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/2.jpg)
AI vs. Gaming AI
• “Standard” Artificial Intelligence• Expert Systems• Probabilistic/Fuzzy Logic• Robotics• Machine Learning
– Goal: Finding best solution to some problem– Characteristics:
• Expensive and time consuming to develop• Large number of processing cycles to run
![Page 3: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/3.jpg)
AI vs. Gaming AI
Example: Chess (“Deep Blue”, IBM)• MINMAX algorithm • Heuristic knowledge• Databases of opening moves, endgames• Result:
– Played at world champion level (best solution)– Took several minutes per move (ok in chess)
• Not viable as commercial chess game!
![Page 4: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/4.jpg)
Goals of Gaming AI
• Challenging but beatable:– Intelligence level artificially limited – AI not given all information
• Problem: making AI intelligent enough!– Players find and take advantage of limitations– “Cheats” compensate for bad AI
![Page 5: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/5.jpg)
Example of Gaming AI
Player coming from unknown direction
Soldier NPC setting up ambush
What to hide behind?
![Page 6: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/6.jpg)
Example of Gaming AI
• Choose at random?
• Current location of player?
• Base on realistic criteria– Terrain around soldier– Past player actions, etc.
This is most difficult approach!
![Page 7: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/7.jpg)
Believable NPCs
• Opponents that offer challenge– “Orc” characters should move realistically– “Boss” characters should appear as intelligent as player
• Minions that require little micromanaging
• Other characters interesting to interact with
![Page 8: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/8.jpg)
Believable NPCs
Intelligent Action:– Good decision making– Realistic movement – Memory of previous actions
(and possibly to improve)– Achieving goals
![Page 9: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/9.jpg)
Believable NPCs
Believable as Characters:– Acts like human (or orc, dog, etc.)
– Has appropriate emotional states – Does not always behave predictably– Can interact with player
• Major simplification from standard AI: NPCs restricted to limited domain– Example: “Shopkeeper”
![Page 10: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/10.jpg)
Turing Test
• Turing test for AI:
![Page 11: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/11.jpg)
Turing Test for AI Gaming
• Does NPC act appropriately for its role in game?– Does it act “intelligently”?– Does it appear to have appropriate information?– Does it behave with the “personality” we would expect?
vs.
![Page 12: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/12.jpg)
Game AI Structure
Movement(Action Choice)
“What actions are part of that plan?”
Example: current direction/ speed to reach next point in path
Strategy
“What are my goals?”
Example: Choosing room to move to
Tactics(Decision Making)
“How to accomplish that goal?”
Example: Choosing path to reach room
AI Engine
World Interface/Game State
Animation/Game Physics
![Page 13: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/13.jpg)
Constraints on Gaming AI
Efficiency– Must consume few processor cycles– Must often act in real time
• Football, racing, etc.
• Simple approaches usually best– Choose fast over optimal– Tweak game to support AI– Depend on player perceptions
![Page 14: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/14.jpg)
Tradeoffs
• Optimal solutions require complex algorithms – Shortest path O(n2) – Optimal plan Exponential tree size
• Many games use greedy algorithms– Choose action resulting in minimal “distance” to goal– O(n) time
![Page 15: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/15.jpg)
Example of Simplification
• Pac-Man– Algorithm: Ghosts move towards player– Problem: ghosts stuck in cul-de-sacs
![Page 16: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/16.jpg)
Example of Simplification
![Page 17: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/17.jpg)
Black and White Game
• Creature “trained” by player by observing player actions in different situations
• Later in game creature takes same actions
• Based entirely on decision tree learningExample Allegiance Defense Tribe Attack
1 friendly weak Celtic no
2 enemy weak Celtic yes
3 friendly strong Norse no
4 enemy strong Norse no
5 friendly weak Greek no
6 enemy medium Greek yes
7 enemy strong Greek no
8 enemy medium Aztec yes
9 friendly weak Aztec no
![Page 18: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/18.jpg)
Apparent Intelligence
NPCs can appear intelligent to player even if based on simple rules
“Theory of mind”We tend to ascribe motives/decision
making skills similar to our own to
other entities, whether this is actually
happening or not!
if hitPoints < 5 then run away from playerif distance to player < 2 units then attack playerif player visible the run towards playerelse move in random direction
![Page 19: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/19.jpg)
Swarm Intelligence
• Simple NPCs in groups can appear to cooperate
• Decision example:if no other player shooting, I shootif in open, run for cover and shoutif in cover, reload and wait
• Orc motion example:…if NPC blocking path to player then run sidewayselse run towards player…
NPCs appear to be covering one another and coordinating attack!
![Page 20: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/20.jpg)
Swarm Intelligence
• Give each NPC slightly different set of rules to create illusion of personalities
• Example: Pac-Manif distance to player < n then move towards playerelse wander at random
n is different for each ghost!
Large n : appeared “aggressive”
Small n : appeared “mellow”
![Page 21: Artificial Intelligence in Game Design Problems and Goals.](https://reader036.fdocuments.in/reader036/viewer/2022062518/56649e435503460f94b36860/html5/thumbnails/21.jpg)
Role of Traditional AI• Good decision making
– Acts like human (or orc, dog, etc.)– Avoids predictability
• Realistic movement – Evasion/pursuit of player– Choosing paths through complex
terrain– Cooperation among groups
• Memory of previous actions
• Achieving goals
Decision Trees
Finite State Machines
Random/Fuzzy Machines
Robotics
Swarm Intelligence
Simple Iterative Learning
Goal-based Planning