AI: A Modern Approach, Chpts. 3-4 Russell and Norvig



Similar documents
Informed search algorithms. Chapter 4, Sections 1 2 1

Problem solving and search

Measuring the Performance of an Agent

CS MidTerm Exam 4/1/2004 Name: KEY. Page Max Score Total 139

An Introduction to The A* Algorithm

Near Optimal Solutions

Search methods motivation 1

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

CMPSCI611: Approximating MAX-CUT Lecture 20

Approximation Algorithms

6.852: Distributed Algorithms Fall, Class 2

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

A Note on Maximum Independent Sets in Rectangle Intersection Graphs

Guessing Game: NP-Complete?

SOLVING PROBLEMS BY SEARCHING

Chapter 6. Decoding. Statistical Machine Translation

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Why? A central concept in Computer Science. Algorithms are ubiquitous.

Cost Model: Work, Span and Parallelism. 1 The RAM model for sequential computation:

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 313]

Branch-and-Price Approach to the Vehicle Routing Problem with Time Windows

Chapter 2: Intelligent Agents

Chapter Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

Chapter 3. if 2 a i then location: = i. Page 40

Offline sorting buffers on Line

Applied Algorithm Design Lecture 5

8.1 Min Degree Spanning Tree

Dynamic programming. Doctoral course Optimization on graphs - Lecture 4.1. Giovanni Righini. January 17 th, 2013

Teaching Introductory Artificial Intelligence with Pac-Man

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

Regular Expressions and Automata using Haskell

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Lecture 4 Online and streaming algorithms for clustering

SIMS 255 Foundations of Software Design. Complexity and NP-completeness

Incremental Routing Algorithms For Dynamic Transportation Networks

Analysis of Micromouse Maze Solving Algorithms

Social Media Mining. Graph Essentials

Efficiency of algorithms. Algorithms. Efficiency of algorithms. Binary search and linear search. Best, worst and average case.

- Easy to insert & delete in O(1) time - Don t need to estimate total memory needed. - Hard to search in less than O(n) time

Cpt S 223. School of EECS, WSU

Smart Graphics: Methoden 3 Suche, Constraints

CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) Total 92.

Graph/Network Visualization

Binary Number System. 16. Binary Numbers. Base 10 digits: Base 2 digits: 0 1

cs171 HW 1 - Solutions

Lecture 6 Online and streaming algorithms for clustering

Scheduling Single Machine Scheduling. Tim Nieberg

Vector storage and access; algorithms in GIS. This is lecture 6

Complete Solution of the Eight-Puzzle and the Benefit of Node Ordering in IDA*

Lecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method

Notes from Week 1: Algorithms for sequential prediction

Binary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( B-S-T) are of the form. P parent. Key. Satellite data L R

Dynamic Programming. Lecture Overview Introduction

THE APPLICATION OF ARTIFICIAL INTELLIGENCE TO SOLVE A PHYSICAL PUZZLE. Dana Cremer

14.1 Rent-or-buy problem

Game playing. Chapter 6. Chapter 6 1

Review D: Potential Energy and the Conservation of Mechanical Energy

INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING & TECHNOLOGY (IJCET)

Week_11: Network Models

Chapter 2 Intelligent Agents

Chapter 11 Monte Carlo Simulation

Home Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit

Single machine models: Maximum Lateness -12- Approximation ratio for EDD for problem 1 r j,d j < 0 L max. structure of a schedule Q...

SUPPLY CHAIN OPTIMIZATION MODELS IN THE AREA OF OPERATION

Algorithms are the threads that tie together most of the subfields of computer science.

Regression Verification: Status Report

Kenken For Teachers. Tom Davis June 27, Abstract

Scheduling Home Health Care with Separating Benders Cuts in Decision Diagrams

Vector and Matrix Norms

Random Map Generator v1.0 User s Guide

Survey On: Nearest Neighbour Search With Keywords In Spatial Databases

9th Max-Planck Advanced Course on the Foundations of Computer Science (ADFOCS) Primal-Dual Algorithms for Online Optimization: Lecture 1

Introduction to Artificial Intelligence. Intelligent Agents

DEVELOPMENT OF A VULNERABILITY ASSESSMENT CODE FOR A PHYSICAL PROTECTION SYSTEM: SYSTEMATIC ANALYSIS OF PHYSICAL PROTECTION EFFECTIVENESS (SAPE)

Data Structures. Chapter 8

Introduction to LAN/WAN. Network Layer

Euclidean Minimum Spanning Trees Based on Well Separated Pair Decompositions Chaojun Li. Advised by: Dave Mount. May 22, 2014

The Goldberg Rao Algorithm for the Maximum Flow Problem

Classification - Examples

Chapter 13: Binary and Mixed-Integer Programming

Introduction to Scheduling Theory

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

A Working Knowledge of Computational Complexity for an Optimizer

Learning to Search More Efficiently from Experience: A Multi-Heuristic Approach

11. APPROXIMATION ALGORITHMS

Network File Storage with Graceful Performance Degradation

10.2 Series and Convergence

Clustering UE 141 Spring 2013

CS/COE

Quiz for Chapter 1 Computer Abstractions and Technology 3.10

Lecture 18: Applications of Dynamic Programming Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY

6.080/6.089 GITCS Feb 12, Lecture 3

Transcription:

AI: A Modern Approach, Chpts. 3-4 Russell and Norvig Sequential Decision Making in Robotics CS 599 Geoffrey Hollinger and Gaurav Sukhatme (Some slide content from Stuart Russell and HweeTou Ng) Spring, 2010 1

2 Decision Making Problem

Problem types Deterministic, fully observable Agent knows exactly which state it will be in solution is a sequence Non-observable Agent may have no idea where it is solution (if any) is a sequence Partially observable observations provide new information about current state solution is a contingent plan or a policy often interleave search, execution Unknown state space exploration problem 3

Vacuum world Observable, start in #5. [Right; Suck] Non-observable, start in: {1;2;3; 4;5;6;7;8} e.g., Right goes to {2;4;6;8} [Right; Suck; Left; Suck] Partially observable, start in #5, suck can dirty a clean carpet, local sensing only [Right; if dirt then Suck] Possible actions: left, right, suck 4

Vacuum world state space 5 States: Successor function: Actions: Goal test: Path cost:

Vacuum world state space 6 States: cross product of dirtiness and robot locations Successor function: Left/Right changes location, suck changes dirtiness Actions: Left, Right, Suck, NoOp Goal test: no dirt Path cost: 1 per action (0 for NoOp)

7 Non-observable vacuum world

8-puzzle state space 8 States: State transition Actions: Goal test: Path cost:

[Note: optimal solution of n-puzzle family is NP-hard] 8-puzzle state space 9 States: integer locations of tiles (ignore intermediate positions) State transitions: tile locations change Actions: move tile left, right, up, down Goal test: goal state (given) Path cost: 1 per move

Basic tree search algorithm Basic idea: offline, simulated exploration of state space by generating successors of already-explored states (a.k.a. expanding states) 10

Search strategies A strategy is defined by picking the order of node expansion 11 Strategies are evaluated along the following dimensions: Completeness: does it always find a solution if one exists? Time complexity: number of nodes generated/expanded Space complexity: maximum number of nodes in memory Optimality: does it always find a least-cost solution? Time and space complexity are measured in terms of b: maximum branching factor of the search tree d: depth of the least-cost solution m:maximum depth of the state space (may be 1) For instance, a strategy might have time or space complexity O(bd) or O(b d )

Uninformed search strategies Breadth-first search Uniform-cost search Depth-first search Depth-limited search Iterative deepening search b = branching factor d = solution depth l = depth limit m = max tree depth C* = cost of optimal ε = min action cost 12

Avoiding repeated states Key idea: Maintaining a closed list can be exponentially more efficient 13

Best-first search Idea: use an evaluation function for each node estimate of desirability Expand most desirable unexpanded node Implementation: fringe is a queue sorted in decreasing order of desirability Special cases: Greedy search A* search 14

Map of Romania Straight line distances provide estimate of cost to goal 15

Greedy search Evaluation function h(n) (heuristic) estimate of cost from n to the closest goal E.g., h SLD (n) = straight-line distance from n to Bucharest Greedy search expands the node that appears to be closest to goal 176 253 16

Greedy search Complete: No Can get stuck in loops Complete in finite space with repeated-state checking Time: O(b m ) but better with a good heuristic Space: O(b m ) keeps all nodes in memory Optimal: No 17

A* search Idea: avoid expanding paths that are already expensive Evaluation function f(n) = g(n) + h(n) g(n) = cost so far to reach n h(n) = estimated cost to goal from n f(n) = estimated total cost of path through n to goal A* search uses an admissible heuristic i.e., h(n) h*(n) where h*(n) is the true cost from n. (Also require h(n) 0, so h(g) = 0 for any goal G.) e.g., h SLD (n) never overestimates the actual road distance One dirty trick Inflating the heuristic 18

A* example 393=140+253 413=220+193 417=317+100 19

A* Optimality proof Suppose some suboptimal goal G 2 has been generated and is in the queue. Let n be an unexpanded node on a shortest path to an optimal goal G. f(g 2 ) = g(g 2 ) since h(g 2 ) = 0 g(g 2 ) > g(g) since G 2 is suboptimal f(g) = g(g) since h(g) = 0 f(g 2 ) > f(g) from above h(n) h*(n) since h is admissible g(n) + h(n) g(n) + h * (n) f(n) f(g) 20 Hence f(g 2 ) > f(n), and A * will not have selected G 2 for expansion

A* Optimality proof Complete: Yes unless there are infinitely many nodes with f f(g) Time: Exponential in [relative error in h * length of soln.] Space: Keeps all nodes in memory Optimal: Yes A* expands all nodes with f(n) < C A* expands some nodes with f(n) = C A* expands no nodes with f(n) > C 21

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) 22 If h 2 (n) h 1 (n) for all n (both admissible) then h 2 dominates h 1 and is better for search Given any admissible heuristics h a, h b, h(n) = max(h a (n); h b (n)), is also admissible and dominates h a, h b

Which heuristics are admissible? Consider an 8-connected grid Euclidean distance to goal Manhattan distance to goal Euclidean distance divided by 2 Euclidean distance times 2 Distance to goal along optimal path Which heuristics dominate? 23

Relaxed problems Admissible heuristics can be derived from the exact solution cost of a relaxed version of the problem If the rules of the 8-puzzle are relaxed so that a tile can move anywhere then h 1 (n) gives the shortest solution If the rules are relaxed so that a tile can move to any adjacent square then h 2 (n) gives the shortest solution Key point: the optimal solution cost of a relaxed problem is no greater than the optimal solution cost of the real problem 24

Relaxed version of TSP Well-known example: travelling salesperson problem (TSP) Find the shortest tour visiting all cities exactly once Minimum spanning tree can be computed in O(n 2 ) and is a lower bound on the shortest (open) tour This also leads to a factor 2 approximation algorithm (much more on this later) 25

Fun questions Iterative deepening A* with a zero heuristic reduces to? A* with a zero heuristic and uniform costs reduces to? 26

Important things to understand Completeness Optimality Time/space complexity State and action spaces State transitions Full, partial, and non-observability Informed/admissible heuristics Relaxed problems To look up if you don t understand: Complexity classes (NP-hard, etc.) 27