Optimizing Autonomous Control of Robotic Systems that Interact with Humans