Skip to main content

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.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mudgym 0.5.1
File Size Uploaded
mudgym-0.5.1.tar.gz 73.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mudgym 0.5.1
File Interpreter ABI Platform
mudgym-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 167.0 kB

Release files / mudgym-0.5.1.tar.gz

Download URL mudgym-0.5.1.tar.gz
Size 73.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d3d037441616c8e83ef99fc867ff0d62fe07110acc3f004252953b295fbb7513
BLAKE2b-256 checksum
How to use checksums
bd1fe3d43731cd3c39ab73d7aa2453c11686913a06e08f9d06dc86105c00049b
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 Sep 19, 2026.

Transparency log

Release files / mudgym-0.5.1-py3-none-any.whl

Download URL mudgym-0.5.1-py3-none-any.whl
Size 93.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f036cfc155e71a917dcbce6a11e1b61d12d421966ebd48cba420a8db9b706b24
BLAKE2b-256 checksum
How to use checksums
e729a599544f76becf6de06fc75e5b7323305d883ed86fa57cbce74bc8ddce0f
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 Sep 19, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.0

2 release files

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page