Our next step is to define the structure of our plans. In the simplest case a plan is a sequence of actions. However, with sensing we are able to verify plans that contain branching. At the root of the branch a sensing action will be executed and depending on the outcome the correct plan will be chosen. For example, a robot is planning to visit my office, and its plan may have the following structure. First, it will enter in the elevator; then it will push the button to go to the eleventh floor; it will get off the elevator in the eleventh floor; it will look at the bulletin board (it will sense); if my office number is even it will go to the left corridor; else it will go to the right corridor.
We recursively define a plan as follows,
If | f | is | a |
fluent and ![]() ![]() | ![]() | f
then ![]() | ![]() ![]() |