Princess Nora University Faculty of Computer & Information Systems ARTIFICIAL INTELLIGENCE (CS 370D) Computer Science Department

Similar documents
Artificial Intelligence. Informed search methods

Introduction to Artificial Intelligence. Informed Search

CS:4420 Artificial Intelligence

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

COMP9414/ 9814/ 3411: Artificial Intelligence. 5. Informed Search. Russell & Norvig, Chapter 3. UNSW c Alan Blair,

Informed search algorithms

Artificial Intelligence, CS, Nanjing University Spring, 2018, Yang Yu. Lecture 3: Search 2.

Informed search algorithms

COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

Introduction to Artificial Intelligence (G51IAI)

Informed search algorithms. Chapter 4, Sections 1 2 1

COMP219: Artificial Intelligence. Lecture 10: Heuristic Search

PROBLEM SOLVING AND SEARCH IN ARTIFICIAL INTELLIGENCE

Artificial Intelligence: Search Part 2: Heuristic search

CS414-Artificial Intelligence

Informed search algorithms

Informed Search and Exploration

COSC343: Artificial Intelligence

Solving Problems using Search

Informed Search and Exploration

Artificial Intelligence

Problem solving and search

Outline. Informed search algorithms. Best-first search. Review: Tree search. A search Heuristics. Chapter 4, Sections 1 2 4

Informed Search Algorithms. Chapter 4

Informed Search and Exploration

Searching and NetLogo

Planning, Execution & Learning 1. Heuristic Search Planning

TDT4136 Logic and Reasoning Systems

Robot Programming with Lisp

Lecture Plan. Best-first search Greedy search A* search Designing heuristics. Hill-climbing. 1 Informed search strategies. Informed strategies

Informed Search. Topics. Review: Tree Search. What is Informed Search? Best-First Search

Informed search methods

Foundations of Artificial Intelligence

Artificial Intelligence CS 6364

Informed Search and Exploration

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

Problem solving and search

Automated Planning & Artificial Intelligence

Solving Problems by Searching. Artificial Intelligence Santa Clara University 2016

Graphs vs trees up front; use grid too; discuss for BFS, DFS, IDS, UCS Cut back on A* optimality detail; a bit more on importance of heuristics,

Foundations of Artificial Intelligence

Outline. Best-first search

Artificial Intelligence

Artificial Intelligence

Outline. Best-first search

Solving Problems by Searching

CS486/686 Lecture Slides (c) 2015 P.Poupart

4. Solving Problems by Searching

CS486/686 Lecture Slides (c) 2014 P.Poupart

Artificial Intelligence

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

Informed (heuristic) search (cont). Constraint-satisfaction search.

Week 3: Path Search. COMP9414/ 9814/ 3411: Artificial Intelligence. Motivation. Example: Romania. Romania Street Map. Russell & Norvig, Chapter 3.

AGENTS AND ENVIRONMENTS. What is AI in reality?

Summary. Search CSL302 - ARTIFICIAL INTELLIGENCE 1

Problem solving and search

Problem Solving and Search. Geraint A. Wiggins Professor of Computational Creativity Department of Computer Science Vrije Universiteit Brussel

Foundations of Artificial Intelligence

Chapter 3 Solving Problems by Searching Informed (heuristic) search strategies More on heuristics

Algorithm. December 7, Shortest path using A Algorithm. Phaneendhar Reddy Vanam. Introduction. History. Components of A.

Outline for today s lecture. Informed Search I. One issue: How to search backwards? Very briefly: Bidirectional search. Outline for today s lecture

Informed Search. Dr. Richard J. Povinelli. Copyright Richard J. Povinelli Page 1

16.1 Introduction. Foundations of Artificial Intelligence Introduction Greedy Best-first Search 16.3 A Weighted A. 16.

CS 771 Artificial Intelligence. Informed Search

AGENTS AND ENVIRONMENTS. What is AI in reality?

Solving problems by searching

Solving Problems by Searching

Solving Problems by Searching

DFS. Depth-limited Search

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

Part I. Instructor: Dr. Wei Ding. Uninformed Search Strategies can find solutions to problems by. Informed Search Strategies

CS 4700: Foundations of Artificial Intelligence

Informatics 2D: Tutorial 2 (Solutions)

Lars Schmidt-Thieme, Information Systems and Machine Learning Lab (ISMLL), University of Hildesheim, Germany, Course on Artificial Intelligence,

PEAS: Medical diagnosis system

Clustering (Un-supervised Learning)

Artificial Intelligence

Ar#ficial)Intelligence!!

CS-E4800 Artificial Intelligence

CS 380: Artificial Intelligence Lecture #4

CS 4700: Foundations of Artificial Intelligence

CS 5100: Founda.ons of Ar.ficial Intelligence

Contents. Foundations of Artificial Intelligence. General Algorithm. Best-First Search

Informed Search (Ch )

Informed search algorithms

Informed search algorithms. Chapter 4

Informed search algorithms

Optimal Control and Dynamic Programming

Artificial Intelligence

S A E RC R H C I H NG N G IN N S T S A T T A E E G R G A R PH P S

Informed Search Algorithms

Informed search algorithms. Chapter 4

Problem Solving and Search

ARTIFICIAL INTELLIGENCE. Informed search

Route planning / Search Movement Group behavior Decision making

Informed search algorithms. (Based on slides by Oren Etzioni, Stuart Russell)

Artificial Intelligence. 2. Informed Search

Artificial Intelligence, CS, Nanjing University Spring, 2018, Yang Yu. Lecture 2: Search 1.

Search. Intelligent agents. Problem-solving. Problem-solving agents. Road map of Romania. The components of a problem. that will take me to the goal!

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

Transcription:

Princess Nora University Faculty of Computer & Information Systems ARTIFICIAL INTELLIGENCE (CS 370D) Computer Science Department

(CHAPTER-3-PART3) PROBLEM SOLVING AND SEARCH

Searching algorithm Uninformed Search Algorithms( Blind Search) 3.1 Breadth first Search 3.2 Depth First Search 3.3 Depth limited Search 3.4 Iterative Deeping Search 3. 5 Bidirectional Search Informed Search (Heuristic Search) 3 3 Best First Search Greedy Search Perfect Information Search A* Search Iterative Deepening A* Search A* with PathMax

informed Search Algorithms (Heuristic Search) 1. Best First Search 2. Greedy Search 3. Perfect Information Search 4. A* Search 5. Iterative Deepening A* Search 6. A* with PathMax 4 4

Uninformed versus Informed Uninformed search does not have any additional information on the quality of states. So, it is impossible to determine which state is the better than others. As a result, search efficiency depends only on the structure of a state space 5 Informed search heuristically informed search uses a certain kind of information about states in order to guide search along promising branches within a state space. Using problem specific knowledge as hints to guide the search.

Uninformed versus Informed (cont) Uninformed search look for solutions by systematically generating new states and checking each of them against the goal. 1. It is very inefficient in most cases. 2. Most successor states are obviously a bad choice. 3. Such strategies do not use problem-specific knowledge 6 Informed search 1. They are almost always more efficient than uninformed strategies. 2. May reduce time and space complexities. 3. Evaluation function f(n) measures distance to the goal. 4. Order nodes in Frontier according to f(n) and decide which node to expand next.

Informed search & Exploration Modified version from blind search algorithm 1. Greedy best first search 2. A* and its relatives The family of local search includes methods 1. inspired by statistical physics [simulated annealing ] 2. evolutionary biology [genetic algorithms] 3. online search [in which agent is faced with state space 7 7 that is completely unknown]

Informed search & Exploration Best first search Main idea: use an evaluation function f(n) for each node Implementation: o Order the nodes in Frontier in decreasing order of desirability (from low f(n) which means high desirability to high f(n) which means low desirability. ) 8 o There is a whole family of best-first search strategies, each with a different evaluation function. Special cases: Greedy best-first search. A* search. 8

Best-first search Algorithm 1-greedy best first search Tries to expand the node that is closest to the goal o Use straight line distance ex : hsld(in(arad))=366 [note that the values of fn hsld cannot be computed from the problem description itself] 9 9

Greedy Search Example 1 Straight line distances between cities which are additionally provided 10 10

11

The greedy best first search using hsld finds a solution without ever expanding a node that is not on solution path, hence its cost is minimal This show why the algorithm is called greedy [at each step it tries to get as close to goal as it can] 12 12

Greedy Search Example 2 Straight line distances between cities which are additionally provided 13 13

Consider the problem of getting from Iasi to Fagras The heuristic suggests that Neamt be expanded first because it is closest to Fagaras but it is like dead end The solution is to go first to Vaslui a step that is actually farther from the goal according to the heuristic & then continue to Urzicent, Bucharest and Fagaras. In this case, then heuristic causes unnecessary needs to be expanded 14 Greedy best first search Resembles depth first search in the way it prefers to follow a single path all the way to goal but it will back up when it hits a dead end It is not optimal (greedy) and incomplete (because of backtracking) 14

Best-first search Algorithm 2-A* best first search Main idea: avoid expanding paths that are already expensive. Minimizing the total estimated solution cost It evaluate a node by F(n) = g(n) + h(n) Cost so far to reach n Estimated Cost to get from n to goal 15 Path cost is g and heuristic function is h f(state) = g(state) + h(state) Choose smallest overall path cost (known + estimate) 15

A* Straight Search Line Distances to Bucharest Example Town SLD Arad 366 Bucharest 0 Craiova 160 Dobreta 242 Eforie 161 Fagaras 178 Giurgiu 77 Hirsova 151 Iasi 226 Lugoj 244 Town SLD Mehadai 241 Neamt 234 Oradea 380 Pitesti 98 Rimnicu 193 Sibiu 253 Timisoara 329 Urziceni 80 Vaslui 199 Zerind 374 16 We can use straight line distances as an admissible heuristic as they will never overestimate the cost to the goal. This is because there is no shorter distance between two cities than the straight line distance. Press space to continue with the slideshow. 16

A* Search Example 17 17

A* Search Example 18 18

A* Search Example 19 19

Properties of A* Complete? Yes Time? Exponential Space? Keeps all nodes in memory Optimal? Yes 20

Examples 21

Shortest paths Find a shortest path from v 0 to v 3??? Can the greedy method solve this problem??? The shortest path: 1 + 2 + 4 = 7. 22 22

Shortest paths on a multi-stage graph Find a shortest path from v 0 to v 3 in the multi-stage graph. Greedy method: v 0 v 1,2 v 2,1 v 3 = 23 Optimal: v 0 v 1,1 v 2,2 v 3 = 7 The greedy method does not work. 23

Admissible heuristics (accepted evaluation function) E.g., for the 8-puzzle: h 1 (n) = number of misplaced tiles[tiles in wrong places) h 2 (n) = total Manhattan distance [how many moves to reach right place] (i.e., no. of squares from desired location of each tile) h 1 (S) =? h 2 (S) =? 24 Start state Goal state

Admissible heuristics (accepted evaluation function) E.g., for the 8-puzzle: h 1 (n) = number of misplaced tiles[tiles in wrong places) h 2 (n) = total Manhattan distance [how many moves to reach right place] (i.e., no. of squares from desired location of each tile) h 1 (S) = 8 h 2 (S) =? 25

Admissible heuristics (accepted evaluation function) E.g., for the 8-puzzle: h 1 (n) = number of misplaced tiles[tiles in wrong places) h 2 (n) = total Manhattan distance [how many moves to reach right place] (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 26

Dominance (which is better) If h 2 (n) h 1 (n) for all n (both admissible) then h 2 dominates h 1 h 2 is better for search Typical search costs (average number of nodes expanded): d=12 IDS = 3,644,035 nodes A * (h 1 ) = 227 nodes A * (h 2 ) = 73 nodes d=24 IDS = too many nodes A * (h 1 ) = 39,135 nodes A * (h 2 ) = 1,641 nodes 27

Thank you End of Chapter 3-Part3 28