Reasoning About Acting, Sensing and Failure Handling: A Logic for Agents Embedded in the Real World