Presentation is loading. Please wait.

Presentation is loading. Please wait.

PART-2 CSC 450-AI by Asma Tabuk 1 CSC 450 - AI Informed Search Algorithms College of Computer and Information Technology Department of Computer.

Similar presentations


Presentation on theme: "PART-2 CSC 450-AI by Asma Tabuk 1 CSC 450 - AI Informed Search Algorithms College of Computer and Information Technology Department of Computer."— Presentation transcript:

1 PART-2 CSC 450-AI by Asma Kausar@UT, Tabuk 1 CSC 450 - AI Informed Search Algorithms College of Computer and Information Technology Department of Computer Science

2 Key Terms CSC 450-AI by Asma Kausar@UT, Tabuk 2 Asymptotic Notation  The O() notation gives us what is called Asymptotic Analysis. NP  Non deterministic Polynomial  NP-Complete  Complete means most extreme  Hardest problems in the class NP Toy Problem – e.g. Vaccum Cleaner World  Intended to illustrate or exercise various problem-solving methods.  It can be given a concise, exact description and hence is usable by different researchers to compare the performance of algorithms. Real Life Problem – e.g. Chess  one whose solutions people actually care about.  Such problems tend not to have a single agreed-upon description, but we can give the general flavor of their formulations.

3 HEURISTICS  From Greek heuriskein, “to find”.  Of or relating to a usually speculative formulation serving as a guide in the investigation or solution of a problem.  Computer Science: Relating to or using a problem-solving technique in which the most appropriate solution, of several found by alternative methods, is selected at successive stages of a program for use in the next step of the program. 3 CSC 450-AI by Asma Kausar@UT, Tabuk

4 HEURISTIC SEARCH Introduction: Al problem solvers employ heuristics in two situations:- – First: A problem may not have an exact solution, because of inherent ambiguities in the problem statement or available data. Medical diagnosis is an example of this. A given set of symptoms may have several possible causes. Doctors use heuristics to chose the most likely diagnosis and formulate a plan of treatment. 4 CSC 450-AI by Asma Kausar@UT, Tabuk

5 HEURISTIC SEARCH Introduction : Al problem solvers employ heuristics in two situations:- – First: A problem may not have an exact solution, because of inherent ambiguities in the problem statement or available data. Vision is another example of an inherently inexact problem. Visual scenes are often ambiguous, allowing multiple interpretations of the connectedness, extent and orientation of objects. 5 CSC 450-AI by Asma Kausar@UT, Tabuk

6 HEURISTIC SEARCH Introduction: ALL problem solvers employ heuristics in two situations:- – First: A problem may not have an exact solution, because of inherent ambiguities in the problem statement or available data. Optical illusions exemplify these ambiguities. Vision systems use heuristics to select the most likely of several possible interpretations of a given scene. 6 CSC 450-AI by Asma Kausar@UT, Tabuk

7 HEURISTIC SEARCH Introduction: Al problem solvers employ heuristics in two situations:- – Second: A problem may have an exact solution, but the computational cost of finding it may be prohibitive. In many problems, state space growth is combinatorially explosive, with the number of possible states increasing exponentially or factorially with the depth of the search. 7 CSC 450-AI by Asma Kausar@UT, Tabuk

8 HEURISTIC SEARCH Introduction: Al problem solvers employ heuristics in two situations:- – Second: A problem may have an exact solution, but the computational cost of finding it may be prohibitive. Heuristic search handles above problem by guiding the search along the most “promising” path through the space. 8 CSC 450-AI by Asma Kausar@UT, Tabuk

9 HEURISTIC SEARCH Introduction: Al problem solvers employ heuristics in two situations:- – Second: A problem may have an exact solution, but the computational cost of finding it may be prohibitive. By eliminating unpromising states and their descendants from consideration, a heuristic algorithm can defeat this combinatorial explosion and find an acceptable solution. 9 CSC 450-AI by Asma Kausar@UT, Tabuk

10 HEURISTIC SEARCH Introduction: Heuristics and the design of algorithms to implement heuristic search have been an important part of artificial intelligence research. Game playing and theorem proving require heuristics to reduce search space to simplify the solution finding. 10 CSC 450-AI by Asma Kausar@UT, Tabuk

11 HEURISTIC SEARCH Introduction: Heuristics are fallible. – A heuristics is only an informed guess of the next step to be taken in solving a problem. It is often based on experience or intuition. – Heuristics use limited information, such as the descriptions of the states currently on the OPEN List. 11 CSC 450-AI by Asma Kausar@UT, Tabuk

12 HEURISTIC SEARCH Introduction: Heuristics are fallible. – Heuristics are seldom able to predict the exact behavior of the state space farther along in the search. – A heuristics can lead a search algorithm to a sub optimal solutions. – At times a heuristic method may fail to find any solution at all. 12 CSC 450-AI by Asma Kausar@UT, Tabuk

13 ALGORITHM FOR HEURISTICS SEARCH Best-First-Search (Revision) Best first search uses lists to maintain states:  OPEN LIST to keep track of the current fringe of the search.  CLOSED LIST to record states already visited. Algorithm orders the states on OPEN according to some heuristics estimate of their closeness to a goal. 13 CSC 450-AI by Asma Kausar@UT, Tabuk

14 ALGORITHM FOR HEURISTICS SEARCH Best-First-Search Each iteration of the loop consider the most promising state on the OPEN list. Example algorithm sorts and rearrange OPEN in precedence of lowest heuristics value. 14 CSC 450-AI by Asma Kausar@UT, Tabuk

15 BEST-FIRST-SEARCH 15

16 BEST-FIRST-SEARCH A HYPOTHETICAL SEARCH SPACE 16 CSC 450-AI by Asma Kausar@UT, Tabuk

17 BEST-FIRST-SEARCH TRACES OF OPEN AND CLOSED LISTS 17 CSC 450-AI by Asma Kausar@UT, Tabuk

18 Heuristic search of a hypothetical state space with OPEN and CLOSED states highlighted. BEST-FIRST-SEARCH 18 CSC 450-AI by Asma Kausar@UT, Tabuk

19 BEST-FIRST-SEARCH The goal of best–first search is to find the goal state by looking at as few states as possible: the more informed the heuristic, the fewer states are processed in finding the goal. The best-first search algorithm always selects the most promising states on OPEN for further expansion. It does not abandon all the other states but maintains them on OPEN. 19 CSC 450-AI by Asma Kausar@UT, Tabuk

20 BEST-FIRST-SEARCH In the event when a heuristic leads the search down a path that proves incorrect, the algorithm will eventually retrieve some previously generated next best state from OPEN and shift its focus to another part of the space. In the example after the children of state B were found to have poor heuristic evaluations, the search shifted its focus to state C. In best-first-search the OPEN list allows backtracking from paths that fail to produce a goal. 20 CSC 450-AI by Asma Kausar@UT, Tabuk

21 Admissible heuristics 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 Example: h SLD (n) (never overestimates the actual road distance) Theorem: If h(n) is admissible, A * using TREE-SEARCH is optimal 21 CSC 450-AI by Asma Kausar@UT, Tabuk

22 Properties of A* Complete? Yes (unless there are infinitely many nodes with f ≤ f(G) ) Time? Exponential Space? Keeps all nodes in memory Optimal? Yes 22 CSC 450-AI by Asma Kausar@UT, Tabuk

23 Admissible heuristics E.g., for the 8-puzzle: h 1 (n) = number of misplaced tiles h 2 (n) = total Manhattan distance (i.e., no. of squares from desired location of each tile) h 1 (S) = ? h 2 (S) = ? 23 CSC 450-AI by Asma Kausar@UT, Tabuk

24 Admissible heuristics E.g., for the 8-puzzle: h 1 (n) = number of misplaced tiles h 2 (n) = total Manhattan distance (i.e., no. of squares from desired location of each tile) h 1 (S) = ? 8 h 2 (S) = ? 3+1+2+2+2+3+3+2 = 18 24 CSC 450-AI by Asma Kausar@UT, Tabuk

25 Relaxed problems A problem with fewer restrictions on the actions is called a relaxed problem The cost of an optimal solution to a relaxed problem is an admissible heuristic for the original problem 25 CSC 450-AI by Asma Kausar@UT, Tabuk


Download ppt "PART-2 CSC 450-AI by Asma Tabuk 1 CSC 450 - AI Informed Search Algorithms College of Computer and Information Technology Department of Computer."

Similar presentations


Ads by Google