!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! NOTE: The deadline for this assignment is extended to Thursday, November 5th !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Homework Assignment #5 1. (20 points) Download the Netica belief network system from www.norsys.com and use it to create the belief network shown in Figure 14.2 in the textbook. Turn in a snapshot of the diagram after the network is initially compiled and once the posterior probabilities are calculated for JohnCalls observed to be true and MaryCalls observed to be false. The posterior probabilities are shown in the corresponding table. P(B) = 0.51, P(E) = 0.45, P(A) = 1.36, P(J) = 100.0, P(M) = 0.0 (listed in Netica values out of 100.0). 2. (40 points) Consider a Prolog program that parses simple English sentences, shown in the file grammar2.pl. Draw the derivation tree that is generated when the program parses the sentence "The boy who sits reads the book". I would like you to enhance this parser by adding rules to parse prepositional phrases and adjectives. Turn in your Prolog program and show sample output of your program parsing sentences that contain these new features. As a guide, a sentence can now be parsed as a noun + verb phrase or as noun + verb phrase + prepositional phrase. A simple prepositional phrase is a preposition + noun phrase. A simple change you can make to the noun phrase rule is to allow an optional adjective after the determiner and before the noun. 3. (12 points) A robot Robbie operates in an environment made of two rooms, R1 and R2, connected by a door D. A box B is located in R2 and the door's key is initially in R2. The door can be open or closed (and locked). The initial state is shown below and is described by: In(Robbie,R2) In(Key, R2) Open(D) +----------------+----------------+ |R1 | | | | Robbie | | \ | | \ D | | \ | | | | | | Key | | Box | | | | R2| +----------------+----------------+ The possible actions are: GraspKeyInR2 LockDoor GoFromR2ToR1WithKey PutKeyInBox defined as follows: GraspKeyInR2 P: In(Robbie,R2), In(Key,R2) E: Holding(Robbie, K) LockDoor P: Holding(Robbie,Key), Open(d) E: ~Open(D), Locked(D) GoFromR2ToR1WithKey P: In(Robbie, R2), Holding(Robbie, Key), Open(D) E: ~In(Robbie, R2), ~In(Key, R2), In(Robbie, R1), In(Key, R1) PutKeyInBox P: In(Robbie, R1), Holding(Robbie, Key) E: ~Holding(Robbie, Key), ~In(Key, R1), In(Key, Box) The goal is: In(Key, Box), Locked(D) Construct a partial order plan to solve this problem. Clearly indicate at each step the modifications made to the plan: The action added, the causal links added and/or the ordering constraints added. Indicate any threats that exist at each step.