0

I'm stuck, I've seen a post of Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels of Kapathy, and I copy all code in there and well done, but only have one problem. The result is run fine without gameplay of pong (gym[atari] in this post). While if I only test code to check Atari enviroment by...

import gym
env = gym.make('SpaceInvaders-v0')
env.reset()
for _ in range(1000):
    env.step(env.action_space.sample())
    env.render('human') 

...it just runs roughly 30 seconds and crashes, and I don't know why. My OS is Windows 10 32bit and installing python 2.7.6

And if I run entire code from Kapathy's post, I just display result without gameplay. Here is source code: kapathy's code

script result without gameplay

Thanks for viewing my question. Please help me.

mpx
  • 3,081
  • 2
  • 26
  • 56
  • Can you please share more details of your problem to help find an answer. Is the problem with the installation of the Atari environment? Are you asking how to display/render the gameplay during/after training? What exactly is the error message during the crash? – Anjum Sayed Apr 30 '18 at 05:21
  • thank for reply, i mean i've test success with render gameplay by 6 first line of code above, but when run entire code of kapathy'blog , just display result of script python file and not display(render) of gameplay of pong(like as image).And don't have any bug log or error message . – LucDaoDaiNhan Apr 30 '18 at 08:54
  • Have you tried changing line 13 of Karpathy's code to `render = True`? – Anjum Sayed Apr 30 '18 at 11:46

0 Answers0