Screen image as input for Mountain-car?


#1

Hi,

Is there any way to have screen images as input for maountain-car or CartPole?

Thank you


#2

yes, many environments including MountainCar and CartPole supports rgb_array render mode. That is, calling env.render(mode='rgb_array') would return an RGB numpy array of the visualization screen. Beware when doing this on a headless machine: the render call requires a display.