Searching: Deterministic single-agent

Similar documents
A search problem. Formalizing a search problem. Our Search Problem. Our Search Problem. Overview

CS 188: Artificial Intelligence Fall Announcements

CS 188: Artificial Intelligence Spring Announcements

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

CS 188: Artificial Intelligence Fall Announcements

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

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

CS 188: Artificial Intelligence Spring 2009

Outline. CSE 473: Artificial Intelligence Spring Types of Agents

CS 188: Artificial Intelligence Fall 2011

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Spring Announcements

Today. CS 232: Ar)ficial Intelligence. Search. Agents that Plan. September 3 rd, 2015 Search Problems. Uninformed Search Methods

CS 188: Artificial Intelligence

Reminder. CS 188: Artificial Intelligence. A reflex agent for pacman. Reflex Agent. A reflex agent for pacman (3) A reflex agent for pacman (2)

CSE 573: Artificial Intelligence Autumn Search thru a. Goal Based Agents 9/28/2012. Agent vs. Environment. Example: N Queens

Announcements. CS 188: Artificial Intelligence Fall Office hours, Section. Today. DFS and BFS. Recap: Search. Lecture 3: A* Search 9/3/2009

Exam 2 Solutions. Jonathan Turner 4/2/2012. CS 542 Advanced Data Structures and Algorithms

Self-Adjusting Top Trees

Course Logistics Textbook: Artificial Intelligence: A Modern Approach, Russell and Norvig (3 rd ed) Topics

T h e C S E T I P r o j e c t

10.3 The Quadratic Formula

Announcements. CS 188: Artificial Intelligence. Costs on Actions. Recap: Search. Lecture 3: A* Search

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely

CS 103 BFS Alorithm. Mark Redekopp

P a g e 3 6 of R e p o r t P B 4 / 0 9

Weighted Graphs. Weighted graphs may be either directed or undirected.

Tangram Fractions Overview: Students will analyze standard and nonstandard

Easy Steps to build a part number... Tri-Start Series III CF P

Problem solving by search

d e c b a d c b a d e c b a a c a d c c e b

P a g e 5 1 of R e p o r t P B 4 / 0 9

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V

CSE 373: AVL trees. Warmup: Warmup. Interlude: Exploring the balance invariant. AVL Trees: Invariants. AVL tree invariants review

Lecture 20: Minimum Spanning Trees (CLRS 23)

OpenMx Matrices and Operators

16.unified Introduction to Computers and Programming. SOLUTIONS to Examination 4/30/04 9:05am - 10:00am

CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp

Using the Printable Sticker Function. Using the Edit Screen. Computer. Tablet. ScanNCutCanvas

Who is this Great Team? Nickname. Strangest Gift/Friend. Hometown. Best Teacher. Hobby. Travel Destination. 8 G People, Places & Possibilities

KEB INVERTER L1 L2 L3 FLC - RELAY 1 COMMON I1 - APPROACH CLOSE 0V - DIGITAL COMMON FLA - RELAY 1 N.O. AN1+ - ANALOG 1 (+) CRF - +10V OUTPUT

Spanning Trees. BFS, DFS spanning tree Minimum spanning tree. March 28, 2018 Cinda Heeren / Geoffrey Tien 1

Series III, TV Breakaway Fail-Safe Connectors Quick-Disconnect with an Axial Pull of Lanyard

Trade Patterns, Production networks, and Trade and employment in the Asia-US region

Chapter 6 Perturbation theory

Classical Theory of Fourier Series : Demystified and Generalised VIVEK V. RANE. The Institute of Science, 15, Madam Cama Road, Mumbai

1 Introduction to Modulo 7 Arithmetic

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura

Math 166 Week in Review 2 Sections 1.1b, 1.2, 1.3, & 1.4

4.1 Interval Scheduling. Chapter 4. Greedy Algorithms. Interval Scheduling: Greedy Algorithms. Interval Scheduling. Interval scheduling.

Language Processors F29LP2, Lecture 5

(Minimum) Spanning Trees

Planar Upward Drawings

ENGO 431 Analytical Photogrammetry

CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018

Convergence tests for the cluster DFT calculations

NUCON NRNON CONRNC ON CURRN RN N CHNOOGY, 011 oo uul o w ul x ol volv y y oll. y ov,., - o lo ll vy ul o Mo l u v ul (G) v Gl vlu oll. u 3- [11]. 000

176 5 t h Fl oo r. 337 P o ly me r Ma te ri al s

Paths. Connectivity. Euler and Hamilton Paths. Planar graphs.

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

The University of Sydney MATH 2009

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes.

L...,,...lllM" l)-""" Si_...,...

Stable Matching for Spectrum Market with Guaranteed Minimum Requirement

( ) ( ) ( ) 0. Conservation of Energy & Poynting Theorem. From Maxwell s equations we have. M t. From above it can be shown (HW)

LWC 434 East First Street 4440 Garwood Place

Problem 1. Solution: = show that for a constant number of particles: c and V. a) Using the definitions of P

Appendix. In the absence of default risk, the benefit of the tax shield due to debt financing by the firm is 1 C E C

COMP 250. Lecture 29. graph traversal. Nov. 15/16, 2017

Functions and Graphs 1. (a) (b) (c) (f) (e) (d) 2. (a) (b) (c) (d)

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS

Nefertiti. Echoes of. Regal components evoke visions of the past MULTIPLE STITCHES. designed by Helena Tang-Lim

Housing Market Monitor

Beechwood Music Department Staff

The local orthonormal basis set (r,θ,φ) is related to the Cartesian system by:

Solutions for HW11. Exercise 34. (a) Use the recurrence relation t(g) = t(g e) + t(g/e) to count the number of spanning trees of v 1

learning objectives learn what graphs are in mathematical terms learn how to represent graphs in computers learn about typical graph algorithms

PLAYGROUND SALE Take up to 40% off. Plus FREE equipment * with select purchase DETAILS INSIDE

Ash Wednesday. First Introit thing. * Dómi- nos. di- di- nos, tú- ré- spi- Ps. ne. Dó- mi- Sál- vum. intra-vé-runt. Gló- ri-

Improving Union. Implementation. Union-by-size Code. Union-by-Size Find Analysis. Path Compression! Improving Find find(e)

Three Phase Asymmetrical Load Flow for Four-Wire Distribution Networks

7 ACM FOR FRAME 2SET 6 FRAME 2SET 5 ACM FOR MAIN FRAME 2SET 4 MAIN FRAME 2SET 3 POLE ASSLY 1 2 CROWN STRUCTURE ASSLY 1 1 CROWN ASSLY 1

Multicast routing algorithm based on Extended Simulated Annealing Algorithm

A L A BA M A L A W R E V IE W

C-Curves. An alternative to the use of hyperbolic decline curves S E R A F I M. Prepared by: Serafim Ltd. P. +44 (0)

Planar convex hulls (I)

b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s?

5/1/2018. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees

SOUTH. Bus Map. From 25 October travelsouthyorkshire.com/sbp

Search: Cost & Heuristics

I N A C O M P L E X W O R L D

Econ 401A Three extra questions John Riley. Homework 3 Due Tuesday, Nov 28

What are S M U s? SMU = Software Maintenance Upgrade Software patch del iv ery u nit wh ich once ins tal l ed and activ ated prov ides a point-fix for

DUET WITH DIAMONDS COLOR SHIFTING BRACELET By Leslie Rogalski

Grade 7/8 Math Circles March 4/5, Graph Theory I- Solutions

Pythagorean Theorem and Trigonometry

sin sin 1 d r d Ae r 2

Chapter 5: Quantization of Radiation in Cavities and Free Space

Depth First Search. Yufei Tao. Department of Computer Science and Engineering Chinese University of Hong Kong

F102 1/4 AMP +240 VDC SEE FIGURE 5-14 FILAMENT AND OVEN CKTS BLU J811 BREAK-IN TB103 TO S103 TRANSMITTER ASSOCIATED CAL OFF FUNCTION NOTE 2 STANDBY

Transcription:

Sing: Dtministi singl-gnt Anw W. Moo Posso Sool o Comut Sin Cngi Mllon Univsity www.s.mu.u/~wm wm@s.mu.u -68-7 ot to ot ts n uss o ts slis. Anw woul ligt i you oun tis sou mtil usul in giving you own ltus. Fl to us ts slis vtim, o to moiy tm to it you own ns. PowPoint oiginls vill. I you mk us o signiint otion o ts slis in you own ltu, ls inlu tis mssg, o t ollowing link to t sou ositoy o Anw s tutoils: tt://www.s.mu.u/~wm/tutoils. Commnts n otions gtully iv. Sli Ovviw Dtministi, singl-gnt, s olms Bt Fist S Otimlity, Comltnss, Tim n S omlxity S Ts Dt Fist S Ittiv Dning Bst Fist Gy S Sli

A s olm How o w gt om S to G? An wt s t smllst ossil num o tnsitions? Sli Fomlizing s olm A s olm s iv omonnts: Q, S, G, sus, ost Q is init st o stts. S Q is non-mty st o stt stts. G Q is non-mty st o gol stts. sus : Q P(Q) is untion wi tks stt s inut n tuns st o stts s outut. sus(s) mns t st o stts you n om s in on st. ost : Q, Q Positiv um is untion wi tks two stts, s n s, s inut. It tuns t on-st ost o tvling om s to s. T ost untion is only in wn s is susso stt o s. Sli

Ou S Polm Q = {,,,,,,,,,,, } S = { } G = { } sus() = { } sus() = {, } sus() = ULL t. ost(s,s ) = o ll tnsitions Sli Ou S Polm Q = {,,,,,,,,,,, } S = { } G = { } sus() = { } sus() = {, } sus() = ULL t. ost(s,s ) = o ll tnsitions Wy o w? Wt olms lik tis? Sli 6

S Polms Sli 7 Mo S Polms Suling 8-Quns Wt nxt? Sli 8

Mo S Polms But t lnty o tings wi w nomlly ll s olms tt on t it ou Suling igi inition A s olm s iv omonnts: Q, S, G, sus, ost 8-Quns Q is init st o stts. S Q is non-mty st o stt stts. G Q is non-mty st o gol stts. sus : Q P(Q) is untion wi tks stt s inut n tuns st o stts s outut. sus(s) mns t st o stts you n om s in on st. ost : Q, Q Positiv um is untion wi tks two stts, s n s, s inut. It tuns t on-st ost o tvling om Wt snxt? to s. T ost untion is only in wn s is susso stt o s. Cn you tink o xmls? Sli Ou inition xlus Sli 0

Gm ginst vsy Ou inition xlus Cn Hin Stt Continuum (ininit num) o stts All o t ov, lus istiut tm ontol Sli Bt Fist S Ll ll stts tt l om S in st ut n t l in lss tn st. Tn ll ll stts tt l om S in sts ut n t l in lss tn sts. Tn ll ll stts tt l om S in sts ut n t l in lss tn sts. Et until Gol stt. Sli 6

Bt-ist S 0 sts om stt Sli st om stt Bt-ist S 0 sts om stt Sli 7

st om stt Bt-ist S 0 sts om stt sts om stt Sli st om stt Bt-ist S 0 sts om stt sts om stt sts om stt Sli 6 8

st om stt Bt-ist S sts om stt 0 sts om stt sts om stt sts om stt Sli 7 Rmm t t! Also, wn you ll stt, o t sso stt. Tis o is ll koint. T istoy o ssos is us to gnt t solution t, on you v oun t gol: I v got to t gol. I s I ws t o tis. An I ws t o I ws t. An I ws. so solution t is S G Sli 8

st om stt Bkoints sts om stt 0 sts om stt sts om stt sts om stt Sli st om stt Bkoints sts om stt 0 sts om stt sts om stt sts om stt Sli 0 0

Stting Bt Fist S Fo ny stt s tt w v ll, w ll mm: vious(s) s t vious stt on sotst t om stt to s. On t kt ittion o t lgoitm w ll gin wit V k in s t st o tos stts o wi t sotst t om t stt osts xtly k sts Tn, uing tt ittion, w ll omut V k+, in s t st o tos stts o wi t sotst t om t stt osts xtly k+ sts W gin wit k = 0, V 0 = {} n w ll in, vious() = ULL Tn w ll in tings on st om t into V. An w ll k going. Sli V 0 Sli

V 0 V Sli V 0 V V Sli

V V 0 V V Sli V V V 0 V V Sli 6

Bt Fist S V 0 := S (t st o stt stts) vious() := IL k := 0 wil (no gol stt is in V k n V k is not mty) o V k+ := mty st Fo stt s in V k Fo stt s in sus(s) I s s not ly n ll St vious(s ) := s A s into V k+ k := k+ I V k is mty signl FAILURE Els uil t solution t tus: Lt S i t it stt in t sotst t. Din S k =, n oll i <= k, in S i- = vious(s i ). Sli 7 V V 0 Suos you s s onvnintly llow you to otin ssos(stt). Cn you tink o int wy to o? An woul you l to voi stoing somting tt w viously to sto? V V V Sli 8

Anot wy: Wok k Ll ll stts tt n G in st ut n t it in lss tn st. Ll ll stts tt n G in sts ut n t it in lss tn sts. Et. until stt is. num o sts to gol lls tmin t sotst t. Don t n xt ookking ino. Sli Bt Fist Dtils It is in o t to mo tn on gol stt. It is in o t to mo tn on stt stt. Tis lgoitm woks ows om t stt. Any lgoitm wi woks ows om t stt is si to ow ining. ou n lso wok kws om t gol. Tis lgoitm is vy simil to Dijkst s lgoitm. Any lgoitm wi woks kws om t gol is si to kw ining. Bkw vsus ow. Wi is tt? Sli 0

Costs on tnsitions 8 oti tt ins t sotst t in tms o num o tnsitions. It os not in t lst-ost t. W will uikly viw n lgoitm wi os in t lst-ost t. On t kt ittion, o ny stt S, wit g(s) s t lst-ost t to S in k o w sts. Sli Lst Cost Bt Fist V k = t st o stts wi n in xtly k sts, n o wi t lstost k-st t is lss ost tn ny t o lngt lss tn k. In ot wos, V k = t st o stts wos vlus ng on t vious ittion. V 0 := S (t st o stt stts) vious() := IL g() = 0 k := 0 wil (V k is not mty) o V k+ := mty st Fo stt s in V k Fo stt s in sus(s) I s s not ly n ll OR i g(s) + Cost(s,s ) < g(s ) St vious(s ) := s St g(s ) := g(s) + Cost(s,s ) A s into V k+ k := k+ I not ll, xit signling FAILURE Els uil t solution t tus: Lt S k t kt stt in t sotst t. Din S k =, n oll i <= k, in S i- = vious(s i ). Sli 6

Uniom-Cost S A ontully siml o wn t osts on tnsitions It uss ioity uus Sli Pioity Quu Rs A ioity uu is t stutu in wi you n inst n tiv (ting, vlu) is wit t ollowing otions: Init-PiQuu(PQ) Inst-PiQuu(PQ, ting, vlu) Po-lst(PQ) initilizs t PQ to mty. insts (ting, vlu) into t uu. tuns t (ting, vlu) i wit t lowst vlu, n movs it om t uu. Sli 7

Pioity Quu Rs A ioity uu is t stutu in wi you n inst n tiv (ting, vlu) is wit t ollowing otions: Fo mo tils, s Knut o Sgwik o silly ny ook wit t wo lgoitms ominntly ing in t titl. Init-PiQuu(PQ) Inst-PiQuu(PQ, ting, vlu) Po-lst(PQ) initilizs t PQ to mty. insts (ting, vlu) into t uu. tuns t (ting, vlu) i wit t lowst vlu, n movs it om t uu. Pioity Quus n imlmnt in su wy tt t ost o t inst n o otions O(log(num o tings in ioity uu)) Vy (toug not solutly, inily!) Sli Uniom-Cost S A ontully siml o wn t osts on tnsitions It uss ioity uu PQ = St o stts tt v n xn o witing xnsion Pioity o stt s = g(s) = ost o gtting to s using t imli y koints. Sli 6 8

Stting UCS 8 PQ = { (S,0) } Sli 7 UCS Ittions PQ = { (S,0) } 8 Ittion:. Po lst-ost stt om PQ. A sussos Sli 8

UCS Ittions 8 PQ = { (,), (,), (,) } Ittion:. Po lst-ost stt om PQ. A sussos Sli UCS Ittions PQ = { (,), (,), (,6) } 8 Ittion:. Po lst-ost stt om PQ. A sussos Sli 0 0

UCS Ittions 8 PQ = { (,), (,), (,), (,6) } Ittion:. Po lst-ost stt om PQ. A sussos Sli UCS Ittions PQ = { (,), (,), (,), (,6) } 8 ot wt n : liz tt gtting to vi ws tt tn t viously st-known wy to gt to Ittion:. Po lst-ost stt om PQ. A sussos Sli n so s ioity ws ng

UCS Ittions 8 PQ = { (,), (,6), (,), (,6) } Ittion:. Po lst-ost stt om PQ. A sussos Sli UCS Ittions PQ = { (,6),(,6),(,),(,),(,6) } 8 Ittion:. Po lst-ost stt om PQ. A sussos Sli

UCS Ittions 8 PQ = { (,6),(,),(,),(,6) } Ittion:. Po lst-ost stt om PQ. A sussos Sli UCS Ittions PQ = { (,0), (,),(,) } 8 Ittion:. Po lst-ost stt om PQ. A sussos Sli 6

UCS Ittions ot wt n : oun nw wy to gt to PQ = { (,0), (,),(,) } ut it ws mo ostly tn t st known wy n so s ioity ws unng 8 Ittion:. Po lst-ost stt om PQ. A sussos Sli 7 UCS Ittions PQ = { (,),(,) } 8 Ittion:. Po lst-ost stt om PQ. A sussos Sli 8

UCS Ittions PQ = { (,) } 8 Ittion:. Po lst-ost stt om PQ. A sussos Sli UCS Ittions PQ = { (,8) } 8 Ittion:. Po lst-ost stt om PQ. A sussos Sli 0

UCS Ittions PQ = { (G,) } 8 Ittion:. Po lst-ost stt om PQ. A sussos Sli UCS Ittions Qustion: Is tmint s soon s you isov t gol t igt stoing ition? PQ = { (G,) } 8 Ittion:. Po lst-ost stt om PQ. A sussos Sli 6

UCS tmints PQ = { } 8 Tmint only on t gol is o om t ioity uu. Els w my miss sot t. Ittion:. Po lst-ost stt om PQ. A sussos Sli Juging s lgoitm Comltnss: is t lgoitm gunt to in solution i solution xists? Gunt to in otiml? (will it in t lst ost t?) Algoitmi tim omlxity S omlxity (mmoy us) Vils: B L num o stts in t olm t vg ning to (t vg num o sussos) (B>) t lngt o t t om stt to gol wit t sotst num o sts How woul w jug ou lgoitms? Sli 7

Juging s lgoitm B L Q num o stts in t olm t vg ning to (t vg num o sussos) (B>) t lngt o t t om stt to gol wit t sotst num o sts t vg siz o t ioity uu Algoitm LC Lst Cost UCS Bt Fist S Uniom Cost S Com Otiml Tim lt i ll tnsitions sm ost O(log(Q) * min(,b L )) S Sli Juging s lgoitm B L Q num o stts in t olm t vg ning to (t vg num o sussos) (B>) t lngt o t t om stt to gol wit t sotst num o sts t vg siz o t ioity uu Algoitm UCS Bt Fist S LC Lst Cost Uniom Cost S Com Otiml Tim lt i ll tnsitions sm ost O(log(Q) * min(,b L )) S Sli 6 8

S T Rsnttion Wt o o w go toug t s t wit? Sli 7 Dt Fist S 8 An ltntiv to. Alwys xn om t mostntly-xn no, i it s ny unti sussos. Els ku to t vious no on t unt t. Sli 8

DFS in tion Sli DFS S t tvsl Cn you w in t o in wi t s-t nos visit? Sli 60 0

DFS Algoitm W us t stutu w ll ll Pt to snt t,, t om t to t unt stt. E.G. Pt P = <,,, > Along wit no on t t, w must mm wi sussos w still v vill to xn. E.G. t t ollowing oint, w ll v P = < (xn=, ), (xn = ULL), (xn = ), (xn = ) > Sli 6 DFS Algoitm Lt P = < (xn = sus())> Wil (P not mty n to(p) not gol) i xn o to(p) is mty tn mov to(p) ( o t stk ) ls lt s mm o xn o to(p) mov s om xn o to(p) mk nw itm on t to o t P: s (xn = sus(s)) I P is mty tun FAILURE Els tun t t onsisting o stts in P Tis lgoitm n wittn ntly wit usion, i.. using t ogm stk to imlmnt P. Sli 6

Juging s lgoitm B L Q num o stts in t olm t vg ning to (t vg num o sussos) (B>) t lngt o t t om stt to gol wit t sotst num o sts t vg siz o t ioity uu Algoitm UCS DFS Bt Fist S LC Lst Cost Uniom Cost S Dt Fist S Com Otiml Tim lt i ll tnsitions sm ost O(log(Q) * min(,b L )) /A S /A Sli 6 Juging s lgoitm B L Q num o stts in t olm t vg ning to (t vg num o sussos) (B>) t lngt o t t om stt to gol wit t sotst num o sts t vg siz o t ioity uu Algoitm UCS DFS Bt Fist S LC Lst Cost Uniom Cost S Dt Fist S Com Otiml Tim lt i ll tnsitions sm ost O(log(Q) * min(,b L )) /A S /A Sli 6

Juging s lgoitm B L LMAX Q num o stts in t olm t vg ning to (t vg num o sussos) (B>) t lngt o t t om stt to gol wit t sotst num o sts Lngt o longst t om stt to nyw t vg siz o t ioity uu Algoitm UCS DFS** Bt Fist S LC Lst Cost Uniom Cost S Dt Fist S Com Otiml Tim lt i ll tnsitions sm ost Assuming Ayli S S O(log(Q) * min(,b L )) O(B LMAX ) S O(LMAX) Sli 6 Juging s lgoitm B L LMAX Q num o stts in t olm t vg ning to (t vg num o sussos) (B>) t lngt o t t om stt to gol wit t sotst num o sts Lngt o longst t om stt to nyw t vg siz o t ioity uu Algoitm UCS DFS** Bt Fist S LC Lst Cost Uniom Cost S Dt Fist S Com Otiml Tim lt i ll tnsitions sm ost Assuming Ayli S S O(log(Q) * min(,b L )) O(B LMAX ) S O(LMAX) Sli 66

Qustions to on How woul you vnt DFS om looing? How oul you o it to giv n otiml solution? Sli 67 Qustions to on How woul you vnt DFS om looing? How oul you o it to giv n otiml solution? Answ : PC-DFS (Pt Cking DFS): Don t us on stt i tt stt is ly in t unt t Answ : MEMDFS (Mmoizing DFS): Rmm ll stts xn so. v xn nyting twi. Sli 68

Qustions to on How woul you vnt DFS om looing? How oul you o it to giv n otiml solution? Answ : PC-DFS (Pt Cking DFS): Don t us on stt i tt stt is ly in t unt t Answ : MEMDFS (Mmoizing DFS): Rmm ll stts xn so. v xn nyting twi. Sli 6 Qustions to on How woul you vnt DFS om looing? A t osions wn PCDFS is tt tn MEMDFS? How oul you o it to giv n otiml solution? A t osions wn MEMDFS is tt tn PCDFS? Answ : PC-DFS (Pt Cking DFS): Don t us on stt i tt stt is ly in t unt t Answ : MEMDFS (Mmoizing DFS): Rmm ll stts xn so. v xn nyting twi. Sli 70

Juging s lgoitm B L LMAX Q num o stts in t olm t vg ning to (t vg num o sussos) (B>) t lngt o t t om stt to gol wit t sotst num o sts Lngt o longst yl- t om stt to nyw t vg siz o t ioity uu Algoitm UCS Bt Fist S LC Lst Cost Uniom Cost S PCDFS Pt Ck DFS MEMDFS Mmoizing DFS Com Otiml Tim lt i ll tnsitions sm ost O(log(Q) * min(,b L )) O(B LMAX ) O(min(,B LMAX )) S O(LMAX) O(min(,B LMAX )) Sli 7 Juging s lgoitm B L LMAX Q num o stts in t olm t vg ning to (t vg num o sussos) (B>) t lngt o t t om stt to gol wit t sotst num o sts Lngt o longst yl- t om stt to nyw t vg siz o t ioity uu Algoitm UCS Bt Fist S LC Lst Cost Uniom Cost S PCDFS Pt Ck DFS MEMDFS Mmoizing DFS Com Otiml Tim lt i ll tnsitions sm ost O(log(Q) * min(,b L )) O(B LMAX ) O(min(,B LMAX )) S O(LMAX) O(min(,B LMAX )) Sli 7 6

Juging s lgoitm B L LMAX Q num o stts in t olm t vg ning to (t vg num o sussos) (B>) t lngt o t t om stt to gol wit t sotst num o sts Lngt o longst yl- t om stt to nyw t vg siz o t ioity uu Algoitm UCS Bt Fist S LC Lst Cost Uniom Cost S PCDFS Pt Ck DFS MEMDFS Mmoizing DFS Com Otiml Tim lt i ll tnsitions sm ost O(log(Q) * min(,b L )) O(B LMAX ) O(min(,B LMAX )) S O(LMAX) O(min(,B LMAX )) Sli 7 Mz xml Imgin stts lls in mz, you n mov, E, S, W. Wt woul lin DFS o, ssuming it lwys xn t E susso ist, tn, tn W, tn S? G Exnsion o E,, W, S S Ot ustions: Wt woul o? Wt woul PCDFS o? Wt woul MEMDFS o? Sli 7 7

Two ot DFS xmls G O:, E, S, W? S G O:, E, S, W wit loos vnt S Sli 7 Fow DFS o Bkw DFS I you v ssos() untion s wll s sussos() untion you n gin t t gol n t-ist-s kws until you it stt. Wy/Wn migt tis goo i? Sli 76 8

Invnt An Algoitm Tim! H s wy to mtilly s osts somtims. Biitionl S. Cn you guss wt tis lgoitm is, n wy it n ug ost-sv? Sli 77 B L LMAX Q num o stts in t olm t vg ning to (t vg num o sussos) (B>) t lngt o t t om stt to gol wit t sotst num o sts Lngt o longst yl- t om stt to nyw t vg siz o t ioity uu Algoitm UCS MEMDFS Mmoizing DFS BI Bt Fist S LC Lst Cost Uniom Cost S PCDFS Pt Ck DFS Biition BF S Com Otiml Tim lt i ll tnsitions sm ost O(log(Q) * min(,b L )) O(B LMAX ) O(min(,B LMAX )) O(min(,B L/ )) S O(LMAX) O(min(,B LMAX )) O(min(,B L/ )) Sli 78

B L LMAX Q num o stts in t olm t vg ning to (t vg num o sussos) (B>) t lngt o t t om stt to gol wit t sotst num o sts Lngt o longst yl- t om stt to nyw t vg siz o t ioity uu Algoitm UCS Bt Fist S LC Lst Cost Uniom Cost S PCDFS Pt Ck DFS MEMDFS Mmoizing DFS BI Biition BF S Com Otiml Tim lt i ll tnsitions sm ost All tns sm ost O(log(Q) * min(,b L )) O(B LMAX ) O(min(,B LMAX )) O(min(,B L/ )) S O(LMAX) O(min(,B LMAX )) O(min(,B L/ )) Sli 7 Ittiv Dning Ittiv ning is siml lgoitm wi uss DFS s suoutin:. Do DFS wi only ss o ts o lngt o lss. (DFS givs u ny t o lngt ). I il, o DFS wi only ss ts o lngt o lss.. I il, o DFS wi only ss ts o lngt o lss..n so on until suss Cost is O( + + + + L ) = O( L ) Cn mu tt tn gul DFS. But ost n mu gt tn t num o stts. Sli 80 0

Mz xml Imgin stts lls in mz, you n mov, E, S, W. Wt woul Ittiv Dning o, ssuming it lwys xn t E susso ist, tn, tn W, tn S? G S Exnsion o E,, W, S Sli 8 B L LMAX Q num o stts in t olm t vg ning to (t vg num o sussos) (B>) t lngt o t t om stt to gol wit t sotst num o sts Lngt o longst yl- t om stt to nyw t vg siz o t ioity uu Algoitm UCS Bt Fist S LC Lst Cost Uniom Cost S PCDFS Pt Ck DFS MEMDFS Mmoizing DFS BI Biition BF S Ittiv ID Dning Com Otiml Tim lt i ll tnsitions sm ost All tns sm ost i ll tnsitions sm ost O(log(Q) * min(,b L )) O(B LMAX ) O(min(,B LMAX )) O(min(,B L/ )) O(B L ) S O(LMAX) O(min(,B LMAX )) O(min(,B L/ )) O(L) Sli 8

B L LMAX Q num o stts in t olm t vg ning to (t vg num o sussos) (B>) t lngt o t t om stt to gol wit t sotst num o sts Lngt o longst yl- t om stt to nyw t vg siz o t ioity uu Algoitm UCS Bt Fist S LC Lst Cost Uniom Cost S PCDFS Pt Ck DFS MEMDFS Mmoizing DFS BI Biition BF S Ittiv ID Dning Com Otiml Tim lt i ll tnsitions sm ost All tns sm ost i ll tnsitions sm ost O(log(Q) * min(,b L )) O(B LMAX ) O(min(,B LMAX )) O(min(,B L/ )) O(B L ) S O(LMAX) O(min(,B LMAX )) O(min(,B L/ )) O(L) Sli 8 Bst Fist Gy S s uisti. A uisti untion ms stt onto n stimt o t ost to t gol om tt stt. Cn you tink o xmls o uistis? E.G. o t 8-uzzl? E.G. o lnning t toug mz? Dnot t uisti y untion (s) om stts to ost vlu. Sli 8

Huisti S Suos in ition to t stn s siition w lso v uisti. A uisti untion ms stt onto n stimt o t ost to t gol om tt stt. Cn you tink o xmls o uistis? E.G. o t 8-uzzl? E.G. o lnning t toug mz? Dnot t uisti y untion (s) om stts to ost vlu. Sli 8 Euliin Huisti = = =8 8 = = =8 = =6 = =0 = =6 Sli 86

Euliin Huisti = = =8 =8 8 = = Anot ioity uu lgoitm. But tis tim, ioity is t uisti vlu. = = =6 =6 =0 = Sli 87 Bst Fist Gy S Init-PiQuu(PQ) Inst-PiQuu(PQ,,()) wil (PQ is not mty n PQ os not ontin gol stt) (s, ) := Po-lst(PQ) o s in sus(s) i s is not ly in PQ n s nv viously n visit Inst-PiQuu(PQ,s,(s )) Algoitm BstFS Bst Fist S Com Otiml Tim lt O(min(,B LMAX )) S O(min(,B LMAX )) A w imovmnts to tis lgoitm n mk tings mu tt. It s littl ting w lik to ll: A*. to ontinu! Sli 88

Wt you soul know Tooug unstning o, LC, UCS. PCDFS, MEMDFS Unstn t onts o wt s is omlt, otiml, its tim n s omlxity Unstn t is in ittiv ning n iitionl s B l to isuss t oktil tis t os n ons o t ov ss Sli 8