PROBLEM-SOLVING METHODS IN: ARTIFICIAL INTELLIGENCE

periodicdollsAI and Robotics

Jul 17, 2012 (4 years and 11 months ago)

241 views

t
;
NILS J. NILSSON Artificial Intelligence Group
Stanford Research Institute, Menlo Park, California
PROBLEM-SOLVING
METHODS IN :
ARTIFICIAL
INTElliGENCE
I
!
I
i
i
.
.
i
I
~
,v 111(
McGRAW-HILL BOOK COMPANY
New York San Francisco St. Louis Dusseldorf
Johannesburg Kuala Lumpur London Mexico Montreal
New Delhi Panama Rio de Janeiro
Singapore Sydney Toronto
~
i
:Ci;
STATE-SPACE SEARCH METHODS 65
A would certainly have missed it and thus would be inadmissible,
contrary to our assumption. Thus, we must assume that algorithm
A "knew" that there ~as no less costly p.ath through node n.) The i. :
actual cost of an optImal path constraIned to go through node ,[
n is ;1
f(n) = g(n) 4- h(n) It
, ~
from which we can state that '
h(n) = f(n) - g(n)
Now, as argued above, algorithm A knows that f(n) ~ f(8) and
therefore it knows that
h(n) ~ f(8) - g(n)
Such information available to algorithm A would permit a lower
bound estimate of
!
h(n) = f(8) - g(n) i .
,
On the other hand, algorithm A * used the evaluation function ! I
J
j(n) = O(n) 4- h(n) I;
We know from Lemma 3-3 that . I' J
j(n) ::;: f(8)
I; . ,
Thus we know!
!
O(n) 4- h(n) ::;: f(8) t
Therefore, whatever the h function used by A * it must have satisfied t:
the inequality , J
,
'I
h(n) ::;: f(8) - O(n) i
Now, at the time A* expanded node n, O(n) = g(n) by Lemma 3-2
and thus l
I
k(n) ::;: f(8) - g(n) I
!
But now we see that, at least for node n, algorithm A used informa- I
tion permitting a lower bound on h at least as large as the lower 1
bound used by algorithm A *. Thus A * could not be more informed 1
1'
than A, contradicting our assumption and proving the theorem. 1
3-10 THE HEURISTIC POWER OF h I
The selection of h is crucial in determining the heuristic power of the \
ordered-search algorithm. Using h = 0 assures admissibility but results
i
1
i
i
,
I
--
-p'aJ'apJO 'aq~ JO J'at.\.od °1~s1Jn'aq 'aq~ s'au1WJ'a~'aP ~'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s1qJ.,
"I{ uo punoq J'at.\.°1 'B ~ou s1 ~'Bq~ u01~ounJ 'awos 'I{ JoJ ~u1sn Aq A~n1q1ss1Wp'B
dn ~U1A~ Jo 'asu'adx'a 'aq~ ~'B P'au1'B~ 'aq U'BO J8t.\.od °1~s1Jn'aq u'a~JO
'A~111q1ss1Wp'B ~u11I1'B~u1'Bw
q~1t.\. ~u'a~s1sUOO s'apou ~S'aM'aJ 'aq~ spu'Bdx'a 'I{ uo punoq J'at.\.°1 'aIq1ssod
~s'aq~1q 'aq~ o~ l'Bnb'a 1,:( ~U!~~'a8 '~u'a1om'au1 An'BnSn snq~ s1 PU'B qOJ'B'as punq u1
3~N3E>11l3.lNI "v'I~I:JI.l~'v' NI SaOH.l3W E>NI/\'OS-W3'80~d 99
.J
~- -
STATE-SPACE SEARCH METHODS 67
1
, I
: i
i
! I
II
I !
I;' I ,
I:
J :
I
I
j;
i
'!
:1
Ii
! ~,
j';
.1:
jl
Ii'
.II, :
I.I" i'
1: '
"
I' '
: i
i 'I
! II
III
'"
I'"
!"
,
in
: II
I i I;
I; I
. ,
i
. '
,
!
i .
/: j
~ ' .1
W ' I
j: i
f\ I !
I. .
: ;
,:
I;' I
I '
"
j!
I
FIG. 3-8 A tree produced by an ordered search. II : t
1,4 : ~
If ( I.
I
!
r
68 PROBLEM-SOLVING METHODS IN ARTIFICIAL INTELLIGENCE !
search algorithm is the amount of effort involved in calculating h. The
best h would be a function identically equal to h, resulting in an absolute
minimum number of node expansions. Such an h could, for example, be
determined as a result of a separate complete search at every node, but
this obviously would not reduce the total computational effort.
Sometimes an h function that is not a lower bound on h is easier to
compute than one that is. In these cases the heuristic power might be
doubly improved-because the total number of nodes expanded may be
reduced (at the expense of admissibility) and the computational effort is
reduced. In certain cases the heuristic power of a given h can be increased
simply by multiplying it by some positive constant greater than unity. If
this factor is very large, the situation is as if O(n) = O. Such a selection, of
course, leads to an inadmissible algorithm but one that might nevertheless
perform satisfactorily. In fact, one might intuitively suppose that setting
O(n) = 0 would increase search efficiency in those cases in which any path
(not necessarily the least costly) to the goal is desired. In the next section
we shall present some results counter to such intuition.
To summarize, there are three important factors influencing the
heuristic power of an ordered-search algorithm:
1. The cost of the path
2. The number of nodes expanded in finding the path
3. The computational effort required to compute h
The selection of a suitable h then permits one to choose for each problem
;. a desirable compromise among these factors to maximize heuristic power.
j
: 3-11 THE IMPORTANCE OF 0
'!
In many problems, we merely desire to find some path to a goal node and
are unconcerned about the cost of the resulting path. (Weare, of course,
concerned about the amount of search effort required to find .a path.) In
such situations, intuitive arguments can be given both for including 0 in
the evaluation function and for ignoring it.
,
Intuitive argument for ignoring 0
When merely any path to a goal is desired, 0 can be ignored since, at any
stage during the search, we don't care about the costs of the paths de-
veloped thus far. We care only about the remaining search effort required
to find a goal node, and this search effort, while possibly dependent on the
h values of the open nodes, is certainly independent of the 0 values of the
open nodes. Therefore, for such problems we should use as the evaluation
function J = h.