Text this: Principles of optimal control theory