MudGym
A Gymnasium reinforcement learning environment for MUD2. One of the first online multiplayer text adventure games.
Status
MudGym is a work in progress and very much under active development.
I've been using most of what's in here myself for a while, but the process of putting it out for wider use, and seeing how it gets used for real, means I'm still refining and settling some of the interfaces and assumptions.
So for now, be prepared for interfaces, APIs, specs and defaults to change, sometimes in breaking ways. If you're using MudGym, feedback and real-world use cases are very welcome.
Setup
Install MudGym from PyPI:
uv add mudgym
By default, MudGym now runs the MUD2 game engine via WASM, which is installed as a dependency.
Quickstart
from mudgym import make_env
env = make_env(observation="parsed")
observation, info = env.reset()
observation, reward, terminated, truncated, info = env.step("howl")
print(observation["room_name"], reward)
env.close()
Docs
See the docs for more examples.
Citing MudGym
If you use MudGym in your research, please cite it using the metadata in CITATION.cff.
Use Cite this repository in the GitHub sidebar to copy a citation in APA or BibTeX format. Please cite the version you used.
License
The Python code and tooling in this repository are made available under the MIT License.
Permission to use the MUD2 game for research purposes has been provided by Richard Bartle, with kind thanks. The MUD2 game, name, source code, and associated story remain the intellectual property of Richard Bartle and Roy Trubshaw and may not be used for commercial purposes.
Metadata
Release files for mudgym 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mudgym-0.6.0.tar.gz | 74.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mudgym-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 168.1 kB
Release files / mudgym-0.6.0.tar.gz
| Download URL | mudgym-0.6.0.tar.gz |
|---|---|
| Size | 74.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c15620162f3ec7272212b699af7d6b7e36881d368eac5df9e908d6fa3234b7ad
|
|
BLAKE2b-256 checksum How to use checksums |
ee29bd1b80c1b621d4ed5e24525efac9c2e6bceeca18c1527b2dfbdc2099e13c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / mudgym-0.6.0-py3-none-any.whl
| Download URL | mudgym-0.6.0-py3-none-any.whl |
|---|---|
| Size | 94.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bcd0f736c0e2d689e5de29b38a37adc1b025f65a0e37519b15bb918bb10a7bd5
|
|
BLAKE2b-256 checksum How to use checksums |
88e882e44e250f12be8cc8020d3a34982fbcf3efe13f81aec34c0244e4d1259a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency log