Formal theories of knowledge in AI and robotics