Home Work 3: Grade weightage twice the normal weight. Due date: Nov 3rd Consider a domain where we have fluents: p1, p2, p3, and f; action a, b, and c. We have the effect of action described as follows: causes(a, f, s). in(p1, s). in(p2, s). %% meaning a causes f if p1, p2. causes(b, p2, s2). in(p3, s2). %% meaning b causes p2 if p3. causes(c, p3, s3). in(neg(f), s3). %% meaning c causes p3 if ~f. We also have the following information about the initial state and goal state: initially(p1). initially(neg(p2)). initially(neg(p3)). initially(neg(f)). finally(f). finally(p1). (i) Write an Smodels program which will generate plans for the above domain. I.e., each answer set of the program will encode a plan. (You have the restriction that at each time point -- until the goal is reached -- exactly one action occurs.) Note that your programs should use the above as facts. (ii) Now consider an updated domain where we have a new action d whose effect is described by causes(d, f, s4). in(p3, s4). %% meaning d causes f if p3. We also now assume that actions take time. We have the following information about that. duration(a,3). %% a takes 3 time units. duration(b,5). duration(c,4). duration(d,6). Now a plan is an occurrence of actions at different time points so that no two actions overlap, and at every time point -- until the goal is reached -- exactly one action is under execution. Also when you reason about the effect of actions, the effect becomes valid only after the duration of that action is over. Moreover, the fluent corresponding to that effect has its truth value as ``unknown'' during the execution of the action. For example, if p3 is true at time point 1, f is false at time point 1, and d occurs at time point 1, then f becomes true at time point 1+6=7, and the value of f is unknown at time points 2..6, as we do not know exactly when the transition of f from false to true takes place. Now modify your earlier planner to take into account all this, and find a plan of minimal length. (iii) For this project you need to submit a report, hard copy of your code with explanations, and if you only do part of the assignment then state which part you did and which you did not.