Hello and welcome to the final step of the training.
So this final step is quite easy and it's just so that we can have a look at how the training is going
in the council when we execute the training because indeed what we want to do now is print the final
word of the policy after the update.
So after we apply this date method here from our policy I object on the rollout and the standard deviation
are made make one step of sand which will bear the weight of the policy in the best directions that
increase the most do we word.
And so we want to test.
We want to test out the policy after we made that up there to see how it is going.
On one full episode that is by playing 1000 action or by falling at some certain point and we can do
this because indeed in the Explore function we have the option to take no direction and no perturbation
there is basically just applying the policy on the direction.
But over one full episode.
And so that's why exactly that we're going to do now is take our explore function and apply it to of
course our environments than our normalizer same we might test several normalizer.
And of course our policy that was just updated thanks to the update function here.
All right.
And remember this explorer function returns at the end the cumulated reward we get over a one full episode
with no directional perturbation applied.
So here indeed we'll get this accumulated reward which we can call reward evaluation because that's
just to evaluate our policy.
After making that date.
So we want evaluation is equal to what is returned by this explore function applied to the current environment.
We're testing our normalizer in our policy after the date was made.
And you can notice that I didn't even have to add the two other arguments here which were the direction
and Delta because by default they're equal to none and none here.
And therefore since that's exactly what I want there is you know no direction and no perturbation.
What I didn't even have to specify duration equals none.
And Delta was not.
So you see the purpose of specifying a value here is just to not having to input them whenever we don't
want to apply any perturbation in some specific direction.
All right.
Perfect So we have this accumulated reward of the one episode after the date of our policy and with
no perturbations.
And so now we are going to print this.
And how can we do that.
Well first we're going to put a string which will be step you need to specify which step of the training
we are when the training is going and all this is printed in the console so step here then we need to
add indeed the value this time of the step which is nothing else and this variable year step.
And then of course we want to specify with the string that we're going to print the word we can specify
We were like that you will understand.
It is the word of the step.
So we wanted.
And then of course we need to add the variable that will get this value which is we can just copy it.
Word evaluation.
All right let's base that here and here we go.
We will have the word printed in the console as soon as we execute the training.
Perfect.
And now we're getting closer and closer to the final demo.
I'm super excited to start.
So we just have one remaining code section to implement.
And actually it will be very easy you know it's just to create objects and to run the train function.
So it will just be a couple of lines to type.
I will include in the code that we won't implement together but that's just to you know prepare for
that that will be populated in the working directory for then that will contain all the videos of your
AI trying to work on the field.
So it's just something that will take from the internet and paste here.
I will quickly explain how it works but that has nothing to do with artificial intelligence.
And that's why I don't want us to focus this energy on it.
But then of course we'll create the objects together and gather the functions and in the end run them.
So let's start doing that in the next.
And until then enjoy AI.