DOC PREVIEW
Pitt CS 2710 - Adversarial search

This preview shows page 1-2-3-4-5-6 out of 19 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 19 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1CS 2710 Foundations of AICS 2710 Foundations of AILecture 8Milos [email protected] Sennott Square Adversarial searchCS 2710 Foundations of AIGame search• Game-playing programs developed by AI researchers since the beginning of the modern AI era– Programs playing chess, checkers, etc (1950s)• Specifics of the game search:– Sequences of player’s decisions we control– Decisions of other player(s) we do not control• Contingency problem: many possible opponent’s moves must be “covered” by the solutionOpponent’s behavior introduces an uncertainty in to the game– We do not know exactly what the response is going to be• Rational opponent – maximizes it own utility (payoff) function2CS 2710 Foundations of AITypes of game problems• Types of game problems:– Adversarial games:• win of one player is a loss of the other– Cooperative games:• players have common interests and utility function– A spectrum of game problems in between the two:we focus on adversarial games only!!Adversarial games Fully cooperative gamesCS 2710 Foundations of AIExample of an adversarial 2 person game: Tic-tac-toe• Player 1 (x) moves firstWinLoss Draw3CS 2710 Foundations of AIGame search problem• Game problem formulation:– Initial state: initial board position + info whose move it is– Operators: legal moves a player can make– Goal (terminal test): determines when the game is over– Utility (payoff) function: measures the outcome of the game and its desirability• Search objective: – find the sequence of player’s decisions (moves) maximizing its utility (payoff)– Consider the opponent’s moves and their utilityCS 2710 Foundations of AIGame problem formulation (Tic-tac-toe)Objectives:• Player 1:maximize outcome• Player 2:minimize outcomeUtility:1-1 0Initial stateTerminal (goal) statesOperators4CS 2710 Foundations of AIMinimax algorithmHow to deal with the contingency problem?• Assuming that the opponent is rational and always optimizes its behavior (opposite to us) we consider the best opponent’s response • Then the minimax algorithm determines the best move MAXMIN31282 4 614523223CS 2710 Foundations of AIMinimax algorithm. ExampleMAXMAXMIN436 2219 3515 4 7 55CS 2710 Foundations of AIMinimax algorithm. ExampleMAXMAXMIN436 2219 3515 4 7 5CS 2710 Foundations of AIMinimax algorithm. ExampleMAXMAXMIN436 2219 3515 4 7 546CS 2710 Foundations of AIMinimax algorithm. ExampleMAXMAXMIN436 2219 3515 4 7 546CS 2710 Foundations of AIMinimax algorithm. ExampleMAXMAXMIN436 2219 3515 4 7 54647CS 2710 Foundations of AIMinimax algorithm. ExampleMAXMAXMIN436 2219 3515 4 7 54642CS 2710 Foundations of AIMinimax algorithm. ExampleMAXMAXMIN436 2219 3515 4 7 5464298CS 2710 Foundations of AIMinimax algorithm. ExampleMAXMAXMIN436 2219 3515 4 7 5464293CS 2710 Foundations of AIMinimax algorithm. ExampleMAXMAXMIN436 2219 3515 4 7 5464293255579CS 2710 Foundations of AIMinimax algorithmCS 2710 Foundations of AIComplexity of the minimax algorithm• We need to explore the complete game tree before making the decision1-1 0Complexity:mb?10CS 2710 Foundations of AIComplexity of the minimax algorithm• We need to explore the complete game tree before making the decision• Impossible for large games – Chess: 35 operators, game can have 50 or more moves1-1 0Complexity:)(mbOmbCS 2710 Foundations of AISolution to the complexity problemTwo solutions:1. Dynamic pruning of redundant branches of the search tree– identify a provably suboptimal branch of the search tree before it is fully explored– Eliminate the suboptimal branchProcedure: Alpha-Beta pruning2. Early cutoff of the search tree– uses imperfect minimax value estimate of non-terminal states (positions)11CS 2710 Foundations of AIAlpha beta pruning• Some branches will never be played by rational players since they include sub-optimal decisions (for either player)CS 2710 Foundations of AIAlpha beta pruning. ExampleMAXMAXMIN436 2219 3515 4 7 512CS 2710 Foundations of AIAlpha beta pruning. ExampleMAXMAXMIN436 2219 3515 4 7 54≥CS 2710 Foundations of AIAlpha beta pruning. ExampleMAXMAXMIN436 2219 3515 4 7 54=4≤13CS 2710 Foundations of AIAlpha beta pruning. ExampleMAXMAXMIN436 2219 3515 4 7 54≤6≥4=!!CS 2710 Foundations of AIAlpha beta pruning. ExampleMAXMAXMIN436 2219 3515 4 7 54=6≥4=4≥14CS 2710 Foundations of AIAlpha beta pruning. ExampleMAXMAXMIN436 2219 3515 4 7 54=6≥4=4≥2≥CS 2710 Foundations of AIAlpha beta pruning. ExampleMAXMAXMIN436 2219 3515 4 7 54=6≥4=4≥2=2≤15CS 2710 Foundations of AIAlpha beta pruning. ExampleMAXMAXMIN436 2219 3515 4 7 54=6≥4=4≥2=2≤!!CS 2710 Foundations of AIAlpha beta pruning. ExampleMAXMAXMIN436 2219 3515 4 7 54=6≥4=4≥2=2≤5≥16CS 2710 Foundations of AIAlpha beta pruning. ExampleMAXMAXMIN436 2219 3515 4 7 54=6≥4=4≥2=2≤5=5≤CS 2710 Foundations of AIAlpha beta pruning. ExampleMAXMAXMIN436 2219 3515 4 7 54=6≥4=4≥2=2≤5=5≤7≥!!17CS 2710 Foundations of AIAlpha beta pruning. ExampleMAXMAXMIN436 2219 3515 4 7 54=6≥4=5≥2=2≤5=5=7≥CS 2710 Foundations of AIAlpha beta pruning. ExampleMAXMAXMIN436 2219 3515 4 7 54=6≥4=5=2=2≤5=5=7≥nodes that were never explored !!!18CS 2710 Foundations of AIAlpha-Beta pruningGOALGOALCS 2710 Foundations of AIUsing minimax value estimates• Idea:– Cutoff the search tree before the terminal state is reached– Use imperfect estimate of the minimax value at the leaves• Evaluation functionHeuristic evaluationfunctionMAXMINCutoff level464293255574319CS 2710 Foundations of AIDesign of evaluation functions• Heuristic estimate of the value for a sub-tree• Examples of a heuristic functions:– Material advantage in chess, checkers• Gives a value to every piece on the board, its position and combines them– More general feature-based evaluation function• Typically a linear evaluation function: kkwsfwsfwsfsf )()()()(2211K++=)( sfi- a feature of a state siw- feature weightCS 2710 Foundations of AIFurther extensions to real games• Restricted set of moves to be considered under the cutoff levelto reduce branching and improve the evaluation function– E.g., consider only the capture moves in chess…Heuristic


View Full Document

Pitt CS 2710 - Adversarial search

Documents in this Course
Learning

Learning

24 pages

Planning

Planning

25 pages

Lecture

Lecture

12 pages

Load more
Download Adversarial search
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Adversarial search and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Adversarial search 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?