SMS: Principles of optimal control theory