Artificial Intelligence (part 4d)

Similar documents
Artificial Intelligence (part 4d)

HEURISTIC SEARCH. 4.3 Using Heuristics in Games 4.4 Complexity Issues 4.5 Epilogue and References 4.6 Exercises

Monotonicity. Admissible Search: That finds the shortest path to the Goal. Monotonicity: local admissibility is called MONOTONICITY

Introduction HEURISTIC SEARCH. Introduction. Heuristics. Two main concerns of AI researchers. Two problems with the search process

Artificial Intelligence (part 4c) Strategies for State Space Search. (Informed..Heuristic search)

Artificial Intelligence

Artificial Intelligence CS 6364

HEURISTIC SEARCH. 4.3 Using Heuristics in Games 4.4 Complexity Issues 4.5 Epilogue and References 4.6 Exercises

Algorithm Design Techniques (III)

Search and Optimization

Parallel Programming. Parallel algorithms Combinatorial Search

State Space Search. Many problems can be represented as a set of states and a set of rules of how one state is transformed to another.

Searching: Where it all begins...

Downloaded from ioenotes.edu.np

Downloded from: CSITauthority.blogspot.com

Chapters 3-5 Problem Solving using Search

Data Structures and Algorithms

Algorithm Design Techniques. Hwansoo Han

ITCS 6150 Intelligent Systems. Lecture 5 Informed Searches

Informed Search Methods

STRUCTURES AND STRATEGIES FOR STATE SPACE SEARCH

Efficient memory-bounded search methods

Potential Midterm Exam Questions

University of Waterloo Department of Electrical and Computer Engineering ECE 457A: Cooperative and Adaptive Algorithms Midterm Examination

Informed/Heuristic Search

Review Adversarial (Game) Search ( ) Review Constraint Satisfaction ( ) Please review your quizzes and old CS-271 tests

Chapter 3: Informed Search and Exploration. Dr. Daisy Tang

Artificial Intelligence. Game trees. Two-player zero-sum game. Goals for the lecture. Blai Bonet

Search. Search Trees

CPSC 436D Video Game Programming

CS 771 Artificial Intelligence. Informed Search

Alpha-Beta Pruning in Mini-Max Algorithm An Optimized Approach for a Connect-4 Game

Heuristic Optimisation

A.I.: Informed Search Algorithms. Chapter III: Part Deux

Lecture 4: Informed/Heuristic Search

AI: Week 2. Tom Henderson. Fall 2014 CS 5300

The wolf sheep cabbage problem. Search. Terminology. Solution. Finite state acceptor / state space

3 SOLVING PROBLEMS BY SEARCHING

Midterm Examination CS 540-2: Introduction to Artificial Intelligence

CS 188: Artificial Intelligence. Recap Search I

Informed search strategies (Section ) Source: Fotolia

APHID: Asynchronous Parallel Game-Tree Search

HW#1 due today. HW#2 due Monday, 9/09/13, in class Continue reading Chapter 3

Informed (Heuristic) Search. Idea: be smart about what paths to try.

HEURISTIC SEARCH. Heuristics: Rules for choosing the branches in a state space that are most likely to lead to an acceptable problem solution.

Uninformed Search Methods. Informed Search Methods. Midterm Exam 3/13/18. Thursday, March 15, 7:30 9:30 p.m. room 125 Ag Hall

Heuristic (Informed) Search

Artificial Intelligence

tree follows. Game Trees

CSCI-630 Foundations of Intelligent Systems Fall 2015, Prof. Zanibbi

Informed Search. CS 486/686 University of Waterloo May 10. cs486/686 Lecture Slides 2005 (c) K. Larson and P. Poupart

CIS 192: Artificial Intelligence. Search and Constraint Satisfaction Alex Frias Nov. 30 th

Chapter 2 Classical algorithms in Search and Relaxation

3.6.2 Generating admissible heuristics from relaxed problems

Lecture 4: Search 3. Victor R. Lesser. CMPSCI 683 Fall 2010

Informed search. Soleymani. CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2016

Finding optimal configurations Adversarial search

Mustafa Jarrar: Lecture Notes on Artificial Intelligence Birzeit University, Chapter 3 Informed Searching. Mustafa Jarrar. University of Birzeit

Outline. Best-first search

Artificial Intelligence Informed search. Peter Antal

Heuristic Optimisation

Search & Planning. Jeremy L Wyatt

SRI VIDYA COLLEGE OF ENGINEERING & TECHNOLOGY REPRESENTATION OF KNOWLEDGE PART A

mywbut.com Informed Search Strategies-I

Multiple Agents. Why can t we all just get along? (Rodney King) CS 3793/5233 Artificial Intelligence Multiple Agents 1

CS 540: Introduction to Artificial Intelligence

Informed Search. CS 486/686: Introduction to Artificial Intelligence Fall 2013

Articial Intelligence Search Algorithms. Richard E. Korf. University of California, Los Angeles. Los Angeles, Ca

1 Tree Search (12 points)

INTRODUCTION TO HEURISTIC SEARCH

Review Agents ( ) Review State Space Search

CS 520: Introduction to Artificial Intelligence. Lectures on Search

Outline. Best-first search

CSCI 4150: Intro. to Artificial Intelligence Midterm Examination

Advanced A* Improvements

Artificial Intelligence

Dr. Mustafa Jarrar. Chapter 4 Informed Searching. Artificial Intelligence. Sina Institute, University of Birzeit

1 Introduction and Examples

Artificial Intelligence (part 4a) Problem Solving Using Search: Structures and Strategies for State Space Search

CSC384: Intro to Artificial Intelligence Game Tree Search II. Midterm: Everything covered so far plus this lecture slides.

Midterm Examination CS540-2: Introduction to Artificial Intelligence

M-ary Search Tree. B-Trees. B-Trees. Solution: B-Trees. B-Tree: Example. B-Tree Properties. Maximum branching factor of M Complete tree has height =

CS 331: Artificial Intelligence Informed Search. Informed Search

Overview. Path Cost Function. Real Life Problems. COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

Informed Search and Exploration for Agents

CSC384 Midterm Sample Questions

COMP9414: Artificial Intelligence Informed Search

COMP9414: Artificial Intelligence Informed Search

CSE 473. Chapter 4 Informed Search. CSE AI Faculty. Last Time. Blind Search BFS UC-BFS DFS DLS Iterative Deepening Bidirectional Search

Solving Problems by Searching

Informed Search A* Algorithm

M-ary Search Tree. B-Trees. Solution: B-Trees. B-Tree: Example. B-Tree Properties. B-Trees (4.7 in Weiss)

Informed Search. Best-first search. Greedy best-first search. Intelligent Systems and HCI D7023E. Romania with step costs in km

Solving Problems by Searching

Structures and Strategies For Space State Search

CS 331: Artificial Intelligence Informed Search. Informed Search

Search. CS 3793/5233 Artificial Intelligence Search 1

Introduction to Spring 2007 Artificial Intelligence Midterm Solutions

Heuristic (Informed) Search

Artificial Intelligence

Transcription:

Artificial Intelligence (part 4d) BEHAVIOR OF HEURISTICS EVALUATIONS (USING HEURISTICS IN GAMES)

HEURISTICS EVALUATIONS: (Admissibility,Monotonicity and Informedness) Admissibility Measures A search is admissible if it is guaranteed to find a minimal path to a solution whenever such a path exists Recall f(n) = g(n) + h(n) estimates the total cost of path from start state through n to the goal state start g(n) n f(n)=total cost h(n) goal

Admissibility A heuristic h(n) is admissible if for every node n, h(n) h * (n), where h * (n) is the true cost to reach the goal state from n. An admissible heuristic never overestimates the cost to reach the goal, i.e., it is optimistic. eg. In 8-puzzle, heuristic of counting # of tiles out of place certainly # of moves required to move to the goal, hence this heuristic is admissible. Best_First_Search + evaluation function Algorithm A If h(n) <= h(n)*(cost of minimal path) Algorithm A* Therefore, All A* algorithms are ADMISSIBLE.

State space generated in heuristic search of the 8-puzzle graph. f(n)=g(n)+h(n) g(n)=actual dist. From n to start h(n)=no. of tiles in wrong position Full best-firstsearch of 8 puzzle

Monotonicity Consistently find the minimal path to each state encountered in the search. For best-first-search with monotonic heuristic, allows any state rediscovered to be dropped immediately without updating open and closed because heuristics always find shortest path the first time the state is visited. Monotone heuristic h is A*and admissible

Informed Heuristics eg. Compare the heuristics proposed for solving the 8-puzzle h1=> breadth-first-search with heuristic h1(x)=0 for all states x h2=> #of tiles out of place h1<= h2 <= h*, h2 is more informed and evaluates many fewer states The more informed an A* algorithm, the less of the space it needs to expand to get the optimal solution

Comparison of state space searched using heuristic search with space searched by breadth-first search. The portion of the graph searched heuristically is shaded. The optimal solution path is in bold. Heuristic used is f(n) = g(n) + h(n) where h(n) is tiles out of place.

Heuristics in Games Game player must use heuristics to guide play along a path to a winning state Eg. game nim, player divide tokens into 2 piles of different size; eg. 6 token => 1-5,2-4 NOT 3-3

State space for a variant of nim. Each state partitions the seven matches into one or more piles.

Heuristics in Games-MINIMAX procedure Predicting opponent s behavior, use MINIMAX procedure to search the game space Rules of MINIMAX: If parent state =MAX, give max value among children If parent state=min, give min value of its children Win for MAX (node=1), Win for MIN (node=0)

Exhaustive minimax for the game of nim. Bold lines indicate forced win for MAX. Each node is marked with its derived value (0 or 1) under minimax. Leaf with parent MIN forced to 0 Leaf with parent MAX forced to 1 Leaf with parent MIN forced to 0

Minimaxing to fixed Ply depth In complicated games, it is impossible to expand the state graph out to leaf nodes. Instead, state space is searched to predefined number of levels, called n-ply-look-ahead. Look-ahead allow the heuristic to be applied over greater area of space. How? States on that ply are measured heuristically, the values are propagated back up using minimax, Search algo uses these values to select possible next moves

Minimax to a hypothetical state space. Leaf states show heuristic values; internal states show backed-up values. If parent =MIN,assign min value of its children If parent =MAX,assign max value of its children Heuristic values

Figure 4.16: Heuristic measuring conflict applied to states of tic-tac-toe.

FIXED FLY DEPTH:Two-ply minimax applied to the opening move of tic-tac-toe, from Nilsson (1971). Step1:expand the tree Step2:calculate heuristic for level n Step3:derived values for n- 1(propogate values back-up)

Figure 4.18: Two-ply minimax and one of two possible MAX second moves, from Nilsson (1971). Step4:choose best move for MAX Repeat step1-step3

Figure 4.19: Two-ply minimax applied to X s move near the end of the game, from Nilsson (1971). Forced win for MIN -inf Step..N:choose best move for MAX Repeat all steps until MAX WIN

Alpha-beta pruning To improve search efficiency in two-person games (compared to minimax that always pursues all branches in state space) Alpha-beta search in depth-first fashion Alpha(α) and beta(β) values are created α associates with MAX-never decrease β associates with MIN-never increase How? Expand to full-ply Apply heuristic evaluation to a state and its siblings Back-up to the parent The value is offered to grantparent as a potential α or β cutoff

Alpha-beta pruning Two rules to stop alpha-beta searching: For MIN node, if β <= α of MAX ancestor For MAX node, if α >= β of MIN ancestors Alpha-beta pruning :- expresses relation between nodes at ply n and ply n+2 under which entire subtrees rooted at level n+1 can be eliminated(pruned) from consideration Alpha-beta pruning can effectively double the depth of search tree with same constraint of space and time-search in only one pass, with mimimax twopass.

Alpha-beta pruning applied to hypothetical state space. States without numbers are not evaluated. Depthfirst fashion Example 1

Alpha-beta pruning : example 2

Number of nodes generated as a function of branching factor, for various lengths, L, of solution paths. The relating equation is: T = B(BL - 1)/(B - 1), adapted from Nilsson (1980). Branching factor-to calculate complexity Total states at depth n Analysis: if the Branching factor is 2, it takes search of 100 states to examine all paths six levels deep into search space. And it takes about 10,000 states to consider paths 12 move deep.

Figure 4.22: Informal plot of cost of searching and cost of computing heuristic evaluation against informedness of heuristic, adapted from Nilsson (1980).