#NoPayJan Offer - Access all CloudxLab Courses for free between 1st to 31st JanEnroll Now >>
Let's get the CartPole environment from
env = gym.make('CartPole-v1')
Set the seed for
Let's initialize the environment by calling is
reset() method. This returns an observation:
obs = env.<< your code comes here >>()
Print the observation
As discussed previously, the
obs of CartPole has 4 values:
-0.01258566 is the position of the cart.
-0.00156614 is the velocity of the cart.
0.04207708 is the angle of the pole.
-0.00180545 is the angular velocity of the pole.
Let's see what the action space looks like:
It says that CartPole has two values for
action. As discussed previously, 0 means left action, 1 means right action.
For more info on
env, we could do:
No hints are availble for this assesment
Answer is not availble for this assesment
Note - Having trouble with the assessment engine? Follow the steps listed here