ivannz / nle_toolbox

Tools, wrappers, and bots for the NLE.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NLE Toolbox

A collection of tools, wrappers, observation preprocessors, and other useful tools for the Nethack Learning Environment.

Installation

The following command sets up an env with the essential dependencies required by the toolbox: torch, numpy, nle, python-plyr, minihack, and others.

# conda deactivate && conda env remove -n nle_toolbox

conda create -n nle_toolbox "python>=3.9" pip setuptools numpy scipy cmake \
  "pytorch::pytorch>=1.8" matplotlib \
  && conda activate nle_toolbox \
  && pip install einops python-plyr

# install bleeding-edge versions from the git
# NLE <= 0.8.1 does not expose certain bottom line attribs
pip install -vv "nle @ git+https://github.com/facebookresearch/nle.git"

# this fork of minihack patched missing parameters in some tasks
pip install -vv "minihack @ git+https://github.com/ivannz/minihack.git"

The latest version of the toolbox itself can be installed from github

conda activate nle_toolbox

pip install git+https://github.com/ivannz/nle_toolbox.git -vv

Or if you would like to contribute or edit/fix some code or tools contained within, please, clone and install the package in editable mode. It is advisable to create a dedicated environments for development purposes.

git clone https://github.com/ivannz/nle_toolbox.git
cd nle_toolbox

# use a dedicated env with correct dependencies
conda activate nle_toolbox

conda install -n nle_toolbox swig pytest notebook \
  && pip install tqdm wandb black pre-commit gitpython box2d-py "gym[box2d]"
# XXX gitpython and gym[box2d] for fancy testing

pre-commit install

pip install -e . -vv

About

Tools, wrappers, and bots for the NLE.

License:MIT License


Languages

Language:Python 100.0%