Top Banner
6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search Review of BFS/DFS Finding Minimum-cost Paths Heuristics Adam Hartz [email protected] 24 February 2020
694

6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Jun 08, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

6.009: Fundamentals of Programming

Lecture 3: UC Search and Informed Search

• Review of BFS/DFS

• Finding Minimum-cost Paths

• Heuristics

Adam Hartz

[email protected]

24 February 2020

Page 2: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Graph Search (Path Finding)

• Some set V of vertices (sometimes called states)

• Some collection E of edges connecting vertices

Page 3: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Search Algorithms

Example: Eight Puzzle

1 2 3

4 5 6

7 8

Start

1 2

3 4 5

6 7 8

Goal

Rearrange board by sequentially sliding tiles into the free spot.

Page 4: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 2 3

4 5 6

7 8

Page 5: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 2 3

4 5

7 8 6

Page 6: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 2 3

4 5

7 8 6

Page 7: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 2 3

4 5

7 8 6

Page 8: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 2 3

7 4 5

8 6

Page 9: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 2 3

7 4 5

8 6

Page 10: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 2 3

7 4 5

8 6

Page 11: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 2 3

7 4

8 6 5

Page 12: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 2

7 4 3

8 6 5

Page 13: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 2

7 4 3

8 6 5

Page 14: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 4 2

7 3

8 6 5

Page 15: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 4 2

7 6 3

8 5

Page 16: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 4 2

7 6 3

8 5

Page 17: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 4 2

6 3

7 8 5

Page 18: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 4 2

6 3

7 8 5

Page 19: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 4 2

6 3

7 8 5

Page 20: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 4 2

6 3 5

7 8

Page 21: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 4 2

6 3 5

7 8

Page 22: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 4 2

6 3 5

7 8

Page 23: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 4 2

3 5

6 7 8

Page 24: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 4 2

3 5

6 7 8

Page 25: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 2

3 4 5

6 7 8

Page 26: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 2

3 4 5

6 7 8

Page 27: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

Rearrange board by sequentially sliding tiles into the free spot.

1 2

3 4 5

6 7 8

That solution took twenty-two moves.

How difficult is this problem?

Page 28: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

1 2 3

4 5 6

7 8

1 2

3 4 5

6 7 8

How many different board configurations (vertices) exist?

1. 82 = 642. 92 = 813. 8 ! = 40, 3204. 9 ! = 362, 880

Page 29: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Eight Puzzle

1 2 3

4 5 6

7 8

1 2

3 4 5

6 7 8

Is the solution with 22 moves optimal? Do shorter solutions exist?

Do we have to look at all 362,880 configurations to be sure?

Page 30: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Search Algorithm

Develop an algorithm to systematically conduct a search.

Analyze how well the algorithm performs.

Optimize the algorithm:

– find the “best” solution (i.e., minimum path length)

– by considering as few cases as possible.

Page 31: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Last Week’s Algorithms

Graph Search Algorithm:

• Initialize visited set

• Initialize agenda (list of paths to consider)

• Repeat the following:

− Remove one path from the agenda

− For each child (of that path’s terminal vertex):

? If it satisfies the goal condition, return a path.

? Otherwise, if it is not already in the visited set:

. Add the new path to the agenda

. Add the new vertex to the visited set

until goal is found or agenda is empty

Page 32: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Example

Find shortest path between 2 points on a rectangular grid.

A B C

D E F

G H I

Page 33: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Replace first path in agenda by its children:

B D

A

B F

C

B

B D F H

E

B D

A

B D F H

E

D

A

D H

G

step Agenda

Page 34: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Replace first path in agenda by its children:

B D

A

B F

C

B

B D F H

E

B D

A

B D F H

E

D

A

D H

G

step Agenda

0: A

Page 35: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Replace first path in agenda by its children:

B D

A

B F

C

B

B D F H

E

B D

A

B D F H

E

D

A

D H

G

step Agenda

0: A

1: AB AD

Page 36: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Replace first path in agenda by its children:

B F

C

B

B D F H

E

B D

A

B D F H

E

D

A

D H

G

step Agenda

0: A

1: AB AD

2: ABC ABE AD

Page 37: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Replace first path in agenda by its children:

F

C

B

B D F H

E

B D

A

B D F H

E

D

A

D H

G

step Agenda

0: A

1: AB AD

2: ABC ABE AD

3: ABCF ABE AD

Page 38: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Replace first path in agenda by its children:

F

C

B

B D F H

E

B D

A

B D F H

E

D

A

D H

G

Depth-first Search

Page 39: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Replace last path in agenda by its children:

B D

A

B F

C

B

B D F H

E

B D

A

B D F H

E

D

A

D H

G

step Agenda

Page 40: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Replace last path in agenda by its children:

B D

A

B F

C

B

B D F H

E

B D

A

B D F H

E

D

A

D H

G

step Agenda

0: A

Page 41: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Replace last path in agenda by its children:

B D

A

B F

C

B

B D F H

E

B D

A

B D F H

E

D

A

D H

G

step Agenda

0: A

1: AB AD

Page 42: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Replace last path in agenda by its children:

B D

A

B F

C

B

B D F H

E

B D F H

E

D

A

D H

G

step Agenda

0: A

1: AB AD

2: AB ADE ADG

Page 43: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Replace last path in agenda by its children:

B D

A

B F

C

B

B D F H

E

B D F H

E

D

A

H

G

step Agenda

0: A

1: AB AD

2: AB ADE ADG

3: AB ADE ADGH

Page 44: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Replace last path in agenda by its children:

B D

A

B F

C

B

B D F H

E

B D F H

E

D

A

H

G

also Depth-first Search

Page 45: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Remove first path from agenda. Add its children to end of agenda.

B D

A

B F

C

B

B D F H

E

B D

A

B D F H

E

D

A

D H

G

step Agenda

Page 46: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Remove first path from agenda. Add its children to end of agenda.

B D

A

B F

C

B

B D F H

E

B D

A

B D F H

E

D

A

D H

G

step Agenda

0: A

Page 47: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Remove first path from agenda. Add its children to end of agenda.

B D

A

B F

C

B

B D F H

E

B D

A

B D F H

E

D

A

D H

G

step Agenda

0: A

1: AB AD

Page 48: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Remove first path from agenda. Add its children to end of agenda.

B F

C

B

B D F H

E

B D

A

B D F H

E

D

A

D H

G

step Agenda

0: A

1: AB AD

2: AD ABC ABE

Page 49: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Remove first path from agenda. Add its children to end of agenda.

B F

C

B

B D F H

E

D

A

D H

G

step Agenda

0: A

1: AB AD

2: AD ABC ABE

3: ABC ABE ADG

Page 50: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Remove first path from agenda. Add its children to end of agenda.

F

C

B

B D F H

E

D

A

D H

G

step Agenda

1: AB AD

2: AD ABC ABE

3: ABC ABE ADG

4: ABE ADG ABCF

Page 51: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Remove first path from agenda. Add its children to end of agenda.

F

C

B

H

E

D

A

D H

G

step Agenda

2: AD ABC ABE

3: ABC ABE ADG

4: ABE ADG ABCF

5: ADG ABCF ABEH

Page 52: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Remove first path from agenda. Add its children to end of agenda.

F

C

B

H

E

D

A

G

step Agenda

3: ABC ABE ADG

4: ABE ADG ABCF

5: ADG ABCF ABEH

6: ABCF ABEH

Page 53: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Remove first path from agenda. Add its children to end of agenda.

F

C

B

H

E

D

A

G

step Agenda

4: ABE ADG ABCF

5: ADG ABCF ABEH

6: ABCF ABEH

7: ABEH ABCFI

Page 54: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Order Matters

Remove first path from agenda. Add its children to end of agenda.

F

C

B

H

E

D

A

G

Breadth-first Search

Page 55: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 56: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 57: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 58: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 59: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 60: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 61: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 62: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 63: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 64: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 65: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 66: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 67: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 68: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 69: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 70: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 71: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 72: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 73: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 74: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 75: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 76: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 77: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 78: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 79: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 80: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 81: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 82: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 83: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 84: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 85: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 86: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 87: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 88: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 89: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 90: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 91: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 92: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 93: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 94: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 95: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 96: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 97: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 98: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 99: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 100: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 101: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 102: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 103: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 104: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 105: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 106: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 107: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 108: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 109: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 110: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 111: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 112: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 113: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 114: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 115: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 116: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 117: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 118: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 119: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 120: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 121: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 122: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 123: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 124: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 125: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 126: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 127: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 128: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 129: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 130: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 131: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 132: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 133: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 134: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 135: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 136: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 137: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 138: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 139: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 140: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 141: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 142: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 143: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 144: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 145: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 146: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 147: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 148: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 149: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 150: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 151: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 152: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 153: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 154: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 155: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 156: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 157: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 158: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 159: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 160: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 161: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 162: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 163: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 164: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 165: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 166: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 167: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 168: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 169: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 170: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 171: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 172: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 1

Page 173: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 174: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 175: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 176: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 177: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 178: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 179: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 180: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 181: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 182: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 183: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 184: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 185: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 186: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 187: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 188: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 189: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 190: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 191: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 192: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 193: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 194: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 195: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 196: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 197: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 198: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 199: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 200: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 201: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 202: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 203: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 204: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 205: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 206: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 207: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 208: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 209: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 210: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 211: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 212: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 213: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 214: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 215: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 216: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 217: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 218: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 219: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 220: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 221: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 222: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 223: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 224: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 225: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 226: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 227: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 228: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 229: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 230: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 231: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 232: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 233: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 234: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 235: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 236: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 237: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 238: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 239: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 240: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 241: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 242: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 243: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 244: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 245: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 246: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 247: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 248: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 249: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 250: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 251: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 252: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 253: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 254: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 255: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 256: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 257: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 258: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 259: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 260: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 261: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 262: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 263: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 264: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 265: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 266: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 267: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 268: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 269: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 270: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 271: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 272: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 273: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 274: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 275: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 276: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 277: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 278: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 279: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 280: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 281: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 282: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 283: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 284: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 285: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 286: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 287: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 288: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 289: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 290: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 291: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 292: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 293: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: BFS 2

Page 294: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 295: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 296: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 297: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 298: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 299: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 300: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 301: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 302: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 303: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 304: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 305: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 306: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 307: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 308: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 309: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 310: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 311: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 312: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 313: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 314: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 315: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 316: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 317: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 318: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 319: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 1

Page 320: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 321: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 322: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 323: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 324: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 325: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 326: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 327: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 328: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 329: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 330: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 331: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 332: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 333: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 334: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 335: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 336: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 337: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 338: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 339: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 340: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 341: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 342: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 343: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 344: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 345: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 346: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 347: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 348: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 349: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 350: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 351: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 352: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 353: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 354: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 355: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 356: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 357: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 358: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 359: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 360: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 361: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 362: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 363: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 364: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 365: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 366: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 367: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 368: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 369: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 370: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 371: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 372: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 373: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 374: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 375: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 376: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 377: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 378: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 379: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 380: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 381: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 382: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 383: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 384: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 385: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 386: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 387: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 388: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 389: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 390: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 391: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 392: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 393: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 394: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 395: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 396: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 397: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 398: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 399: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 400: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 401: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 402: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 403: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 404: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 405: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 406: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 407: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 408: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 409: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 410: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 411: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 412: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 413: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 414: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 415: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 416: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 417: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 418: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 419: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 420: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 421: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 422: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 423: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 424: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 425: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 426: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 427: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 428: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 429: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 430: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 431: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 432: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 433: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 434: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 435: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 436: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 437: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Grid: DFS 2

Page 438: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

More Examples

Page 439: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Properties of BFS/DFS

BFS

• Always returns a shortest path to a goal vertex, if a goal vertex

exists in the set of vertexs reachable from the start vertex.

• May run forever in an infinite domain if there is no solution.

• Generally requires more memory than depth-first search.

DFS

• Always returns a path to a goal vertex, if a goal vertex exists

in the set of vertexs reachable from the start vertex and the

search domain is finite.

• May run forever in an infinite domain.

• Doesn’t necessarily find the shortest path.

• Efficient in the amount of space it requires to store the agenda.

Page 440: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

16 Lines!

def search(successors, start_vertex, goal_test, dfs=False):if goal_test(start_vertex):

return [start_vertex]else:

agenda = [(start_vertex, None)]visited = {start_vertex}while len(agenda) > 0:

parent_path = agenda.pop(-1 if dfs else 0)for child_vertex in successors(parent_path[0]):

child_path = (child_vertex, parent)if goal_test(child_vertex):

return flatten_path(child)if child_vertex not in visited:

agenda.append(child)visited.add(child_vertex)

return None

Page 441: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Today: Adding Costs

BFS is guaranteed always to return the shortest possible path (in

terms of total number of edges traversed) to the goal.

Suppose that some edges are more beneficial than others to traverse,

though. BFS’s sense of optimality does not take that information

into account.

Today, we’ll develop a new algorithm that takes into account a sense

of how desireable each edge is.

Page 442: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

What is a Graph?

Set V of vertices (or ”states”)

Set E of edges connecting vertices

Set W of edge costs (or ”weights”)

New goal: rather than finding the shortest path, we want to find a

path with minimum total cost

Page 443: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Example

Find path E → I, minimizing total cost

A B C

D E F

G H I

1 0.5

1

1

1

5

21

0.5

1

0.5

1

Page 444: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Uniform-Cost Search

Consider searching for least-cost paths instead of shortest paths.

Instead of popping from agenda based on when nodes were added,

pop based on of the cost of the paths they represent.

By considering paths in order of increasing cost, we guarantee that

we return a path to the goal that has minimal cost.

Page 445: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Uniform-Cost Search

Uniform Cost Search:

• Initialize expanded set

• Initialize agenda (list of paths to consider)

• Repeat the following:

− Remove one path from the agenda

− If its terminal vertex is in the expanded set, ignore it.

− If its terminal vertex satisfies the goal condition, return

a path.

− Add its terminal vertex to the expanded set

− Add each child to the agenda if its terminal vertex is not

already in the expanded set itemize

until goal is found or agenda is empty

Page 446: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Example

Find path E → I, minimizing total cost

A B C

D E F

G H I

1 0.5

1

1

1

5

21

0.5

1

0.5

1

Page 447: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

More Examples

Page 448: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

More Examples

Page 449: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 450: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 451: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 452: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 453: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 454: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 455: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 456: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 457: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 458: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 459: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 460: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 461: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 462: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 463: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 464: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 465: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 466: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 467: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 468: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 469: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 470: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 471: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 472: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 473: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 474: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 475: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 476: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 477: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 478: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 479: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 480: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 481: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 482: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 483: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 484: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 485: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 486: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 487: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 488: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 489: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 490: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 491: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 492: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 493: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 494: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 495: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 496: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 497: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 498: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 499: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 500: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 501: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 502: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 503: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 504: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 505: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 506: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 507: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 508: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 509: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 510: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 511: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 512: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 513: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 514: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 515: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 516: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 517: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 518: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 519: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 520: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 521: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 522: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 523: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 524: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 525: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 526: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 527: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 528: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 529: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 530: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 531: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 532: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 533: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 534: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 535: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 536: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 537: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 538: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 539: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 540: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 541: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 542: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 543: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 544: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 545: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 546: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 547: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 548: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 549: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 550: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 551: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 552: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 553: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 554: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 555: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 556: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 557: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 558: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 559: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 560: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 561: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 562: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 563: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 564: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 565: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 566: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Problem?

So far, our searches have radiated outward from the starting point.

We only notice the goal when we stumble upon it. Wasting time

searching on the wrong side of the goal.

Page 567: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Heuristics

So far, we have sorted our agenda based on:

g(n) = the path cost from the start to n

Thus, any values with the same g(n) will be considered at roughly

the same time, regardless of whether they are moving ”in the right

direction” or not.

We can do better by including another function, which we’ll call a

heuristic:

h(n) = an estimate of the remaining cost from n to the goal

Since we want to minimize total path cost, we can instead sort by:

f(n) = g(n) + h(n)

f(n) = an estimate of total cost from start to goal through n

Page 568: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Heuristics

Including a heuristic function makes this an ”informed” search: it

uses information not only about the path so far, but about the nature

of the goal, to focus its attention toward the goal. The resulting

algorithm (UC search with a heuristic) is often referred to as A*

(”A-star”).

This can have a dramatic effect on the amount of the search space

we explore.

Page 569: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Heuristics and Optimality

In order to guarantee that we still get an optimal path, our heuristic

needs a couple of properties:

• admissibility: h(n) never overestimates the actual cost of the

lowest-cost path from n to the goal

• consistency: roughly, h(n) does not increase as n gets closer to

the goal.

The ideal heuristic should be

• as close as possible to actual cost (without exceeding it)

• easy to calculate

Page 570: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Example

Find path E → I, A*, heuristic: h(s) = M(s, I)/2

A B C

D E F

G H I

1 0.5

1

1

1

5

21

0.5

1

0.5

1

Page 571: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 572: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 573: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 574: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 575: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 576: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 577: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 578: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 579: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 580: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 581: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 582: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 583: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 584: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 585: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 586: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 587: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 588: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 589: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 590: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 591: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 592: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 593: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 594: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 595: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 596: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 597: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 598: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 599: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 600: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 601: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 602: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 603: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 604: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 605: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 606: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 607: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 608: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 609: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 610: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 611: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 612: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 613: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 614: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 615: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 616: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 617: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 618: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 619: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 620: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 621: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 622: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 623: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 624: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 625: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 626: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 627: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 628: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 629: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 630: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 631: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 632: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 633: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 634: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 635: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 636: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 637: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 638: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 639: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 640: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 641: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 642: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 643: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 644: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 645: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 646: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 647: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 648: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 649: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 650: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 651: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 652: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 653: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 654: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 655: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 656: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 657: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 658: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 659: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 660: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 661: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 662: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 663: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 664: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 665: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 666: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 667: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 668: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 669: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 670: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 671: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 672: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 673: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 674: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 675: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 676: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 677: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 678: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 679: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 680: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 681: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 682: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 683: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 684: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 685: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 686: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 687: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 688: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

How many of the following heuristics are admissible?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))3. max(abs(r0-r1),abs(c0-c1))4. 2*min(abs(r0-r1),abs(c0-c1))5. 2*max(abs(r0-r1),abs(c0-c1))

Page 689: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Check Yourself!

Consider searching in a 4-direction grid, and let (r0,c0) and (r1,c1)

represent the current and goal locations.

Which of the admissible heuristics minimizes the number of paths

expanded?

1. abs(r0-r1)+abs(c0-c1) (i.e. Manhattan distance)

2. min(abs(r0-r1),abs(c0-c1))

3. max(abs(r0-r1),abs(c0-c1))

4. 2*min(abs(r0-r1),abs(c0-c1))

5. 2*max(abs(r0-r1),abs(c0-c1))

Page 690: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Compare

Heuristic Paths Expanded

abs(r0-r1) + abs(c0-c1) 42

min(abs(r0-r1), abs(c0-c1)) 114

max(abs(r0-r1), abs(c0-c1)) 60

2*min(abs(r0-r1), abs(c0-c1)) 72

Page 691: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Heuristics: Eight Puzzle

Consider three heuristic functions for the ”eight puzzle”:

a. h(n) = 0b. h(n) = number of tiles out of place

c. h(n) = sum over tiles of Manhattan distances to their goals

Let Mi = # of moves in the best solution with heuristic i

Let Ei = # of paths expanded during search with heuristic i

Which of the following is/are true?

1. Ma = Mb = Mc

2. Ea = Eb = Ec

3. Ma > Mb > Mc

4. Ea ≥ Eb ≥ Ec

Page 692: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

Compare

Heuristic Expanded Solution Cost

a 84,516 22

b 8,329 22

c 1,348 22

Page 693: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

End

Page 694: 6.009: Fundamentals of Programming...6.009: Fundamentals of Programming Lecture 3: UC Search and Informed Search • Review of BFS/DFS • Finding Minimum-cost Paths • Heuristics

End