Robots with a mind of their own