You are on page 1of 4

Islington College

Artificial Intelligence
CU6051NI
Week 1 - Workshop
Submitted By:

Submitted To:

Dilip Raya

Mr. Sukant Kumar Sahu

ID: 14046983

Lecturer

Group: L3C6
Date: 24th September 2016

Artificial Intelligence
1. Do the first iteration of the A* algorithm and give the resulting nodes n in the first level
of the search tree, together with their g(n) and h(n).
(A2, g=1, h=4), (B3, g=1, h=4), (A4, g=1, h=6).

Answer:
We know; f(n) = g(n) + h(n)
f(A2) = 1 + 4 = 5
f(B3) = 1 + 4 = 5
f(A4) = 1 + 6 = 7

2. Do the next iteration of the A* algorithm; write down which node you expand and
which successor nodes are added. Ignore nodes that already have been handled
before.
Expand A2 (not B2 because A2 is to the left of B2) resulting in A1(2,5).

Answer:
In this step; A2 and B3 has been expanded.
The successor node for A2 is A1; f(A1) = 2 + 5 = 7.
And the successor nodes for B3 are C3; f(C3) = 2 + 3 = 5 and B4; f(B4) = 2 + 5 = 7
respectively.
3. Continue iteration of the A* algorithm until you reach B5; give the order in which you
have expanded the nodes starting from the root node. Also give the g and h value for
each of these nodes.

Dilip Raya

14046983

Artificial Intelligence

Answer: The order in which the nodes expand is A3 -> B3 -> B4 -> B5
The optimal solution for the given problem by this method is:
f(n) = g(n) + h(n)
f(B5) = 3 + 6 = 9

Figure showing the route of the path of the solution:


A
3

A
2

B
3

A
4

A
1

C3

B
4

B5

B
1

C5

D5

D4

E4

E3

E2

Dilip Raya

14046983

Artificial Intelligence

Table of states:
State
A2
B3
A4
A1
C3
B4
B1
B5
C5
D5
D4
E4
E3
E2

Dilip Raya

g(n)
1
1
1
2
2
2
3
3
4
5
6
7
8
9

h(n)
4
4
6
5
3
5
4
6
5
4
3
2
1
0

f(n)
5
5
7
7
5
7
7
9
9
9
9
9
9
9

14046983

You might also like