0% found this document useful (0 votes)
9 views3 pages

Spring 2025 - CS607 - 1

Uploaded by

harram shamaim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Spring 2025 - CS607 - 1

Uploaded by

harram shamaim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Total marks = 20

Artificial Intelligence (CS607) Deadline


Assignment # 01 th
6 of May 2025
Spring 2025

Please carefully read the following instructions before attempting the assignment.

RULES FOR MARKING


It should be clear that your assignment would not get any credit if:
 The assignment is submitted after the due date.
 The submitted assignment does not open or the file is corrupt.
 Strict action will be taken if the submitted solution is copied from any other student or the
internet.

You should consult the recommended books to clarify your concepts as handouts are not sufficient.
You are supposed to submit your assignment in Doc or Docx format.
Any other formats like scan images, PDF, ZIP, RAR, PPT, BMP, etc. will not be accepted.

Topic Covered:
 Introduction of Artificiall Intelligence
 Search Strategies
 A* Algorithm

Topic Covered
Lecture 01 to Lecture 10

NOTE

No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding
or internet malfunctioning etc.). Hence refrain from uploading assignments in the last hour of the deadline. It is
recommended to upload the solution at least two days before its closing date.

If you people find any mistake or confusion in the assignment (Question statement), please consult with your
instructor before the deadline. After the deadline, no queries will be entertained in this regard.

For any query, feel free to email me at:


[email protected]
Question Marks (20)
You are required to implement the A* (A-star) algorithm to find the shortest path from a source node S to a goal node G
considering the following graph.

You must:
 Show the path taken at each step(No need to draw graph at each step).
 Calculate the total cost (f(n)=g(n) + h(n)) at each step where g(n) is actual cost and h(n) is the heuristic cost.
 Show the final optimal path with cost.

Sample Solution File:


Current Open List (with Closed f(n)
Step g(n) values Action Taken
Node f = g + h) List values

Solution:

By using A* (A-star) algorithm to find the shortest path from a source node S to a goal node G we will use cost function:

F(n) = g(n) + h(n)

g(n) = path cost from start node S to node n

h(n) = heuristic cost from node n to goal G


Node g(n) h(n)

S 7

A 2 6

B 5 4

C 6 2

D 9 1

G 9 0

Current Open List (with f Close f(n)


Step g(n) values Action Taken
Node = g + h) d List values

A(2+6 = 8), B(5+4 S=0, A=2, Expand S, add A &


1 S S A=8, B=9
=9) B=5 B

B(5+4 =9), C(6+2


Expand A, add C &
2 A =8), S, A C=6, D=9 C=8, D=10
D
D(9+1 =10)
B(5+4 =9), D(9+1
3 C =10), S, A, C G=9 G=9 Expand C, add G
G(9+0 =9)

S,A,C,
4 G - - - Goal Achived
G

Path with cost : 2( S  A ) + 4 (A C) + 3(C  G) = 9

You might also like