-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,I have some problems when I run the vae_racing in prettyNEAT? #13
Comments
Hey, it is necessary to render the environment (the input is the pixels screen). Are you running this on something headless (is there really no display?). If you are trying to run headless you will have to use something like xvfb. e.g. something like this: |
Thanks for your reply!I run this program in server,and the server hasn't monitor.So,can I use this method to run this program?Thank you very much! |
that's right. no problem! |
Hi,I have another question want to ask?Can I change the windows,for example change windows to 640x320?Thank you very much! |
It should be no problem -- but remember for the racing domain the input is the pixels, so if the virtual screen is smaller than number of pixels it will probably be a problem. |
when I run the neat_train.py use the vaeRacer.json,I get this error:
Traceback (most recent call last):
File "neat_train.py", line 279, in
main(args)
File "neat_train.py", line 255, in main
slave()
File "neat_train.py", line 196, in slave
result = task.getFitness(wVec, aVec) # process it
File "/home/a/Bcw_data/rl-ga-neat-alg/Google-WANN/WANNRelease/prettyNEAT/domain/task_gym.py", line 61, in getFitness
reward[iRep] = self.testInd(wVec, aVec, view=view, seed=seed+iRep)
File "/home/a/Bcw_data/rl-ga-neat-alg/Google-WANN/WANNRelease/prettyNEAT/domain/task_gym.py", line 84, in testInd
state = self.env.reset()
File "/home/a/Bcw_data/rl-ga-neat-alg/Google-WANN/WANNRelease/prettyNEAT/domain/vae_racing.py", line 57, in reset
return super(VAERacing, self).reset()
File "/home/a/anaconda3/envs/bcw_env/lib/python3.6/site-packages/gym/envs/box2d/car_racing.py", line 311, in reset
return self.step(None)[0]
File "/home/a/Bcw_data/rl-ga-neat-alg/Google-WANN/WANNRelease/prettyNEAT/domain/vae_racing.py", line 67, in step
self.render("rgb_array")
File "/home/a/Bcw_data/rl-ga-neat-alg/Google-WANN/WANNRelease/prettyNEAT/domain/vae_racing.py", line 62, in render
return super(VAERacing, self).render(mode=mode)
File "/home/a/anaconda3/envs/bcw_env/lib/python3.6/site-packages/gym/envs/box2d/car_racing.py", line 346, in render
from gym.envs.classic_control import rendering
File "/home/a/anaconda3/envs/bcw_env/lib/python3.6/site-packages/gym/envs/classic_control/rendering.py", line 27, in
from pyglet.gl import *
File "/home/a/anaconda3/envs/bcw_env/lib/python3.6/site-packages/pyglet/gl/init.py", line 239, in
import pyglet.window
File "/home/a/anaconda3/envs/bcw_env/lib/python3.6/site-packages/pyglet/window/init.py", line 1896, in
gl._create_shadow_window()
File "/home/a/anaconda3/envs/bcw_env/lib/python3.6/site-packages/pyglet/gl/init.py", line 208, in _create_shadow_window
_shadow_window = Window(width=1, height=1, visible=False)
File "/home/a/anaconda3/envs/bcw_env/lib/python3.6/site-packages/pyglet/window/xlib/init.py", line 166, in init
super(XlibWindow, self).init(*args, **kwargs)
File "/home/a/anaconda3/envs/bcw_env/lib/python3.6/site-packages/pyglet/window/init.py", line 501, in init
display = get_platform().get_default_display()
File "/home/a/anaconda3/envs/bcw_env/lib/python3.6/site-packages/pyglet/window/init.py", line 1845, in get_default_display
return pyglet.canvas.get_display()
File "/home/a/anaconda3/envs/bcw_env/lib/python3.6/site-packages/pyglet/canvas/init.py", line 82, in get_display
return Display()
File "/home/a/anaconda3/envs/bcw_env/lib/python3.6/site-packages/pyglet/canvas/xlib.py", line 86, in init
raise NoSuchDisplayException('Cannot connect to "%s"' % name)
pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to "None"
Can you help me to solve this problem?It looks like the problem is I use the env.render() in server?Can I close the env.render() in vaeracing?Thanks!
The text was updated successfully, but these errors were encountered: