Metadata-Version: 2.4
Name: mudgym
Version: 0.7.2
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: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Games/Entertainment :: Multi-User Dungeons (MUD)
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Dist: gymnasium>=1.3.0 ; sys_platform != 'emscripten'
Requires-Dist: gymnasium>=1.3.0,<1.4 ; sys_platform == 'emscripten'
Requires-Dist: structlog>=26.1.0
Requires-Dist: numpy>=2.4.3
Requires-Dist: pettingzoo>=1.27.0
Requires-Dist: wasmtime>=48.0.0,<49 ; sys_platform != 'emscripten'
Requires-Dist: mudgym-wasm-engine~=0.2.1
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.

## Browser Quickstart

No install needed, through the magic of WebAssembly.

See the game and env in action at the [MudGym Playground](https://mudgym.kingrolo.com/).

Or run and train against the game in JupyterLite notebooks:
- [Quickstart](https://rolo.github.io/mudgym/lite/notebooks/index.html?path=quickstart.ipynb).
- [Goal room DQN](https://rolo.github.io/mudgym/lite/notebooks/index.html?path=goal_room_dqn.ipynb).

## Local Setup 

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/).

## Citation

```
@misc{Mawlabaux2026MudGym,
	author = {Mawlabaux, Rolo},
	year = {2026},
	title = {MudGym},
	doi = {10.5281/zenodo.22730678},
	url = {https://rolo.github.io/mudgym/},
}
```

To cite a specific release, use its version DOI from [Zenodo](https://doi.org/10.5281/zenodo.22730678). You can also use GitHub's sidebar link.

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