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, or open the goal room DQN notebook, which trains an agent in your browser with nothing to install.

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

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.7.0
File Size Uploaded Provenance Actions
mudgym-0.7.0.tar.gz 86.8 kB With provenance Details for mudgym-0.7.0.tar.gz

Built distribution (wheel)

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

Total release size: 191.2 kB

Release files / mudgym-0.7.0.tar.gz

Download URL mudgym-0.7.0.tar.gz
Size 86.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2ba97612adcebb6e2b1f55db06d996d42bb8dcfcb1dfb1f51096350ae2394832
BLAKE2b-256 checksum
How to use checksums
41068ec14a0405d9e5c7bd05a2a807ebea4c02952a83b117c1eb7d2fe81fe04b
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 Nov 4, 2026.

Transparency log

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

Download URL mudgym-0.7.0-py3-none-any.whl
Size 104.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08d4966b5f00041b979c1d92e412bbfba6e569450b740309335619d5ba145de5
BLAKE2b-256 checksum
How to use checksums
eb20f2605e2534e38936f6fd9c6f65751b982f0ca743f44fb54206a701023ace
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 Nov 4, 2026.

Transparency log

Security for mudgym 0.7.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mudgym-0.7.0.tar.gz

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 Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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