MIT2_017JF09_p30

# MIT2_017JF09_p30 - 30 DYNAMIC PROGRAMMING FOR PATH DESIGN...

This preview shows pages 1–3. Sign up to view the full content.

30 DYNAMIC PROGRAMMING FOR PATH DESIGN 109 30 Dynamic Programming for Path Design Given the transition costs in red, what are the maximum and minimum costs to get from node 1 to node 11? This situation is encountered when planning paths for autonomous agents moving through a complex environment, e.g., a wheeled robot in a building. 2 9 11 2 5 4 3 4 3 4 8 8 3 5 4 1 4 7 5 8 4 6 5 4 5 7 3 4 10 4 5 4 7 Solution: The minimum cost is 16 (path [1,6,9,11] or [1,2,8,9,11]) and the maximum value is 28 (path [1,4,5,6,7,9,11]!). The attached code uses value iteration to find these in two and five iterations, respectively. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Value iteration solution of deterministic dynamic programming. % The program looks complicated only because I cover both % minimization and maximization in the same program! clear all; ch = input(’Find minimum (0) or maximum (1): ’); if ~ch, init = 1e6 ; % look for minimum; % big initial guesses for costs to go else, init = 1e-6 ; % look for maximum; % small initial guesses for value to go end; % interconnect matrix: row is the node (first is starting

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
30 DYNAMIC PROGRAMMING
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern