Text this: A gradient algorithm for optimal control problems with model-reality differences