1. Add to the situation calculus example (also available from the book web page) the ability to...

Question:

1. Add to the situation calculus example (also available from the book 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 exercise, 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 (apart from the 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))))).

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: