5. Copy the Prolog parser/interpreter for noun phrases presented in the chapter (or write your own). Then

Question:

5. Copy the Prolog parser/interpreter for noun phrases presented in the chapter

(or write your own). Then test the np predicate on a variety of noun phrases to show that it is capable of identifying the blocks being referred to in your scene.

To model moving a block within your blocks world, suppose there is a predicate put_on(block1, block2) that uses the Prolog assert and retract operations to change the location of a block. This predicate should fail if the move action would be impossible, that is, if there is a block on either block1 or block2, or if block2 is not a cube.

Otherwise, put_on should retract the located_on fact involving block1, and assert that it is now on block2.

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

Step by Step Answer:

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