Text this: Dynamic programming and its application to optimal control