nle  by facebookresearch

RL environment for NetHack game research

created 5 years ago
962 stars

Top 39.1% on sourcepulse

GitHubView on GitHub
Project Summary

The NetHack Learning Environment (NLE) provides a standardized Reinforcement Learning (RL) interface to the classic roguelike game NetHack. It aims to establish NetHack as a challenging benchmark for decision-making and machine learning research, offering a rich, procedurally generated environment that is more computationally efficient than other complex RL testbeds.

How It Works

NLE is a direct fork of NetHack 3.6.6, integrating a language wrapper that translates game observations into text-based representations, allowing for natural language processing approaches. Actions can also be provided as text, which are then converted to NetHack's discrete action space. The environment is designed to be compatible with the OpenAI Gym API, facilitating integration with existing RL frameworks.

Quick Start & Requirements

  • Installation: pip install nle
  • Prerequisites: Python >= 3.5, CMake >= 3.15. Build dependencies include build-essential, autoconf, libtool, pkg-config, python3-dev, python3-pip, python3-numpy, git, flex, bison, libbz2-dev. Specific CMake installation instructions are provided for Ubuntu and macOS.
  • Development Install: git clone --recursive https://github.com/facebookresearch/nle && pip install -e ".[dev]" && pre-commit install
  • Docker: Pre-built Docker images are available.
  • Usage Example: env = gym.make("NetHackScore-v0"); env.reset(); env.step(1)
  • Resources: Tutorials and Colab notebooks are available for the NetHack Learning Dataset (NLD).
  • Docs: github.com/heiner/nle

Highlighted Details

  • Includes the NetHack Learning Dataset (NLD) code for loading and generating large-scale datasets.
  • Offers a bundled TorchBeast agent for a starting point in experiments.
  • Provides scripts for human play, random agent rollouts, and plotting performance.
  • Supports text-based action and observation representations.

Maintenance & Community

The project is actively maintained by the original authors from Facebook AI Research and associated institutions. Contributions are welcomed. Links to relevant papers and interviews are provided.

Licensing & Compatibility

The project is licensed under the MIT License, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

The project README indicates that the primary repository has moved to github.com/heiner/nle. While the core NetHack environment is complex, the RL interface abstracts much of this complexity. Specific performance characteristics or limitations of the RL agent implementations are not detailed in the README.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
15 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Omar Sanseviero Omar Sanseviero(DevRel at Google DeepMind), and
1 more.

RL4LMs by allenai

0.0%
2k
RL library to fine-tune language models to human preferences
created 3 years ago
updated 1 year ago
Feedback? Help us improve.