A self-localizing agent