Properties of AI Problems
Properties of AI Problems
Knowledge Representation
Intelligence/intelligent behaviour requires knowledge.
Properties of Knowledge
Voluminous
Hard to characterize
Constantly changing
Use of Knowledge
Provides a way of solving complex problems by
exploiting the structures of the objects that are
involved.
Abstraction
Provides a way of separating important features and
variations from the many unimportant ones that
would otherwise overwhelm any process.
Advantages of using AI Techniques
For example:
White pawn at Square( file e, rank 2) AND
Square( File e, rank 3) is empty AND Square(file
e, rank 4) is empty, then move the pawn from
Square( file e, rank 2) to Square( file e, rank 4).
Way to Describe Chess Moves
A Water Jug Problem
Water Jug Problem
The state space for this problem can be described as the
set of ordered pairs of integers (x,y) such that x = 0, 1,2,
3 or 4 and y = 0,1,2 or 3; x represents the number of
gallons of water in the 4-gallon jug and y represents the
quantity of water in 3-gallon jug
The start state is (0,0)
The goal state is (2,n)
Production Rules for the
Water Jug Problem
A Water Jug Problem (Contd)
To solve the water jug problem
(4,0) (0,3)
They are bad to the extent that they may miss points of interest
to particular individuals.
On the average they improve the quality of the paths that are
explored.
are available: C B
A B C
CLEAR(x) [ block x
Goal:
has nothing on it]-> Start: ON(C,A) ON(B,C) and
ON(A,B)
ON(x, Table)
CLEAR(x) and
ON(B,C) and ON(A,B)
CLEAR(y) -> ON(x,y)
[ put x on y] ON(B,C) ON(A,B)
CLEAR(A) ON(A,B)
ON(B,C)
CLEAR(A) ON(A,B)
Proving Mathematical Theorem
Suppose we are trying to prove a mathematical theorem. We proceed by
first proving a lemma that we think will be useful. Eventually, we
realize that the lemma is no help at all.
Are we in trouble?
No, Everything we need to know to prove the theorem is still true and
in memory, if it ever was.
Any rules that could have been applied at the outset can still be applied.
All we have lost is the effort that was spent exploring the blind alley.
An Example of the 8-Puzzle
An Example of the 8-Puzzle
8-puzzle problem
40
Algorithm : Check Duplicate Nodes
1. Examine the set of nodes that have been created so far to see if the new node already
exists.
(a) Set the node that is being expanded to point to the already existing-node corresponding
to its successor rather than to the new one. The new one can simply be thrown away.
(b) If you are keeping track of the best (shortest or otherwise least-cost) path to each node,
then check to see if the new path is better or worse than the old one. If worse, do
nothing. If better, record the new path as the correct path to use to get to the node and
propagate the corresponding change in cost down through successor nodes as
necessary.
41
The Missionaries and cannibals Problem
Cryptarithmetic
Some Cryptarithmetic Problems
42
Four steps for designing a program to solve a problem:
1. Define the problem precisely
2. Analyse the problem
3. Identify and represent the knowledge required by the task
4. Choose one or more techniques for problem solving and
apply those techniques to the problem.