1
00:00:06,515 --> 00:00:10,259
Welcome to this new video
on our pathfinding project.

2
00:00:10,259 --> 00:00:13,889
Today, we're going to be looking
at a really fun algorithm,

3
00:00:13,889 --> 00:00:18,461
a calculation that we're going to be
calling the Flood Fill calculation that

4
00:00:18,461 --> 00:00:21,874
is going to allow our cells to grow and
access neighbors and

5
00:00:21,874 --> 00:00:26,827
continue accessing neighbors until we
can go from one point to another, right?

6
00:00:26,827 --> 00:00:29,128
So let's just look at what
we're going to try to do.

7
00:00:29,128 --> 00:00:33,030
So the Flood Fill calculation,
it's a simple way for

8
00:00:33,030 --> 00:00:38,160
a cell that we're going to create,
it's going to be a start node, right?

9
00:00:38,160 --> 00:00:43,083
So we're going to define one arbitrary
cell to be our starting position, and

10
00:00:43,083 --> 00:00:45,350
we're going to basically expand and

11
00:00:45,350 --> 00:00:49,124
understand what are the neighbors
of that cell, right?

12
00:00:49,124 --> 00:00:52,816
And once we have the neighbors,
we're going to flip the information.

13
00:00:52,816 --> 00:00:55,161
We're going to need
a variable called visited,

14
00:00:55,161 --> 00:00:57,814
meaning we've already covered this cell,
right?

15
00:00:57,814 --> 00:01:02,412
Visited this cell, but at that point, we
add all those cells to a new collection,

16
00:01:02,412 --> 00:01:04,292
which we're going to call a stack.

17
00:01:04,292 --> 00:01:07,904
Also could be understood as a frontier,
and we're going to repeat the process.

18
00:01:07,904 --> 00:01:11,808
Basically, we're going to access
the neighbors of those cells and

19
00:01:11,808 --> 00:01:16,778
only if we haven't visited those cells, we
added those new cells to our new stack or

20
00:01:16,778 --> 00:01:17,706
our frontier.

21
00:01:17,706 --> 00:01:21,449
That would naturally start creating
a sense of expansion, right?

22
00:01:21,449 --> 00:01:25,992
The blue tiles, as you can see here,
are going to be the visited tiles.

23
00:01:25,992 --> 00:01:30,839
The new tiles that we are evaluating
are going to be the outermost tiles,

24
00:01:30,839 --> 00:01:33,714
the frontier,
which are going to be a list,

25
00:01:33,714 --> 00:01:37,764
a specific list of tiles to
be further evaluated, right?

26
00:01:37,764 --> 00:01:40,425
And if we actually have an end node,
if we reach an end node,

27
00:01:40,425 --> 00:01:44,023
we could actually stop the simulation,
so this doesn't run forever, right?

28
00:01:44,023 --> 00:01:48,682
This would naturally cover out
the entire grid in this case, but

29
00:01:48,682 --> 00:01:53,862
because we're trying to implement
these ideas, pathfinding logic,

30
00:01:53,862 --> 00:01:57,573
we're going to create a start point,
an endpoint and

31
00:01:57,573 --> 00:02:02,086
once we reach an endpoint,
we will, in fact, stop, right?

32
00:02:02,086 --> 00:02:04,822
This is the idea that the frontier or

33
00:02:04,822 --> 00:02:10,034
the stack we're going to be calling
a stack is going to be a list of tiles.

34
00:02:10,034 --> 00:02:13,719
That is, we constantly going to
be going through this list and

35
00:02:13,719 --> 00:02:17,567
expanding that list through
the neighborhood calculation.

36
00:02:17,567 --> 00:02:23,096
So adding new tiles to that list until
we really kind of run out of tiles or

37
00:02:23,096 --> 00:02:24,796
we reach our target.

38
00:02:24,796 --> 00:02:28,755
So, it will make more sense
as we start writing it and

39
00:02:28,755 --> 00:02:32,810
we start kind of visualizing
some of the information.

40
00:02:32,810 --> 00:02:35,280
So let's start writing it
in processing together.

41
00:02:35,280 --> 00:02:38,188
So I'm continuing the project
where we left off.

42
00:02:38,188 --> 00:02:42,904
We have a neighborhood calculation
which works if you want to revert

43
00:02:42,904 --> 00:02:45,895
to the customization of the environment.

44
00:02:45,895 --> 00:02:49,684
You can comment out the neighborhood.

45
00:02:49,684 --> 00:02:53,723
This was just a check to see if
the neighborhood calculation was in fact

46
00:02:53,723 --> 00:02:54,622
working well.

47
00:02:54,622 --> 00:03:00,704
But we basically should have an
environment that we can customize, right?

48
00:03:00,704 --> 00:03:03,911
So let's draw work here
in the environment.

49
00:03:03,911 --> 00:03:08,411
Let's create a few things that we
might need for the simulation to run.

50
00:03:08,411 --> 00:03:10,971
So sometimes I like
leaving a bit of space,

51
00:03:10,971 --> 00:03:14,893
knowing that this is kind of
the initiation of the sales function.

52
00:03:14,893 --> 00:03:19,164
But let's just create a variable
called self.start node.

53
00:03:22,664 --> 00:03:26,778
And we could start with something like, or

54
00:03:26,778 --> 00:03:32,391
basically none,
just to have something self.endnode.

55
00:03:34,831 --> 00:03:38,428
At this point,
we could basically define like these

56
00:03:38,428 --> 00:03:42,444
nodes are going to be necessary for
our simulation, right?

57
00:03:42,444 --> 00:03:44,384
going to be our start point, an endpoint.

58
00:03:44,384 --> 00:03:51,327
Let's just,
instead of making them be empty nodes,

59
00:03:51,327 --> 00:03:56,124
let's just create self.getcell.

60
00:03:58,713 --> 00:04:03,724
And here we can specify the index of
a cell or, sorry, a coordinate, right?

61
00:04:03,724 --> 00:04:08,266
Somewhere we say 100, 100, right?

62
00:04:08,266 --> 00:04:14,542
The cell associated with that
will be the start node and

63
00:04:14,542 --> 00:04:18,636
the cell that would be our end node,

64
00:04:18,636 --> 00:04:23,830
let's just do something within the canvas.

65
00:04:23,830 --> 00:04:28,865
I don't want to break the logic here and
get something outside the canvas.

66
00:04:28,865 --> 00:04:33,049
We wouldn't get a correct node, but
we know that our canvas is 1200 by 600.

67
00:04:33,049 --> 00:04:37,960
So I'm trying to get something
in the top leftmost corner and

68
00:04:37,960 --> 00:04:42,698
somewhere in the right corner
to be starting an end nodes.

69
00:04:42,698 --> 00:04:44,657
I would like to visualize those nodes.

70
00:04:44,657 --> 00:04:48,770
And we actually have
a pretty handy function

71
00:04:48,770 --> 00:04:53,672
that makes those nodes
visible to draw highlights.

72
00:04:53,672 --> 00:04:56,760
So we could say something like draw start.

73
00:05:00,428 --> 00:05:04,479
And then here we could say that the color,
I mean,

74
00:05:04,479 --> 00:05:10,852
remember what we were doing in the last
video is basically this equation here.

75
00:05:10,852 --> 00:05:13,746
So the start would be a color, right?

76
00:05:13,746 --> 00:05:15,380
Let's make that red.

77
00:05:15,380 --> 00:05:19,813
And the cell that we want to
draw is the start node, right?

78
00:05:19,813 --> 00:05:26,810
So let's just draw the start node.

79
00:05:26,810 --> 00:05:28,900
Let's draw it with this color, right?

80
00:05:28,900 --> 00:05:30,305
So let's see.

81
00:05:33,398 --> 00:05:34,852
Okay, so we don't see it.

82
00:05:34,852 --> 00:05:37,689
We have to draw the start.

83
00:05:37,689 --> 00:05:40,838
We have to call this within our,

84
00:05:43,717 --> 00:05:48,653
Run loop, right?

85
00:05:48,653 --> 00:05:51,087
So we have our start node here.

86
00:05:51,087 --> 00:05:55,551
And I'm going to do this as independent
functions because I like having, even

87
00:05:55,551 --> 00:06:00,314
if there's going to be several functions
here, we're going to copy that function.

88
00:06:00,314 --> 00:06:06,752
Let's draw end, And

89
00:06:06,752 --> 00:06:12,193
let's do this one green, right?

90
00:06:12,193 --> 00:06:17,096
And here the node that we want
to draw is the end node, right?

91
00:06:21,542 --> 00:06:26,645
So basically we can copy paste this now.

92
00:06:31,999 --> 00:06:34,797
So we have a start node and an end node.

93
00:06:34,797 --> 00:06:39,436
Basically we are creating
an arbitrary node to be our

94
00:06:39,436 --> 00:06:44,293
starting node and
an arbitrary node to be our end node.

95
00:06:44,293 --> 00:06:46,535
So that's great.

96
00:06:46,535 --> 00:06:49,186
Now let's start creating some
of the data that this algorithm,

97
00:06:49,186 --> 00:06:51,064
the Flood Fill algorithm will need, right?

98
00:06:51,064 --> 00:06:58,278
So let's just create an empty list that
we're going to call the stack self stack.

99
00:06:58,278 --> 00:07:02,170
Stack.

100
00:07:02,170 --> 00:07:07,798
It's going to be an empty list and
we also want to add to that stack.

101
00:07:09,940 --> 00:07:11,424
A stack it's an arbitrary name.

102
00:07:11,424 --> 00:07:13,987
If you want to use
a number like frontier or

103
00:07:13,987 --> 00:07:17,736
something like that,
that makes more sense to you, right?

104
00:07:17,736 --> 00:07:20,345
By all means, just change that.

105
00:07:20,345 --> 00:07:21,558
We're going to do append,

106
00:07:21,558 --> 00:07:24,576
we're going to add the,
what do we want to start with that stack?

107
00:07:24,576 --> 00:07:26,453
We want to use the start node, right?

108
00:07:26,453 --> 00:07:32,206
So basically the stack is going to
be the nodes that we are evaluating.

109
00:07:32,206 --> 00:07:36,741
Sorry, that should be self.start node,
right?

110
00:07:36,741 --> 00:07:40,171
Again, let's double check
that we're not any error.

111
00:07:40,171 --> 00:07:40,980
That's fine.

112
00:07:40,980 --> 00:07:46,520
We can construct environments, but we'll
see that our system is not going to read

113
00:07:46,520 --> 00:07:52,241
these columns just yet, but or these walls
just yet, but we're going to get there.

114
00:07:52,241 --> 00:07:54,332
So we have basically a point of start.

115
00:07:54,332 --> 00:07:59,350
Our stack has a node to work with, right?

116
00:07:59,350 --> 00:08:04,072
So we can actually start writing
our algorithm right now.

117
00:08:04,072 --> 00:08:07,838
Let's just call it,

118
00:08:07,838 --> 00:08:13,488
we're drawing the tiles here,

119
00:08:13,488 --> 00:08:19,765
let's create a bit of space here and

120
00:08:19,765 --> 00:08:25,849
call it the flood-fill, right?

121
00:08:25,849 --> 00:08:29,952
So one thing that we would like to do,
where are we going to call this algorithm?

122
00:08:29,952 --> 00:08:33,669
We're going to call it within our run
function, so if we run it forever,

123
00:08:33,669 --> 00:08:36,127
it would actually continue growing, right?

124
00:08:36,127 --> 00:08:41,202
So for
that I would like to have a variable

125
00:08:41,202 --> 00:08:49,276
which is going to be a Boolean that
we can call here self.running.

126
00:08:49,276 --> 00:08:56,738
And let's say that's true,
let's do true, right?

127
00:08:56,738 --> 00:09:01,213
Basically I want to have a condition
that starts growing, but

128
00:09:01,213 --> 00:09:05,956
eventually we reach an exit point and
we stop running it, right?

129
00:09:05,956 --> 00:09:11,291
So with this variable in mind,
we can write our first line or

130
00:09:11,291 --> 00:09:16,732
our flood-fill, which is that,
well, if it's running,

131
00:09:16,732 --> 00:09:21,124
right, let's execute the algorithm, right?

132
00:09:21,124 --> 00:09:26,359
The second thing we want to do is
that if the length of the stack,

133
00:09:32,514 --> 00:09:36,508
We're checking if the stack
is bigger than zero,

134
00:09:36,508 --> 00:09:41,465
meaning that we haven't run out
of tiles to execute, right?

135
00:09:41,465 --> 00:09:46,172
What we're going to be doing
is picking an entry on stack,

136
00:09:46,172 --> 00:09:51,794
get its neighbors, and
add those to the stack basically, right?

137
00:09:51,794 --> 00:09:57,449
So we're going to say that the current

138
00:09:57,449 --> 00:10:01,793
cell equals self.stack.

139
00:10:01,793 --> 00:10:06,910
And here we're going to use the pop,
something we learned a little bit ago

140
00:10:06,910 --> 00:10:12,634
in the second course, I believe, when
we were talking about list operations.

141
00:10:12,634 --> 00:10:15,076
And we haven't been using pop too much,
but

142
00:10:15,076 --> 00:10:19,900
it's incredibly useful here because pop,
it removes an entry from the list, right?

143
00:10:19,900 --> 00:10:23,277
So think of that,
you start with one point or

144
00:10:23,277 --> 00:10:27,854
one node in that list and
you're assigning it to this cell.

145
00:10:27,854 --> 00:10:31,954
But now that list, you remove
that entry from that list, right?

146
00:10:31,954 --> 00:10:34,597
So the first entry of
the list gets removed,

147
00:10:34,597 --> 00:10:36,747
gets assigned to the current cell.

148
00:10:36,747 --> 00:10:39,829
That means that the stack,
it's kind of shrinking.

149
00:10:39,829 --> 00:10:42,732
It's obviously, it's going to grow
as well when we get the neighbors.

150
00:10:42,732 --> 00:10:47,415
But we don't want to have that stack
like just adding entries to that list.

151
00:10:47,415 --> 00:10:51,162
We want to be able to make sure that we're
not going through entries twice, right,

152
00:10:51,162 --> 00:10:52,833
so the pop is going to be really useful.

153
00:10:52,833 --> 00:10:57,747
What we want to say is that the
current-cell has been visited, right, but

154
00:10:57,747 --> 00:11:01,025
that information is not part of the tile,
right?

155
00:11:01,025 --> 00:11:08,590
So let's add a new variable to
the tile called self-visited,

156
00:11:08,590 --> 00:11:15,455
it's going to be a Boolean,
it's going to be false, right?

157
00:11:15,455 --> 00:11:23,733
So once we have that, we could actually
assign now to the current-cell.

158
00:11:23,733 --> 00:11:29,884
This current-cell,
we could say visited equals true, right?

159
00:11:29,884 --> 00:11:35,162
Because I want to make sure
that we marked it said,

160
00:11:35,162 --> 00:11:42,089
well, this has been visited,
therefore we can move on, right?

161
00:11:42,089 --> 00:11:45,720
And we're going to visualize this as well,
I think it's useful for

162
00:11:45,720 --> 00:11:48,899
us to make a visualization
of the visited tiles, right?

163
00:11:48,899 --> 00:11:52,001
The next thing that we want to
check how we reach the end,

164
00:11:52,001 --> 00:11:54,051
meaning we have an end node, right?

165
00:11:54,051 --> 00:12:01,125
So if the current-cell,
it's equal that the self-end-node,

166
00:12:01,125 --> 00:12:05,842
then at that point we've reached our goal.

167
00:12:05,842 --> 00:12:11,578
We could actually print line and

168
00:12:11,578 --> 00:12:16,895
say, hey, we Goal Reached.

169
00:12:16,895 --> 00:12:20,378
But most importantly, in order to
stop the running of the simulation,

170
00:12:20,378 --> 00:12:24,051
we could say self.running,
which is that Boolean equals false, right?

171
00:12:24,051 --> 00:12:29,700
So we could say at this point stop
running the simulation, right?

172
00:12:29,700 --> 00:12:34,941
That's the goal of achieving,
we're first checking,

173
00:12:34,941 --> 00:12:38,990
we check if that node is
in fact the end goal.

174
00:12:38,990 --> 00:12:42,773
Obviously in the setup that we have right
now, the start point is not the end point.

175
00:12:42,773 --> 00:12:45,586
So it's not going to happen right away,
we need to kind of start growing now.

176
00:12:45,586 --> 00:12:53,640
So here's where we're going to do
our neighborhood calculation and

177
00:12:53,640 --> 00:13:00,123
we're going to say for
the neighbor in current-cell.

178
00:13:00,123 --> 00:13:03,868
So we're checking the current-cell,
we're going to get the neighbors.

179
00:13:08,497 --> 00:13:14,031
So that's a function that we constructed
already, right, let me just a column here.

180
00:13:15,111 --> 00:13:21,891
So we're saying if the neighbor

181
00:13:21,891 --> 00:13:26,913
we're checking in this

182
00:13:26,913 --> 00:13:34,704
loop hasn't been visited, right?

183
00:13:34,704 --> 00:13:43,943
The neighbor, Becomes visited and

184
00:13:43,943 --> 00:13:48,392
we added to the stack.

185
00:13:48,392 --> 00:13:54,909
So self.stack.append neighbor, right,

186
00:13:54,909 --> 00:14:00,573
so let's see what's happening here.

187
00:14:00,573 --> 00:14:06,344
The stack only has one entry point,
right, we loop through its neighbors.

188
00:14:06,344 --> 00:14:09,967
If those neighbors haven't been
visited for whatever reason,

189
00:14:09,967 --> 00:14:13,256
maybe the algorithm is kind
of running around a corner.

190
00:14:13,256 --> 00:14:16,859
At some point we're checking if
that neighbor hasn't visited,

191
00:14:16,859 --> 00:14:20,502
we will check that neighbor has
visited and we add it to the stack.

192
00:14:20,502 --> 00:14:24,296
So that stack entry now will actually
repeat this loop will actually go

193
00:14:24,296 --> 00:14:27,422
again and
basically the stack will continue growing.

194
00:14:27,422 --> 00:14:31,284
One of the things that I like
visualizing are two things,

195
00:14:31,284 --> 00:14:36,690
is which tiles have been visited and
which tiles are the current stack, right?

196
00:14:36,690 --> 00:14:40,358
Because those are dynamically
changing over time, right?

197
00:14:40,358 --> 00:14:44,986
This is the entirety of the flood field,
but we wouldn't see much.

198
00:14:44,986 --> 00:14:49,088
Maybe if we let it run for
a while we'll see goal reached, right,

199
00:14:49,088 --> 00:14:51,858
because the growth eventually will reach.

200
00:14:51,858 --> 00:14:56,400
But I don't like really operating under
the premises that we cannot see what's

201
00:14:56,400 --> 00:14:57,023
going on.

202
00:14:57,023 --> 00:15:01,812
So let's for
now do one more function here which is

203
00:15:01,812 --> 00:15:06,725
going to be the definition
to draw the stack at least.

204
00:15:06,725 --> 00:15:12,686
So we draw the stack and then we go and
see how to visualize the visited tiles.

205
00:15:12,686 --> 00:15:17,296
So the draw-stack will be,

206
00:15:19,759 --> 00:15:23,630
We're going to use
the same idea of a color.

207
00:15:23,630 --> 00:15:28,204
Let's just use a cel color this time

208
00:15:28,204 --> 00:15:33,374
where we use something like that.

209
00:15:33,374 --> 00:15:36,219
And for cell in,

210
00:15:36,219 --> 00:15:41,914
basically we are looping through

211
00:15:41,914 --> 00:15:47,211
this stack this time, right?

212
00:15:47,211 --> 00:15:51,044
And we could say cell-display, right?

213
00:15:55,457 --> 00:16:00,375
Display highlight, which is basically
this function that's, Becoming very

214
00:16:00,375 --> 00:16:05,685
useful to visualize all sorts of
cells in different conditions, right?

215
00:16:05,685 --> 00:16:11,673
So let's just make sure
that we add first the flood

216
00:16:11,673 --> 00:16:16,663
field to actually, so we draw the start,

217
00:16:16,663 --> 00:16:22,224
we draw the end,
we execute the flood field and

218
00:16:22,224 --> 00:16:26,519
we also want to visualize the stack.

219
00:16:35,681 --> 00:16:38,662
Let's see if we're running into errors.

220
00:16:38,662 --> 00:16:43,602
Okay, so this is running, so
we're seeing now that the stack

221
00:16:43,602 --> 00:16:48,642
are all the cells that are in CN and
they're actually growing.

222
00:16:50,342 --> 00:16:54,246
It's not moving inwards because these
cells here have been visited and

223
00:16:54,246 --> 00:16:57,292
seeing those would actually
be really useful as well.

224
00:16:57,292 --> 00:16:59,380
So let's just do a visualization of that.

225
00:16:59,380 --> 00:17:04,523
Let's just check if the algorithm at least
once it reaches one of these stack nodes,

226
00:17:04,523 --> 00:17:09,304
if it becomes equal to the end node, we
should get a message that says we reached

227
00:17:09,304 --> 00:17:12,004
the goal, right, and it stopped, right?

228
00:17:12,004 --> 00:17:16,426
Great, so this in fact worked,
we reached the goal and

229
00:17:16,426 --> 00:17:21,220
basically one of the stack cells
was equal to the end node.

230
00:17:21,220 --> 00:17:24,308
So it's a very slow
algorithm to actually reach.

231
00:17:24,308 --> 00:17:29,684
It doesn't have too much intelligence, but
it's in fact using the neighboring cells.

232
00:17:29,684 --> 00:17:34,532
Let's just finish this lesson with
visualizing the visitor nodes.

233
00:17:34,532 --> 00:17:38,714
So we drew the stack,
how could we draw the visitor?

234
00:17:38,714 --> 00:17:43,150
So dev draw visited,

235
00:17:43,150 --> 00:17:47,832
we're going to say these

236
00:17:47,832 --> 00:17:53,254
are going to be blue as we've

237
00:17:53,254 --> 00:17:59,177
done before, RGB, right?

238
00:17:59,177 --> 00:18:04,506
And here is for column in self.cells,
this is a nested list,

239
00:18:04,506 --> 00:18:09,629
in all of them we're going to
check if visited, which is the,

240
00:18:09,629 --> 00:18:14,239
it's probably not a very
efficient way of doing it for

241
00:18:14,239 --> 00:18:20,102
now because we are kind of looping
once again through all the cells.

242
00:18:25,042 --> 00:18:27,936
But I would like to kind of for
graphic purposes,

243
00:18:27,936 --> 00:18:32,029
this is a kind of a visualization
layer that we're going to turn off, so

244
00:18:32,029 --> 00:18:34,734
I don't want to kind of
embed it into the tile.

245
00:18:34,734 --> 00:18:37,777
So we're saying for

246
00:18:37,777 --> 00:18:42,610
column in cells, list a cell for

247
00:18:42,610 --> 00:18:48,875
each entity called cell within the column

248
00:18:48,875 --> 00:18:53,898
if that cell is visited, right?

249
00:18:53,898 --> 00:18:57,029
Has the property which is a boolean true,
right?

250
00:18:57,029 --> 00:19:01,500
If that's true, cell.display highlight,

251
00:19:01,500 --> 00:19:05,519
with the color blue in this case, right?

252
00:19:05,519 --> 00:19:08,068
Because we said we define the color,

253
00:19:08,068 --> 00:19:12,932
that's the color we're going to pass here,
we're passing the color.

254
00:19:12,932 --> 00:19:14,528
So the same function, display,

255
00:19:14,528 --> 00:19:17,439
highlight can display things
in different colors, right?

256
00:19:17,439 --> 00:19:22,179
So that is dev visited,
and the visited here's

257
00:19:22,179 --> 00:19:27,392
where the order might be
important because if we draw

258
00:19:27,392 --> 00:19:32,382
the visited,
I'm going to draw the visited first.

259
00:19:37,298 --> 00:19:40,829
Because I would like to draw the end and
start node and

260
00:19:40,829 --> 00:19:42,843
stack on top of that, right?

261
00:19:42,843 --> 00:19:48,012
So let's see if this runs okay,
so that's more graphic.

262
00:19:48,012 --> 00:19:51,063
Yeah, so
we have an algorithm that basically,

263
00:19:51,063 --> 00:19:55,871
every time that you're in Photoshop and
you press like feel like an area and

264
00:19:55,871 --> 00:19:58,715
it would kind of spread
pixels in that area.

265
00:19:58,715 --> 00:20:00,977
This is kind of roughly what's going on,
right?

266
00:20:00,977 --> 00:20:06,914
We have pixels that keep expanding within
that region based on adjacency and

267
00:20:06,914 --> 00:20:09,238
neighbor relationships.

268
00:20:09,238 --> 00:20:13,798
And in this case we're kind of putting
it to the task of reaching an end node,

269
00:20:13,798 --> 00:20:17,822
a specific node that we
know that it's our target.

270
00:20:17,822 --> 00:20:21,358
So yeah, we have some
visualization of the visited nodes,

271
00:20:21,358 --> 00:20:25,744
the stack which is the dynamic list
that we're using to keep track of which

272
00:20:25,744 --> 00:20:29,776
are the new frontier neighbor or
frontier cells that we're using to

273
00:20:29,776 --> 00:20:33,466
continue growing our search and
the start node and end node.

274
00:20:33,466 --> 00:20:35,472
So with this,
we're going to leave it here and

275
00:20:35,472 --> 00:20:38,682
start talking about obstacles in
the next video, I'll see you then.