WEBVTT

00:00.033 --> 00:02.910
-: Hi everyone and welcome back.

00:02.910 --> 00:05.430
In the next lecture, you're going to be working

00:05.430 --> 00:09.420
on the Grid World demonstration and as an update

00:09.420 --> 00:11.970
this lecture is to help set you up with

00:11.970 --> 00:14.850
an environment to run that without any issues

00:14.850 --> 00:17.730
and this is because the original Grid World program

00:17.730 --> 00:21.120
or files, were released with Python 2.7.

00:21.120 --> 00:24.660
As we know, Python now has Python 3 available

00:24.660 --> 00:26.580
that most of us are using.

00:26.580 --> 00:28.650
But these files were originally built

00:28.650 --> 00:31.020
for more of a pure Python purpose.

00:31.020 --> 00:33.360
You don't really need to set up or install anything.

00:33.360 --> 00:36.420
So the best option, barring any customizations

00:36.420 --> 00:37.980
or changes to the algorithm

00:37.980 --> 00:39.720
and the grid world visualization.

00:39.720 --> 00:41.700
For our demonstration purposes

00:41.700 --> 00:44.100
we can set up a new environment.

00:44.100 --> 00:45.720
It's really simple and this is also

00:45.720 --> 00:47.310
something really powerful to use

00:47.310 --> 00:49.590
when you're working on any projects because you can set

00:49.590 --> 00:53.880
up multiple virtual environments within Anaconda

00:53.880 --> 00:55.050
and we're gonna go through the steps

00:55.050 --> 00:57.570
so that you can set it up for this demonstration.

00:57.570 --> 01:00.600
If you want to run, again in the next video

01:00.600 --> 01:02.340
you will see the demonstration.

01:02.340 --> 01:04.299
You don't need to set this environment up

01:04.299 --> 01:06.390
because it's just for Grid World,

01:06.390 --> 01:08.460
but for those of you who want to follow along

01:08.460 --> 01:10.050
and want to run the commands

01:10.050 --> 01:12.390
I would highly recommend this approach.

01:12.390 --> 01:15.630
In order to do so, please launch the Anaconda Navigator.

01:15.630 --> 01:17.370
Once you have the navigator up

01:17.370 --> 01:19.530
you're gonna go to the environments command.

01:19.530 --> 01:21.300
When you have the environment set up

01:21.300 --> 01:24.780
you could find the create option, click on create

01:24.780 --> 01:26.730
and here you're gonna name your environment.

01:26.730 --> 01:30.153
So we can use let's say, grid test.

01:31.020 --> 01:34.200
Once you have the name, you can select the Python version.

01:34.200 --> 01:36.090
Also, quickly as a reminder

01:36.090 --> 01:38.160
you could have any Anaconda version.

01:38.160 --> 01:40.530
If you downloaded the most recent Anaconda

01:40.530 --> 01:42.120
that's absolutely fine.

01:42.120 --> 01:43.890
You can set up versions within it.

01:43.890 --> 01:47.340
As you'll see, we have 2.7 the version that we wanna work

01:47.340 --> 01:48.690
with in this environment.

01:48.690 --> 01:50.850
This is a separate from your root environment.

01:50.850 --> 01:53.700
You can see as an example, I have quite a few environments

01:53.700 --> 01:57.510
set up for any projects or applications that I'm working on.

01:57.510 --> 02:00.690
It's nice to have because you can have the version

02:00.690 --> 02:04.050
and specific library versions contained to that environment.

02:04.050 --> 02:05.460
It's highly recommended.

02:05.460 --> 02:07.860
So what we can set up is 2.7.

02:07.860 --> 02:11.103
Once we have 2.7, we have our grid test.

02:12.120 --> 02:15.990
Let's do grid test one because I do think I already

02:15.990 --> 02:18.000
had a grid test as I do.

02:18.000 --> 02:20.910
So let's do grid world test.

02:20.910 --> 02:24.510
As we have grid world test, we're gonna click on create.

02:24.510 --> 02:27.660
Let that create for a moment.

02:27.660 --> 02:31.260
While that's creating, you can have two options.

02:31.260 --> 02:34.860
You can launch an environment from here

02:34.860 --> 02:38.520
and if you want to install, let's say Spider or Jupiter

02:38.520 --> 02:41.550
or anything like that, once you go back to the home

02:41.550 --> 02:46.290
once it loads, you can select the environment.

02:46.290 --> 02:47.730
So we want grid world test, and then you

02:47.730 --> 02:49.080
can install the applications on that.

02:49.080 --> 02:50.610
We don't need that right now because we're gonna be

02:50.610 --> 02:51.930
working straight from the terminal.

02:51.930 --> 02:53.970
As you'll see in the next lecture.

02:53.970 --> 02:55.380
If you go to your environment

02:55.380 --> 02:58.410
you can click on the grid world test,

02:58.410 --> 03:03.000
click on the green arrow and select open terminal.

03:03.000 --> 03:05.610
That is one method that you can do.

03:05.610 --> 03:08.310
We're gonna open the terminal here in a second.

03:08.310 --> 03:11.580
Just give my computer one moment since it's still building

03:11.580 --> 03:15.180
and we have it open and you'll see that it's activated.

03:15.180 --> 03:17.610
Another option is to bring up a terminal.

03:17.610 --> 03:20.850
Let me launch this for Mac and Windows,

03:20.850 --> 03:22.170
or excuse me for Mac and Linux.

03:22.170 --> 03:25.260
You can use the source activate command

03:25.260 --> 03:27.660
and then you're gonna use the name of your environment.

03:27.660 --> 03:30.300
So we're using Grid World test

03:30.300 --> 03:32.670
and this would activate that environment.

03:32.670 --> 03:35.100
If you're on Windows, you do not need the source command

03:35.100 --> 03:38.250
you would just use the activate and the environment name.

03:38.250 --> 03:40.140
So we could run this and as you'll see,

03:40.140 --> 03:42.000
we're in the environment.

03:42.000 --> 03:44.880
Next, you can find the files for the next lecture

03:44.880 --> 03:47.790
attached to this lecture and the next lecture

03:47.790 --> 03:50.670
I'm going to grab the files and bring 'em into this folder.

03:50.670 --> 03:52.410
I'm gonna CD to change the directory

03:52.410 --> 03:54.150
to the location of those files

03:54.150 --> 03:56.730
and I'm gonna drag and drop them into this folder.

03:56.730 --> 03:59.374
Give one second let me just bring this over

03:59.374 --> 04:03.690
CD into this and I can always check the files.

04:03.690 --> 04:05.310
There we go I'm gonna clear this.

04:05.310 --> 04:07.890
So we have the files cleared

04:07.890 --> 04:10.200
and we can see into the terminal.

04:10.200 --> 04:12.030
Now, this is only for demonstration purpose

04:12.030 --> 04:14.550
just to demonstrate that it is running and executing.

04:14.550 --> 04:17.220
In the next lecture Kiel is going to explain

04:17.220 --> 04:18.420
all the details related

04:18.420 --> 04:20.640
to the grid world visualization.

04:20.640 --> 04:23.490
But in order to run it and test it

04:23.490 --> 04:25.200
I just want to issue the command that

04:25.200 --> 04:28.350
we were working with in the next lecture

04:28.350 --> 04:33.207
and that is the Python grid world.high K10 A flag

04:37.350 --> 04:39.600
and the Q flag actually don't need the flag there

04:39.600 --> 04:41.430
and the Q, I just wanna verify

04:41.430 --> 04:44.310
that this runs so we can run a test and it is running.

04:44.310 --> 04:46.470
So I'm gonna exit out I'm gonna clear this

04:46.470 --> 04:48.480
because we only want to make sure

04:48.480 --> 04:50.400
that the files are executing.

04:50.400 --> 04:51.840
In the next lecture you're going to

04:51.840 --> 04:54.420
see the demonstration of Grid world.pie

04:54.420 --> 04:57.030
and you'll see how what the flags mean

04:57.030 --> 04:58.230
Kiel is going to go through

04:58.230 --> 05:01.200
and explain the grid world pie, set up an information.

05:01.200 --> 05:05.400
This is to just set up your environment for Python 2.7

05:05.400 --> 05:07.440
and you can do this for as many environments

05:07.440 --> 05:09.060
or other environments that you're working with.

05:09.060 --> 05:11.190
It's just extremely helpful.

05:11.190 --> 05:12.930
All right, hope you found this helpful

05:12.930 --> 05:15.430
and enjoy the great world visualization coming up.
