Professional Documents
Culture Documents
6
Figure 1: A partially defined
(customized) roadmap of
some cities in Nigeria 7
SCENARIO CONT’D
• Now, the agent’s performance measure contains many
other factors beside the cost of the ticket and the
undesirability of being arrested and deported.
• For example it wants to improve its spoken English, get
a suntan, capture more sights and so on.
• All these factors might suggest a vast array of possible
actions.
8
SCENARIO CONT’D
• However, given the seriousness of the situation, it
should be able to adopt the goal of driving down to
Lagos instead (
).
• Actions that will result in failure to reach Lagos on time
would be rejected without further consideration.
• Goals such as this help organize behaviour by limiting
the objectives that the agent is trying to achieve.
9
10
• What is goal formulation? This is the
first step towards solving a problem
( ).
• What is problem formulation?
11
• What is search?
.
• A search algorithm takes a as input and
returns a in the form of an
. Once a solution is found, the
recommended action is carried out. This is called
the
12
• We will consider a goal to be one out of a
set of – just those states in
which the goal can be satisfied.
can be viewed as operations
between world states,
so it is expected that the agent discovers
which set of actions will get it to a goal
state.
13
• A problem (
) consist of four
parts:
1. The : this is the state that the agent knows
itself to be in
2. A set of : this denotes the description of an
action in terms of which state will be reached by
carrying out an action while in a particular state.
[NB: 1 and 2 defines the state space or environment of the
problem]
14
Figure 1: A partially defined
(customized) roadmap of
some cities in Nigeria 15
3. A function: this is the action applied by the agent
to a single state description to ascertain if it is a goal state.
For example in chess, the goal is to reach a state called
“checkmate”, where the opponent’s king can be captured
on the next move no matter what the opponent does.
4. A function: in a case where one solution is
preferable to another, this becomes important. This
function assigns a cost to a path.
by searching
RECOGNIZE A SOLUTION
19
FORMULATING PROBLEMS
• Also note that the actions an agent takes as
well as the state that it is in are both
functions of the amounts of knowledge that
the agent has.
• All of these also depend on the nature of
connection the agent has with its
environment through its percepts and
actuators with which actions are executed.
20
PROBLEM TYPES
There are four basic types of problems:
1. Single-state problems (enhanced sensors)
2. Multiple-state problems (limited sensors)
3. Exploration problems (limited knowledge of
environment)
4. Contingency problems (loss of function)
• Let us consider an
environment somewhat different from the Nigeria
problem described earlier
21
22
1. Let the (vacuum) environment world contain two
locations
2. Each location may or may not contain dirt, and the agent
may be in one location or the other.
3. There are eight possible world states as shown in figure 4
in the next slide.
4. The agent has three possible actions: left, right and suck.
• If we assume that sucking is 100% effective.
• GOAL – clean up all dirt i.e. the goal is equivalent to the
state set {7,8}
23
1 2
3 4 5 6
7 8
Measuring Problem-solving Performance
The effectiveness of a search can be measured
in at least three ways:
1. Does it find a solution?
2. Is it a good solution (one with low path
cost)?
3. What is the search cost associated with the
time and memory required to find a
solution?
25
Measuring Problem-solving Performance
2 5 1 2 3
1 4 8 4 5 6
7 3 6 7 8
33
The 8-Queens Problem
34
Missionaries and Cannibals
35
EXAMPLE PROBLEMS
REAL WORLD PROBLEMS
1. – as can be seen in a variety of applications
such as routing in computer networks, automated travel
advisory systems and this
application is somewhat more complicated, because airline
travel has a very complex path cost, in terms of money, time
of day, type of airplane, frequent-flyer – also, certain actions
do not have known outcomes e.g. flights can be late or
overbooked, connections can be missed and fog or
emergency maintenance can cause delays . 36
EXAMPLE PROBLEMS
REAL WORLD PROBLEMS
2. – Consider the
problem, "Visit all the 22 cities traversable in Figure 1 at least once,
starting and ending in Lagos." This seems very similar to route
finding, because the operators still correspond to trips between
adjacent cities. But for this problem, the must record
more information. In addition to the agent's location, each state
must keep track of the set of cities the agent has visited. So the initial
state would be "In Lagos; visited {Lagos}," a typical intermediate
state would be "In Benin-City; visited {Lagos, Sagamu, Ijebu-Ode,
Benin-City}," and the goal test would check if the agent is in Lagos
and that all 22 cities have been visited.
37
EXAMPLE PROBLEMS
REAL WORLD PROBLEMS
3. - A typical VLSI chip can have as
many as a million gates, and the positioning and
connections of every gate are crucial to the
successful operation of the chip. Computer-aided
design tools are used in every phase of the
process. Two of the most difficult tasks are cell
layout and channel routing.
38
EXAMPLE PROBLEMS
REAL WORLD PROBLEMS
4. Assembly sequencing – In assembly problems, the problem
is to find an order in which to assemble the parts of some
object. If the wrong order is chosen, there will be no way to
add some part later in the sequence without undoing some
of the work already done.
. Thus,
the generation of legal successors is the expensive part of
assembly sequencing, and the use of informed algorithms (as
against the uninformed) to reduce search is essential.
39