Podcast
Questions and Answers
What makes game playing a suitable problem for AI researchers?
What makes game playing a suitable problem for AI researchers?
It presents a good reasoning problem that is both formal and nontrivial.
List two characteristics that define games of strategy in the context of AI.
List two characteristics that define games of strategy in the context of AI.
The games involve a sequence of moves to play and have rules that specify possible moves.
Describe the roles of the computer and the opponent in a two-player game tree.
Describe the roles of the computer and the opponent in a two-player game tree.
In the game tree, the computer is designated as 'Max' and aims to maximize its utility, while the opponent is 'Min' and seeks to minimize the computer's utility.
What does the evaluation function do in evaluating a board position?
What does the evaluation function do in evaluating a board position?
Signup and view all the answers
What do the values produced by the evaluation function signify?
What do the values produced by the evaluation function signify?
Signup and view all the answers
How is the concept of a game tree utilized in AI for game playing?
How is the concept of a game tree utilized in AI for game playing?
Signup and view all the answers
Why are evaluation functions critical in evaluating board positions in games?
Why are evaluation functions critical in evaluating board positions in games?
Signup and view all the answers
What does the 'zero-sum assumption' imply in the context of AI and game evaluation?
What does the 'zero-sum assumption' imply in the context of AI and game evaluation?
Signup and view all the answers
How do AI strategies in game playing compare to human strategies?
How do AI strategies in game playing compare to human strategies?
Signup and view all the answers
In a game tree, what roles does the 'Max' player and 'Min' player represent?
In a game tree, what roles does the 'Max' player and 'Min' player represent?
Signup and view all the answers
Study Notes
Artificial Intelligence in Games
- AI in games is about implemented game design
- Game AI is used to create the appearance of intelligence in non-player characters (NPCs)
Game Playing
- Game playing is a good reasoning problem
- Comparing game AI to human and other computer programs is relatively easy
- Strategic games have a sequence of moves, rules for moves and payment per move and the goal of maximizing payoff
Kinds of Games
- Strategy games are particularly important for AI study
Characteristics of strategy games:
- Sequence of moves to play
- Rules defining possible moves
- Rules defining payment for each move
- Goal to maximize your payment
Game Tree
- Computer is 'Max', opponent is 'Min'
- The game tree shows possible game states
- Terminal nodes are evaluated based on the utility function, a means to measure the 'goodness' or 'badness' of a position
Evaluation Functions
- A board position's value is based on its static features, such as piece count and position
- Zero-sum assumption: one function describes the position's goodness for both players – if one player is winning the other loses, vice versa
- f(n) > 0 : Player is winning in position 'n'
- f(n) = 0 : Position 'n' is tied
- f(n) < 0: Opponent is winning in position 'n'
- Evaluation functions can be developed using expert knowledge (e.g. the number of three-in-a-rows in Tic-tac-toe)
Example Chess Score
- Black has 1 bishop and 2 rooks, score = 18
- White has 5 pawns and 1 rook, score = 10
- Overall score for the board position: black = 8, white = -8
Entire Search Space
- Shows all possible positions of a game until a final result.
Partial Game Tree for Tic-Tac-Toe
- MAX is X
- MIN is O
- The utility function determines the values at the leaf nodes (results of the game)
- Backtracking values gives value to the tree nodes.
Mini-Max Terminology
- Utility function: Evaluates the end position
- Backed-up value: Value given to each node based on successors of the node.
- Minimax procedure: A search algorithm to determine the optimal move. It searches several levels to find the highest achievable payoff.
Minimax
- A perfect play strategy for deterministic games where players know the outcomes.
- The goal is to find a move that results in the highest possible minimax value.
- 2-ply Games (2 player game) the example given shows a simplified tree, representing possible game outcomes.
Example
- Possible moves given in a game board position
- Evaluates each move (immediate results) generated by some static evaluator.
Example with Opponent's Moves
- Shows calculation of the next move against opponent's moves generated by a static evaluator and its consequent positions of the game.
- Showing how moves and the possible outcomes (static evaluations) are recursively combined.
This Process Continued
- The minimax process can calculate all possible moves up to any level, as resources allow in a given amount of time.
Modified Game
- Analyzing best decision at node level from the leaves upwards
- Giving each node a value
Strategies Used
- Minimax algorithm is used to find winning positions by exploring the possible outcomes of the game to the end.
- Giving best strategy is for the 'MAX' player.
Minimax Example
- Shows a calculation example of the minimax evaluation to determine the best possible move. Static evaluation function runs on the leaves of the tree structure.
Sample Evaluations
- Shows example scenarios of a basic Tic-Tac-Toe board and evaluating each board state.
Example Tree With Chance
- Shows how to deal with chance events in game trees.
Game Agents (1 of 2)
- AI focuses on game agents (e.g. NPC)
- Agents have a sense-think-act lifecycle
- Gather current world state; including barriers, opponents and objects
- Game agents are restricted at vision and hearing range.
Game Agents (2 of 2)
- Evaluation and decision making using if-then logic statements and/or an effective search strategy
- Pre-coded expert knowledge/ if-then statements with randomness help create unpredictability.
- Search Algorithm: Finding the best/optimal solution.
Game Agents - Thinking (1 of 3)
- Expert knowledge: FSM (finite state machines), decision trees
- Often adequate for many AI tasks
- Simple rules
- Easy to develop
Game Agents - Thinking (2 of 3)
- Search: Look ahead, calculating possible moves
- Determining moves in game board, pathfinding
- Machine learning: Past actions are evaluated, used for future too slow
- ML Techniques promising, but too slow to be employed
Game Agents - Thinking (3 of 3)
- Making agents "stupid"
- Simple implementation for many cases
- Agent cheating: Give agents an unfair advantage; for instance, more attributes/knowledge
- Remember, that's the goal, to create a challenge for the player
Pac-Man
- Game developed by Namco and distributed by Midway
- Released in 1980
- Single player only
- Simple maze game
Ghosts
- Ghosts move with a specific strategy, not random per say
- Pac-Man chasing
- Moves can be random but are not necessarily random
Sim City
- Game developed by Maxis
- Published by Electronic Arts
- Released in 1989
- Series of Simulation games, AI implemented at the forefront of technology
A Living World
- Players can manipulate certain aspects of the city
- City population acts somewhat autonomously
- The game simulates random disasters
AI Learning
- Training large creatures using reward/punishment mechanisms
- Creatures learn to complete tasks based on reward or punishment, or based on the player's desired behaviour.
Game AI History - 1980
- First computer games (1960s): Space War, chess against the computer
- Atari (1970s): Pong, space invader
- More complex games (1980s): Fighting games, Pac-man
Game AI History - 1990s
- Madden Football, FPS (first-person shooter) and RTS(real time strategy): complex AI
- RTS games, path finding issues due to complexity, enemy attacks in bee line fashion.
Game AI History - 2000s
- More games utilized neural networks
- Black and White (2001)
- Collin McRae Rally 2 (2001)
- Hyperthreading
- More sophisticated AI engines, creates more realistic 3D environments (Core Duo)
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz explores the role of Artificial Intelligence in games, particularly focusing on its implementation in game design and the behavior of non-player characters (NPCs). It covers various types of games, including strategy games, and the use of game trees and evaluation functions to analyze game moves. Test your knowledge on how AI improves gameplay and strategic decision-making.