Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:04,140 --> 00:00:08,310
Here is the four one state space search
algorithm.
2
00:00:08,310 --> 00:00:12,937
This algorithm is defined as a function
forward search that takes three arguments
3
00:00:12,937 --> 00:00:16,322
namely the three components that make up
a planning problem.
4
00:00:16,322 --> 00:00:20,216
The first component is the set of
operators defined for the planning
5
00:00:20,216 --> 00:00:22,980
problem.
Then we have an initial state and a goal
6
00:00:22,980 --> 00:00:25,971
description.
The algorithm works by starting from the
7
00:00:25,971 --> 00:00:30,485
initial state and searching from here.
And it also builds up a solution plan why
8
00:00:30,485 --> 00:00:34,013
we go through this loop.
As for the previous search algorithms,
9
00:00:34,013 --> 00:00:38,530
the first thing in the loop we do is test
whether we have reached a goal state.
10
00:00:38,530 --> 00:00:42,591
The goal test, now, is whether the state
that we're currently looking at,
11
00:00:42,591 --> 00:00:45,107
initially the initial state, is a goal
state.
12
00:00:45,107 --> 00:00:48,195
We test this by testing whether it
satisfies the goal.
13
00:00:48,195 --> 00:00:52,370
If this is the case, then we can return
our plan, initially, the empty plan.
14
00:00:52,370 --> 00:00:56,773
So, if our initial state was the goal
state, then we return the empty plan, and
15
00:00:56,773 --> 00:00:59,290
we are done.
If not, then we have to continue.
16
00:00:59,290 --> 00:01:03,619
And what we have to do next is compute
the state transition function.
17
00:01:03,619 --> 00:01:08,325
We do this as described earlier by
computing all the ground instances from
18
00:01:08,325 --> 00:01:13,533
all the operators defined in our planning
problem that are applicable in our state.
19
00:01:13,533 --> 00:01:18,060
So this gives us the set of applicable
actions in our current state.
20
00:01:18,060 --> 00:01:22,694
Now if this set was empty, if there are
no applicable actions in the current
21
00:01:22,694 --> 00:01:26,902
state, then we can return failure.
That means we, we have exhausted our
22
00:01:26,902 --> 00:01:29,830
search space and haven't come across a
solution.
23
00:01:29,830 --> 00:01:35,063
The next step is simply choose one of the
applicable actions that we have just
24
00:01:35,063 --> 00:01:37,771
computed.
What I've done here is simply made my
25
00:01:37,771 --> 00:01:41,828
life a little simpler by describing the
algorithm as a non-deterministic
26
00:01:41,828 --> 00:01:44,662
algorithm.
This is a non-deterministic choice point.
27
00:01:44,662 --> 00:01:48,497
What this means, in the actual
implementation, would have to do search
28
00:01:48,497 --> 00:01:50,775
here.
It would have to back track to this
29
00:01:50,775 --> 00:01:55,165
point, to try out the different action.
If the one we've chosen previously fails.
30
00:01:55,165 --> 00:01:59,000
So this would build up a search tree,
branching at exactly this point.
31
00:01:59,000 --> 00:02:03,631
In a non-deterministic algorithm we can,
of course, assume that we have chosen the
32
00:02:03,631 --> 00:02:06,947
right action here.
Then what we do is we simply update our
33
00:02:06,947 --> 00:02:11,064
current state by applying the state
transition function of the previous
34
00:02:11,064 --> 00:02:15,410
state, this is the previous state, and
the action that we apply in this state.
35
00:02:15,410 --> 00:02:20,879
And of course we have to add this action
to the plan, so we concatenate new plan
36
00:02:20,879 --> 00:02:26,660
consisting of just one action to our old
plan, and get the new plan as a result
37
00:02:26,660 --> 00:02:29,734
and that's it.
We simply go through our loop again until
38
00:02:29,734 --> 00:02:33,906
we either come to this point where we can
return a plan to a solution state.
39
00:02:33,906 --> 00:02:38,243
Or we come to this point where we return
failure meaning we have exhausted the
40
00:02:38,243 --> 00:02:44,595
search space and didn't find a solution.
And here is a very simple example to
41
00:02:44,595 --> 00:02:48,752
illustrate this algorithm.
We start off in a initial state, which is
42
00:02:48,752 --> 00:02:53,591
the trivial problem we've seen earlier.
And we have defined the goal also from
43
00:02:53,591 --> 00:02:58,120
the example we've seen earlier to give us
just one state as a goal state.
44
00:02:58,120 --> 00:03:02,617
But the algorithm doesn't know that
there's only one goal state, or where it
45
00:03:02,617 --> 00:03:04,451
is.
So we will remove this, here.
46
00:03:04,451 --> 00:03:08,889
So, the first thing the algorithm does is
test whether this is a goal state.
47
00:03:08,889 --> 00:03:12,735
And I can assure you it is not.
So the algorithm will continue by
48
00:03:12,735 --> 00:03:16,581
computing the applicable actions.
And then selecting one of these
49
00:03:16,581 --> 00:03:20,132
applicable actions.
And in this case, what the algorithm does
50
00:03:20,132 --> 00:03:23,860
is select this action, here.
We're taking, with the crane, there's
51
00:03:23,860 --> 00:03:27,765
only one, at location one, the container,
which is on this pile here.
52
00:03:27,765 --> 00:03:32,087
from the pallet in the pile.
That is the action that the algorithm
53
00:03:32,087 --> 00:03:35,361
chooses.
Then what happens is it applies the state
54
00:03:35,361 --> 00:03:39,943
transition function to get a new state,
which is the state we see here.
55
00:03:39,943 --> 00:03:43,610
And it also updates its plan, which is
what we have here.
56
00:03:43,610 --> 00:03:48,281
And it continues like this through the
loops so it checks whether this is a goal
57
00:03:48,281 --> 00:03:50,818
state.
It isn't a goal state, it computes the
58
00:03:50,818 --> 00:03:55,316
applicable actions, picks one of those,
in this case that's the move action, and
59
00:03:55,316 --> 00:03:59,757
accordingly has to compute a new state,
that's the new state we generate with
60
00:03:59,757 --> 00:04:02,986
this move action.
And so on we continue through the loop
61
00:04:02,986 --> 00:04:07,599
and see this is not a goal state, so we
compute the applicable actions again, now
62
00:04:07,599 --> 00:04:11,720
we try to load the container with the
crane at the location.
63
00:04:11,720 --> 00:04:15,120
And, we get a new state.
As a result, now you can see the
64
00:04:15,120 --> 00:04:19,076
container is on the robot.
And, this is not a goal state so we go
65
00:04:19,076 --> 00:04:22,600
through the loop.
And we find there's a final action that
66
00:04:22,600 --> 00:04:26,185
we need to execute.
We need to move the robot to the other
67
00:04:26,185 --> 00:04:28,472
location.
And then we get a new state.
68
00:04:28,472 --> 00:04:33,541
And this is now our goal state so at the
beginning of the loop, the algorithm will
69
00:04:33,541 --> 00:04:37,499
terminate.
And it will return at this stage this
70
00:04:37,499 --> 00:04:43,031
plan here consisting of those four
actions that, gave us the path through
71
00:04:43,031 --> 00:04:48,187
this state space.
So you have seen that the algorithm was
72
00:04:48,187 --> 00:04:51,570
only a very small step given all the
definitions we had before.
73
00:04:51,570 --> 00:04:55,919
But now we want to say a little bit more
about the algorithm and what we want to
74
00:04:55,919 --> 00:04:59,946
say is that the algorithm possesses two
properties that are very important.
75
00:04:59,946 --> 00:05:02,900
Forward search is sound and forward
search is complete.
76
00:05:02,900 --> 00:05:07,975
Soundness means that if the function
returns a plan as a solution, then this
77
00:05:07,975 --> 00:05:11,848
plan is indeed a solution.
This is, of course, a very useful
78
00:05:11,848 --> 00:05:16,255
property of such an algorithm.
If the algorithm was not sound, that
79
00:05:16,255 --> 00:05:19,661
means it could return a plan that isn't a
solution.
80
00:05:19,661 --> 00:05:24,670
So we would still not know what the
solution is but the algorithm is sound.
81
00:05:24,670 --> 00:05:28,656
And the proof of this is very simple.
We can show this by induction.
82
00:05:28,656 --> 00:05:33,356
And we show that, at the beginning of the
loop, this statement here always holds.
83
00:05:33,356 --> 00:05:36,271
So we have the two loop variables, state
and plan.
84
00:05:36,271 --> 00:05:40,554
And we show that the state is always
equals to gamma of si, and the plan we're
85
00:05:40,554 --> 00:05:43,767
currently looking at.
This is true, initially, of course
86
00:05:43,767 --> 00:05:47,099
because the initial value of state is the
initial state.
87
00:05:47,099 --> 00:05:51,144
And the initial plan is empty.
So gamma applied to SI with the empty
88
00:05:51,144 --> 00:05:53,822
plan means we still are in the initial
state.
89
00:05:53,822 --> 00:05:57,723
And those two are equal.
And then we can show that this condition
90
00:05:57,723 --> 00:06:01,887
is maintained through the loop.
Each iteration of the loop keeps this
91
00:06:01,887 --> 00:06:05,266
condition true.
Which means that it is also true for the
92
00:06:05,266 --> 00:06:07,800
final iteration before we return the
plan.
93
00:06:07,800 --> 00:06:12,688
And that means the state is the result of
applying the state transition function,
94
00:06:12,688 --> 00:06:16,007
NSI, with the plan.
And we return from the function when
95
00:06:16,007 --> 00:06:19,808
state satisfies the goal.
So, therefore, this plan must reach the
96
00:06:19,808 --> 00:06:21,800
state.
And our algorithm is sound.
97
00:06:21,800 --> 00:06:26,795
The second property that the algorithm is
complete means that if there is a
98
00:06:26,795 --> 00:06:30,740
solution to our problem, the algorithm
can find the solution.
99
00:06:30,740 --> 00:06:35,420
And since this is a non-deterministic
algorithm, we talk about an execution
100
00:06:35,420 --> 00:06:38,352
trace.
So there is a set of choices that we can
101
00:06:38,352 --> 00:06:42,908
make at the non-deterministic choice
points, such that the algorithm will
102
00:06:42,908 --> 00:06:46,652
return the solution plan.
And again, the proof can be done by
103
00:06:46,652 --> 00:06:49,709
induction.
And this time, we show that our plan is
104
00:06:49,709 --> 00:06:52,880
always a prefix of the plan we're looking
for.
105
00:06:52,880 --> 00:06:57,960
What you need to remember is only that
our algorithm is sound and complete.
10696
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.