| Current Path : /var/www/html/rkala/two/ |
| Current File : /var/www/html/rkala/two/IIT2019090.txt |
Note: You have to upload every small piece of rough work done. question no. 1: Replace all $digit by the most suitable character/numeral (case-sensitive). The final answer is all character replacement of all <digit> in an ascending order of <digit>. For example, if $1=E, $2=C, $3=8, then the answer is EC8. Compute a sublist from the first item such that the sum of the sub-list is less than or equal to the second argument of sublis Y. The function sublis is used for query. The function subl keeps appending the head into the third argument M till the sum is under the limit sublis(Z,Y,T):-subl(Z,Y,[],T). subl([],_,M,$1). subl([Q|_],Y,M,$2):-Y-Q<0. subl([Q|O],Y,M,T):-Y-Q>=0,I is Y-Q,append(M,[Q],B),subl($3,I,$4,T). question no. 2: The mentioned action is applied in a backward search. Show the state after the application of the action. The answer is all the state variables separated by a space in a sorted order. Source: k, ~y, q Goal: y, q Action A1: Precondition k, ~y, Effect y question no. 3: Arrange the algorithms A, B and C in an increasing order of computation time with the smallest computation time first The answer is A, B and C in a sorted order separated by a space, e.g. C A B A) Value Iteration, B) Uniform Cost Search, C) A* algorithm question no. 4: For the following planning problem, use the planning graph. Show all the variables generated at level 2, assuming source is level 0. Also calculate the sum level heuristic and max level heuristic for the given goal The first line of the answer is all the state variables generated till level 2 in a sorted order. Use ~ to denote negation. The second line of the answer is the sum level heuristic and max level heuristic separated by a space Source: B, ~T Goal: B, T, K Action A1: Precondition B, ~T, Effect K Action A2: Precondition ~T, K, Effect ~B Action A3: Precondition ~B, K, Effect T question no. 5: Replace all $digit by the most suitable character/numeral (case-sensitive). The final answer is all character replacement of all <digit> in an ascending order of <digit>. For example, if $1=E, $2=C, $3=8, then the answer is EC8. Compute factorial of an integer fac(1,$1). fac(Y,$2):-Q is Y-1,fac(Q,V),P is Y*$3. question no. 6: Using backward chaining identify the rules that are used to prove the truthness of the following variable. The answer is the actions in the path in a sorted order, e.g. R1 R3 R6 Compute the truth of the variable: b Initial knowldge base is as follows R1: u∧e→p R2: m∧c→b R3: p∧c→b R4: u R5: z∧u→m R6: z∧e→p R7: e∧k→c R8: z∧k→c R9: m∧u→b R10: e R11: k question no. 7: Using resolution any number of times find all new facts that contain a single symbol only that are known to be true and can be added in the knowledge base Assume ~ denotes a not. Only answer the new facts in any (not necissarily sorted) order in a space separated format e.g a b c d Initial knowldge base is as follows ~b∨~f n∨b∨i ~b∨f b∨f n∨b∨~i question no. 8: Replace all $digit by the most suitable character/numeral (case-sensitive). The final answer is all character replacement of all <digit> in an ascending order of <digit>. For example, if $1=E, $2=C, $3=8, then the answer is EC8. Compute a new list containing elements that are positive or zero sub([],[]). sub([X|O],F):-X>=0,sub($1,$2),append([X],W,F). sub([X|O],$3):-X<0,sub(O,F). question no. 9: Assume the following grid-map with walls on all sides. a b c d e f g h i The current utility estimate of the different states are as follows, when using a value iteration algorithm: a=0.1 b=3.4 c=6.3 d=4.1 e=9.2 f=0.9 g=1.9 h=0.7 i=6.6 The agent has action up, down, right and left. Each action results in the desired action with a probability of 0.7. The agent makes no motion with a probability of 0.1. The agent slips in either of the perpendicular direction of the applied action with no motion in the intended direction with a probability of 0.1 for each of the perpendicular directions. Hitting a wall has a negative reward of -10 with no motion. Motion without hitting or no motion has a reward of -0.1. Discount factor is kept as 1. There is no goal/terminal. For the following fixed policy, calculate the updated value of the utility of a. [1], [2], and similarly thereafter denote the question numbers. policy(a)=up, U(a)=[1] policy(a)=down, U(a)=[2] policy(a)=right, U(a)=[3] policy(a)=left, U(a)=[4] For value iteration with no fixed policy, calculate the updated value of the utility estimate of a, U(a)=[5]. Also calculate the policy for the updated utility estimate of a, policy(a)=[6]. In case of a tie, the preference of actions is up (highest), down, right, left (lowest). The answer will be 1 line with all abswers space separated as [1] [2] [3] [4] [5] [6], without square brackets question no. 10: Replace all $digit by the most suitable character/numeral (case-sensitive). The final answer is all character replacement of all <digit> in an ascending order of <digit>. For example, if $1=E, $2=C, $3=8, then the answer is EC8. Compute sum of all positive numbers sumif([],$1). sumif([J|U],M):-J>=0,sumif(U,R),$2 is $3+R. sumif([J|U],M):-J<0,sumif(U,$4). question no. 11: Using forward chaining find all *new* facts that contain a single symbol only that are known to be true and can be added in the knowledge base Only answer the new facts in a sorted order in a space separated format e.g a b c d Initial knowldge base is as follows y x∧m→e i∧h→n k∧f→n f y∧f→x n∧f→e k∧i→x i x∧k→n x∧n→r f∧y→m n∧m→r f∧i→m question no. 12: Give the substitution such that the following unification succeeds in the format X/abc Y/pqr … Unify(related(X, eldestson(f1)) , related(Y,Z)) question no. 13: The action A described below is guaranteed to be mutex with which all of the following actions. Here ~ is the not operator. Answer all possible actions guaranteed to be mutex separated by a space. E.g. A1 A2 A3 A5 Action A: Precondition a, Effect ~b A1: Precondition ~b, Effect ~a A2: Precondition a, Effect ~b A3: Precondition ~a, Effect ~b A4: Precondition a, Effect b A5: Precondition b, Effect a A6: Precondition ~b, Effect a