KU NLP Heuristic Search30 4.1.3 Heuristic Search and Expert Systems (1) q An interesting approach to implementing heuristics is the use of confidence.

Slides:



Advertisements
Similar presentations
Ch 4. Heuristic Search 4.0 Introduction(Heuristic)
Advertisements

1 CS 385 Fall 2006 Chapter 4 Heuristic Search. 2 Heuristics eurisko ("I discover" in Greek) "the study of the methods and rules of discovery and invention."
Adversarial Search We have experience in search where we assume that we are the only intelligent being and we have explicit control over the “world”. Lets.
Games & Adversarial Search Chapter 5. Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent’s reply. Time.
Using Heuristics in Games At that time two opposing concepts of the game called forth commentary and discussion. The foremost players distinguished two.
Artificial Intelligence Adversarial search Fall 2008 professor: Luigi Ceccaroni.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2008.
Game Playing (Tic-Tac-Toe), ANDOR graph By Chinmaya, Hanoosh,Rajkumar.
Game Playing Games require different search procedures. Basically they are based on generate and test philosophy. At one end, generator generates entire.
CS 484 – Artificial Intelligence
University College Cork (Ireland) Department of Civil and Environmental Engineering Course: Engineering Artificial Intelligence Dr. Radu Marinescu Lecture.
Adversarial Search Chapter 5.
Adversarial Search: Game Playing Reading: Chapter next time.
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
Adversarial Search CSE 473 University of Washington.
Adversarial Search Chapter 6.
MINIMAX SEARCH AND ALPHA- BETA PRUNING: PLAYER 1 VS. PLAYER 2.
Artificial Intelligence for Games Game playing Patrick Olivier
Search Strategies.  Tries – for word searchers, spell checking, spelling corrections  Digital Search Trees – for searching for frequent keys (in text,
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Minimax and Alpha-Beta Reduction Borrows from Spring 2006 CS 440 Lecture Slides.
State Space 4 Chapter 4 Adversarial Games. Two Flavors Games of Perfect Information ◦Each player knows everything that can be known ◦Chess, Othello Games.
Mahgul Gulzai Moomal Umer Rabail Hafeez
This time: Outline Game playing The minimax algorithm
Game Playing CSC361 AI CSC361: Game Playing.
1 search CS 331/531 Dr M M Awais A* Examples:. 2 search CS 331/531 Dr M M Awais 8-Puzzle f(N) = g(N) + h(N)
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2006.
Adversarial Search: Game Playing Reading: Chess paper.
Games & Adversarial Search Chapter 6 Section 1 – 4.
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
ICS-270a:Notes 5: 1 Notes 5: Game-Playing ICS 270a Winter 2003.
1 Adversary Search Ref: Chapter 5. 2 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans.
CSC 412: AI Adversarial Search
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 2 Adapted from slides of Yoonsuck.
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
Lecture 6: Game Playing Heshaam Faili University of Tehran Two-player games Minmax search algorithm Alpha-Beta pruning Games with chance.
Game Playing.
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
Notes on Game Playing by Yun Peng of theYun Peng University of Maryland Baltimore County.
Minimax with Alpha Beta Pruning The minimax algorithm is a way of finding an optimal move in a two player game. Alpha-beta pruning is a way of finding.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
For Wednesday Read chapter 7, sections 1-4 Homework: –Chapter 6, exercise 1.
Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.
CSCI 4310 Lecture 6: Adversarial Tree Search. Book Winston Chapter 6.
GAME PLAYING 1. There were two reasons that games appeared to be a good domain in which to explore machine intelligence: 1.They provide a structured task.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
Adversarial Games. Two Flavors  Perfect Information –everything that can be known is known –Chess, Othello  Imperfect Information –Player’s have each.
Game Playing Revision Mini-Max search Alpha-Beta pruning General concerns on games.
Knowledge Search CPTR 314.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Graph Search II GAM 376 Robin Burke. Outline Homework #3 Graph search review DFS, BFS A* search Iterative beam search IA* search Search in turn-based.
Adversarial Search. Regular Tic Tac Toe Play a few games. –What is the expected outcome –What kinds of moves “guarantee” that?
Adversarial Search 2 (Game Playing)
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 5 Adversarial Search (Thanks Meinolf Sellman!)
Artificial Intelligence in Game Design Board Games and the MinMax Algorithm.
Search: Games & Adversarial Search Artificial Intelligence CMSC January 28, 2003.
1 Chapter 6 Game Playing. 2 Chapter 6 Contents l Game Trees l Assumptions l Static evaluation functions l Searching game trees l Minimax l Bounded lookahead.
Adversarial Search and Game-Playing
PENGANTAR INTELIJENSIA BUATAN (64A614)
State Space 4 Chapter 4 Adversarial Games.
Alpha-Beta Search.
NIM - a two person game n objects are in one pile
Alpha-Beta Search.
Alpha-Beta Search.
Alpha-Beta Search.
Mini-Max search Alpha-Beta pruning General concerns on games
Alpha-Beta Search.
Unit II Game Playing.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

KU NLP Heuristic Search Heuristic Search and Expert Systems (1) q An interesting approach to implementing heuristics is the use of confidence measures by expert systems to weigh the results of a rule. q Expert systems employ confidence measures to select the conclusions with the highest likelihood of success. q Games are ideal vehicles for exploring the design and behavior of heuristic search algorithm. 1. Search spaces are large enough to require heuristic pruning 2. Most games are complex enough to suggest a rich variety of heuristic evaluations for comparison and analysis. 3. Games generally do not involve complex representational issues. 4. Because each node of the state space has a common representation(e.g. a board description), a single heuristic may be applied throughout the search space.

KU NLP Heuristic Search Heuristic Search and Expert Systems (2) q More realistic problems(such as those found in expert systems applications, planning, intelligent control, and machine learning) complicate the implementation and analysis of heuristic search by requiring multiple heuristics to deal with different situations in the problem space.  A single heuristic may not apply to each state in these domains. Instead, situation specific problem-solving heuristics are encoded in the syntax and content of individual problem solving operators.

KU NLP Heuristic Search32 Example The Financial Advisor (1) q So far, the knowledge base has been treated as a set of logical implications, whose conclusions are either true or false, depending on the truth value of the premises. savings_account(adequate)  income(adequate)  investment(stocks) q In reality, it is possible that such an individual may prefer the added security of a combination strategy or even that of placing all investment money in savings  The problem solver should try to account for this uncertainty.  Expert systems have attached a numeric weight (confidence measure or certainty factor) to the conclusion of each rule.  Savings_account(adequate)  income(adequate)  investment(stocks) with confidence=0.8

KU NLP Heuristic Search33 Example The Financial Advisor (2)  Savings_account(adequate)  income(adequate)  investment(combination) with confidence=0.5  Savings_account(adequate)  income(adequate)  investment(savings) with confidence=0.1 q Heuristic search algorithms can use certainty factors in a number of ways  The results of all applicable rules could be produced with varying certainties placed on multiple conclusions.  The program might return only the result with the strongest confidence value.

KU NLP Heuristic Search Using Heuristics in Games (1) q Games are good application area for heuristic algorithm. q Tow-person games are more complicated than simple puzzles.  Hostility  maximize own advantage while minimize opponent’s opportunity of win.  Unpredictable opponent  different knowledge of games.  Credit assignment is difficult.

KU NLP Heuristic Search Using Heuristics in Games (2) q Various games  Checker  Samuel’s program had an interesting learning component which allowed its performance to improve with experience. Ultimately, the program was able to beat its author. Evaluate all states at a level with a evaluation polynomial. (C 1 *piece advantage + C 2 *advancement + C 3 *center control + C 4 *fork treat + C 5 *mobility …) If the evaluation polynomial led to a losing series of moves, the program adjusted its coefficients to improve performance.  Limitations No notion of global strategy, it may lead the program into local maxima. The learning component of the program is vulnerable to inconsistencies in the opponent play.  Go : Go is a very difficult game to play by machine since the average branching factor of the game tree is very high.  Backgammon : a backgammon program must choose its moves with incomplete information about what may happen.  Othello, Chess: achieved world-championship level.

KU NLP Heuristic Search Minimax Procedure on Exhaustively Searchable Graphs (1) q If a game whose state space is small enough to be exhaustively searched, then the problem is systematically searching the space of possible moves and counter moves by the opponent.  A game of “nim” (Fig 4.13, p145, tp37)  To predict opponent’s behavior, we assume that our opponent uses the same knowledge of the state space as we use. q MAX represents the player trying to win, or to maximize the advantage. MIN is the opponent who attempts to minimize MAX’s score.

KU NLP Heuristic Search Minimax Procedure on Exhaustively Searchable Graphs (2)

KU NLP Heuristic Search Minimax Procedure on Exhaustively Searchable Graphs (3) q In implementing minimax, label each level MIN or MAX in the search space according to whose move it is at that point in the game (Fig 4.14, p146)  If the parent state is a MAX node, give it the maximum value among its children.  If the parent is a MIN node, give the minimum value of its children.  The value assigned to each state indicates the value of the best state that this player can hope to achieve.

KU NLP Heuristic Search Minimax Procedure on Exhaustively Searchable Graphs (4)

KU NLP Heuristic Search Minimaxing to Fixed Ply Depth q In applying MINIMAX to complicated games, the state space is searched to a predefined number of levels(N- move look-ahead)  The value propagated back to the root node is simply the heuristic value of the best state that can be reached in N moves. q Many game heuristics measure the advantage of one player over another.  simple heuristic take the difference in the number of pieces belonging to MAX and MIN, and try to maximize the difference.  more sophisticated strategy might assign different values to the pieces (e.g. queen, pawn, king, checker) or location on the board. q Game playing programs typically look ahead a fixed ply depth. The states on that ply are measured heuristically and the values are propagated back up the graph using MINIMAX.

KU NLP Heuristic Search41 Minimax Search (1) q One-ply search q two-ply search C A BD (8)(3)(-2) (9) C A BD EFGHIJK (-6)(0) (-2)(-4)(-3)

KU NLP Heuristic Search42 Minimax Search (2) q Two-ply search (continued) C A BD EFGHIJK (9)(-6)(0) (-2)(-4)(-3) (-4)(-2)(-6) (-2) Maximizing ply Minimizing ply

KU NLP Heuristic Search43 Minimax Search (3)

KU NLP Heuristic Search44 Minimax Procedure (1) q When a heuristic applied with a limited look-ahead, it is possible that the depth of the look-ahead may not detect that a heuristically promising path leads to a bad situation later in the game.  Horizon effect: selection of the state may cause the entire game to be lost.  Selective deepening of search : searching several plies deeper from states that look exceptionally good. q The evaluations that take place very deep in the space can be biased by their very depth. q A desirable heuristic can be one that attempts to measure the conflict in the game.  A heuristic applied to tic-tac-toe (Fig 4.16, tp45)

KU NLP Heuristic Search45 Minimax Procedure (2)

KU NLP Heuristic Search46 Minimax Procedure (3)

KU NLP Heuristic Search47 Minimax Procedure (4)

KU NLP Heuristic Search Alpha-Beta Procedure (1) q Minimax procedure is a depth-first process, its efficiency can be improved by using branch-and- bound techniques in which partial solutions that are clearly worse than known solutions can be abandoned early. q It requires the maintenance of two threshold values (alpha and beta)  one representing a lower bound on the value that a maximizing node may be assigned  one representing an upper bound on the value that a minimizing node may be assigned.

KU NLP Heuristic Search Alpha-Beta Procedure (2) q At maximizing levels, rule out a move early if it becomes clear that its value will be less than the current threshold. q At minimizing levels, search will be terminated if values that are greater than the current threshold are discovered.

KU NLP Heuristic Search Alpha-Beta Procedure (3) q An Alpha Cutoff Maximizing ply Minimizing ply A BC DEFG (  3) (3) (5)(-5) (  -5)

KU NLP Heuristic Search Alpha-Beta Procedure (4) q Alpha and Beta Cutoffs Maximizing ply Minimizing ply Maximizing ply Minimizing ply A BC DEFG (3) (5) (  0) H IJMN KL (0  ) (0) (5)

KU NLP Heuristic Search Alpha-Beta Procedure (5) q Alpha and Beta Cutoffs (continued) A BC DEFG (5) (  5) (3)(5) H IJMN KL (0  ) (0) (5) (  7) (4) (7) Maximizing ply Minimizing ply Maximizing ply Minimizing ply

KU NLP Heuristic Search Alpha-Beta Procedure (6)