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

A Docker engine is required to run the game. The image ghcr.io/rolo/mudgym is pulled automatically on first use.

Install MudGym from PyPI:

uv add 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.

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mudgym-0.4.6.tar.gz (84.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mudgym-0.4.6-py3-none-any.whl (107.8 kB view details)

Uploaded Python 3

File details

Details for the file mudgym-0.4.6.tar.gz.

File metadata

  • Download URL: mudgym-0.4.6.tar.gz
  • Upload date:
  • Size: 84.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mudgym-0.4.6.tar.gz
Algorithm Hash digest
SHA256 a2c2929dc3ba82154e3cbba0600f0d15bad4bdde10e7143cc55848e3e5649af1
MD5 6d830e5cf33121a68db972384ad9de1a
BLAKE2b-256 ecb53f58a5cb3632476b1244b3ac06b7f6044044573a90574cab4e52dd225e2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mudgym-0.4.6.tar.gz:

Publisher: release.yml on rolo/mudgym

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mudgym-0.4.6-py3-none-any.whl.

File metadata

  • Download URL: mudgym-0.4.6-py3-none-any.whl
  • Upload date:
  • Size: 107.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mudgym-0.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b2a65e15b30a436ec1151ba5b99cd71dac9db45ab2946951b502496165a9a104
MD5 88451831417a23491d815bd994d431f7
BLAKE2b-256 1fc0332054929989b0f0b89e16522a933dbd87af9a9a2cdf6e211fa9a76bc753

See more details on using hashes here.

Provenance

The following attestation bundles were made for mudgym-0.4.6-py3-none-any.whl:

Publisher: release.yml on rolo/mudgym

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.6 This release

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 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