Code Monkey home page Code Monkey logo

multi-agent-emergence-environments's Introduction

Status: Archive (code is provided as-is, no updates expected)

Multiagent emergence environments

Environment generation code for Emergent Tool Use From Multi-Agent Autocurricula (blog)

Installation

This repository depends on the mujoco-worldgen package. You will need to clone the mujoco-worldgen repository and install it and its dependencies:

pip install -r mujoco-worldgen/requirements.txt
pip install -e mujoco-worldgen/
pip install -e multi-agent-emergence-environments/

This repository has been tested only on Mac OS X and Ubuntu 16.04 with Python 3.6

Use

Environment construction works in the following way: You start from the Base environment (defined in mae_envs/envs/base.py) and then you add environment modules (e.g. Boxes, Ramps, RandomWalls, etc.) and then wrappers on top. You can see examples in the mae_envs/envs folder.

If you want to construct a new environment, we highly recommend using the above paradigm in order to minimize code duplication. If you need new objects or game dynamics that don't already exist in this codebase, add them in via a new EnvModule class or a gym.Wrapper class rather than subclassing Base (or mujoco-worldgen's Env class). In general, EnvModules should be used for adding objects or sites to the environment, or otherwise modifying the mujoco simulator; wrappers should be used for everything else (e.g. adding rewards, additional observations, or implementing game mechanics like Lock and Grab).

The environments defined in this repository are:
Hide and seek - mae_envs/envs/hide_and_seek.py - The Hide and Seek environment described in the paper. This encompasses the random rooms, quadrant and food versions of the game (you can switch between them by changing the arguments given to the make_env function in the file)
Box locking - mae_envs/envs/box_locking.py - Encompasses the Lock and Return and Sequential Lock transfer tasks described in the paper.
Blueprint Construction - mae_envs/envs/blueprint_construction.py
Shelter Construction - mae_envs/envs/shelter_construction.py

You can test out environments by using the bin/examine script. Example usage: bin/examine.py base.
You can also use bin/examine to play a saved policy on an environment. There are several environment jsonnets and policies in the examples folder. Example usage:

bin/examine.py examples/hide_and_seek_quadrant.jsonnet examples/hide_and_seek_quadrant.npz

Note that to be able to play saved policies, you will need to install a few additional packages. You can do this via

pip install -r multi-agent-emergence-environments/requirements_ma_policy.txt

multi-agent-emergence-environments's People

Contributors

bowenbaker avatar dependabot[bot] avatar todor-markov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multi-agent-emergence-environments's Issues

Supporting project for everyone who wants to work with multi-agent-emergence-environments

Hello, everyone! If you are interested in developing your own projects with the multi-agent-emergence-environments by OpenAI but is having a hard time wrapping your head around the existing code (like I did myself for at least a couple of weeks!), please feel free to take a look at a project I developed at ETH Zürich using multi-agent-emergence-environments. It is called "Cooperation Learning for multi-agent systems", and you can find its repository at https://github.com/leonardovvla/multi-agent-cooperation-learning. Hope it can be helpful to at least some of you! All the best!

AttributeError: 'dict2' object has no attribute 'mj_ray'

When running the example code:

bin/examine.py mae_envs/envs/base.py

I get the following error:

Loading env from the module: mae_envs/envs/base.py
Creating window glfw
Traceback (most recent call last):
  File "bin/examine.py", line 91, in <module>
    main()
  File "/home/ep15/.local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/ep15/.local/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/ep15/.local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ep15/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "bin/examine.py", line 47, in main
    env_viewer=EnvViewer)
  File "/home/ep15/libraries/mujoco-worldgen/mujoco_worldgen/util/envs/examine_env.py", line 32, in examine_env
    env_viewer(env).run()
  File "/home/ep15/libraries/multi-agent-emergence-environments/mae_envs/viewer/env_viewer.py", line 23, in __init__
    self.env_reset()
  File "/home/ep15/libraries/multi-agent-emergence-environments/mae_envs/viewer/env_viewer.py", line 59, in env_reset
    self.env.reset()
  File "/home/ep15/libraries/multi-agent-emergence-environments/mae_envs/wrappers/util.py", line 89, in reset
    obs = self.env.reset()
  File "/home/ep15/anaconda3/envs/py366_hideseek/lib/python3.6/site-packages/gym/core.py", line 259, in reset
    observation = self.env.reset(**kwargs)
  File "/home/ep15/anaconda3/envs/py366_hideseek/lib/python3.6/site-packages/gym/core.py", line 259, in reset
    observation = self.env.reset(**kwargs)
  File "/home/ep15/anaconda3/envs/py366_hideseek/lib/python3.6/site-packages/gym/core.py", line 260, in reset
    return self.observation(observation)
  File "/home/ep15/libraries/multi-agent-emergence-environments/mae_envs/wrappers/line_of_sight.py", line 28, in observation
    self.metadata['agent_geom_idxs'][j])
  File "/home/ep15/libraries/multi-agent-emergence-environments/mae_envs/util/vision.py", line 54, in insight
    dist, collision_geom = raycast(sim, geom1_id, geom2_id=geom2_id, pt2=pt2)
  File "/home/ep15/libraries/mujoco-worldgen/mujoco_worldgen/util/geometry.py", line 40, in raycast
    dist = functions.mj_ray(sim.model,
AttributeError: 'dict2' object has no attribute 'mj_ray'

Is this actually Partial Brute Force?

Hi! I read the paper and follow the Transformer architecture etc.

( As noted below, some behavior seems only discoverable by randomly finding it. )

I have an idea how the bots are learning. First, I noticed each team takes a turn at finding a solution. It takes many games. Then, the next team finds their solution next. This looks like a step-by-step learning. Where they are randomly moving and hit a solution. But it's not full brute-force, they take random actions and many are a solution, and the attention/etc aids, making it a partial-brute force? I noticed the bots move/grab perfectly just in time, and they start off randomly moving around but learn what to keep doing and what to add on to their plan. It seems progressive and seems like it is something simpler going on.

  • Take for example the way at final stage the one blue hider moved the box in position *for the other team member for when he arrived back it would be closer. Why? It must had randomly tried actions, and found what worked in its super short time limit. What aided it I'm assuming is Attention, but I wonder why...how would Attention help it take better random actions?

  • For example, it needs to pull in the ramp so they can't jump over the wall... what tells only 1 blue hider to go to the other side of the room and where to bring it!? This looks like a brute force/normal RL. I don't see how the attention/sensor RNN thingy is aiding the solution finding to occur quicker.


P.S. What about only 1 team in a rain-forest that has to avoid rain entering the hut they need to stay in? Same thing but the environment is the seekers/eaters instead of needing other agents to find/eat/end them.

I also like how yous skipped learning to crawl/run/grab, just like skipping simulating atoms and aiming for high-level water simulation.

an ERROR was found!!

In the line 27 of the function's comment of ma_policy.graph_construct.construct_tf_graph, I suppose it should be "Each layer spec has optional arguments: nodes_in and nodes_out" instead of "Each layer spec has optional arguments: nodes_in and nodes_in.".

gym.error.DoubleWrapperError: Attempted to double wrap with Wrapper: AgentGeomObsMask2D

I want it to support tf2, but I ran into some problems:

gym.error.DoubleWrapperError: Attempted to double wrap with Wrapper: AgentGeomObsMask2D

### Environment:

(env1) root@agi:/home/agi/Downloads/multi-agent-emergence-environments# uname -a

Linux agi 5.13.0-22-generic #22-Ubuntu SMP Fri Nov 5 13:21:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

(env1) root@agi:/home/agi/Downloads/multi-agent-emergence-environments#  conda list
# packages in environment at /root/anaconda3/envs/env1:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
_tflow_select             2.1.0                       gpu  
abseil-cpp                20210324.2           h9c3ff4c_0    conda-forge
absl-py                   1.0.0              pyhd8ed1ab_0    conda-forge
aiohttp                   3.8.1            py39h3811e60_0    conda-forge
aiosignal                 1.2.0              pyhd8ed1ab_0    conda-forge
alabaster                 0.7.12                     py_0    conda-forge
astor                     0.8.1              pyh9f0ad1d_0    conda-forge
astunparse                1.6.3              pyhd8ed1ab_0    conda-forge
async-timeout             4.0.1              pyhd8ed1ab_0    conda-forge
attrs                     21.2.0             pyhd8ed1ab_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
baselines                 0.1.6                     dev_0    <develop>
binutils_impl_linux-64    2.36.1               h193b22a_2    conda-forge
blinker                   1.4                        py_1    conda-forge
brotlipy                  0.7.0           py39h3811e60_1003    conda-forge
c-ares                    1.18.1               h7f98852_0    conda-forge
ca-certificates           2021.10.26           h06a4308_2  
cachetools                4.2.4              pyhd8ed1ab_0    conda-forge
certifi                   2021.10.8        py39h06a4308_0  
cffi                      1.15.0                   pypi_0    pypi
charset-normalizer        2.0.7              pyhd8ed1ab_0    conda-forge
click                     8.0.3            py39hf3d152e_1    conda-forge
cloudpickle               1.2.2                    pypi_0    pypi
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
cryptography              36.0.0           py39h95dcef6_0    conda-forge
cudatoolkit               11.3.1               h2bc3f7f_2  
cudnn                     8.2.1                cuda11.3_0  
cython                    0.29.24          py39he80948d_1    conda-forge
dataclasses               0.8                pyhc8e2a94_3    conda-forge
decorator                 5.1.0              pyhd8ed1ab_0    conda-forge
docutils                  0.17.1                   pypi_0    pypi
fasteners                 0.16.3                   pypi_0    pypi
freetype                  2.10.4               h0708190_1    conda-forge
frozenlist                1.2.0            py39h3811e60_1    conda-forge
future                    0.18.2                   pypi_0    pypi
gast                      0.3.3                      py_0    conda-forge
gcc                       11.2.0               h702ea55_1    conda-forge
gcc_impl_linux-64         11.2.0              h82a94d6_11    conda-forge
giflib                    5.2.1                h36c2ea0_2    conda-forge
glfw                      2.4.0                    pypi_0    pypi
google-auth               1.35.0             pyh6c4a22f_0    conda-forge
google-auth-oauthlib      0.4.6              pyhd8ed1ab_0    conda-forge
google-pasta              0.2.0              pyh8c360ce_0    conda-forge
grpc-cpp                  1.37.1               hfc4d69e_3    conda-forge
grpcio                    1.37.1           py39hff7568b_0    conda-forge
gym                       0.10.5                   pypi_0    pypi
h5py                      2.10.0          nompi_py39h98ba4bc_106    conda-forge
hdf5                      1.10.6          nompi_h6a2412b_1114    conda-forge
icu                       68.2                 h9c3ff4c_0    conda-forge
idna                      3.3                      pypi_0    pypi
imagehash                 4.2.1              pyhd8ed1ab_0    conda-forge
imageio                   2.11.1                   pypi_0    pypi
imagesize                 1.3.0              pyhd8ed1ab_0    conda-forge
importlib-metadata        4.8.2            py39hf3d152e_0    conda-forge
iniconfig                 1.1.1              pyh9f0ad1d_0    conda-forge
ipdb                      0.13.9             pyhd8ed1ab_0    conda-forge
ipython                   7.29.0           py39hef51801_2    conda-forge
jbig                      2.1               h7f98852_2003    conda-forge
jedi                      0.18.1           py39hf3d152e_0    conda-forge
jinja2                    3.0.3              pyhd8ed1ab_0    conda-forge
joblib                    1.1.0                    pypi_0    pypi
jpeg                      9d                   h36c2ea0_0    conda-forge
jsonnet                   0.17.0                   pypi_0    pypi
keras                     2.7.0                    pypi_0    pypi
keras-preprocessing       1.1.2              pyhd8ed1ab_0    conda-forge
kernel-headers_linux-64   2.6.32              he073ed8_15    conda-forge
krb5                      1.19.2               hcc1bbae_3    conda-forge
lcms2                     2.12                 hddcbb42_0    conda-forge
ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
lerc                      2.2.1                h9c3ff4c_0    conda-forge
libblas                   3.9.0           12_linux64_openblas    conda-forge
libcblas                  3.9.0           12_linux64_openblas    conda-forge
libclang                  12.0.0                   pypi_0    pypi
libcurl                   7.79.1               h2574ce0_1    conda-forge
libdeflate                1.7                  h7f98852_5    conda-forge
libedit                   3.1.20210910         h7f8727e_0  
libev                     4.33                 h516909a_1    conda-forge
libffi                    3.3                  he6710b0_2  
libgcc-devel_linux-64     11.2.0              h0952999_11    conda-forge
libgcc-ng                 11.2.0              h1d223b6_11    conda-forge
libgfortran-ng            11.2.0              h69a702a_11    conda-forge
libgfortran5              11.2.0              h5c6108e_11    conda-forge
libgomp                   11.2.0              h1d223b6_11    conda-forge
liblapack                 3.9.0           12_linux64_openblas    conda-forge
libnghttp2                1.43.0               h812cca2_1    conda-forge
libopenblas               0.3.18          pthreads_h8fe5266_0    conda-forge
libpng                    1.6.37               h21135ba_2    conda-forge
libprotobuf               3.15.8               h780b84a_1    conda-forge
libsanitizer              11.2.0              he4da1e4_11    conda-forge
libssh2                   1.10.0               ha56f1ee_2    conda-forge
libstdcxx-ng              11.2.0              he4da1e4_11    conda-forge
libtiff                   4.3.0                hf544144_1    conda-forge
libwebp-base              1.2.1                h7f98852_0    conda-forge
libxcb                    1.13              h7f98852_1004    conda-forge
lockfile                  0.12.2                     py_1    conda-forge
lz4-c                     1.9.3                h9c3ff4c_1    conda-forge
markdown                  3.3.6              pyhd8ed1ab_0    conda-forge
markupsafe                2.0.1            py39h3811e60_1    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
monotonic                 1.5                        py_0    conda-forge
more-itertools            8.12.0             pyhd8ed1ab_0    conda-forge
mujoco-py                 2.0.2.13                  dev_0    <develop>
mujoco-worldgen           0.0.0                     dev_0    <develop>
multidict                 5.2.0            py39h3811e60_1    conda-forge
ncurses                   6.3                  h7f8727e_2  
numpy                     1.21.0                   pypi_0    pypi
numpy-stl                 2.16.3                   pypi_0    pypi
oauthlib                  3.1.1              pyhd8ed1ab_0    conda-forge
olefile                   0.46               pyh9f0ad1d_1    conda-forge
opencv-python             4.5.4.60                 pypi_0    pypi
openssl                   1.1.1l               h7f8727e_0  
opt_einsum                3.3.0              pyhd8ed1ab_1    conda-forge
p5py                      1.0.0                    pypi_0    pypi
packaging                 21.3               pyhd8ed1ab_0    conda-forge
parso                     0.8.2              pyhd8ed1ab_0    conda-forge
pep517                    0.12.0                   pypi_0    pypi
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    8.4.0                    pypi_0    pypi
pip                       21.3.1                   pypi_0    pypi
pluggy                    1.0.0            py39hf3d152e_2    conda-forge
prompt-toolkit            3.0.22             pyha770c72_0    conda-forge
protobuf                  3.15.8           py39he80948d_0    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
py                        1.11.0             pyh6c4a22f_0    conda-forge
pyasn1                    0.4.8                      py_0    conda-forge
pyasn1-modules            0.2.7                      py_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pyglet                    1.5.0                    pypi_0    pypi
pygments                  2.10.0             pyhd8ed1ab_0    conda-forge
pyjwt                     2.0.1              pyhd8ed1ab_0    conda-forge
pyopenssl                 21.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.6              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1            py39hf3d152e_4    conda-forge
pytest                    6.2.5                    pypi_0    pypi
pytest-instafail          0.4.2                    pypi_0    pypi
python                    3.9.7                h12debd9_1  
python-flatbuffers        1.12               pyhd8ed1ab_1    conda-forge
python-utils              2.5.6                    pypi_0    pypi
python_abi                3.9                      2_cp39    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pyu2f                     0.1.5              pyhd8ed1ab_0    conda-forge
pywavelets                1.2.0            py39hce5d2b2_0    conda-forge
re2                       2021.08.01           h9c3ff4c_0    conda-forge
readline                  8.1                  h27cfd23_0  
requests                  2.26.0             pyhd8ed1ab_1    conda-forge
requests-oauthlib         1.3.0              pyh9f0ad1d_0    conda-forge
rsa                       4.8                pyhd8ed1ab_0    conda-forge
scipy                     1.7.2                    pypi_0    pypi
setuptools                59.4.0                   pypi_0    pypi
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.8                he1b5a44_3    conda-forge
snowballstemmer           2.2.0              pyhd8ed1ab_0    conda-forge
sphinx                    4.3.0              pyh6c4a22f_0    conda-forge
sphinx_rtd_theme          1.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_1    conda-forge
sqlite                    3.36.0               hc218d9a_0  
sysroot_linux-64          2.12                he073ed8_15    conda-forge
tensorboard               2.7.0                    pypi_0    pypi
tensorboard-data-server   0.6.1                    pypi_0    pypi
tensorboard-plugin-wit    1.8.0              pyh44b312d_0    conda-forge
tensorflow                2.4.1            py39hf3d152e_0    conda-forge
tensorflow-base           2.4.1            py39h23a8cbf_0    conda-forge
tensorflow-estimator      2.7.0                    pypi_0    pypi
tensorflow-gpu            2.7.0                    pypi_0    pypi
tensorflow-io-gcs-filesystem 0.22.0                   pypi_0    pypi
termcolor                 1.1.0                      py_2    conda-forge
tk                        8.6.11               h1ccaba5_0  
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     1.2.2                    pypi_0    pypi
tqdm                      4.62.3                   pypi_0    pypi
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
typing-extensions         4.0.0                hd8ed1ab_0    conda-forge
typing_extensions         4.0.0              pyha770c72_0    conda-forge
tzdata                    2021e                hda174b7_0  
urllib3                   1.26.7             pyhd8ed1ab_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
werkzeug                  2.0.1              pyhd8ed1ab_0    conda-forge
wheel                     0.37.0             pyhd3eb1b0_1  
wrapt                     1.13.3           py39h3811e60_1    conda-forge
xmltodict                 0.12.0                   pypi_0    pypi
xorg-fixesproto           5.0               h7f98852_1002    conda-forge
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libx11               1.7.2                h7f98852_0    conda-forge
xorg-libxau               1.0.9                h7f98852_0    conda-forge
xorg-libxcursor           1.2.0                h7f98852_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h7f98852_1    conda-forge
xorg-libxfixes            5.0.3             h7f98852_1004    conda-forge
xorg-libxinerama          1.1.4             h9c3ff4c_1001    conda-forge
xorg-libxrandr            1.5.2                h7f98852_1    conda-forge
xorg-libxrender           0.9.10            h7f98852_1003    conda-forge
xorg-randrproto           1.5.0             h7f98852_1001    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-xextproto            7.3.0             h7f98852_1002    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xz                        5.2.5                h7b6447c_0  
yarl                      1.7.2            py39h3811e60_1    conda-forge
zipp                      3.6.0              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11               h7b6447c_3  
zstd                      1.5.0                ha95c52a_0    conda-forge

(env1) root@agi:/home/agi/Downloads/multi-agent-emergence-environments# pip3 list
Package                       Version   Location
----------------------------- --------- ----------------------------------------------------------------------------------
absl-py                       1.0.0
aiohttp                       3.8.1
aiosignal                     1.2.0
alabaster                     0.7.12
astor                         0.8.1
astunparse                    1.6.3
async-timeout                 4.0.1
attrs                         21.2.0
Babel                         2.9.1
backcall                      0.2.0
backports.functools-lru-cache 1.6.4
baselines                     0.1.6     /home/agi/Downloads/baselines
blinker                       1.4
brotlipy                      0.7.0
cachetools                    4.2.4
certifi                       2021.10.8
cffi                          1.15.0
charset-normalizer            2.0.7
click                         8.0.3
cloudpickle                   1.2.2
colorama                      0.4.4
cryptography                  36.0.0
Cython                        0.29.24
dataclasses                   0.8
decorator                     5.1.0
docutils                      0.17.1
fasteners                     0.16.3
flatbuffers                   1.12
frozenlist                    1.2.0
future                        0.18.2
gast                          0.3.3
glfw                          2.4.0
google-auth                   1.35.0
google-auth-oauthlib          0.4.6
google-pasta                  0.2.0
grpcio                        1.37.1
gym                           0.10.5
h5py                          2.10.0
idna                          3.3
ImageHash                     4.2.1
imageio                       2.11.1
imagesize                     1.3.0
importlib-metadata            4.8.2
iniconfig                     1.1.1
ipdb                          0.13.9
ipython                       7.29.0
jedi                          0.18.1
Jinja2                        3.0.3
joblib                        1.1.0
jsonnet                       0.17.0
keras                         2.7.0
Keras-Preprocessing           1.1.2
libclang                      12.0.0
lockfile                      0.12.2
Markdown                      3.3.6
MarkupSafe                    2.0.1
matplotlib-inline             0.1.3
monotonic                     1.5
more-itertools                8.12.0
mujoco-py                     2.0.2.13  /root/anaconda3/envs/env1/lib/python3.9/site-packages/mujoco_py-2.0.2.13-py3.9.egg
mujoco-worldgen               0.0.0     /home/agi/Downloads/mujoco-worldgen
multidict                     5.2.0
numpy                         1.21.4
numpy-stl                     2.16.3
oauthlib                      3.1.1
olefile                       0.46
opencv-python                 4.5.4.60
opt-einsum                    3.3.0
p5py                          1.0.0
packaging                     21.3
parso                         0.8.2
pep517                        0.12.0
pexpect                       4.8.0
pickleshare                   0.7.5
Pillow                        8.4.0
pip                           21.3.1
pluggy                        1.0.0
prompt-toolkit                3.0.22
protobuf                      3.15.8
ptyprocess                    0.7.0
py                            1.11.0
pyasn1                        0.4.8
pyasn1-modules                0.2.7
pycparser                     2.21
pyglet                        1.5.0
Pygments                      2.10.0
PyJWT                         2.0.1
pyOpenSSL                     21.0.0
pyparsing                     3.0.6
PySocks                       1.7.1
pytest                        6.2.5
pytest-instafail              0.4.2
python-utils                  2.5.6
pytz                          2021.3
pyu2f                         0.1.5
PyWavelets                    1.2.0
requests                      2.26.0
requests-oauthlib             1.3.0
rsa                           4.8
scipy                         1.7.3
setuptools                    59.4.0
six                           1.16.0
snowballstemmer               2.2.0
Sphinx                        4.3.0
sphinx-rtd-theme              1.0.0
sphinxcontrib-applehelp       1.0.2
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.5
tensorboard                   2.7.0
tensorboard-data-server       0.6.1
tensorboard-plugin-wit        1.8.0
tensorflow                    2.4.1
tensorflow-estimator          2.7.0
tensorflow-gpu                2.7.0
tensorflow-io-gcs-filesystem  0.22.0
termcolor                     1.1.0
toml                          0.10.2
tomli                         1.2.2
tqdm                          4.62.3
traitlets                     5.1.1
typing_extensions             4.0.0
urllib3                       1.26.7
wcwidth                       0.2.5
Werkzeug                      2.0.1
wheel                         0.37.0
wrapt                         1.13.3
xmltodict                     0.12.0
yarl                          1.7.2
zipp                          3.6.0


Is there any memory requirement of running this project?

Finally, after installed all the related package and applying the license, Segmentation error shows up.

Does anybody know about the memory requirement of running this project?

My current memory is 4 GB. Is it too small?

Thank you.

ModuleNotFoundError: No module named 'gym.spaces.dict_space'

bin/examine.py examples/hide_and_seek_quadrant.jsonnet examples/lock_and_return.npz


Inferred:
	names: examples/hide_and_seek_quadrant.jsonnet examples/lock_and_return.npz
	arguments: {}


/home/amitmandliya/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/amitmandliya/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/amitmandliya/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/amitmandliya/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/amitmandliya/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/amitmandliya/.local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
/home/amitmandliya/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/amitmandliya/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/amitmandliya/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/amitmandliya/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/amitmandliya/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/amitmandliya/.local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
/home/amitmandliya/.local/lib/python3.7/site-packages/gym/logger.py:30: UserWarning: WARN: Box bound precision lowered by casting to float32
  warnings.warn(colorize('%s: %s'%('WARN', msg % args), 'yellow'))
2020-03-21 01:24:02,468 From /home/amitmandliya/amit/multi-agent-emergence-environments/ma_policy/load_policy.py:57: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.

2020-03-21 01:24:02,468 From /home/amitmandliya/amit/multi-agent-emergence-environments/ma_policy/load_policy.py:58: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

2020-03-21 01:24:02,468 From /home/amitmandliya/amit/multi-agent-emergence-environments/ma_policy/load_policy.py:61: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.

2020-03-21 01:24:02.475922: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-03-21 01:24:02.498972: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2099940000 Hz
2020-03-21 01:24:02.499333: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x2d669a0 executing computations on platform Host. Devices:
2020-03-21 01:24:02.499353: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
Traceback (most recent call last):
  File "bin/examine.py", line 91, in <module>
    main()
  File "/home/amitmandliya/.local/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/amitmandliya/.local/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/amitmandliya/.local/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/amitmandliya/.local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "bin/examine.py", line 68, in main
    for i, name in enumerate(policy_names)]
  File "bin/examine.py", line 68, in <listcomp>
    for i, name in enumerate(policy_names)]
  File "/home/amitmandliya/amit/multi-agent-emergence-environments/ma_policy/load_policy.py", line 65, in load_policy
    policy_fn_and_args_raw = pickle.loads(policy_dict['policy_fn_and_args'])
ModuleNotFoundError: No module named 'gym.spaces.dict_space'

Error when running bin/examine.py without the pre-trained model

Whenever I try to run the environments such as base or hide_and_seek through the
bin/examine.py hide_and_seek or base commands
I receive this error:

Inferred:
	names: hide_and_seek.py
	arguments: {}


Traceback (most recent call last):
  File "bin/examine.py", line 91, in <module>
    main()
  File "/home/avi/anaconda3/envs/python3.6/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/avi/anaconda3/envs/python3.6/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/avi/anaconda3/envs/python3.6/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/avi/anaconda3/envs/python3.6/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "bin/examine.py", line 47, in main
    env_viewer=EnvViewer)
  File "/home/avi/Desktop/hideandseek/mujoco-worldgen/mujoco_worldgen/util/envs/examine_env.py", line 26, in examine_env
    return_args_remaining=True, **env_kwargs)
  File "/home/avi/Desktop/hideandseek/mujoco-worldgen/mujoco_worldgen/util/envs/flexible_load.py", line 88, in load_env
    matching = (glob(join(core_dir, envs_dir, "**", "*.py"), recursive=True) +
  File "/home/avi/anaconda3/envs/python3.6/lib/python3.6/posixpath.py", line 94, in join
    genericpath._check_arg_types('join', a, *p)
  File "/home/avi/anaconda3/envs/python3.6/lib/python3.6/genericpath.py", line 149, in _check_arg_types
    (funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'tuple'

I'm not sure how to fix it and running the environments with the pre-trained models works perfectly fine.

How to run this project ?

How do i run the project so that I can see the agents doing the work?
I can't find any scenes in the project

Question on training procedure

Hi, thanks for releasing your whole project, I read the paper and I am quite interested in how you train your model, especially details on training buffer, however I didn't find this part in the project. Did you use an off-policy buffer to train the model?

How to training agents

I've deployed the entire environment and can play saved policies, but how do I train agents?how to produce policy ?Who can help me? I'd better have an example,thanks

policy

Thanks for releasing your whole project,but I can't find the trainning progress. I want to know about rapid architecture, can you give me some information?

Running example environment: invalid scope name

Hi, I'm trying to run the example environment as specified in the doc: bin/examine.py examples/hide_and_seek_quadrant.jsonnet examples/hide_and_seek_quadrant.npz. I've installed all the dependencies without issue. I'm not exactly sure what problem is, and I get the following output when I try running the above command:

`(rl_env)  :multi-agent-emergence-environments  $ bin/examine.py examples/hide_and_seek_quadrant.jsonnet examples/hide_and_seek_quadrant.npz
objc[68761]: Class GLFWApplicationDelegate is implemented in both /Users/ /.mujoco/mjpro150/bin/libglfw.3.dylib (0x10c9de778) and /usr/local/Cellar/glfw/3.3/lib/libglfw.3.3.dylib (0x10cb26710). One of the two will be used. Which one is undefined.
objc[68761]: Class GLFWWindowDelegate is implemented in both /Users/*****/.mujoco/mjpro150/bin/libglfw.3.dylib (0x10c9de700) and /usr/local/Cellar/glfw/3.3/lib/libglfw.3.3.dylib (0x10cb26738). One of the two will be used. Which one is undefined.
objc[68761]: Class GLFWContentView is implemented in both /Users/*****/.mujoco/mjpro150/bin/libglfw.3.dylib (0x10c9de7a0) and /usr/local/Cellar/glfw/3.3/lib/libglfw.3.3.dylib (0x10cb26788). One of the two will be used. Which one is undefined.
objc[68761]: Class GLFWWindow is implemented in both /Users/*****/.mujoco/mjpro150/bin/libglfw.3.dylib (0x10c9de818) and /usr/local/Cellar/glfw/3.3/lib/libglfw.3.3.dylib (0x10cb26800). One of the two will be used. Which one is undefined.

Inferred:
	names: examples/hide_and_seek_quadrant.jsonnet examples/hide_and_seek_quadrant.npz
	arguments: {}


WARN: <class 'mae_envs.envs.hide_and_seek.HideAndSeekRewardWrapper'> doesn't implement 'reset' method, which is required for wrappers derived directly from Wrapper. Deprecated default implementation is used.
2019-09-21 15:52:25.117396: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Traceback (most recent call last):
  File "bin/examine.py", line 91, in <module>
    main()
  File "//anaconda3/envs/rl_env/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "//anaconda3/envs/rl_env/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "//anaconda3/envs/rl_env/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "//anaconda3/envs/rl_env/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "bin/examine.py", line 68, in main
    for i, name in enumerate(policy_names)]
  File "bin/examine.py", line 68, in <listcomp>
    for i, name in enumerate(policy_names)]
  File "/Users/*****/Desktop/rl/multi-agent-emergence-environments/ma_policy/load_policy.py", line 73, in load_policy
    policy = MAPolicy(**policy_args)
  File "/Users/*****/Desktop/rl/multi-agent-emergence-environments/ma_policy/ma_policy.py", line 88, in __init__
    with tf.variable_scope(self.scope, reuse=self.reuse):
  File "//anaconda3/envs/rl_env/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 1980, in __enter__
    return self._enter_scope_uncached()
  File "//anaconda3/envs/rl_env/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 2024, in _enter_scope_uncached
    current_name_scope_name = current_name_scope.__enter__()
  File "//anaconda3/envs/rl_env/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 6008, in __enter__
    return self._name_scope.__enter__()
  File "//anaconda3/envs/rl_env/lib/python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "//anaconda3/envs/rl_env/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 4131, in name_scope
    raise ValueError("'%s' is not a valid scope name" % name)
ValueError: 'policy_{i}' is not a valid scope name
`

Error when running the four environment files of multi-agent-emergence-environments

I encounter the follwoing error when I want to run the four environments in "/multi-agent-emergence-environments-master/mae_envs/envs" folder:

running build_ext
building 'mujoco_py.cymj' extension
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Imujoco-py-1.50.1.0/mujoco_py -I/notebooks/mujoco-py-1.50.1.0/mujoco_py -Inotebooks/mujoco/mjpro150/include -I/usr/local/lib/python3.8/dist-packages/numpy/core/include -I/usr/include/python3.8 -c /notebooks/mujoco-py-1.50.1.0/mujoco_py/cymj.c -o /notebooks/mujoco-py-1.50.1.0/mujoco_py/generated/_pyxbld_LinuxCPUExtensionBuilder/temp.linux-x86_64-3.8/notebooks/mujoco-py-1.50.1.0/mujoco_py/cymj.o -fopenmp -w
/notebooks/mujoco-py-1.50.1.0/mujoco_py/cymj.c:666:10: fatal error: mjmodel.h: No such file or directory
666 | #include "mjmodel.h"
| ^~~~~~~~~~~
compilation terminated.
Traceback (most recent call last):
File "/usr/lib/python3.8/distutils/unixccompiler.py", line 117, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] +
File "/usr/lib/python3.8/distutils/ccompiler.py", line 910, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/lib/python3.8/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/usr/lib/python3.8/distutils/spawn.py", line 157, in _spawn_posix
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "multi-agent-emergence-environments-master/mae_envs/envs/blueprint_construction.py", line 5, in
from mae_envs.wrappers.util import (DiscretizeActionWrapper, MaskActionWrapper,
File "/notebooks/multi-agent-emergence-environments-master/mae_envs/wrappers/util.py", line 2, in
from mujoco_py import MujocoException
File "/notebooks/mujoco-py-1.50.1.0/mujoco_py/init.py", line 1, in
from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
File "/notebooks/mujoco-py-1.50.1.0/mujoco_py/builder.py", line 283, in
cymj = load_cython_ext(mjpro_path)
File "/notebooks/mujoco-py-1.50.1.0/mujoco_py/builder.py", line 54, in load_cython_ext
cext_so_path = builder.build()
File "/notebooks/mujoco-py-1.50.1.0/mujoco_py/builder.py", line 131, in build
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.8/dist-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/notebooks/mujoco-py-1.50.1.0/mujoco_py/builder.py", line 75, in build_extensions
build_ext.build_extensions(self)
File "/usr/local/lib/python3.8/dist-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "/usr/lib/python3.8/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/lib/python3.8/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1

"mjmodel.h" is already in "/mujoco/mjpro/include/mjmodel.h". So my question is that most probably the environment files or more specifically "cymj.c" is not able to find "mjmodel.h" due to some problem in installation, or is there any other reason? Thanks!

Error when loading pre-trained policy

When I examine the environment using the command bin/examine.py examples/hide_and_seek_quadrant.jsonnet examples/hide_and_seek_quadrant.npz, I get the error below. However, when I do not specify the .npz file, I am able to successfully visualize the environment.

(mujoco) scazlab@scazlab-INTEL:~/catkin_ws/src/multi-agent-emergence-environments$ bin/examine.py examples/hide_and_seek_quadrant.jsonnet examples/hide_and_seek_quadrant.npz

Inferred:
	names: examples/hide_and_seek_quadrant.jsonnet examples/hide_and_seek_quadrant.npz
	arguments: {}


2022-12-05 17:46:48.707354: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 AVX512F AVX512_VNNI FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-12-05 17:46:48.796426: I tensorflow/core/util/port.cc:104] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2022-12-05 17:46:49.134219: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/scazlab/catkin_ws/devel/lib:/opt/ros/melodic/lib:/usr/local/cuda/lib64:/home/scazlab/.mujoco/mujoco210/bin:/usr/lib/nvidia
2022-12-05 17:46:49.134264: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/scazlab/catkin_ws/devel/lib:/opt/ros/melodic/lib:/usr/local/cuda/lib64:/home/scazlab/.mujoco/mujoco210/bin:/usr/lib/nvidia
2022-12-05 17:46:49.134269: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
Traceback (most recent call last):
  File "/home/scazlab/catkin_ws/src/multi-agent-emergence-environments/bin/examine.py", line 91, in <module>
    main()
  File "/home/scazlab/anaconda3/envs/mujoco/lib/python3.10/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/scazlab/anaconda3/envs/mujoco/lib/python3.10/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/scazlab/anaconda3/envs/mujoco/lib/python3.10/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/scazlab/anaconda3/envs/mujoco/lib/python3.10/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/scazlab/catkin_ws/src/multi-agent-emergence-environments/bin/examine.py", line 54, in main
    from ma_policy.load_policy import load_policy
  File "/home/scazlab/catkin_ws/src/multi-agent-emergence-environments/ma_policy/load_policy.py", line 7, in <module>
    import cloudpickle as pickle
  File "/home/scazlab/anaconda3/envs/mujoco/lib/python3.10/site-packages/cloudpickle/__init__.py", line 3, in <module>
    from cloudpickle.cloudpickle import *
  File "/home/scazlab/anaconda3/envs/mujoco/lib/python3.10/site-packages/cloudpickle/cloudpickle.py", line 151, in <module>
    _cell_set_template_code = _make_cell_set_template_code()
  File "/home/scazlab/anaconda3/envs/mujoco/lib/python3.10/site-packages/cloudpickle/cloudpickle.py", line 132, in _make_cell_set_template_code
    return types.CodeType(

It stopped in "Successfully opened dynamic library libcuda.so.1"

Sorry, I am a beginner, I just want to reproduce this paper, I run bin/examine.py examples/hide_and_seek_quadrant.jsonnet examples/hide_and_seek_quadrant.npz, and the result has been stopped here

(base) root@lang:~/Downloads/multi-agent-emergence-environments# bin/examine.py examples/hide_and_seek_quadrant.jsonnet examples/hide_and_seek_quadrant.npz

Inferred:
        names: examples/hide_and_seek_quadrant.jsonnet examples/hide_and_seek_quadrant.npz
        arguments: {}


2020-07-06 10:14:55.019859: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2020-07-06 10:14:55.060290: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency: 2599990000 Hz
2020-07-06 10:14:55.061626: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f24a4000b60 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-07-06 10:14:55.061723: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2020-07-06 10:14:55.070895: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1

, I do not know what to do next, can get a little help, I will be grateful

My system environment information:

(base) root@lang:~# uname -a
Linux lang 5.7.0-kali1-amd64 #1 SMP Debian 5.7.6-1kali2 (2020-07-01) x86_64 GNU/Linux

(base) root@lang:~# nvidia-smi
Mon Jul  6 11:31:47 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.100      Driver Version: 440.100      CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 960M    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   72C    P0    N/A /  N/A |     11MiB /  4046MiB |    100%      Default |

(base) root@lang:~# python --version
Python 3.7.3

and I run it in Pycharm

How to determine successful installation?

When i run
pip install -e multi-agent-emergence-environments/

The following error appears:

Running setup.py develop for mae-envs
ERROR: Command errored out with exit status 1:
command: /home/jtr/anaconda3/envs/mujoco/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/jtr/multi-agent-emergence-environments/setup.py'"'"'; file='"'"'/home/jtr/multi-agent-emergence-environments/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps
cwd: /home/jtr/multi-agent-emergence-environments/
Complete output (3 lines):
running develop
running egg_info
error: [Errno 13] Permission denied

ERROR: Command errored out with exit status 1: /home/jtr/anaconda3/envs/mujoco/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/jtr/multi-agent-emergence-environments/setup.py'"'"'; file='"'"'/home/jtr/multi-agent-emergence-environments/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

I thought it was not enough authority, so I executed:
sudo pip install -e multi-agent-emergence-environments/

The output seems to be successful, but mae-envs cannot be found when running base.
No handlers could be found for logger "pip._internal.network.auth"
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
WARNING: The directory '/home/jtr/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Looking in indexes: http://pypi.douban.com/simple
Obtaining file:///home/jtr/multi-agent-emergence-environments
Installing collected packages: mae-envs
Attempting uninstall: mae-envs
Found existing installation: mae-envs 0.0.0
Uninstalling mae-envs-0.0.0:
Successfully uninstalled mae-envs-0.0.0
Running setup.py develop for mae-envs
Successfully installed mae-envs

So did I install it successfully? In addition, how to test after successful installation

rendering env to look like in the blog

Hi,
i was wondering if it is possible to use this repository in order to render the simulations as you show in your blog (better looking characters, obstacles, floors, etc.)?
when i ran the examine.py script the render of the env was rather basic..

thanks

Observation parameters

Hey, I would like to implement some different policies to play the game, and I am trying to find out the meanings of the variables in the observations. Could you elaborate a little bit on the parameters in 'observation_self'? Thank you kindly for your attention.

Jsonnet error when unrolling policy

Hi,

I created a fresh python 3.6 environments and installed the dependencies from both repositories. However, when I try to unroll a saved policy in the respective environment, e.g. $ bin/examine.py examples/hide_and_seek_quadrant.jsonnet examples/hide_and_seek_quadrant.npz, I get RuntimeError: STATIC ERROR: std.jsonnet:1249:1-5: did not expect: (IDENTIFIER, "core").

This might or might not be related to #19, as I am experiencing that problem as well.

Here's the full stack:


Inferred:
	names: examples/hide_and_seek_full.jsonnet examples/hide_and_seek_full.npz
	arguments: {}


/home/jan/.conda/envs/openairl/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:523: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/jan/.conda/envs/openairl/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:524: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/jan/.conda/envs/openairl/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/jan/.conda/envs/openairl/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/jan/.conda/envs/openairl/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/jan/.conda/envs/openairl/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:532: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
  File "bin/examine.py", line 91, in <module>
    main()
  File "/home/jan/.conda/envs/openairl/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/jan/.conda/envs/openairl/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/jan/.conda/envs/openairl/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/jan/.conda/envs/openairl/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "bin/examine.py", line 58, in main
    return_args_remaining=True, **kwargs)
  File "/home/jan/Projekte/PsychoRL/mujoco-worldgen/mujoco_worldgen/util/envs/flexible_load.py", line 81, in load_env
    env_data = json.loads(_jsonnet.evaluate_file(pattern))
RuntimeError: STATIC ERROR: std.jsonnet:1249:1-5: did not expect: (IDENTIFIER, "core")

cymj.o - file not recognized

When running an example like bin/examine.py examples/hide_and_seek_quadrant.jsonnet examples/hide_and_seek_quadrant.npz gcc errors with cymj.o: file not recognized: file format not recognized

Missing architectures jsonnet files

ma_policy/graph_construct.py specifies that file mas/ppo/base-architectures.jsonnet contains example architectures, to the best of my ability I can't find that file in the repository.

[Suggestion] Switch to a free physics engine

This depends on the proprietary MuJoCo physics engine, which apparently requires a subscription-based license for extended use. So would it be feasible to eliminate this dependency and replace it with something else? A free, open-source physics engine would be ideal, but even one that's just free as in beer (without any trial period or student requirement) would be a great improvement.

I know the readme says this repository is no longer being updated, but hopefully there's someone (from OpenAI or otherwise) who would be interested in taking this on as a project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.