Artificial Intelligence CS607 WWW.VUTUBE.EDU.PK Assignment No. 1 Question No.1 Apply the Best First Search on the tree given below to reach to the goal N (Highlighted) S 10 8 C A 15 17 12 14 15 13 E D B G F 9 J 10 L K H 7 M 0 4 10 I 8 N O Solution: Step 1. S 10 8 C A 15 17 12 14 15 13 E D B G F 9 J 10 K L 7 H M 4 0 10 I N 8 Available options: A , B , C Best Option: A Virtual University of Pakistan O Artificial Intelligence CS607 So, S 10 8 C A 15 17 12 14 15 13 E D B G F 9 J 10 L K H 7 M 0 4 10 I 8 N O Step 2. S 10 8 C A 15 17 12 14 15 13 E D B G F 9 J 10 K L H 7 M 4 0 10 I N 8 O Available options: D, E, F , B , C Best Option: C So, Virtual University of Pakistan 2 Artificial Intelligence CS607 S 10 8 C A 15 17 12 14 15 13 E D B G F 9 J 10 L K H 7 M 0 4 10 I 8 N O Step 3. S 10 8 C A 15 17 12 14 15 13 E D B G F 9 J 10 L K H 7 M 0 4 10 I 8 N O Available options: D, E, F , B , G , H , I Best Option: I So, S 10 8 C A 15 17 12 14 15 13 E D B G F 9 J 10 K L 7 H M 4 0 10 I N Virtual University of Pakistan 8 O 3 Artificial Intelligence CS607 Step 4. S 10 8 C A 15 17 12 14 15 13 E D B G F 9 J 10 L K H 7 M 0 4 10 I 8 N O Available options: D, E, F , B , G , H , N , O Best Option: N So, S 10 8 C A 15 17 12 14 15 13 E D B G F 9 J 10 K L H 7 M 4 0 10 I N 8 O We have reached our goal. Question No.2 Apply the beam search (with k = 2) on the tree given below to reach the Goal M the distance of all the nodes from goal node is written adjacent to each node; show all the steps and give the final path from Start node S to the final node M, in the form of list of nodes or highlighted path. Virtual University of Pakistan 4 Artificial Intelligence CS607 S 13 12 C A 13 12 B 12 E D J 8 G F 13 9 10 8 H 8 P 4 3 N K 10 I O 0 M Solution: Step 1. S 13 12 C A 13 12 E D B 12 J 8 G F 13 9 10 8 P K H 8 4 10 I N 3 O 0 M Nodes considering: A, C Node Selected: C Step 2. Virtual University of Pakistan 5 Artificial Intelligence CS607 S 13 12 C A 13 12 B 12 E D J 8 G F 13 9 10 8 H 8 P 4 3 N K 10 I O 0 M Nodes considering: A, B Node Selected: B Step3. S 13 12 C A 13 12 E D B 12 J 8 G F 13 9 10 8 P K H 8 4 10 I N 3 O 0 M Nodes considering: F, P Node Selected: F Step 4. Virtual University of Pakistan 6 Artificial Intelligence CS607 S 13 12 C A 13 12 B 12 E D J 8 G F 13 9 10 8 H 8 P 4 3 N K 10 I O 0 M No next node after F so moving back to its parent B and going to P. Step 5. S 13 12 C A 13 12 E D B 12 J 8 G F 13 9 10 8 P K H 8 4 10 I N 3 O 0 M Only one child node M moving to it and stopping our search as it is our goal. Virtual University of Pakistan 7
© Copyright 2026 Paperzz