Homework #3 (Search) Out: 1/24/11 Due: 2/1/11 (at noon)

Similar documents
Homework #6 (Constraint Satisfaction, Non-Deterministic Uncertainty and Adversarial Search) Out: 2/21/11 Due: 2/29/11 (at noon)

Heuristic (Informed) Search

Heuristic (Informed) Search

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

Chapter S:V. V. Formal Properties of A*

Are We Smart Yet? (Where we try to choose smartly) R&N: Chap. 4, Sect

CS171 Introduction to Computer Science II. Graphs

Motion Planning for a Point Robot (2/2) Point Robot on a Grid. Planning requires models. Point Robot on a Grid 1/18/2012.

Informed Search Algorithms

Assignment 1 is out! Due: 9 Sep 23:59! Can work in a group of 2-3 students.! NO cheating!!!! Submit in turnitin! Code + report!

Module 11. Directed Graphs. Contents

CS 5522: Artificial Intelligence II

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

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

1 Introduction and Examples

CS 3114 Data Structures and Algorithms Test 1 READ THIS NOW!

Informed search algorithms. Chapter 4

MC302 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/13 68 points + 6 extra credit points

CS 3114 Data Structures and Algorithms READ THIS NOW!

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

CS 380/480 Foundations of Artificial Intelligence Winter 2007 Assignment 2 Solutions to Selected Problems

CS 540-1: Introduction to Artificial Intelligence

Can work in a group of at most 3 students.! Can work individually! If you work in a group of 2 or 3 students,!

ARTIFICIAL INTELLIGENCE. Informed search

Advanced A* Improvements

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

Informed search strategies (Section ) Source: Fotolia

mywbut.com Informed Search Strategies-I

Motion Planning, Part IV Graph Search Part II. Howie Choset

Informed Search and Exploration for Agents

Informed/Heuristic Search

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

CS 495 & 540: Problem Set 1

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

Exercise 1. D-ary Tree

2006/2007 Intelligent Systems 1. Intelligent Systems. Prof. dr. Paul De Bra Technische Universiteit Eindhoven

Informed search algorithms. Chapter 4

2. CONNECTIVITY Connectivity

(Refer Slide Time: 02.06)

Artificial Intelligence

a b c d a b c d e 5 e 7

Final Exam. Introduction to Artificial Intelligence. CS 188 Spring 2010 INSTRUCTIONS. You have 3 hours.

Announcements. CS 188: Artificial Intelligence Fall 2010

Midterm Examination CS 540-2: Introduction to Artificial Intelligence

CSE 40171: Artificial Intelligence. Informed Search: A* Search

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

CSE Winter 2015 Quiz 1 Solutions

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

Path Planning. Marcello Restelli. Dipartimento di Elettronica e Informazione Politecnico di Milano tel:

TDDC17. Intuitions behind heuristic search. Recall Uniform-Cost Search. Best-First Search. f(n) =... + h(n) g(n) = cost of path from root node to n

Final Exam Spring 2003

6.034 Quiz 1, Spring 2004 Solutions

521495A: Artificial Intelligence

Spring 2007 Midterm Exam

Math Summer 2012

4 INFORMED SEARCH AND EXPLORATION. 4.1 Heuristic Search Strategies

Homework #2 Posted: February 8 Due: February 15

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

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. (Based on slides by Oren Etzioni, Stuart Russell)

ˆ The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

CS 331: Artificial Intelligence Informed Search. Informed Search

3 SOLVING PROBLEMS BY SEARCHING

A* optimality proof, cycle checking

Problem Solving and Search

CS261: Problem Set #1

CS-171, Intro to A.I. Mid-term Exam Winter Quarter, 2014

4 Search Problem formulation (23 points)

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

Chapter 3: Paths and Cycles

Search in discrete and continuous spaces

Solving Problems by Searching (Blindly)

Heuristic Search. Rob Platt Northeastern University. Some images and slides are used from: AIMA

Problem Solving: Informed Search

Search: Advanced Topics and Conclusion

CS 380: Artificial Intelligence Lecture #4

CS 188 Introduction to Artificial Intelligence Fall 2018 Note 1

This should prevent residual sexism, racism, favoritism lurking in the unconscious of your professor & TA from biasing grading!!

Artificial Intelligence

Informed Search A* Algorithm

A4B36ZUI - Introduction ARTIFICIAL INTELLIGENCE

Artificial Intelligence

U.C. Berkeley CS170 : Algorithms, Fall 2013 Midterm 1 Professor: Satish Rao October 10, Midterm 1 Solutions

Week 4 Lecture Notes Part 1 Blind Search cont. and Informed Search

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

CS 331: Artificial Intelligence Informed Search. Informed Search

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

Problem Pts Score Grader Problem Pts Score Grader

Informed search algorithms

CS264: Homework #1. Due by midnight on Thursday, January 19, 2017

Part II. Graph Theory. Year

Introduction to Artificial Intelligence Midterm 1. CS 188 Spring You have approximately 2 hours.

Artificial Intelligence

Pathfinding. Artificial Intelligence for gaming

CS 4700: Foundations of Artificial Intelligence

Artificial Intelligence

CS 188: Artificial Intelligence Fall 2008

Announcements. CS 188: Artificial Intelligence Fall Large Scale: Problems with A* What is Search For? Example: N-Queens

CPS 170: Artificial Intelligence Search

CSC384 Midterm Sample Questions

Transcription:

CS121 Introduction to Artificial Intelligence Winter 2011 Homework #3 (Search) Out: 1/24/11 Due: 2/1/11 (at noon) How to complete this HW: First copy this file; then type your answers in the file immediately below each question; start each question on a separate page, write your name on every page. Finally, print this file and return it in the drawer marked CS121 of a file cabinet located in the entryway of the Gates building next to office Gates 182 (see red arrow in http://ai.stanford.edu/~latombe/cs121/2011/map.jpg) no later than Tuesday 2/1 at noon. Your name: Your email address: Note on Honor Code: You must NOT look at previously published solutions of any of these problems in preparing your answers. You may discuss these problems with other students in the class (in fact, you are encouraged to do so) and/or look into other documents (books, web sites), with the exception of published solutions, without taking any written or electronic notes. If you have discussed any of the problems with other students, indicate their name(s) here: Any intentional transgression of these rules will be considered an honor code violation. General information: Justify your answers, but keep explanations short and to the point. Excessive verbosity will be penalized. If you have any doubt on how to interpret a question, tell us in advance, so that we can help you understand the question, or tell us how you understand it in your returned solution. Grading: Problem# Max. grade Your grade I 25 II 25 III 25 IV 25 Total 100

I. Business travel in California (25 points) You are given a road map of California in the form of a graph in which each node is a city and each edge represents a road between two cities. The graph is such that every two nodes are connected by a path made of one or several consecutive edges. Each edge (i,j) is labeled by the length l(i,j) of the road between cities i and j. The two pairs (i,j) and (j,i) designate the same edge; in other words, edges are non-directed. Any two cities connected by an edge in the map are said to be adjacent. Two business persons A and B start from two different cities of the map, respectively a and b. They want to meet in a city of the map (any one) to discuss a new business project. To achieve this goal, they move in successive steps. At each step, both A and B start moving at the same time and each must move from some city i to an adjacent city j. Neither A nor B can stay in the same city. We assume that both A and B move at unit velocity. So, the amount of time to move from city i to neighboring city j is equal to the length l(i,j) of the road between the two cities. Since A and B do not usually travel the same distance, at the end of each step, they may not reach their respective new cities at the same time. The person that arrives first to his/her new city must wait until the other arrives to his/her new city (each one calls the other on his/her cell phone when he/she arrives to a new city) before the next step can begin. Under the above conditions, the two business persons want to meet as quickly as possible. Recall that their goal is to meet in a city of the map (any one), but not anywhere on a road. 1. Formulate this problem as a state-space search problem: a) What is the state space? b) What are the initial and the goal states? c) What is the successor function? d) What is the cost function for an arc? 2. Let D(i,j) be the straight-line distance between any two cities i and j in the map. Assume that D is known for each pair of cities. Using D, define the most informed monotone admissible heuristic function h for the search problem you have defined in question 1. 3. Build a road map with n > 1 cities (where n is arbitrary) satisfying the description of the first paragraph of this problem such that no solution exists for certain pairs of initial cities a and b. Note that the first paragraph says: The graph is such that every two nodes are connected by a path made of one or several consecutive edges.

II. Best-First Search (25 points) Consider the search problem defined by the following search graph in which I is the initial state and G is the only goal state. The cost of each arc is indicated beside each arc. The table of the right gives the values of 4 heuristic functions h i, i = 0, 1, 2, and 3. 1. Which of the heuristics shown in the table are admissible? Which ones are consistent? No need to justify your answers. 2. Let us assume that use best-first search with the evaluation function f i (N) = g(n) + h i (N) and that the search algorithm tests if a node is a goal node when it expands this node. What sequence of states (connecting I to G) would be returned by the algorithm using each of the heuristics? Assume that when several nodes in the fringe share the same minimum value of f i, then the algorithm expands the nodes in alphabetic order of their states.

III. Robot on a grid (25 points) A robot moves from vertices to vertices in the unbounded regular 2D grid shown in Figure 1. The initial position of the robot is the vertex (0,0) marked with a black dot. At each step the robot can move from its current position by a unit increment up, down, left, or right. The goal is for the robot to move to some given grid vertex (x,y). Figure 1: A portion of the grid used in Problem II 1. How many distinct positions can the robot reach in k > 0 steps that it could not reach in less than k steps? (i) 4 k (ii) 4k (iii) 4k 2 2. Let n = x + y. How many nodes, at most, does breadth-first search without revisited-state checking expand before terminating? [You must explain your answer.] (i) ((4 n+1 1)/3) 1 (ii) 4n 2 1 (iii) 2n(n+1) 1 3. Let n = x + y. How many nodes, at most, does breadth-first search with revisited-state checking expand before terminating? [You must explain your answer.] (i) ((4 n+1 1)/3) (ii) 4n 2 (iii) 2n(n+1) 4. Is h(n) = u x + v y a consistent heuristic, where (u,v) is the state of node N? Why? 5. Does A* with revisited-state checking using h expands O( x + y ) nodes before terminating? 6. Does the heuristic h defined above remain consistent if some links in the grid are removed? 7. Does h remain consistent if some links are added?

IV. Approximately optimal search (25 points) The two objectives of (1) finding a solution as quickly as possible and (2) finding an optimal solution are often conflicting. In some problems, one may design two heuristic functions h A and h N, such that h A is admissible and h N is not admissible, with h N resulting in much faster search most of the time. Then, one may try to take advantage of both functions. Let f(n) = g(n) + h A (N), where g(n) is the cost of a path from the initial node to node N. Let A ε * search be defined as follows. Like A*, it runs the SEARCH#2 algorithm, hence it terminates when the node selected for expansion is a goal node. Also, like A* (since h A is only known to be admissible), A ε * does not try to detect if states are re-visited. However, unlike A*, at each expansion step, A ε * expands a node N (any one) such that f(n ) (1+ε) min N FRINGE {f(n)}, where ε is any strictly positive number. In other words, if N is the node in the fringe that has the smallest value of f, then A ε * expands a node N that such that f(n) f(n ) (1+ε) f(n). 1. Prove that A ε * terminates whenever a solution exists. 2. What can you say about the cost of the solution returned by A ε *? [Hint: Prove that the cost of the path found by is only slightly greater than the cost of the optimal path.] 3. Explain briefly how A ε * can use the second heuristic function h N to reduce the time of the search. What tradeoff is being made in choosing ε? [Hint: What are the advantages and drawbacks of increasing the value of e?]