The Neural-MMO Challenge
Getting Started
This notebook walks you through installing dependencies and helps you make your first submission
Getting started¶
Clone Starter Kit and Install Dependencies¶
!git clone http://gitlab.aicrowd.com/neural-mmo/neural-mmo-starter-kit.git
!git checkout round2
!pip install neural-mmo
#Optional: Install ML dependencies
!pip install -U -r neural-mmo-starter-kit/requirements.txt
Cloning into 'neural-mmo-starter-kit'...
remote: Enumerating objects: 242, done.
remote: Counting objects: 100% (242/242), done.
remote: Compressing objects: 100% (139/139), done.
remote: Total 649 (delta 133), reused 190 (delta 98), pack-reused 407
Receiving objects: 100% (649/649), 18.93 MiB | 5.57 MiB/s, done.
Resolving deltas: 100% (305/305), done.
fatal: not a git repository (or any of the parent directories): .git
Collecting neural-mmo
Downloading neural_mmo-1.5.2.2-py3-none-any.whl (124 kB)
|████████████████████████████████| 124 kB 4.2 MB/s
Collecting fire==0.4.0
Downloading fire-0.4.0.tar.gz (87 kB)
|████████████████████████████████| 87 kB 5.2 MB/s
Collecting setproctitle==1.1.10
Downloading setproctitle-1.1.10.zip (34 kB)
Collecting matplotlib==3.1.3
Downloading matplotlib-3.1.3-cp37-cp37m-manylinux1_x86_64.whl (13.1 MB)
|████████████████████████████████| 13.1 MB 12.5 MB/s
Collecting vec-noise==1.1.4
Downloading vec_noise-1.1.4.zip (134 kB)
|████████████████████████████████| 134 kB 57.0 MB/s
Collecting Twisted==19.2.0
Downloading Twisted-19.2.0.tar.bz2 (3.1 MB)
|████████████████████████████████| 3.1 MB 15.8 MB/s
Collecting autobahn==19.3.3
Downloading autobahn-19.3.3-py2.py3-none-any.whl (389 kB)
|████████████████████████████████| 389 kB 40.5 MB/s
Collecting gym==0.17.2
Downloading gym-0.17.2.tar.gz (1.6 MB)
|████████████████████████████████| 1.6 MB 43.0 MB/s
Collecting sphinx-rtd-theme==0.5.1
Downloading sphinx_rtd_theme-0.5.1-py2.py3-none-any.whl (2.8 MB)
|████████████████████████████████| 2.8 MB 38.6 MB/s
Collecting tqdm==4.61.1
Downloading tqdm-4.61.1-py2.py3-none-any.whl (75 kB)
|████████████████████████████████| 75 kB 4.7 MB/s
Collecting bokeh==2.2.3
Downloading bokeh-2.2.3.tar.gz (8.8 MB)
|████████████████████████████████| 8.8 MB 20.8 MB/s
Collecting imageio==2.8.0
Downloading imageio-2.8.0-py3-none-any.whl (3.3 MB)
|████████████████████████████████| 3.3 MB 30.0 MB/s
Requirement already satisfied: six>=1.11.0 in /usr/local/lib/python3.7/dist-packages (from autobahn==19.3.3->neural-mmo) (1.15.0)
Collecting txaio>=18.8.1
Downloading txaio-21.2.1-py2.py3-none-any.whl (30 kB)
Requirement already satisfied: PyYAML>=3.10 in /usr/local/lib/python3.7/dist-packages (from bokeh==2.2.3->neural-mmo) (3.13)
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.7/dist-packages (from bokeh==2.2.3->neural-mmo) (2.8.2)
Requirement already satisfied: Jinja2>=2.7 in /usr/local/lib/python3.7/dist-packages (from bokeh==2.2.3->neural-mmo) (2.11.3)
Requirement already satisfied: numpy>=1.11.3 in /usr/local/lib/python3.7/dist-packages (from bokeh==2.2.3->neural-mmo) (1.19.5)
Requirement already satisfied: pillow>=7.1.0 in /usr/local/lib/python3.7/dist-packages (from bokeh==2.2.3->neural-mmo) (7.1.2)
Requirement already satisfied: packaging>=16.8 in /usr/local/lib/python3.7/dist-packages (from bokeh==2.2.3->neural-mmo) (21.3)
Requirement already satisfied: tornado>=5.1 in /usr/local/lib/python3.7/dist-packages (from bokeh==2.2.3->neural-mmo) (5.1.1)
Requirement already satisfied: typing_extensions>=3.7.4 in /usr/local/lib/python3.7/dist-packages (from bokeh==2.2.3->neural-mmo) (3.10.0.2)
Requirement already satisfied: termcolor in /usr/local/lib/python3.7/dist-packages (from fire==0.4.0->neural-mmo) (1.1.0)
Requirement already satisfied: scipy in /usr/local/lib/python3.7/dist-packages (from gym==0.17.2->neural-mmo) (1.4.1)
Requirement already satisfied: pyglet<=1.5.0,>=1.4.0 in /usr/local/lib/python3.7/dist-packages (from gym==0.17.2->neural-mmo) (1.5.0)
Requirement already satisfied: cloudpickle<1.4.0,>=1.2.0 in /usr/local/lib/python3.7/dist-packages (from gym==0.17.2->neural-mmo) (1.3.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib==3.1.3->neural-mmo) (1.3.2)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib==3.1.3->neural-mmo) (3.0.6)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.7/dist-packages (from matplotlib==3.1.3->neural-mmo) (0.11.0)
Requirement already satisfied: sphinx in /usr/local/lib/python3.7/dist-packages (from sphinx-rtd-theme==0.5.1->neural-mmo) (1.8.6)
Collecting zope.interface>=4.4.2
Downloading zope.interface-5.4.0-cp37-cp37m-manylinux2010_x86_64.whl (251 kB)
|████████████████████████████████| 251 kB 58.9 MB/s
Collecting constantly>=15.1
Downloading constantly-15.1.0-py2.py3-none-any.whl (7.9 kB)
Collecting incremental>=16.10.1
Using cached incremental-21.3.0-py2.py3-none-any.whl (15 kB)
Collecting Automat>=0.3.0
Downloading Automat-20.2.0-py2.py3-none-any.whl (31 kB)
Collecting hyperlink>=17.1.1
Downloading hyperlink-21.0.0-py2.py3-none-any.whl (74 kB)
|████████████████████████████████| 74 kB 3.1 MB/s
Collecting PyHamcrest>=1.9.0
Downloading PyHamcrest-2.0.2-py3-none-any.whl (52 kB)
|████████████████████████████████| 52 kB 740 kB/s
Requirement already satisfied: attrs>=17.4.0 in /usr/local/lib/python3.7/dist-packages (from Twisted==19.2.0->neural-mmo) (21.2.0)
Requirement already satisfied: idna>=2.5 in /usr/local/lib/python3.7/dist-packages (from hyperlink>=17.1.1->Twisted==19.2.0->neural-mmo) (2.10)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from Jinja2>=2.7->bokeh==2.2.3->neural-mmo) (2.0.1)
Requirement already satisfied: future in /usr/local/lib/python3.7/dist-packages (from pyglet<=1.5.0,>=1.4.0->gym==0.17.2->neural-mmo) (0.16.0)
Requirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from zope.interface>=4.4.2->Twisted==19.2.0->neural-mmo) (57.4.0)
Requirement already satisfied: alabaster<0.8,>=0.7 in /usr/local/lib/python3.7/dist-packages (from sphinx->sphinx-rtd-theme==0.5.1->neural-mmo) (0.7.12)
Requirement already satisfied: imagesize in /usr/local/lib/python3.7/dist-packages (from sphinx->sphinx-rtd-theme==0.5.1->neural-mmo) (1.3.0)
Requirement already satisfied: sphinxcontrib-websupport in /usr/local/lib/python3.7/dist-packages (from sphinx->sphinx-rtd-theme==0.5.1->neural-mmo) (1.2.4)
Requirement already satisfied: snowballstemmer>=1.1 in /usr/local/lib/python3.7/dist-packages (from sphinx->sphinx-rtd-theme==0.5.1->neural-mmo) (2.2.0)
Requirement already satisfied: requests>=2.0.0 in /usr/local/lib/python3.7/dist-packages (from sphinx->sphinx-rtd-theme==0.5.1->neural-mmo) (2.23.0)
Requirement already satisfied: babel!=2.0,>=1.3 in /usr/local/lib/python3.7/dist-packages (from sphinx->sphinx-rtd-theme==0.5.1->neural-mmo) (2.9.1)
Requirement already satisfied: docutils<0.18,>=0.11 in /usr/local/lib/python3.7/dist-packages (from sphinx->sphinx-rtd-theme==0.5.1->neural-mmo) (0.17.1)
Requirement already satisfied: Pygments>=2.0 in /usr/local/lib/python3.7/dist-packages (from sphinx->sphinx-rtd-theme==0.5.1->neural-mmo) (2.6.1)
Requirement already satisfied: pytz>=2015.7 in /usr/local/lib/python3.7/dist-packages (from babel!=2.0,>=1.3->sphinx->sphinx-rtd-theme==0.5.1->neural-mmo) (2018.9)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests>=2.0.0->sphinx->sphinx-rtd-theme==0.5.1->neural-mmo) (2021.10.8)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests>=2.0.0->sphinx->sphinx-rtd-theme==0.5.1->neural-mmo) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests>=2.0.0->sphinx->sphinx-rtd-theme==0.5.1->neural-mmo) (1.24.3)
Requirement already satisfied: sphinxcontrib-serializinghtml in /usr/local/lib/python3.7/dist-packages (from sphinxcontrib-websupport->sphinx->sphinx-rtd-theme==0.5.1->neural-mmo) (1.1.5)
Building wheels for collected packages: bokeh, fire, gym, setproctitle, Twisted, vec-noise
Building wheel for bokeh (setup.py) ... done
Created wheel for bokeh: filename=bokeh-2.2.3-py3-none-any.whl size=9296320 sha256=55e840872b419cb9431c6a2a7a9bd1361e41fdcb8c226ec177fd5529800b6509
Stored in directory: /root/.cache/pip/wheels/0c/6a/ac/5de7ec1983d76fa1243106008b70df211dceb5ed643ad15699
Building wheel for fire (setup.py) ... done
Created wheel for fire: filename=fire-0.4.0-py2.py3-none-any.whl size=115943 sha256=4852ba09a784b529dabd12efefe6cf54da909d52070473805b80616377bea8c0
Stored in directory: /root/.cache/pip/wheels/8a/67/fb/2e8a12fa16661b9d5af1f654bd199366799740a85c64981226
Building wheel for gym (setup.py) ... done
Created wheel for gym: filename=gym-0.17.2-py3-none-any.whl size=1650889 sha256=1fef4073c8f526c5867f2009977cca6974c887240a0ad06957830e1e89ae81da
Stored in directory: /root/.cache/pip/wheels/18/e1/58/89a2aa24e6c2cc800204fc02010612afdf200926c4d6bfe315
Building wheel for setproctitle (setup.py) ... done
Created wheel for setproctitle: filename=setproctitle-1.1.10-cp37-cp37m-linux_x86_64.whl size=35216 sha256=b1999d8e39a772ac1d85dd759e98fcb2a91117c8184e58504152fdec21b3f74a
Stored in directory: /root/.cache/pip/wheels/c2/fc/58/bd368d9483b36eafa3673e2acd8dcd121b0695d10719fe5fce
Building wheel for Twisted (setup.py) ... done
Created wheel for Twisted: filename=Twisted-19.2.0-cp37-cp37m-linux_x86_64.whl size=3045147 sha256=f4eaf6945b4a2d2fd945fcfe82d9f890816cdd613bb1235461f33a5186027959
Stored in directory: /root/.cache/pip/wheels/29/80/ed/9dc8ba80624047e0de94ef0405f14db26edb0a5e94bc5d188a
Building wheel for vec-noise (setup.py) ... done
Created wheel for vec-noise: filename=vec_noise-1.1.4-cp37-cp37m-linux_x86_64.whl size=80692 sha256=9dc06f30436c4e750c94879232b3f007f2290307f79502bb98a15e2f63954709
Stored in directory: /root/.cache/pip/wheels/fc/0c/19/5932b4834cf3204ed2ae845e788f07c79b3279c302d55d6fa8
Successfully built bokeh fire gym setproctitle Twisted vec-noise
Installing collected packages: zope.interface, txaio, PyHamcrest, incremental, hyperlink, constantly, Automat, vec-noise, Twisted, tqdm, sphinx-rtd-theme, setproctitle, matplotlib, imageio, gym, fire, bokeh, autobahn, neural-mmo
Attempting uninstall: tqdm
Found existing installation: tqdm 4.62.3
Uninstalling tqdm-4.62.3:
Successfully uninstalled tqdm-4.62.3
Attempting uninstall: matplotlib
Found existing installation: matplotlib 3.2.2
Uninstalling matplotlib-3.2.2:
Successfully uninstalled matplotlib-3.2.2
Attempting uninstall: imageio
Found existing installation: imageio 2.4.1
Uninstalling imageio-2.4.1:
Successfully uninstalled imageio-2.4.1
Attempting uninstall: gym
Found existing installation: gym 0.17.3
Uninstalling gym-0.17.3:
Successfully uninstalled gym-0.17.3
Attempting uninstall: bokeh
Found existing installation: bokeh 2.3.3
Uninstalling bokeh-2.3.3:
Successfully uninstalled bokeh-2.3.3
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
panel 0.12.1 requires bokeh<2.4.0,>=2.3.0, but you have bokeh 2.2.3 which is incompatible.
albumentations 0.1.12 requires imgaug<0.2.7,>=0.2.5, but you have imgaug 0.2.9 which is incompatible.
Successfully installed Automat-20.2.0 PyHamcrest-2.0.2 Twisted-19.2.0 autobahn-19.3.3 bokeh-2.2.3 constantly-15.1.0 fire-0.4.0 gym-0.17.2 hyperlink-21.0.0 imageio-2.8.0 incremental-21.3.0 matplotlib-3.1.3 neural-mmo-1.5.2.2 setproctitle-1.1.10 sphinx-rtd-theme-0.5.1 tqdm-4.61.1 txaio-21.2.1 vec-noise-1.1.4 zope.interface-5.4.0
Collecting flexdict
Downloading flexdict-0.0.1a1-py2.py3-none-any.whl (7.8 kB)
Collecting ray[default]==1.5.2
Downloading ray-1.5.2-cp37-cp37m-manylinux2014_x86_64.whl (51.0 MB)
|████████████████████████████████| 51.0 MB 201 kB/s
Collecting aioredis<2
Downloading aioredis-1.3.1-py3-none-any.whl (65 kB)
|████████████████████████████████| 65 kB 3.5 MB/s
Collecting numpy==1.21.2
Downloading numpy-1.21.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)
|████████████████████████████████| 15.7 MB 9.4 MB/s
Requirement already satisfied: protobuf>=3.15.3 in /usr/local/lib/python3.7/dist-packages (from ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (3.17.3)
Collecting pydantic>=1.8
Downloading pydantic-1.8.2-cp37-cp37m-manylinux2014_x86_64.whl (10.1 MB)
|████████████████████████████████| 10.1 MB 21.2 MB/s
Collecting redis>=3.5.0
Downloading redis-4.0.2-py3-none-any.whl (119 kB)
|████████████████████████████████| 119 kB 38.8 MB/s
Requirement already satisfied: filelock in /usr/local/lib/python3.7/dist-packages (from ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (3.4.0)
Requirement already satisfied: pyyaml in /usr/local/lib/python3.7/dist-packages (from ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (3.13)
Requirement already satisfied: prometheus-client>=0.7.1 in /usr/local/lib/python3.7/dist-packages (from ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (0.12.0)
Requirement already satisfied: grpcio>=1.28.1 in /usr/local/lib/python3.7/dist-packages (from ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (1.42.0)
Collecting aiohttp-cors
Downloading aiohttp_cors-0.7.0-py3-none-any.whl (27 kB)
Collecting aiohttp
Downloading aiohttp-3.8.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)
|████████████████████████████████| 1.1 MB 42.4 MB/s
Collecting py-spy>=0.2.0
Downloading py_spy-0.3.11-py2.py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.0 MB)
|████████████████████████████████| 3.0 MB 50.1 MB/s
Collecting colorama
Downloading colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Requirement already satisfied: jsonschema in /usr/local/lib/python3.7/dist-packages (from ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (2.6.0)
Collecting gpustat
Downloading gpustat-0.6.0.tar.gz (78 kB)
|████████████████████████████████| 78 kB 5.8 MB/s
Collecting opencensus
Downloading opencensus-0.8.0-py2.py3-none-any.whl (128 kB)
|████████████████████████████████| 128 kB 55.8 MB/s
Requirement already satisfied: msgpack<2.0.0,>=1.0.0 in /usr/local/lib/python3.7/dist-packages (from ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (1.0.3)
Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (2.23.0)
Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.7/dist-packages (from ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (7.1.2)
Collecting colorful
Downloading colorful-0.5.4-py2.py3-none-any.whl (201 kB)
|████████████████████████████████| 201 kB 51.0 MB/s
Collecting hiredis
Downloading hiredis-2.0.0-cp37-cp37m-manylinux2010_x86_64.whl (85 kB)
|████████████████████████████████| 85 kB 3.8 MB/s
Collecting async-timeout
Downloading async_timeout-4.0.1-py3-none-any.whl (5.7 kB)
Requirement already satisfied: six>=1.5.2 in /usr/local/lib/python3.7/dist-packages (from grpcio>=1.28.1->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (1.15.0)
Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.7/dist-packages (from pydantic>=1.8->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (3.10.0.2)
Collecting deprecated
Downloading Deprecated-1.2.13-py2.py3-none-any.whl (9.6 kB)
Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (21.2.0)
Collecting multidict<7.0,>=4.5
Downloading multidict-5.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (160 kB)
|████████████████████████████████| 160 kB 52.1 MB/s
Collecting frozenlist>=1.1.1
Downloading frozenlist-1.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (192 kB)
|████████████████████████████████| 192 kB 42.3 MB/s
Collecting aiosignal>=1.1.2
Downloading aiosignal-1.2.0-py3-none-any.whl (8.2 kB)
Collecting asynctest==0.13.0
Downloading asynctest-0.13.0-py3-none-any.whl (26 kB)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (2.0.8)
Collecting yarl<2.0,>=1.0
Downloading yarl-1.7.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (271 kB)
|████████████████████████████████| 271 kB 49.8 MB/s
Requirement already satisfied: idna>=2.0 in /usr/local/lib/python3.7/dist-packages (from yarl<2.0,>=1.0->aiohttp->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (2.10)
Requirement already satisfied: wrapt<2,>=1.10 in /usr/local/lib/python3.7/dist-packages (from deprecated->redis>=3.5.0->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (1.13.3)
Requirement already satisfied: nvidia-ml-py3>=7.352.0 in /usr/local/lib/python3.7/dist-packages (from gpustat->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (7.352.0)
Requirement already satisfied: psutil in /usr/local/lib/python3.7/dist-packages (from gpustat->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (5.4.8)
Collecting blessings>=1.6
Downloading blessings-1.7-py3-none-any.whl (18 kB)
Requirement already satisfied: google-api-core<3.0.0,>=1.0.0 in /usr/local/lib/python3.7/dist-packages (from opencensus->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (1.26.3)
Collecting opencensus-context==0.1.2
Downloading opencensus_context-0.1.2-py2.py3-none-any.whl (4.4 kB)
Requirement already satisfied: pytz in /usr/local/lib/python3.7/dist-packages (from google-api-core<3.0.0,>=1.0.0->opencensus->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (2018.9)
Requirement already satisfied: setuptools>=40.3.0 in /usr/local/lib/python3.7/dist-packages (from google-api-core<3.0.0,>=1.0.0->opencensus->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (57.4.0)
Requirement already satisfied: packaging>=14.3 in /usr/local/lib/python3.7/dist-packages (from google-api-core<3.0.0,>=1.0.0->opencensus->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (21.3)
Requirement already satisfied: googleapis-common-protos<2.0dev,>=1.6.0 in /usr/local/lib/python3.7/dist-packages (from google-api-core<3.0.0,>=1.0.0->opencensus->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (1.53.0)
Requirement already satisfied: google-auth<2.0dev,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from google-api-core<3.0.0,>=1.0.0->opencensus->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (1.35.0)
Requirement already satisfied: rsa<5,>=3.1.4 in /usr/local/lib/python3.7/dist-packages (from google-auth<2.0dev,>=1.21.1->google-api-core<3.0.0,>=1.0.0->opencensus->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (4.8)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /usr/local/lib/python3.7/dist-packages (from google-auth<2.0dev,>=1.21.1->google-api-core<3.0.0,>=1.0.0->opencensus->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (0.2.8)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in /usr/local/lib/python3.7/dist-packages (from google-auth<2.0dev,>=1.21.1->google-api-core<3.0.0,>=1.0.0->opencensus->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (4.2.4)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging>=14.3->google-api-core<3.0.0,>=1.0.0->opencensus->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (3.0.6)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /usr/local/lib/python3.7/dist-packages (from pyasn1-modules>=0.2.1->google-auth<2.0dev,>=1.21.1->google-api-core<3.0.0,>=1.0.0->opencensus->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (0.4.8)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (2021.10.8)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->ray[default]==1.5.2->-r neural-mmo-starter-kit/requirements.txt (line 2)) (1.24.3)
Building wheels for collected packages: gpustat
Building wheel for gpustat (setup.py) ... done
Created wheel for gpustat: filename=gpustat-0.6.0-py3-none-any.whl size=12617 sha256=6f6baf810f27f257f3f5c4e2b1c8d83e67ed2ab49f9bde24846397083bec0618
Stored in directory: /root/.cache/pip/wheels/e6/67/af/f1ad15974b8fd95f59a63dbf854483ebe5c7a46a93930798b8
Successfully built gpustat
Installing collected packages: multidict, frozenlist, yarl, asynctest, async-timeout, aiosignal, opencensus-context, hiredis, deprecated, blessings, aiohttp, redis, pydantic, py-spy, opencensus, numpy, gpustat, colorama, aioredis, aiohttp-cors, ray, colorful, flexdict
Attempting uninstall: numpy
Found existing installation: numpy 1.19.5
Uninstalling numpy-1.19.5:
Successfully uninstalled numpy-1.19.5
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
yellowbrick 1.3.post1 requires numpy<1.20,>=1.16.0, but you have numpy 1.21.2 which is incompatible.
datascience 0.10.6 requires folium==0.2.1, but you have folium 0.8.3 which is incompatible.
albumentations 0.1.12 requires imgaug<0.2.7,>=0.2.5, but you have imgaug 0.2.9 which is incompatible.
Successfully installed aiohttp-3.8.1 aiohttp-cors-0.7.0 aioredis-1.3.1 aiosignal-1.2.0 async-timeout-4.0.1 asynctest-0.13.0 blessings-1.7 colorama-0.4.4 colorful-0.5.4 deprecated-1.2.13 flexdict-0.0.1a1 frozenlist-1.2.0 gpustat-0.6.0 hiredis-2.0.0 multidict-5.2.0 numpy-1.21.2 opencensus-0.8.0 opencensus-context-0.1.2 py-spy-0.3.11 pydantic-1.8.2 ray-1.5.2 redis-4.0.2 yarl-1.7.2
Generate maps that will be used for building your models and evaluation¶
import os
os.chdir('/content/neural-mmo-starter-kit')
os.system('ln -s neuralmmo/resource')
!python neuralmmo/Forge.py generate --config=CompetitionRound1
/usr/local/lib/python3.7/dist-packages/ray/autoscaler/_private/cli_logger.py:61: FutureWarning: Not all Ray CLI dependencies were found. In Ray 1.4+, the Ray CLI, autoscaler, and dashboard will only be usable via `pip install 'ray[default]'`. Please update your install command. "update your install command.", FutureWarning) Generating 256 training and 64 evaluation maps: 100% 320/320 [00:23<00:00, 13.55it/s]
Building your models¶
Your agents need to implement the NeuralMMOAgent
class from evaluator/base_agent.py
. You can check the code in agents
directory for examples.
Note: If your agent doesn't inherit the NeuralMMOAgent
class, the evaluation will fail.
Once your agent class is ready, you can specify the class to use as the player agent in your config.py
. The starter kit comes with a machine learning based baseline. The config.py
in the starter kit points to this class. You should update it to use your class.
For information on tweaking and training the baseline agents, please refer training baselines
.
Evaluating you agents locally¶
Test your agents locally by running the rollout script
Make sure to include your agent in config.py
!python evaluator/rollout.py
/usr/local/lib/python3.7/dist-packages/ray/autoscaler/_private/cli_logger.py:61: FutureWarning: Not all Ray CLI dependencies were found. In Ray 1.4+, the Ray CLI, autoscaler, and dashboard will only be usable via `pip install 'ray[default]'`. Please update your install command. "update your install command.", FutureWarning) ======= Episode 1 ======= Achievement 0 Equipment 0 Exploration 5 PlayerKills 0 Foraging 10.5 ========================= ======= Episode 2 ======= Achievement 18 Equipment 0 Exploration 37 PlayerKills 1 Foraging 48.5 =========================
Making a submission¶
Add your SSH key to AIcrowd GitLab¶
You can add your SSH Keys to your GitLab account by going to your profile settings here. You will first need to generate one.
!ssh-keygen
!cat /root/.ssh/id_rsa.pub
!ssh-keyscan gitlab.aicrowd.com >> /root/.ssh/known_hosts
!ssh -T git@gitlab.aicrowd.com
Install git lfs¶
!curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
!apt-get install git-lfs
!git lfs install
Configure git credentials and change remote¶
Replace your user name by username on gitlab.aicrowd.com
!git config --global user.email "username@aicrowd.com"
!git config --global user.name "User Name"
!git remote add aicrowd git@gitlab.aicrowd.com:<user-name>/neural-mmo-starter-kit.git
!git remote rm origin
Run the script to submit¶
!bash ./utils/submit.sh "Test submission 1"
Content
Comments
You must login before you can post a comment.