diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 6e489bd27..a0760705a 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -45,7 +45,7 @@ template: | Install with pip: `pip install nle==$RESOLVED_VERSION`. - See [README.md](https://github.com/heiner/nle/blob/v$RESOLVED_VERSION/README.md) and/or [docker/README.md](https://github.com/heiner/nle/blob/v$RESOLVED_VERSION/docker/README.md) for further instructions. + See [README.md](https://github.com/NetHack-LE/nle/blob/v$RESOLVED_VERSION/README.md) and/or [docker/README.md](https://github.com/NetHack-LE/nle/blob/v$RESOLVED_VERSION/docker/README.md) for further instructions. # New in NLE v$RESOLVED_VERSION diff --git a/DATASET.md b/DATASET.md index 15b01b513..157b3da11 100644 --- a/DATASET.md +++ b/DATASET.md @@ -4,7 +4,7 @@ Instructions and Tutorials for the NetHack Learning Dataset ## License -This data is licensed under the NetHack General Public License - based on the GPL-style BISON license. It is the license used for the game of NetHack, and can be found [here](https://github.com/heiner/nle/blob/main/LICENSE). +This data is licensed under the NetHack General Public License - based on the GPL-style BISON license. It is the license used for the game of NetHack, and can be found [here](https://github.com/NetHack-LE/nle/blob/main/LICENSE). ## Accessing the Dataset @@ -120,14 +120,14 @@ $ unzip /path/to/nld-nao-dir-ac.zip -d /path/to/nld-nao ## Using the Dataset ([Colab Demo](https://colab.research.google.com/drive/1GRP15SbOEDjbyhJGMDDb2rXAptRQztUD?usp=sharing)) -The code needed to use the dataset will be distributed in `NLE v0.9.0`. For now it can be found on the `main` branch of [NLE](https://github.com/heiner/nle). You can follow the instructions to install [there](https://github.com/heiner/nle), or try the below. +The code needed to use the dataset will be distributed in `NLE v0.9.0`. For now it can be found on the `main` branch of [NLE](https://github.com/NetHack-LE/nle). You can follow the instructions to install [there](https://github.com/NetHack-LE/nle), or try the below. ``` # With pip: -pip install git+https://github.com/heiner/nle.git@main +pip install git+https://github.com/NetHack-LE/nle.git@main # From source: -git clone --recursive https://github.com/heiner/nle.git +git clone --recursive https://github.com/NetHack-LE/nle.git cd nle && pip install -e . ``` diff --git a/README.md b/README.md index c363ec69b..703ae7dc1 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -![NetHack Learning Environment (NLE)](https://github.com/heiner/nle/raw/main/dat/nle/logo.png) +![NetHack Learning Environment (NLE)](https://github.com/NetHack-LE/nle/raw/main/dat/nle/logo.png) --------------------------------------------------------------------------------

- + Twitter @@ -24,7 +24,7 @@ You can read more about NLE in the [NeurIPS 2020 paper](https://arxiv.org/abs/20 README](./README.nh), at [nethack.org](https://nethack.org/), and on the [NetHack wiki](https://nethackwiki.com). -![Example of an agent running on NLE](https://github.com/heiner/nle/raw/main/dat/nle/example_run.gif) +![Example of an agent running on NLE](https://github.com/NetHack-LE/nle/raw/main/dat/nle/example_run.gif) This version of NLE uses the [Farama Organisation Gymnasium Environment](https://gymnasium.farama.org) APIs. @@ -75,7 +75,7 @@ $ pip install nle NOTE: If you want to extend / develop NLE, please install the package as follows: ``` bash -$ git clone https://github.com/heiner/nle --recursive +$ git clone https://github.com/NetHack-LE/nle --recursive $ pip install -e ".[dev]" $ pre-commit install ``` @@ -84,7 +84,7 @@ $ pre-commit install ## Docker We have provided some docker images. Please see the [relevant -README](https://github.com/heiner/nle/blob/main/docker/README.md). +README](https://github.com/NetHack-LE/nle/blob/main/docker/README.md). ## Trying it out @@ -187,7 +187,7 @@ for i, mb in enumerate(dataset): foo(mb) # etc... ``` -For information on how to download NLD-AA and NLD-NAO, see the dataset doc [here](https://github.com/heiner/nle/blob/main/DATASET.md). +For information on how to download NLD-AA and NLD-NAO, see the dataset doc [here](https://github.com/NetHack-LE/nle/blob/main/DATASET.md). Otherwise checkout the tutorial Colab notebook [here](https://colab.research.google.com/drive/1GRP15SbOEDjbyhJGMDDb2rXAptRQztUD?usp=sharing). @@ -201,7 +201,7 @@ Otherwise checkout the tutorial Colab notebook [here](https://colab.research.goo - Küttler et al. [The NetHack Learning Environment](https://arxiv.org/abs/2006.13760) (FAIR, Oxford, NYU, Imperial, UCL, NeurIPS 2020). Open a [pull -request](https://github.com/heiner/nle/edit/main/README.md) +request](https://github.com/NetHack-LE/nle/edit/main/README.md) to add papers. @@ -209,7 +209,7 @@ to add papers. # Contributing We welcome contributions to NLE. If you are interested in contributing please -see [this document](https://github.com/heiner/nle/blob/main/CONTRIBUTING.md). +see [this document](https://github.com/NetHack-LE/nle/blob/main/CONTRIBUTING.md). # Architecture @@ -221,7 +221,7 @@ repeated nethack games, and finally to binding of these games to Python `gymnasium` environment. If you want to learn more about the architecture of `nle` and how it works -under the hood, checkout the [architecture document](https://github.com/heiner/nle/blob/main/doc/nle/ARCHITECTURE.md). +under the hood, checkout the [architecture document](https://github.com/NetHack-LE/nle/blob/main/doc/nle/ARCHITECTURE.md). This may be a useful starting point for anyone looking to contribute to the lower level elements of NLE. diff --git a/doc/nle/ARCHITECTURE.md b/doc/nle/ARCHITECTURE.md index b5af502cd..625f5d0d2 100644 --- a/doc/nle/ARCHITECTURE.md +++ b/doc/nle/ARCHITECTURE.md @@ -19,10 +19,10 @@ that just feeds back observations. Below we examine these layers from lowest to ### Layer 0: “Original” NetHack Game Logic - **part of `libnethack.so`** -- **key directories & files** [`src/`](https://github.com/heiner/nle/blob/main/src), -[`include/`](https://github.com/heiner/nle/blob/main/include), -[`dat/`](https://github.com/heiner/nle/blob/main/dat), -[`src/allmain.c`](https://github.com/heiner/nle/blob/main/src/allmain.c) +- **key directories & files** [`src/`](https://github.com/NetHack-LE/nle/blob/main/src), +[`include/`](https://github.com/NetHack-LE/nle/blob/main/include), +[`dat/`](https://github.com/NetHack-LE/nle/blob/main/dat), +[`src/allmain.c`](https://github.com/NetHack-LE/nle/blob/main/src/allmain.c) * The original nethack game is written purely in C, found mainly in `src` and @@ -31,18 +31,18 @@ that just feeds back observations. Below we examine these layers from lowest to file to keep track of the internal state of the game, rendering the gamely utterly un-threadsafe. * The game logic itself starts in `allmain.c` where the game is started with -[`void moveloop(bool resuming)`](https://github.com/heiner/nle/blob/main/src/allmain.c#L23). +[`void moveloop(bool resuming)`](https://github.com/NetHack-LE/nle/blob/main/src/allmain.c#L23). This function never returns, instead it runs an infinite loop -[(line 83)](https://github.com/heiner/nle/blob/main/src/allmain.c#L83), +[(line 83)](https://github.com/NetHack-LE/nle/blob/main/src/allmain.c#L83), and may be interrupted either by the player or completing the game. ### Layer 1: Interacting with NetHack Game Logic: Windows and Window Procs - **part of `libnethack.so`** -- **key directories & files** [`win/rl`](https://github.com/heiner/nle/blob/main/win/rl), -[`win/tty`](https://github.com/heiner/nle/blob/main/win/tty), -[`src/windows.c`](https://github.com/heiner/nle/blob/main/src/windows.c), -[`include/winprocs.h`](https://github.com/heiner/nle/blob/main/include/winprocs.h) +- **key directories & files** [`win/rl`](https://github.com/NetHack-LE/nle/blob/main/win/rl), +[`win/tty`](https://github.com/NetHack-LE/nle/blob/main/win/tty), +[`src/windows.c`](https://github.com/NetHack-LE/nle/blob/main/src/windows.c), +[`include/winprocs.h`](https://github.com/NetHack-LE/nle/blob/main/include/winprocs.h) * Periodically the game may need input from the player, or need to return @@ -50,29 +50,29 @@ something to be displayed to the player. To allow a variety of interfaces to be exposed to the player (ie tty, mobile, atari etc), a developer must implement and provide a number functions to the game, as a standard contract. * The full api is described in -[`doc/window.doc`](https://github.com/heiner/nle/blob/main/doc/window.doc), +[`doc/window.doc`](https://github.com/NetHack-LE/nle/blob/main/doc/window.doc), and is defined in `include/winprocs.h`. The object to be provided to the game is the `struct window_procs`, which is (largely) a struct of pointers to functions. * Once a developer has implemented this struct, it can be added to the chosen `window_procs` in `src/windows.c`, via some macros. Our `window_procs` struct is `extern`'d there under the name `rl_procs`. * The implementation of `rl_procs` is found in -[`win/rl/winrl.cc`](https://github.com/heiner/nle/blob/main/win/rl/winrl.cc). +[`win/rl/winrl.cc`](https://github.com/NetHack-LE/nle/blob/main/win/rl/winrl.cc). In this C++ file we implement a `class NetHackRL` that will contain all our functions, and then we declare the struct `rl_procs` to point to the appropriate methods. * Our implementation of the `window_procs` wrap heavily around existing tty `window_procs` found in -[`win/tty/wintty.c`](https://github.com/heiner/nle/blob/main/win/tty/wintty.c) +[`win/tty/wintty.c`](https://github.com/NetHack-LE/nle/blob/main/win/tty/wintty.c) but allows us to control the capture of information and when to send it to the user. ### Layer 2: Yielding from NetHack Game Logic: Context Switching and the “nethack-stack” - **part of `libnethack.so`** -- **key directories & files** [`src/nle.c`](https://github.com/heiner/nle/blob/main/src/nle.c), -[`include/nle.h`](https://github.com/heiner/nle/blob/main/include/nle.h), -[`include/nletypes.h`](https://github.com/heiner/nle/blob/main/include/nletypes.h) +- **key directories & files** [`src/nle.c`](https://github.com/NetHack-LE/nle/blob/main/src/nle.c), +[`include/nle.h`](https://github.com/NetHack-LE/nle/blob/main/include/nle.h), +[`include/nletypes.h`](https://github.com/NetHack-LE/nle/blob/main/include/nletypes.h) * In our case the user “playing” the game is not a terminal, but ultimately a @@ -123,9 +123,9 @@ user.: ### Layer 3: Dynamic Library Loading: Resetting the Game - **library:** libnethackdl.a, -- **key directories & files:** [`sys/unix/nledl.c`](https://github.com/heiner/nle/blob/main/sys/unix/nledl.c), -[`include/nledl.h`](https://github.com/heiner/nle/blob/main/include/nledl.h), -[`sys/unix/rlmain.cc`](https://github.com/heiner/nle/blob/main/sys/unix/rlmain.cc) +- **key directories & files:** [`sys/unix/nledl.c`](https://github.com/NetHack-LE/nle/blob/main/sys/unix/nledl.c), +[`include/nledl.h`](https://github.com/NetHack-LE/nle/blob/main/include/nledl.h), +[`sys/unix/rlmain.cc`](https://github.com/NetHack-LE/nle/blob/main/sys/unix/rlmain.cc) * Now that we have a means of playing the game in `libnethack.so`, we would @@ -148,11 +148,11 @@ nethack, instead of `nle.h`, and in fact we can test this with the file ### Layer 4: Binding to Python: Exposing the Game - **libraries:** `_pynethack.cpython-37.*` -- **key directories & files:**[`pynethack.cc`](https://github.com/heiner/nle/blob/main/win/rl/pynethack.cc), -[`src/monst.c`](https://github.com/heiner/nle/blob/main/src/monst.c), -[`src/objects.c`](https://github.com/heiner/nle/blob/main/src/objects.c), -[`src/decl.c`](https://github.com/heiner/nle/blob/main/src/decl.c), -[`src/drawing.c`](https://github.com/heiner/nle/blob/main/src/drawing.c) +- **key directories & files:**[`pynethack.cc`](https://github.com/NetHack-LE/nle/blob/main/win/rl/pynethack.cc), +[`src/monst.c`](https://github.com/NetHack-LE/nle/blob/main/src/monst.c), +[`src/objects.c`](https://github.com/NetHack-LE/nle/blob/main/src/objects.c), +[`src/decl.c`](https://github.com/NetHack-LE/nle/blob/main/src/decl.c), +[`src/drawing.c`](https://github.com/NetHack-LE/nle/blob/main/src/drawing.c) * Now that we have a means of playing the game, we need to bind our commands to @@ -168,9 +168,9 @@ These include items found in `src/monst.c`, `src/decl.c`, `src/drawing.c`, ### Layer 5: Calling from Python: Playing A Copy of the Game -- **libraries:** [`nle`](https://github.com/heiner/nle/blob/main/nle) -- **key directories & files:** [`nle/nethack/*.py`](https://github.com/heiner/nle/blob/main/nle/nethack), -[`nle/env/*.py`](https://github.com/heiner/nle/blob/main/nle/env) +- **libraries:** [`nle`](https://github.com/NetHack-LE/nle/blob/main/nle) +- **key directories & files:** [`nle/nethack/*.py`](https://github.com/NetHack-LE/nle/blob/main/nle/nethack), +[`nle/env/*.py`](https://github.com/NetHack-LE/nle/blob/main/nle/env) * The `class nle.nethack.Nethack` is our Python interface to the game. It does diff --git a/doc/nle/source/getting_started.rst b/doc/nle/source/getting_started.rst index 8330b8513..597b8b8dc 100644 --- a/doc/nle/source/getting_started.rst +++ b/doc/nle/source/getting_started.rst @@ -47,7 +47,7 @@ Optionally, one can clone the repository and install the package manually. .. code-block:: bash - $ git clone https://github.com/heiner/nle --recursive + $ git clone https://github.com/NetHack-LE/nle --recursive $ conda activate nledev $ pip install . diff --git a/docker/README.md b/docker/README.md index a0db3321c..11bdcc574 100644 --- a/docker/README.md +++ b/docker/README.md @@ -15,7 +15,7 @@ To build and run an image (e.g. `Dockerfile-jammy`) for your local architecture do: ```bash -$ git clone https://github.com/heiner/nle --recursive +$ git clone https://github.com/NetHack-LE/nle --recursive $ cd nle $ docker build --file docker/Dockerfile-jammy . --tag nle $ docker run -it --gpus all --rm --name nle nle diff --git a/nle/tests/test_converter.py b/nle/tests/test_converter.py index 393d85e58..70ca6f98a 100644 --- a/nle/tests/test_converter.py +++ b/nle/tests/test_converter.py @@ -88,7 +88,7 @@ def test_is_loaded(self): def test_no_memleak(self): pytest.skip( "Test is flaky " - "(https://github.com/heiner/nle/actions/runs/8943546654/job/24568502821)" + "(https://github.com/NetHack-LE/nle/actions/runs/8943546654/job/24568502821)" ) chars = np.zeros((SEQ_LENGTH, ROWS, COLUMNS), dtype=np.uint8) diff --git a/setup.py b/setup.py index 9253bf268..56c0d9a4e 100644 --- a/setup.py +++ b/setup.py @@ -148,7 +148,7 @@ def build_extension(self, ext): long_description=long_description, long_description_content_type="text/markdown", author="The NLE Dev Team", - url="https://github.com/heiner/nle", + url="https://github.com/NetHack-LE/nle", license="NetHack General Public License", entry_points=entry_points, packages=packages, diff --git a/third_party/converter/converter.c b/third_party/converter/converter.c index 4b51c96a8..eae901f7d 100644 --- a/third_party/converter/converter.c +++ b/third_party/converter/converter.c @@ -61,7 +61,7 @@ void callback(tmt_msg_t, TMT *, const void *, void *); #define BRIGHT 8 -/* Taken from nle.c -- github.com/heiner/nle */ +/* Taken from nle.c -- github.com/NetHack-LE/nle */ signed char vt_char_color_extract(TMTCHAR *c) {