Theory of Mind for Transfer Learning in New Environments