TextWorld

TextWorld

Publications

Microsoft Research blog

Overview

You are navigating through a house. You've just entered a serious study. There is a gross looking mantle in the room. It has nothing on it. You see a closed rusty toolbox. Now why would someone leave that there?
Looks like there is a locked door. Find the key to unlock the door. You should try going east.

Get the code

Unlock the door to text-based adventure

TextWorld illustration of a yellow key on a dark blue background

Text-based games may seem primitive next to the beautifully rendered graphics of today, but to succeed at even the simplest such game, humans must use a special set of skills. We seamlessly and simultaneously comprehend language descriptions, plan our next moves, visualize the environment, remember important information, and generalize past experiences to new situations. AI agents don’t yet possess such capabilities, but they are the key to general intelligence. We can help an AI agent to learn these skills.

Microsoft TextWorld is an open-source, extensible engine that both generates and simulates text games. You can use it to train reinforcement learning (RL) agents to learn skills such as language understanding and grounding, combined with sequential decision making.

Try TextWorld today

TextWorld blue house with orange front door

The default environment is a house where the RL agent can learn basic domestic skills such as putting objects in containers, opening and closing doors, eating food, and more.

You can integrate your agent in the TextWorld framework, then train your agent to solve a potentially limitless number of multi-step quests in a potentially limitless number of text-based worlds. To learn more and get the code, visit our GitHub page.

Get the code

Questions?

Send any questions or comments to textworld@microsoft.com.

People

Research

Program Management

Engineering

Contribute

Let your imagination guide you—extend TextWorld!

Below are some ideas for how you could extend TextWorld:

Extend the action space: Cook a recipe. Bring out your agent’s inner gourmet chef by having it create meals with the action “cook.” Now, you can incorporate in the quests tasks such as cooking a savory omelet, a fancy Italian meal, or a fragrant fried rice dish. Yum.

Create a new skin for the world: A haunted castle. Forget the modern house. Imagine your agent navigating through a magical, haunted castle. Instead of cupboards and coffee, your agent will be interacting with treasure chests and potions. Don’t forget to use your wand to unlock those pesky locked doors.

Design a new quest for the agent. Need a more complex quest? Want to test an agent on specific tasks? Use TextWorld to design your own quest by defining the layout of the world, the quest goal, the tasks, the optimal route, and the rewards. Then share your quest on GitHub and see how others fare!

Get the code

In the News