Artificial Intelligence

Slides:



Advertisements
Similar presentations
Informed search algorithms
Advertisements

Informed Search CS 171/271 (Chapter 4)
CMSC 471 Fall 2002 Class #5-6 – Monday, September 16 / Wednesday, September 18.
Informed search algorithms
Heuristic Searches. Feedback: Tutorial 1 Describing a state. Entire state space vs. incremental development. Elimination of children. Closed and the solution.
CSM6120 Introduction to Intelligent Systems
Review: Search problem formulation
Heuristic Search. Best First Search A* Heuristic Search Heuristic search exploits additional knowledge about the problem that helps direct search to.
Informed Search Algorithms
Notes Dijstra’s Algorithm Corrected syllabus.
Heuristic Search techniques
Informed search algorithms
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal.
An Introduction to Artificial Intelligence
A* Search. 2 Tree search algorithms Basic idea: Exploration of state space by generating successors of already-explored states (a.k.a.~expanding states).
Problem Solving: Informed Search Algorithms Edmondo Trentin, DIISM.
Ch 4. Heuristic Search 4.0 Introduction(Heuristic)
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."
Greedy best-first search Use the heuristic function to rank the nodes Search strategy –Expand node with lowest h-value Greedily trying to find the least-cost.
State Space 3 Chapter 4 Heuristic Search. Three Algorithms Backtrack Depth First Breadth First All work if we have well-defined: Goal state Start state.
Solving Problem by Searching
Artificial Intelligence
Artificial Intelligence Lecture No. 7 Dr. Asad Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Mahgul Gulzai Moomal Umer Rabail Hafeez
Review: Search problem formulation
Uninformed Search Reading: Chapter 3 by today, Chapter by Wednesday, 9/12 Homework #2 will be given out on Wednesday DID YOU TURN IN YOUR SURVEY?
CS 188: Artificial Intelligence Spring 2006 Lecture 2: Queue-Based Search 8/31/2006 Dan Klein – UC Berkeley Many slides over the course adapted from either.
HEURISTIC SEARCH. Luger: Artificial Intelligence, 5 th edition. © Pearson Education Limited, 2005 Portion of the state space for tic-tac-toe.
1 Heuristic Search 4 4.0Introduction 4.1An Algorithm for Heuristic Search 4.2Admissibility, Monotonicity, and Informedness 4.3Using Heuristics in Games.
CS 561, Session 6 1 Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Informed search algorithms
George F Luger ARTIFICIAL INTELLIGENCE 6th edition Structures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial Intelligence,
Informed search strategies Idea: give the algorithm “hints” about the desirability of different states – Use an evaluation function to rank nodes and select.
CS 415 – A.I. Slide Set 6. Chapter 4 – Heuristic Search Heuristic – the study of the methods and rules of discovery and invention State Space Heuristics.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
Review: Tree search Initialize the frontier using the starting state While the frontier is not empty – Choose a frontier node to expand according to search.
For Wednesday Read chapter 6, sections 1-3 Homework: –Chapter 4, exercise 1.
Informed Search Reading: Chapter 4.5 HW #1 out today, due Sept 26th.
4/11/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 4, 4/11/2005 University of Washington, Department of Electrical Engineering Spring 2005.
Knowledge Search CPTR 314.
Search Techniques CS480/580 Fall Introduction Trees: – Root, parent, child, sibling, leaf node, node, edge – Single path from root to any node Graphs:
3.5 Informed (Heuristic) Searches This section show how an informed search strategy can find solution more efficiently than uninformed strategy. Best-first.
CSE 473: Artificial Intelligence Spring 2012 Search: Cost & Heuristics Luke Zettlemoyer Lecture adapted from Dan Klein’s slides Multiple slides from Stuart.
Artificial Intelligence Lecture No. 8 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
CPSC 420 – Artificial Intelligence Texas A & M University Lecture 5 Lecturer: Laurie webster II, M.S.S.E., M.S.E.e., M.S.BME, Ph.D., P.E.
Best-first search is a search algorithm which explores a graph by expanding the most promising node chosen according to a specified rule.
PART-2 CSC 450-AI by Asma Tabuk 1 CSC AI Informed Search Algorithms College of Computer and Information Technology Department of Computer.
For Monday Read chapter 4 exercise 1 No homework.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Review: Tree search Initialize the frontier using the starting state
AI Classnotes #5, John Shieh, 2012
Last time: Problem-Solving
Artificial Intelligence (CS 370D)
Heuristic Search A heuristic is a rule for choosing a branch in a state space search that will most likely lead to a problem solution Heuristics are used.
For Monday Chapter 6 Homework: Chapter 3, exercise 7.
Department of Computer Science
Heuristic Search Introduction to Artificial Intelligence
Artificial Intelligence Problem solving by searching CSC 361
CS 188: Artificial Intelligence Fall 2008
CS 4100 Artificial Intelligence
Informed search algorithms
Informed search algorithms
BEST FIRST SEARCH -OR Graph -A* Search -Agenda Search CSE 402
Heuristic Search Methods
Lecture 9 Administration Heuristic search, continued
HW 1: Warmup Missionaries and Cannibals
HW 1: Warmup Missionaries and Cannibals
Informed Search.
Presentation transcript:

Artificial Intelligence Lecture : Heuristic Search-I Ghulam Irtaza Sheikh– Dept CS-BZU Adapted from original course material & others

Today Hill-climbing Heuristic search algorithm Heuristic Evaluation Function

Heuristic “A commonsense rule (or set of rules) intended to increase the probability of solving some problem”

Heuristics Rules for choosing paths in a state space that most likely lead to an acceptable problem solution Purpose Reduce the search space Reasons May not have exact solutions, need approximations Computational cost is too high Fallible

First three levels of the tic-tac-toe state space reduced by symmetry

The “most wins” heuristic applied to the first children in tic-tac-toe

Heuristically reduced state space for tic-tac-toe

Today Hill-climbing Heuristic search algorithm Heuristic Evaluation Function

Hill-Climbing Analog Principle Problem Go uphill along the steepest possible path until no farther up Principle Expand the current state of the search and evaluate its children Select the best child, ignore its siblings and parent No history for backtracking Problem Local maxima – not the best solution

The local maximum problem for hill-climbing with 3-level look ahead Insert fig 4.4

Today Hill-climbing Heuristic search algorithm Heuristic Evaluation Function

The Best-First Search Also heuristic search – use heuristic (evaluation) function to select the best state to explore Can be implemented with a priority queue Breadth-first implemented with a queue Depth-first implemented with a stack

Best-First Search

Best-First / Greedy Search Expand the node that seems closest… What can go wrong?

Best-First / Greedy Search A common case: Best-first takes you straight to the goal on a wrong path Worst-case: like a badly-guided DFS in the worst case Can explore everything Can get stuck in loops if no cycle checking Like DFS in completeness (finite states w/ cycle checking) b … b …

Best First Search What do we need to do to make it complete? Algorithm Complete Optimal Time Space Greedy Best-First Search Y* N O(bm) O(bm) b … m What do we need to do to make it complete? Can we make it optimal?

The best-first search algorithm

Heuristic search of a hypothetical state space

A trace of the execution of best-first-search

Heuristic search of a hypothetical state space with open and closed states highlighted

Today Hill-climbing Heuristic search algorithm Heuristic Evaluation Function

Heuristic Evaluation Function Heuristics can be evaluated in different ways 8-puzzle problem Heuristic 1: count the tiles out of places compared with the goal state Heuristic 2: sum all the distances by which the tiles are out of pace, one for each square a tile must be moved to reach its position in the goal state Heuristic 3: multiply a small number (say, 2) times each direct tile reversal (where two adjacent tiles must be exchanged to be in the order of the goal)

The start state, first moves, and goal state for an example-8 puzzle Insert fig 4.12

Three heuristics applied to states in the 8-puzzle

Heuristic Design Use the limited information available in a single state to make intelligent choices Must be its actual performance on problem instances The solution path consists of two parts: from the starting state to the current state, and from the current state to the goal state The first part can be evaluated using the known information The second part must be estimated using unknown information The total evaluation can be f(n) = g(n) + h(n) g(n) – from the starting state to the current state n h(n) – from the current state n to the goal state

The heuristic f applied to states in the 8-puzzle Insert fig 4.15

State space generated in heuristic search of the 8-puzzle graph Insert fig 4.16

The successive stages of open and closed that generate the graph are:

Open and closed as they appear after the 3rd iteration of heuristic search

Heuristic Design Summary f(n) is computed as the sum of g(n) and h(n) g(n) is the depth of n in the search space and has the search more of a breadth-first flavor. h(n) is the heuristic estimate of the distance from n to a goal The h value guides search toward heuristically promising states The g value grows to determine h and force search back to a shorter path, and thus prevents search from persisting indefinitely on a fruitless path