Search: Cost & Heuristics

Similar documents
CS 188: Artificial Intelligence Spring 2007

Uninformed Search Lecture 4

Announcements. CS 188: Artificial Intelligence Fall Today. Reflex Agents. Goal Based Agents. Search Problems

CS 188: Artificial Intelligence Spring Announcements

Lecture 3. XML Into RDBMS. XML and Databases. Memory Representations. Memory Representations. Traversals and Pre/Post-Encoding. Memory Representations

Outline. CSE 473: Artificial Intelligence Spring Types of Agents

Announcements. CS 188: Artificial Intelligence Fall Reflex Agents. Today. Goal Based Agents. Search Problems

CS 188: Artificial Intelligence Fall Announcements

Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition

CS 188: Artificial Intelligence Fall Announcements

Common intervals of genomes. Mathieu Raffinot CNRS LIAFA

Problem solving by search

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

CS 188: Artificial Intelligence Fall 2011

Chapter 4 State-Space Planning

CSC2542 State-Space Planning

SIMPLE NONLINEAR GRAPHS

Lecture 11 Binary Decision Diagrams (BDDs)

Informed Search. Day 3 of Search. Chap. 4, Russel & Norvig. Material in part from

I 3 2 = I I 4 = 2A

DATA Search I 魏忠钰. 复旦大学大数据学院 School of Data Science, Fudan University. March 7 th, 2018

Connectivity in Graphs. CS311H: Discrete Mathematics. Graph Theory II. Example. Paths. Connectedness. Example

Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point

State Complexity of Union and Intersection of Binary Suffix-Free Languages

03. Early Greeks & Aristotle

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Informed Search. Chap. 4. Breadth First. O(Min(N,B L )) BFS. Search. have same cost BIBFS. Bi- Direction. O(Min(N,2B L/2 )) BFS. have same cost UCS

Formal Methods in Software Engineering

CS 360 Exam 2 Fall 2014 Name

10. AREAS BETWEEN CURVES

a) Read over steps (1)- (4) below and sketch the path of the cycle on a P V plot on the graph below. Label all appropriate points.

Search: The Core of Planning

Algorithm Design and Analysis

Factorising FACTORISING.

Running an NFA & the subset algorithm (NFA->DFA) CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths

Algebra 2 Semester 1 Practice Final

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of:

Lecture 6: Coding theory

On Determinisation of History-Deterministic Automata.

9.1 Day 1 Warm Up. Solve the equation = x x 2 = March 1, 2017 Geometry 9.1 The Pythagorean Theorem 1

Algorithm Design and Analysis

= x x 2 = 25 2

Module 6 Value Iteration. CS 886 Sequential Decision Making and Reinforcement Learning University of Waterloo

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

CSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4

Finite state automata

Announcements. CS 188: Artificial Intelligence Spring More Announcements. Today. From Last Time: Reflex Agents.

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

CS 188: Artificial Intelligence

The DOACROSS statement

6. Suppose lim = constant> 0. Which of the following does not hold?

2.4 Linear Inequalities and Interval Notation

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours

CS 188: Artificial Intelligence Spring Announcements

PYTHAGORAS THEOREM,TRIGONOMETRY,BEARINGS AND THREE DIMENSIONAL PROBLEMS

CIT 596 Theory of Computation 1. Graphs and Digraphs

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

GEOMETRY OF THE CIRCLE TANGENTS & SECANTS

CS 188: Artificial Intelligence Spring 2009

Data Compression Techniques (Spring 2012) Model Solutions for Exercise 4

Implication Graphs and Logic Testing

Section 1.3 Triangles

Linear Algebra Introduction

19 Optimal behavior: Game theory

Inspiration and formalism

CS 188: Artificial Intelligence Spring Announcements

Graph Theory. Simple Graph G = (V, E). V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)}

MA10207B: ANALYSIS SECOND SEMESTER OUTLINE NOTES

CS241 Week 6 Tutorial Solutions

CS 491G Combinatorial Optimization Lecture Notes

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

Review of Gaussian Quadrature method

Lumpability and Absorbing Markov Chains

Prefix-Free Regular-Expression Matching

1 Introduction to Modulo 7 Arithmetic

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

NFAs continued, Closure Properties of Regular Languages

Automatic Synthesis of New Behaviors from a Library of Available Behaviors

Deterministic Finite Automata

Momentum and Energy Review

1 nonlinear.mcd Find solution root to nonlinear algebraic equation f(x)=0. Instructor: Nam Sun Wang

8Similarity UNCORRECTED PAGE PROOFS. 8.1 Kick off with CAS 8.2 Similar objects 8.3 Linear scale factors. 8.4 Area and volume scale factors 8.

Forces on curved surfaces Buoyant force Stability of floating and submerged bodies

for all x in [a,b], then the area of the region bounded by the graphs of f and g and the vertical lines x = a and x = b is b [ ( ) ( )] A= f x g x dx

Homework 2 solutions

CS S-12 Turing Machine Modifications 1. When we added a stack to NFA to get a PDA, we increased computational power

CMSC 330: Organization of Programming Languages

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

List all of the possible rational roots of each equation. Then find all solutions (both real and imaginary) of the equation. 1.

Boolean Algebra cont. The digital abstraction

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

MAT 403 NOTES 4. f + f =

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Area and Perimeter. Area and Perimeter. Solutions. Curriculum Ready.

Minimal DFA. minimal DFA for L starting from any other

Chapter Gauss Quadrature Rule of Integration

Graph Algorithms. Vertex set = { a,b,c,d } Edge set = { {a,c}, {b,c}, {c,d}, {b,d}} Figure 1: An example for a simple graph

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example

CS 573 Automata Theory and Formal Languages

Transcription:

9/9/ CSE 7: Artiiil Intelligene Autumn 0 Pizz? Announements Serh: Cost & Heuristis Dn Wel Projet : Serh online tomorrow ue Mony 0/ ue We / Strt! With slies rom Dn Klein, Sturt Russell, Anrew Moore, Luke Zettlemoyer Serh thru Prolem Se / Stte Se Inut: Set o sttes Oertors [n osts] Strt stte Gol stte [test] Outut: Pth: strt stte stisying gol test [My reuire shortest th] [Sometimes just nee stte ssing test] Grution? Getting BS in CSE s serh rolem? (on t think too hr) Se o Sttes Oertors Initil Stte Gol Stte Serh Methos Blin serh Deth irst serh (DFS) Breth irst serh (BFS) Itertive eeening eth-irst serh (IDS) 6 Serh Methos Deth irst serh (DFS) Breth irst serh (BFS) Itertive eeening eth-irst serh (IDS) Best irst serh Uniorm ost serh (UCS) Greey serh A* Itertive Deeening A* (IDA*) Bem serh 7 Hill liming Heuristi serh

9/9/ Deth First Serh Mintin stk o noes to visit Chek th to root to rune ulites Evlution Not or ininite ses O( m ) Se Comlexity? O(m) e g h m Breth First Serh Mintin ueue o noes to visit Evlution Yes O( ) Se Comlexity? O( ) e g h Memory Limittion? Suose: GHz CPU 6 GB min memory 00 instrutions / exnsion 0 ytes / noe 00,000 exnsions / se Memory ille in 00 se < 7 min Itertive Deeening Serh DFS with limit; inrementlly grow limit Evlution Se Comlexity? Dniel S. Wel 0 Itertive Deeening Serh DFS with limit; inrementlly grow limit Evlution Se Comlexity? Itertive Deeening Serh DFS with limit; inrementlly grow limit Evlution Se Comlexity? e i g h l k j

9/9/ Itertive Deeening Serh DFS with limit; inrementlly grow limit Evlution Yes O( ) Se Comlexity? O( ) e Cost o Itertive Deeening rtio ID to DFS 5.5 0. 5.08 00.0 5 See 8 Puzzle xx Ruik s 0 6. se 5 Puzzle xx Ruik s 0 9 68k yrs Puzzle Why the ierene? Assuming 0M noes/se & suiient memory BFS Noes Time 0 5.0 se 0 6 ys 0 5 B yrs Ruik hs higher rnh tor 5 uzzle hs greter eth Mx 8x # o ulites Iter. Dee. Noes Time 0 5.0 se 0 6. se 0 7 0k yrs 0 0 57k yrs 0 7 0 yrs Slie te rom Rihr Kor resenttion START Costs on Ations 8 e 9 8 h 5 r Ojetive: Pth with smllest overll ost GOAL START Costs on Ations 8 e 9 8 h 5 GOAL r Best-First Serh Generliztion o reth-irst serh Fringe = Priority ueue o noes to e exlore Cost untion (n) lie to eh noe Wht will BFS return? ins the shortest th in terms o numer o trnsitions. It oes not in the lest-ost th. 9

9/9/.ush(key, vlue).o() Priority Queue Reresher A riority ueue is t struture in whih you n insert n retrieve (key, vlue) irs with the ollowing oertions: inserts (key, vlue) into the ueue. returns the key with the lowest vlue, n removes it rom the ueue. You n erese key s riority y ushing it gin Unlike regulr ueue, insertions ren t onstnt time, usully O(log n) We ll nee riority ueues or ost-sensitive serh methos Best-First Serh Generliztion o reth-irst serh Fringe = Priority ueue o noes to e exlore Cost untion (n) lie to eh noe A initil stte to riority ueue While ueue not emty Noe = he(ueue) I gol?(noe) then return noe A hilren o noe to ueue exning the noe Breth First = Best First with (n) = eth(n) Ol Friens Dijkstr s Algorithm (Uniorm ost) = Best First with (n) = the sum o ege osts rom strt to n Uniorm Cost Serh Best irst, where (n) = ost rom strt to n START 5 8 9 8 h e GOAL r k Dijkstr s Algorithm Exnsion orer: Uniorm Cost Serh S,,,, e,, r,, e, G S Cost ontours (not ll shown) 6 S 0 e 9 e 5 h r 7 8 G 0 G 8 e 9 h 8 r 5 h 7 r G 6 Uniorm Cost Serh Algorithm Comlete Otiml Time Se DFS BFS UCS w/ Pth Cheking C* = Otiml ost C*/ε tiers ε = Minimum ost o n tion Y i inite N O( m ) O(m) Y Y* O( ) O( ) Y* Y O( C*/ε ) O( C*/ε )

9/9/ Uniorm Cost Issues Uniorm Cost: P-Mn Rememer: exlores inresing ost ontours The goo: UCS is omlete n otiml! Cost o or eh tion Exlores ll o the sttes, ut one The : Exlores otions in every iretion No inormtion out gol lotion Strt Gol Wht is Heuristi? An estimte o how lose stte is to gol Designe or rtiulr serh rolem Wht is Heuristi? An estimte o how lose stte is to gol Designe or rtiulr serh rolem 0 5. 0 Exmles: Mnhttn istne: 0+5 = 5 Eulien istne:. 5 Atul istne to gol: ++++8= Greey Serh Best irst with (n) = heuristi estimte o istne to gol Greey Serh Exn the noe tht seems losest A strt B gol Wht n go wrong? 5

9/9/ A ommon se: Best-irst tkes you stright to (suotiml) gol Worst-se: like lyguie DFS in the worst se Cn exlore everything Cn get stuk in loos i no yle heking Like DFS in omleteness (i inite # sttes w/ yle heking) Greey Serh A* Serh Hrt, Nilsson & Rel 968 Best irst serh with (n) = g(n) + h(n) g(n) = sum o osts rom strt to n h(n) = estimte o lowest ost th n gol h(gol) = 0 I h(n) is missile n monotoni then A* is otiml Unerestimtes ost o rehing gol rom } noe { vlues inrese rom noe to esennts (tringle ineulity) A* Serh Hrt, Nilsson & Rel 968 Best irst serh with (n) = g(n) + h(n) g(n) = sum o osts rom strt to n h(n) = estimte o lowest ost th n gol h(gol) = 0 Cn view s ross-ree: g(n) ~ uniorm ost serh h(n) ~ greey serh Best o oth worls Is Mnhttn istne missile? Unerestimte? S G 6 Is Mnhttn istne monotoni? vlues inrese rom noe to hilren (tringle ineulity) Amissile? Monotoni? Eulien Distne S S G G 7 8 6

9/9/ A* Exmle A* Exmle 9 0 A* Exmle A* Exmle A* Exmle A* Exmle 7

9/9/ strt Euroen Exmle Otimlity o A* 5 en 5 6 Otimlity Continue A* Summry Pros Proues otiml ost solution! Does so uite uikly (ouse) Cons Mintins riority ueue Whih n get exonentilly ig L 7 8 8