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

The default connection runs the local WASM engine, which is installed automatically with MudGym.

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.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.5.0
File Size Uploaded
mudgym-0.5.0.tar.gz 95.7 kB Details

Built distribution (wheel)

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

Total release size: 217.1 kB

Release files / mudgym-0.5.0.tar.gz

Download URL mudgym-0.5.0.tar.gz
Size 95.7 kB
Tags Source
SHA-256 checksum
How to use checksums
263566451192b1121d06fbcd3001ef30cdb82a3c6b207844b96e1ea5c1c74aaf
BLAKE2b-256 checksum
How to use checksums
f2042a0096c9243307ac1b774231bc109ccd386b19b7c7f9cffe732dcdc025de
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 12, 2026.

Transparency log

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

Download URL mudgym-0.5.0-py3-none-any.whl
Size 121.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b01bcb32e0c2ce01301f72562021171f375e098d73c25cde5faf4f03cba7dd7
BLAKE2b-256 checksum
How to use checksums
e838325864161ff5f8c29af725a0025feb7409c882a04da901864cbbd2153935
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 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.0

2 release files

0.5.1

2 release files

This release

0.5.0 This release

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