1
00:00:00,329 --> 00:00:02,489
In this video, I'm
going to show a simple example

2
00:00:02,729 --> 00:00:06,719
of using model preconditions to
avoid using a slow model using a

3
00:00:06,719 --> 00:00:12,449
simple, single queue planner
that uses A*. First, I'm

4
00:00:12,449 --> 00:00:16,409
going to show the process of
selecting which model to use. So

5
00:00:16,619 --> 00:00:19,619
suppose we have three models
available M0, M1 and M2.

6
00:00:19,619 --> 00:00:23,189
We're going to look at each
of the models, and we're

7
00:00:23,189 --> 00:00:27,479
going to pick the one that has
the highest value, but such that

8
00:00:27,479 --> 00:00:31,379
s and a are still in the
precondition of that model. So

9
00:00:31,379 --> 00:00:34,829
in this example, (s,a) is not on
the precondition of M2, so it

10
00:00:34,829 --> 00:00:37,739
does not make it to the next
round. And then between M0

11
00:00:37,739 --> 00:00:40,769
and M1, we're going to pick M
one because it's the fastest one

12
00:00:40,769 --> 00:00:47,999
in the precondition. In this
example, we have five states,

13
00:00:48,029 --> 00:00:53,399
this start state is s0 and the
goal state is SG, the

14
00:00:53,429 --> 00:00:57,839
transitions, the arrows in the
transition show which

15
00:00:58,079 --> 00:01:00,509
transitions are in the
precondition of each model. So

16
00:01:00,719 --> 00:01:03,329
if there's an orange line, it
means that there's a transition

17
00:01:03,329 --> 00:01:07,079
that is accurately modeled using
M0, that's a slow model. So

18
00:01:07,079 --> 00:01:10,889
a simulator, for example. And if
the line is green, and dashed,

19
00:01:10,889 --> 00:01:13,799
it means that that transition is
in the precondition of M1

20
00:01:14,219 --> 00:01:18,389
And these can be in the
precondition of both models or

21
00:01:18,389 --> 00:01:21,989
only in the precondition of one
model. For this example, we say

22
00:01:21,989 --> 00:01:25,739
that M0 is approximately 10
times slower than M1. So

23
00:01:25,739 --> 00:01:30,269
we'll have a strong preference
to use M1 whenever possible. And

24
00:01:30,269 --> 00:01:36,119
then the edge cost is one for
each transition. And for

25
00:01:36,119 --> 00:01:39,389
simplicity, we will say the
heuristic value is zero for all

26
00:01:39,389 --> 00:01:43,319
nodes. tiebreakers are
alphabetical so we will expand

27
00:01:43,679 --> 00:01:48,629
sa before SB if they have the
same f value. And we only label

28
00:01:48,629 --> 00:01:54,719
the actions that we need to
discuss. Just like A*

29
00:01:54,719 --> 00:01:58,559
We start with the graph
with just s0

30
00:01:58,589 --> 00:02:03,869
we add that to the
graph after expanding it. And

31
00:02:03,869 --> 00:02:07,739
then we get the successors, SA
and SB. To note that even though

32
00:02:07,739 --> 00:02:11,909
we could have used even though
we could have used M0, we

33
00:02:11,909 --> 00:02:15,599
use M1, because it is faster.
And both of them are in the

34
00:02:15,599 --> 00:02:19,949
precondition. So that's what we
used to compute SA and SB. And

35
00:02:19,949 --> 00:02:25,199
then s0 is expanded, so it is closed, then we

36
00:02:25,229 --> 00:02:28,529
expand the next one and based on
the tiebreaker that will be SA.

37
00:02:28,679 --> 00:02:32,879
So we expand that. And then we
are going to execute, we're

38
00:02:32,879 --> 00:02:37,169
going to evaluate a0. And
there's only one option there.

39
00:02:37,169 --> 00:02:43,229
We're going to have to use
this whole model. So evaluate sA

40
00:02:43,469 --> 00:02:49,919
using a0, and then we
find a goal state. However, we

41
00:02:49,919 --> 00:02:53,039
haven't expanded it yet, so we
have not found the optimal path

42
00:02:53,039 --> 00:02:59,279
yet. Then we're going to expand
SB SB has two actions that come

43
00:02:59,279 --> 00:03:03,239
from it. One of them, we can use
the fast model a1 but the

44
00:03:03,239 --> 00:03:06,779
other one, we have to use the
slow model. And then we find SC,

45
00:03:07,169 --> 00:03:10,949
expand sC there's no actions
there. And then finally we we

46
00:03:10,949 --> 00:03:14,879
expand the goal state and we
have found the path did we need

47
00:03:14,879 --> 00:03:21,449
to did we need to use the
simulator twice? And no, we

48
00:03:21,449 --> 00:03:25,079
could have found a path of the
same cost without using the

49
00:03:25,079 --> 00:03:28,889
simulator. So in the next
example, we'll talk about a way

50
00:03:28,889 --> 00:03:32,969
to avoid unnecessary, expensive
evaluations.

