openai / maddpg

Code for the MADDPG algorithm from the paper "Multi-Agent Actor-Critic for Mixed Cooperative-Competitive Environments"

Home Page:https://arxiv.org/pdf/1706.02275.pdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

displaying agent behaviors on the screen

williamyuanv0 opened this issue · comments

Hi,I want to display agent behaviors on the screen,but when I change the default value of "--display" to be True,I get an error:

Using good policy maddpg and adv policy maddpg
Loading previous state...
Starting iterations...
agent 1 to agent 0: _ agent 2 to agent 0: _ agent 0 to agent 1: _ agent 2 to agent 1: _ agent 0 to agent 2: _ agent 1 to agent 2: _
Traceback (most recent call last):

File "", line 1, in
runfile('/home/***/Desktop/maddpg-master-new/experiments/train.py', wdir='/home/yuanweilin/Desktop/maddpg-master-new/experiments')

File "/home/***/anaconda3/envs/tensorflow/lib/python3.5/site-packages/spyder/utils/site/sitecustomize.py", line 705, in runfile
execfile(filename, namespace)

File "/home/***/anaconda3/envs/tensorflow/lib/python3.5/site-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "/home/***/Desktop/maddpg-master-new/experiments/train.py", line 198, in
train(arglist)

File "/home/***/Desktop/maddpg-master-new/experiments/train.py", line 155, in train
env.render()

File "/home/***/Desktop/multiagent-particle-envs-master-new/multiagent/environment.py", line 220, in render
self.viewers[i] = rendering.Viewer(700,700)

File "/home/***/Desktop/multiagent-particle-envs-master-new/multiagent/rendering.py", line 52, in init
self.window = pyglet.window.Window(width=width, height=height, display=display)

File "/home/***/anaconda3/envs/tensorflow/lib/python3.5/site-packages/pyglet/window/init.py", line 504, in init
screen = display.get_default_screen()

File "/home/***/anaconda3/envs/tensorflow/lib/python3.5/site-packages/pyglet/canvas/base.py", line 73, in get_default_screen
return self.get_screens()[0]

File "/home/***/anaconda3/envs/tensorflow/lib/python3.5/site-packages/pyglet/canvas/base.py", line 65, in get_screens
raise NotImplementedError('abstract')

NotImplementedError: abstract

@awesome-xiaoy hey how did you solve this?