Exercise 14.1 Add to the situation calculus example (also available from the course web page) the ability
Question:
Exercise 14.1 Add to the situation calculus example (also available from the course web page) the ability to paint an object. In particular, add the predicate color(Obj, Col, Sit)
that is true if object Obj has color Col in situation Sit.
The parcel starts off blue. Thus, we have an axiom:
color(parcel, blue, init).
There is an action paint(Obj, Col) to paint object Obj with color Col. For this question, assume objects can only be painted red, and they can only be painted when the object and the robot are both at position o109. Colors accumulate on the robot (there is nothing that undoes an object being a color; if you paint the parcel red, it is both red and blue – of course this is unrealistic, but it makes the problem simpler).
Axiomatize the predicate color and the action paint using situation calculus.
You can do this without using more than three clauses (as well as the aforementioned clause defining the color in the initial situation), where none of the clauses has more than two atomic symbols in the body. You do not require equality, inequality, or negation as failure. Test it in AILog.
Your output should look something like the following:
ailog: bound 12.
ailog: ask color(parcel,red,S).
Answer: color(parcel,red, do(paint(parcel,red), do(move(rob,storage,o109), do(pickup(rob,parcel), do(move(rob,o109,storage), init))))).
Step by Step Answer:
Artificial Intelligence Foundations Of Computational Agents
ISBN: 9780521519007
1st Edition
Authors: David L. Poole, Alan K. Mackworth