Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Subtle Search Issues with Non-Unit Costs

•  Search all paths that are 1 cell


2 distant from source S
•  When we reach a new cell, we label it
2 S1 2 with a pathcost
4 •  pathcost = pathcost of neighbor used
3 3 3 3 to “reach” this cell, plus cell’s own cost
•  So, this cell is 1+3=4
3 3 3 3

T
•  So far, so good…

Slide 47 © 2013, R.A. Rutenbar


Subtle Search Issues with Non-Unit Costs
•  But, what is this cell’s pathcost
2 to be “reached”?
•  Is it 2+3=5, reached “from” cell with
2 S1 2 ? cost 2 that is to the North?
?
4
3
53 3 3
•  Is it 4+3=7, reached “from” cell with
cost 4 that is to the West?

3 3 3 3
•  Answer: 5
T
•  Always want to label cells with the
minimum pathcost to reach that cell
•  Again: this is sum of costs of all cells
from source to this cell, on this path
Slide 48 © 2013, R.A. Rutenbar

You might also like