Text worlds for interactive agents

WordPlay

A modular toolkit for building text-based simulation environments where agents move, act, communicate, and cooperate through text and tile-based worlds.

Full Melting Pot suite 4 composable primitives Text and tile rendering
~ ~ ~ ~
Collaborative Cooking Figure Eight
Cooking: Figure Eight
Predator Prey Orchard
Predator-Prey: Orchard
Chemistry Three Metabolic Cycles
Chemistry: 3 Cycles
Commons Harvest Partnership
Harvest: Partnership
Paintball Capture the Flag
Paintball: CTF
Fruit Market
Fruit Market
Factory Commons
Factory Commons
Externality Mushrooms Dense
Mushrooms: Dense
Allelopathic Harvest Open
Allelopathic Harvest
Cooperative Mining
Cooperative Mining
Daycare
Daycare
Hidden Agenda
Hidden Agenda

// Abstract

Agents do not live in the real world, so WordPlay gives them worlds made of words. WordPlay is a Python framework for constructing environments for interactive agents. Environments are built from four composable primitives: Entities, Actions, Systems, and Movement. This makes it easy to go from a tiny grid world to a bustling multi-agent environment with inventory, combat, communication, and trading. Environments can be rendered as text descriptions or tilemaps, and agents can be controlled by language models, scripted policies, or humans. The framework also includes text-grid adaptations of DeepMind's full Melting Pot scenario suite.

~ ~ ~ ~

// How It Works

Under the hood, every environment follows the same loop: observe, choose an action, validate it, execute it, run shared systems, and render the next state.

WordPlay environment loop: agents observe, choose actions, validate them, update modular systems, and render the next state ONE STEP OF THE ENVIRONMENT LOOP Environment for each entity: 1. Observe state -> text description 2. Choose Action LLM / Human / Scripted action + target + args 3. Validate target is nearby, etc. loop over entities 4. Execute Action 5. Run Systems combat / inventory health / communication 6. Render text description / tilemap Entity position + tags components (inventory, health...) available actions Action Policies LLM Agent (OpenAI / OpenRouter) Human-in-the-loop Scripted / Follow Sequence Systems Combat Inventory & Trading Communication (Chat Room) Health / Do-Nothing Movement 2D grid / single-point / freeform Output text UI or tilemap image

The same interface supports human policies, scripted policies, and LLM policies, so you can swap the driver without rebuilding the world. Components and systems can be mixed, matched, and extended without pulling the rest apart.

~ ~ ~ ~

// What makes it different

Composable primitives

Entities, actions, systems, and movement models snap together like building blocks. Swap the movement system without touching the combat code.

🤖

LLM-native design

Agents act from natural-language action descriptions. Plug in OpenAI, OpenRouter, or local models through one shared interface.

👁

Human-in-the-loop

Drop in a human policy for interactive play, debugging, or data collection. Same world, different driver.

📄

Text & tile rendering

Render environments as text descriptions or as 2D tilemaps with sprite assets. Replay and live-view rendering are built in.

🤝

Multi-agent ready

Built for multi-agent settings with communication, trading, shared tasks, and the occasional glorious mess of coordination.

📈

Built-in benchmarks

Text-grid adaptations of DeepMind's full Melting Pot scenario suite — some examples below.

~ ~ ~ ~

// Examples

A few small worlds to get you moving: chat, trade, and a single-point room where three agents share one abstract location.

Chat demo with speech bubbles Chat Private conversation rendered as in-world speech bubbles.
Trade demo with updating offers Trade Negotiation rounds add items to each side of the offer.
Single-point summit with agents ringed around a round table taking turns speaking Single-point summit Agents share one abstract location, ringed around a round table taking turns to speak.
~ ~ ~ ~

// Benchmarks

WordPlay includes text-grid adaptations of DeepMind's Melting Pot — the full scenario suite, reimagined as text and tile-based worlds.

~ ~ ~ ~

// Getting Started

Two commands, one grid world, one human-controlled agent:

# install the base package (renderer and model extras are optional) $ pip install -e .

# run a simple environment with a human-controlled agent $ python examples/simple_env_0.py

See the GitHub repo for the current code, examples, and setup details.

~ ~ ~ ~

// Citation

If WordPlay is useful in your work, reference the project repository:

@software{wordplay_2025, author = {WordPlay contributors}, title = {WordPlay: A Modular Framework for Text-Based Environments}, year = {2025}, publisher = {GitHub}, url = {https://github.com/AndreiMuresanu/Word_Play} }

// Thanks

The name "WordPlay" was suggested by Darci Prout.

Sprite assets in the tilemap renderer come from open-licensed packs including DawnLike, Kenney Tiny Dungeon, and Mana Seed Character Base. See sprite_library/art_source/citations.md for full credits.