AIppt 3
AIppt 3
1
Introduction
an agent can act by establishing goals
and considering sequences of actions that
might achieve those goals.
A goal and a set of means for achieving
performance measure.
Cont’d
Goal formulation, based on the current
situation, is the first step in problem solving.
As well as formulating a goal, the agent may
2. multiple-state problems
Suppose that the robot has no sensor that
states.
Multi state problems: know which states
might be in.
7
Cont’d
3.contingency problems
Obviously, the agent does have a way to solve the problem
starting from one of {1,3}: first suck, then move right, then
suck only if there is dirt there.
Thus, solving this problem requires sensing during the
execution phase.
Notice that the agent must now calculate a whole tree of
in its memory.
The point of a map is to provide the agent with information
about the states it might get itself into, and the actions it can
take.
The agent can use this information to consider subsequent
to be in.
The set of possible actions available to the
a cost to a path.
In all cases we will consider, the cost of a path
a solution?
Space complexity: how much memory does it
on.
In effect, iterative deepening combines the
21
COMPARING SEARCH STRATEGIES
before.
This requires every state that is generated to be kept
26
in
memory, resulting in a space complexity of O(bd),
CONSTRAINT SATISFACTION SEARCH
A constraint satisfaction problem (or CSP) is a special kind of
problem that satisfies some additional structural properties beyond
the basic requirements for problems in general.
In a CSP, the states are defined by the values of a set of
variables and the goal test specifies a set of constraints that the
values must obey.
For example, the 8-queens problem can be viewed as a CSP in which
the variables are the locations of each of the eight queens; the
possible values are squares on the board; and the constraints state
that no two queens can be in the same row, column or diagonal.
A solution to a CSP specifies values for all the variables such that
the constraints are satisfied.
Crypt arithmetic can also be described as CSPs.
Many kinds of design and scheduling problems can be expressed
as CSPs, so they form a very important subclass.
CSPs can be solved by general-purpose search algorithms, 27 but
Sudoku
•variables are cells
• domain of each variable is {1,2,3,4,5,6,7,8,9}
29
• constraints: rows, columns, boxes contain all different
numbers
Question ?
30
Quiz (5pt)?
1. Define problem(2pt)?
2. Write two elements of problem(1pt)?
3. What is blind search and give example
(2pt) ?
31