Metadata-Version: 2.4
Name: mudgym
Version: 0.4.6
Summary: Reinforcement learning environment for MUD2.
Keywords: reinforcement-learning,gymnasium,pettingzoo,multi-agent,mud,mud2,text-adventure,llm-agents
Author: Rolo Mawlabaux
Author-email: Rolo Mawlabaux <rolo@kingrolo.com>
License-Expression: MIT
License-File: LICENSE
License-File: NOTICE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: POSIX
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Games/Entertainment :: Multi-User Dungeons (MUD)
Requires-Dist: ansi2html>=1.9.2
Requires-Dist: faker>=37.12.0
Requires-Dist: gymnasium>=1.3.0
Requires-Dist: pexpect>=4.9.0
Requires-Dist: structlog>=25.5.0
Requires-Dist: numpy>=2.3.4
Requires-Dist: pettingzoo>=1.25.0
Requires-Python: >=3.13
Project-URL: Homepage, https://rolo.github.io/mudgym/
Project-URL: Documentation, https://rolo.github.io/mudgym/
Project-URL: Repository, https://github.com/rolo/mudgym
Project-URL: Issues, https://github.com/rolo/mudgym/issues
Description-Content-Type: text/markdown

# 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:

```bash
uv add mudgym
```

## Quickstart

```python
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](https://rolo.github.io/mudgym/) 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.
