0% found this document useful (0 votes)
169 views11 pages

AI Assignment # 1

The document provides details of an assignment for an Artificial Intelligence course. It includes 10 questions related to topics like parameters for judging intelligent agents, distinguishing between knowledge and information, search algorithms like bidirectional search and uniform cost search, and applying search algorithms like A* to example problems.

Uploaded by

Rafshan Imbisaat
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)
169 views11 pages

AI Assignment # 1

The document provides details of an assignment for an Artificial Intelligence course. It includes 10 questions related to topics like parameters for judging intelligent agents, distinguishing between knowledge and information, search algorithms like bidirectional search and uniform cost search, and applying search algorithms like A* to example problems.

Uploaded by

Rafshan Imbisaat
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/ 11

Jinnah University for Women

Department of Computer Science & Software Engineering


Subject: Artificial Intelligence (CSC 4261)
Theory Assignment #01
Note: Attempt all questions
Total Marks: 10

1. What are the parameters to judge an intelligent agent? Does intelligent agents are super-
efficient and have every knowledge about the domain?

PEAS is the parameter through which we can judge intelligent agent.


P (Performance):- The output we are expecting from our agent.
E (Environment):- All the things under which the agent works.
A (Actuator):- The device (hardware/software) through which agent perform action.
(Actuator can be different for different agent).
S (Sensor):- The device through which machine will take input.

Yes, intelligent agents are super-efficient but not every intelligent agent contains every
knowledge about the domain.

2. How do you distinguish between knowledge and information? Justify your answer with
examples

Information: It is a single entity that describes a person but through information, a machine or a
person cannot take any decisions.

Example: Date of Birth of a person is a simple form of information that describes person age
and year / month, that person was born we cannot take any decisions on that particular age.

Knowledge : It’s a collection of information through any machine, person or even an AI agents
can make a decision out of it.

Example: if we want our agent to recognize a chair we give him chair related info like it have
two legs and a person can sit on it so agents can also detect it’s could be any animal but them we
say it’s a nonliving object which is main characteristic them the agent will recognize completely.

3. Do you think bidirectional search has the optimal time complexity? Justify your answer.

Ans: We use bidirectional approach more often because it is comparatively faster and it’s usually
reduces the required exploration.
Complexity:

Suppose ‘b’ is the branch factor of tree and ‘d’ is the distance of goal vertex then then
the normal complexity would be (O(bd)) but if we execute two search operation would
be (O(bd/2)) and the total a would be ;

O(bd/2) + O(bd/2) after calculating the complexity will be O(b d).

4. Apply uniform cost search algorithm to reach “Vaslui” and write each steps:
5. Apply any algorithm which gives guaranteed optimal solution to reach point “h” in the
following search space.

Assumption for heuristic value.

a = 1, b = 3, c = 2, d = 5, e = 7, f = 4, g = 8, = 0

1- Start from mode ‘a’ node ‘b’ and ‘c’ can be reached
f(b) = 10 + 3 = 13
f(c) = 12 + 2 = 4

Since: f(b) < f(c) so go to node ‘b’


Path: a  b
2- From ‘b’ node ‘c’ and ‘d’ can be reached.
F(c) = (10 + 9) + 2 = 21
f(d) = (10 + 8 ) + 5 = 23

Since, f(c) < f(d) so go to node ‘c’


Path : a  b  c
3- From ‘c’ node ‘e’ and ‘f’ can be reached.
F(e) = (10 + 9 3) + 7 = 29
F(f) = (10 + 9 + 1) + 4 = 24

Since f(f) < f(e) so go to node ‘f’


Path: a  b  c  f
4- From ‘f’ node ‘h’ can be reached
F(h) = (10 + 9 + 1 + 6) + 0 = 26
Path: a  b  c  f  h
6. In searching algorithms, which search algorithms take maximum memory and still do not give
the solution?

Breath First Search is the algorithm that have a drawback that it consumes a lot of memory
because it saves all the present and next coming nodes. It also takes a lot of time if the solution
node it far away.

7. Consider the following scenario:

“ Mr.Ali is a medicine drug supplier. He mainly deals in ASian countries and he does have
proper legal permission to export medicine drugs. Mr.Ali has a business partner named Mr.Zain
and they both have divided their export areas. The countries where they export medicine drug
restricted them to provide only 6% drugs but sometimes for the sake of extra money Mr.Zain
exports more quantity and sells it to drug suppliers. The profit is then shared between both
Mr.Ali and Mr.Zain.Somehow Mr.Ali knows that Mr.Zain and now he tries to prove that
Mr.Zain is a criminal.

Apply forward chaining and backward chaining to prove the required fact.

Forward Chaining:

Facts:

Step 01:

1) Mr. Ali is a drug supplier


Mr. Ali (A), drug supplier (S)
Drug Supplier (Mr. Ali)
d (A)
2) Mr. Ali exports medical drugs
Exports (e), Medical drugs (d)
Exports (Mr. Ali, Medical drugs)
e
(A,d)
3) Mr. Ali has business partner named Zain
Mr. Zain (z), business partner (b)
Business partner (Mr. Zain, Mr. Ali)
b(Z,A)
4) Mr. Zain exports more quantity and sells it to drug supplier.
Quanity (q)
Z Λ e Λ q Λ sells (z , d , s)  criminal (c)
5) Mr. Zain is criminal
Criminnal (c)
Criminal (Mr. Zain)
C(z)
Step 2

Backward Chaining:

Step 1:

1) Mr. Ali is a drug supplier


Mr. Ali (A), drug supplier (S)
Drug Supplier (Mr. Ali)
d (A)
2) Mr. Ali exports medical drugs
Exports (e), Medical drugs (d)
Exports (Mr. Ali, Medical drugs)
e
(A,d)
3) Mr. Ali has business partner named Zain
Mr. Zain (z), business partner (b)
Business partner (Mr. Zain, Mr. Ali)
b(Z,A)
4) Mr. Zain exports more quantity and sells it to drug supplier.
Quanity (q)
Z Λ e Λ q Λ sells (z , d , s)  criminal (c)
5) Mr. Zain is criminal
Criminnal (c)
Criminal (Mr. Zain)
C(z)

Step 2:

8. Consider the following tree:

In the above tree find the goal node “M” with least memory consumption and definite goal
finding.Justify the use of your search method.
Depth/Level Deeping depth Search

0 A

1 A, B, C

2 A, B, D, E, C, F, G

3 A, B, D, H, I, E, J, K, C, F, L, M

Goal node

9. Is hill climbing technique a complete method? When do you consider an algorithm is


completed?

No hill climbing isn’t a complete method because it doesn’t allow backtracking and also it get
stuck in the local maxima.

10. Mr Wjid is planning to visit a new city but the problem is that he does not know the paths of
historical places of the city. After landing there he decided to visit the “Museum”. But first he
decided to book a room in a hotel for his stay. He apparently visits the nearest hotel and books
the room. After booking he starts his journey for “Museum”. He first calculates the cost from
hotel to museum which was 40 dollars.
And in between there were four junction points which he had to cross. The junction points were:
“Bus stop” , “ Medical market” , “Book market” and “toy shop”. To reach the first junction he
needs 4 dollars, from the first junction to second junction he needs 7 dollars,from second
junction to third junction he needs 15 dollars from the third junction there were two paths ; one
path towards the fourth junction which cost 8 dollars and one path towards the final point which
was a museum and it costs 19 dollars. Now after calculating cost he now made his trip budget in
which he calculates the expected cost from each junction to museum which was:

First junction to museum: Expected cost will be 13 dollars

Second junction to museum: Expected cost will be 11 dollars

Third junction to museum: Expected cost will be 10 dollars

Fourth junction to museum: Expected cost will be 14 dollars

Task: Solve this problem and calculate the best possible path with least cost from hotel to
museum.

Using A* Algorithm

i) F(N) = g(N) + h(N)


F(H) = 0 + 40
= 40
Explore A
ii) F(B) = 4 + 13
F(B) = 17
Explore B
HotelBusstop  Museum = 4 + 7 + 11
HotelBusstop  Museum = 22
Now explore HostelBusstop  Museum

HotelBookMarket  4+7+15+10=36
Explore BookMarket

HotellBusstopMedicalMarketBookMarket  Museum = 4+7+15+19+0


= 45
HotellBusstopMedicalMarketBookMarket  ToyShop = 4+7+15+8
= 48
We take HotelBusstopMedicalMarketBookMarket  Museum

Path:
Hotel  Busstop  MedicalMarket

BookMarket

Museum

You might also like