1 Heuristic Search 4 4.0Introduction 4.1An Algorithm for Heuristic Search 4.2Admissibility, Monotonicity, and Informedness 4.3Using Heuristics in Games.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 2 - Search.
Heuristic Search. Best First Search A* Heuristic Search Heuristic search exploits additional knowledge about the problem that helps direct search to.
State Space Heuristic Search. Three Algorithms  Backtrack  Depth First  Breadth First All work if we have well-defined:  Goal state  Start state.
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.
Artificial Intelligence Chapter 9 Heuristic Search Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
1 Heuristic Search Chapter 4. 2 Outline Heuristic function Greedy Best-first search Admissible heuristic and A* Properties of A* Algorithm IDA*
Artificial Intelligence
Search in AI.
HEURISTIC SEARCH ARTIFICIAL INTELLIGENCE 5th edition George F Luger
Mahgul Gulzai Moomal Umer Rabail Hafeez
Review: Search problem formulation
Structures and Strategies for State Space Search
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)
1 Heuristic Search 4 4.0Introduction 4.1An Algorithm for Heuristic Search 4.2Admissibility, Monotonicity, and Informedness 4.3Using Heuristics in Games.
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?
Problem Solving and Search in AI Heuristic Search
1 Heuristic Search 4 4.0Introduction 4.1An Algorithm for Heuristic Search 4.2Admissibility, Monotonicity, and Informedness 4.3Using Heuristics in Games.
Monotonicity Admissible Search: “That finds the shortest path to the Goal” Monotonicity: local admissibility is called MONOTONICITY This property ensures.
HEURISTIC SEARCH. Luger: Artificial Intelligence, 5 th edition. © Pearson Education Limited, 2005 Portion of the state space for tic-tac-toe.
1 Structures and Strategies for State Space Search 3 3.0Introduction 3.1Graph Theory 3.2Strategies for State Space Search 3.3Using the State Space to Represent.
Heuristic Search Heuristic - a “rule of thumb” used to help guide search often, something learned experientially and recalled when needed Heuristic Function.
3.0 State Space Representation of Problems 3.1 Graphs 3.2 Formulating Search Problems 3.3 The 8-Puzzle as an example 3.4 State Space Representation using.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 5: Monotonicity 13 th Jan, 2011.
Chapter 4 Search in State Spaces Xiu-jun GONG (Ph. D) School of Computer Science and Technology, Tianjin University
Heuristic Search In addition to depth-first search, breadth-first search, bound depth-first search, and iterative deepening, we can also use informed or.
CS 344 Artificial Intelligence By Prof: Pushpak Bhattacharya Class on 15/Jan/2007.
George F Luger ARTIFICIAL INTELLIGENCE 5th edition Structures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial Intelligence,
George F Luger ARTIFICIAL INTELLIGENCE 6th edition Structures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial Intelligence,
Informed Search Methods. Informed Search  Uninformed searches  easy  but very inefficient in most cases of huge search tree  Informed searches  uses.
Informed Search Strategies Lecture # 8 & 9. Outline 2 Best-first search Greedy best-first search A * search Heuristics.
Search exploring the consequences of possible actions.
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.
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.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
CS344: Introduction to Artificial Intelligence (associated lab: CS386)
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.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 3 - Search.
Informed Search Reading: Chapter 4.5 HW #1 out today, due Sept 26th.
Informed Search and Heuristics Chapter 3.5~7. Outline Best-first search Greedy best-first search A * search Heuristics.
State space representations and search strategies - 2 Spring 2007, Juris Vīksna.
Knowledge Search CPTR 314.
George F Luger ARTIFICIAL INTELLIGENCE 5th edition Structures and Strategies for Complex Problem Solving HEURISTIC SEARCH Luger: Artificial Intelligence,
HEURISTIC SEARCH 4 4.0Introduction 4.1An Algorithm for Heuristic Search 4.2Admissibility, Monotonicity, and Informedness 4.3Using Heuristics in Games 4.4Complexity.
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 17– Theorems in A* (admissibility, Better performance.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 3: Search, A*
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.
Chapter 3.5 Heuristic Search. Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
Review: Tree search Initialize the frontier using the starting state
AI Classnotes #5, John Shieh, 2012
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.
Heuristic Search Introduction to Artificial Intelligence
Chapter 10.1 Binary Search Trees
Artificial Intelligence Chapter 9 Heuristic Search
4 Heuristic Search 4.0 Introduction
(1) Breadth-First Search  S Queue S
HW 1: Warmup Missionaries and Cannibals
More advanced aspects of search
HW 1: Warmup Missionaries and Cannibals
Reading: Chapter 4.5 HW#2 out today, due Oct 5th
Informed Search.
“If I Only had a Brain” Search
Presentation transcript:

1 Heuristic Search 4 4.0Introduction 4.1An Algorithm for Heuristic Search 4.2Admissibility, Monotonicity, and Informedness 4.3Using Heuristics in Games 4.4Complexity Issues 4.5Epilogue and References 4.6Exercises

2 Chapter Objectives Learn the basics of heuristic search in a state space. Learn the basic properties of heuristics: admissability, monotonicity, informedness. Learn the basics of searching for two-person games: minimax algorithm and alpha-beta procedure. The agent model: Has a problem, searches for a solution, has some “heuristics” to speed up the search.

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

4 The “most wins” heuristic

5 Heuristically reduced state space for tic- tac-toe

6 Heuristic search of a hypothetical state space (Fig. 4.4) node The heuristic value of the node

7 Take the DFS algorithm Function depth_first_search; begin open := [Start]; closed := [ ]; while open  [ ] do begin remove leftmost state from open, call it X; if X is a goal then return SUCCESS else begin generate children of X; put X on closed; discard remaining children of X if already on open or closed put remaining children on left end of open end end; return FAIL end.

8 Add the children to OPEN with respect to their heuristic value Function best_first_search; begin open := [Start]; closed := [ ]; while open  [ ] do begin remove leftmost state from open, call it X; if X is a goal then return SUCCESS else begin generate children of X; assign each child their heuristic value; put X on closed; (discard remaining children of X if already on open or closed) put remaining children on open sort open by heuristic merit (best leftmost) end end; return FAIL end. new will be handled differently

9 Now handle those nodes already on OPEN or CLOSED... generate children of X; for each child of X do case the child is not on open or closed: begin assign the child a heuristic value; add the child to open end; the child is already on open: if the child was reached by a shorter path then give the state on open the shorter path the child is already on closed: if the child was reached by a shorter path then begin remove the child from closed; add the child to open end; end; put X on closed; re-order states on open by heuristic merit (best leftmost) end;...

The full algorithm Function best_first_search; begin open := [Start]; closed := [ ]; while open  [ ] do begin remove leftmost state from open, call it X; if X is a goal then return SUCCESS else begin generate children of X; for each child of X do case the child is not on open or closed: begin assign the child a heuristic value; add the child to open end; the child is already on open: if the child was reached by a shorter path then give the state on open the shorter path the child is already on closed: if the child was reached by a shorter path then begin remove the child from closed; add the child to open end; end; put X on closed; re-order states on open by heuristic merit (best leftmost) end; return FAIL end.

11 Heuristic search of a hypothetical state space

12 A trace of the execution of best_first_search for Fig. 4.4

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

14 What is in a “heuristics?” f(n) = g(n) + h(n) The heuristic value of node n The actual cost of node n (from the root to n) The estimated cost of achieving the goal (from node n to the goal)

15 An 8-puzzle instance

16 Three heuristics applied to states

17 The heuristic f applied to states in the 8- puzzle

18 The successive stages of OPEN and CLOSED

21

22 Monotonicity A heuristic function h is monotone if 1. For all states n i and n J, where n J is a descendant of n i, h(n i ) - h(n J )  cost (n i, n J ), where cost (n i, n J ) is the actual cost (in number of moves) of going from state n i to n J. 2. The heuristic evaluation of the goal state is zero, or h(Goal) = 0.

23 Informedness For two A* heuristics h 1 and h 2, if h 1 (n)  h 2 (n), for all states n in the search space, heuristic h 2 is said to be more informed than h 1.