0% found this document useful (0 votes)
42 views

CAP402 Artificial Intelligence

The document provides answers to questions related to artificial intelligence concepts like the Turing test, water jug problems, and solving puzzles using search algorithms. For question 1, the real Turing test is described as involving a human judge communicating with one human and one machine via text to determine which is which. Question 2 provides steps to obtain 1 liter of water using a 5 liter and 2 liter jug. Question 3 lists problems that can be solved better using production systems than state space search, like the 8 puzzle.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

CAP402 Artificial Intelligence

The document provides answers to questions related to artificial intelligence concepts like the Turing test, water jug problems, and solving puzzles using search algorithms. For question 1, the real Turing test is described as involving a human judge communicating with one human and one machine via text to determine which is which. Question 2 provides steps to obtain 1 liter of water using a 5 liter and 2 liter jug. Question 3 lists problems that can be solved better using production systems than state space search, like the 8 puzzle.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 11

CAP402

Artificial Intelligence

HW-1

SUBMITTED TO:-
RAJNI

SUBMITTED BY
PRIYANKA SHARMA
ROLLNO
RTB901A04
MSC( CS)
Part A

1. The turing test has often been incorrectly interpreted as being


a test of whether or not a person could distinguish between
responses from a computer and responses from a person. How
does this differ the real turing test? Are the two tests
equivalent? If not, explain why they are not?
Ans) Sol
The Turing test is a proposal for a test of a machine's ability to
demonstrate intelligence. It proceeds as follows: a human judge engages
in a natural language conversation with one human and one machine,
each of which tries to appear human. All participants are placed in
isolated locations. If the judge cannot reliably tell the machine from the
human, the machine is said to have passed the test. In order to test the
machine's intelligence rather than its ability to render words into audio,
the conversation is limited to a text-only channel such as a computer
keyboard and screen.

Conventionally, the Turing test is conceived as having a human judge and


a computer subject who attempts to appear human. Critical to the concept
is the parallel situation of a human judge and a human subject, who also
attempts to appear human. The intent of the test is for the judge to attempt
to distinguish which of these two situations is actually occurring. It is
presumed that a human subject will always be judged human, and a
computer is then said to "pass the Turing test" if it too is judged human.
Any of these roles may be changed to form a "reverse Turing test".

Real Turing Test:- in this test there is a interrogator on one side one
male client and one female client on separate computer. The mode of
communication is not verbal but it is in the form of text-type writing.
After some time the female client is replaced by the machine and the
interrogator have to identify that the whether there are human being or
machine on the other side.

These two test are not really related with the artificial intelligence
because they are concerned with the behaviors as well as imitate the
human being. The intelligence of the human being vary from person
from person. So these two test are practically not applicable and these
are totally different.
Q)2Given a 5-litre jug filled with water and an empty 2-litre jug, how
can one obtain precisely 1-litre in the 2-litre jug? Water may either
be discarded or poured from one jug to another; however, no more
than the initial 5 liters is available. Use production system to solve the
problem.
Ans) Sol There are two jugs one is of 5-litre and another is of 2-litre. 5
litre jug is full of water and the jug of 2 litre is empty.

Assume that A is the name of 5 litre jug and B is 2 lire jug.


Step 1. Pour the water from A to B.
Step 2. Discard the water from B.
Step 3. Again pour the water from A to B.
Step 4 Discard the water from B.

Now there is one litre water in jug A.


Step 5. Pour the water from A to B.

Now there is one litre water in jug B(jug of 2 litre).

3)Name some the problems of 8 puzzle using state space search


where production system can be used in a better way than state
space search.

Ans) A state represents a status of the solution at a given step of the


problem solving procedure. The solution of a problem, thus, is a
collection of the problem states. The problem solving procedure applies
an operator to a state to get the next state. Then it applies another operator
to the resulting state to derive a new state. The process of applying an
operator to a state and its subsequent transition to the next state, thus, is
continued until the goal (desired) state is derived. Such a method of
solving a problem is generally referred to as state space approach. We
will first discuss the state-space approach for problem solving by a well-
known problem, which most of us perhaps have solved in our childhood.

Example: 8 Puzzle

An 8 puzzle is a simple game consisting of a 3 x 3 grid (containing 9


squares). One of the squares is empty.
The object is to move to squares around into different positions and
having the numbers displayed in the "goal state".
The image to the left can be thought of as an unsolved initial state of the
"3 x 3" 8 puzzle.
Here is the shortest solution generated by the 8 puzzle program for the
initial state given above. (The program animates through each game state)
+-----+
|8 3 5|
|4 1 6|
|2 7 |
+-----+

+-----+
|8 3 5|
|4 1 |
|2 7 6|
+-----+

+-----+
|8 3 |
|4 1 5|
|2 7 6|
+-----+

+-----+
|8 3|
|4 1 5|
|2 7 6|
+-----+

+-----+
|8 1 3|
|4 5|
|2 7 6|
+-----+

+-----+
|8 1 3|
| 4 5|
|2 7 6|
+-----+

+-----+
|8 1 3|
|2 4 5|
| 7 6|
+-----+

+-----+
|8 1 3|
|2 4 |
|7 6 5|
+-----+

+-----+
|8 1 3|
|2 4|
|7 6 5|
+-----+

+-----+
|8 1 3|
| 2 4|
|7 6 5|
+-----+

+-----+
| 1 3|
|8 2 4|
|7 6 5|
+-----+

+-----+
|1 3|
|8 2 4|
|7 6 5|
+-----+

+-----+
|1 2 3|
|8 4|
|7 6 5|
+-----+
Total Number of moves: 14
A search tree for 8-puzzle.

Part B

Q4)Describe how the A* could be used to find the shortest solution


to a water jug problem.
ANS) State: (x, y) x = 0, 1, 2, 3, or 4 y = 0, 1, 2, 3
•Start state: (0, 0).
•Goal state: (2, n) for anyn.
•Attempting to end up in a goal state

Q5) How does Breath- First Search would work better than Depth –
First search and vice-versa?
Ans) Sol .

Depth First Search

Using Depth First Search let's find a path between nodes F

Initially there is an Open list and a Closed List. An Open list keeps track
of what you need to do, and the Closed List keeps track of what you have
already done.

• Open List: A
• Closed List: <empty>
we discover the neighbors of our A node. To put another way, let's
take the first item from our Open list and explore its neighbors:

these are a ,b ,c

Our Open list contains two items. For depth first search and breadth first
search, you always explore the first item from our Open list. The first
item in our Open list is the B node. B is not our destination, so let's
explore its neighbors:

Our new nodes are D and E, and we add these nodes to the beginning of
our Open list:

• Open List: D, E, C
• Closed List: A, B

D is at the beginning of our Open List, we expand it. D isn't our


destination, and it does not contain any neighbors. All you do in this step
is remove D from our Open List and add it to our Closed List:

• Open List: E, C
• Closed List: A, B, D

Our Open list will have the E node removed and the F and G nodes
added. The removed E node will be added to our Closed List:

• Open List: F, G, C
• Closed List: A, B, D, E

We now expand the F node. Since it is our intended destination, we


stop:

The final path taken by our depth first search method is what the
final value of our Closed List is: A, B, D, E, F.
Breadth First Search:-

In breadth first search, newly explored nodes are added to the end of your
Open list. Let's see how that change will affect our results.

Let's try to find a path between nodes A and E. Let's start with our
root/goal node:

• Open List: A
• Closed List: <empty>

First of all let's explore the neighbors of our A node.

We remove A from our Open list and add A to our Closed List. A's
neighbors, the B and C nodes, are added to our Open list. They are added
to the end of our Open list, but since our Open list was

Open List: B, C

Closed List: A

B is now moved to our Closed List, but the neighbors of B, nodes D and
E are added to the end of our Open list:

• Open List: C, D, E
• Closed List: A, B

We now expand our C node:

Since C has no neighbors, all we do is remove C from our Closed List and
move on:

• Open List: D, E
• Closed List: A, B, C

Similar to Step 3, we expand node D. Since it isn't our destination, and it


too does not have any neighbors, we simply remove D from our to Open
list, add D to our Closed List, and continue on:

• Open List: E
• Closed List: A, B, C, D

Our final versions of the Open and Closed Lists contain the following
data:

• Open List: <empty>


• Closed List: A, B, C, D, E

from A to E takes you through B, C, and D using breadth first search.

On the basis of above example we can say breath first search is better
than depth first search.

Q6)While solving the problem of 8 puzzle using hill climbing what


are the problems which can occur?
Ans) For the 8-puzzle problem is, evaluation function f (x) = g (x), Where
g (x) is the number of mislaid tiles in node x
Some steps are given to ;

Step1: Initially we have to make a stack having one element in each place
and also containing of the root node.

Step2: we have to test them to see whether the top element in the queue is
a goal node or not. If it is goal not then stop, else go to step 3.
Step3: in this step we have to eliminate the top element from the stack
and add the first element’s descendants, if any, to the top of the stack
according to arrangement computed by the estimated function.

Step4: At last, If the stack is empty, then indicate program is not


successful else, go to Step 2 and perform the all steps again.

The below created diagrams show the working of hill climbing method.

2 8 3
1 4
7 6 5

2 3
1 8 4 2 8 3
7 6 5 1 4
7 6 5

2 8 3
1 4
7 6 5

2 3
1 8 4
7 6 5

1 2 3
8 4
7 6 5

1 2 3
7 8 4
6 5

You might also like