Engineers help artificial intelligence to learn more safely in the real world