jiseongHAN / Super-Mario-RL

🍄Reinforcement Learning: Super Mario Bros with dueling dqn🍄
103 stars 18 forks source link

How can I get a video like mario1.gif? #1

Closed NeighborhoodCoding closed 3 years ago

NeighborhoodCoding commented 3 years ago

Hi, Thanks for wonderful project!

I want to study RL via this code, but I have a question.

How can I get a video like mario1.gif? because I want to know my agent is trained well via gif or video.

thanks.

jiseongHAN commented 3 years ago

Hi, I think you can use opencv-python, pillow or matplotlib to make gif or video. In my case, I used matplotlib to make gif. (save all state to jpg then, convert to gif. I think it is much more convenient to using cv2 or pillow to make mp4 or gif rather than using matplotlib.

jiseongHAN commented 3 years ago

Also, you can capture your screen with env.render().