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.6.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.6.0
File Size Uploaded
mudgym-0.6.0.tar.gz 74.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mudgym 0.6.0
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.1

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