nle  by facebookresearch

RL environment for NetHack game research

Created 5 years ago
965 stars

Top 38.2% 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
3 stars in the last 30 days

Explore Similar Projects

Starred by Jerry Tworek Jerry Tworek(VP Research at OpenAI), Jianwei Yang Jianwei Yang(Research Scientist at Meta Superintelligence Lab), and
1 more.

pytorch-rl by jingweiz

0%
801
Deep RL research with PyTorch and Visdom
Created 8 years ago
Updated 5 years ago
Starred by Evan Hubinger Evan Hubinger(Head of Alignment Stress-Testing at Anthropic), Jiayi Pan Jiayi Pan(Author of SWE-Gym; MTS at xAI), and
1 more.

rl by pytorch

0.4%
3k
PyTorch library for reinforcement learning research
Created 3 years ago
Updated 2 days ago
Feedback? Help us improve.