YouTube

Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← 04-24 Dynamic Programming

Get Embed Code
3 Languages

Showing Revision 1 created 06/29/2012 by Amara Bot.

  1. I now want to teach you an alternative method for planning.
  2. This alternative method has a number of advantages and a number of disadvantages.
  3. It's called dynamic programming,
  4. and just like A-star, it's going to find you the shortest path.
  5. You give it a map of the environment as in A-star, one or more goal positions--
  6. let's assume just one goal position.
  7. What it outputs is the best path from any possible starting location.
  8. This planning technique is not just limited to a single
  9. start location, but to any start location. Why would we worry about this?
  10. Let me give you an example.
  11. Suppose you are the Google self-driving car in an environment just like this.
  12. You're in this little street over here, and you're asked to turn right,
  13. but your goal is right over here.
  14. As before, there are two different lanes over here--a left turn lane and a straight lane.
  15. If you reach the straight lane, the only way to get to the goal
  16. is to go around the block over here and proceed in this direction.
  17. You've seen this example before.
  18. Now, the point I want to make is a different one.
  19. That is, your attempt to do a lane shift over here might fail. Why would it fail?
  20. Well, it could be there's a big, big truck in this lane over here,
  21. and as you go into the right lane when you're waiting for the truck to disappear,
  22. there are these people behind you that honk their horns.
  23. You really don't want to wait for the truck to disappear.
  24. That means the environment is stochastic.
  25. The outcomes of actions are non-deterministic.
  26. In our planning so far we ignored this, but in reality that's the case.
  27. In reality, you might find yourself--wow, I'm over here. How did that happen?
  28. Well, it's happened because the world is stochastic, and this truck over here--
  29. this stupid truck---didn't let you in.
  30. What that means is you need a plan not just for the most likely position
  31. but you might need a plan for other positions as well.
  32. What dynamic programming gives you is a plan for every position.
  33. If we redraw this environment as a grid with a goal location and certain obstacles,
  34. they dynamic programming gives you an optimal action to do at every single grid cell.
  35. As you can see, each grid cell now has a label.
  36. That label is often called policy,
  37. and policy is a function that maps the grid cell into an action
  38. with the action in this case as a move left, move down, move right, or move up.
  39. Now, we will compute a policy using dynamic programming.
  40. That is, given a grid world like this and a goal state like that,
  41. we will write software that will output for each of the grid cells
  42. what the best thing is to do should the robot find itself there.
  43. That requires a different algorithm than A-star.
  44. It happens to be a more computation involved algorithm.
  45. As I said before, it's called dynamic programming for robot path planning.