​TextWorld is a sandbox learning environment for the training and evaluation of reinforcement learning (RL) agents on text-based games.

Overview

TextWorld

Build Status PyPI version Documentation Status Join the chat at https://gitter.im/Microsoft/TextWorld

A text-based game generator and extensible sandbox learning environment for training and testing reinforcement learning (RL) agents. Also check out aka.ms/textworld for more info about TextWorld and its creators. Have questions or feedback about TextWorld? Send them to [email protected] or use the Gitter channel listed above.

Installation

TextWorld requires Python 3 and only supports Linux and macOS systems at the moment. For Windows users, docker can be used as a workaround (see Docker section below).

Requirements

TextWorld requires some system libraries for its native components. On a Debian/Ubuntu-based system, these can be installed with

sudo apt update && sudo apt install build-essential libffi-dev python3-dev curl git

And on macOS, with

brew install libffi curl git

Note: We advise our users to use virtual environments to avoid Python packages from different projects to interfere with each other. Popular choices are Conda Environments and Virtualenv

Installing TextWorld

The easiest way to install TextWorld is via pip:

pip install textworld

Or, after cloning the repo, go inside the root folder of the project (i.e. alongside setup.py) and run

pip install .

Visualization

TextWorld comes with some tools to visualize game states. Make sure all dependencies are installed by running

pip install textworld[vis]

Then, you will need to install either the Chrome or Firefox webdriver (depending on which browser you have currently installed). If you have Chrome already installed you can use the following command to install chromedriver

pip install chromedriver_installer

Current visualization tools include: take_screenshot, visualize and show_graph from textworld.render.

Docker

A docker container with the latest TextWorld release is available on DockerHub.

docker pull marccote19/textworld
docker run -p 8888:8888 -it --rm marccote19/textworld

Then, in your browser, navigate to the Jupyter notebook's link displayed in your terminal. The link should look like this

http://127.0.0.1:8888/?token=8d7aaa...e95

Note: See README.md in the docker folder for troubleshooting information.

Usage

Generating a game

TextWorld provides an easy way of generating simple text-based games via the tw-make script. For instance,

tw-make custom --world-size 5 --nb-objects 10 --quest-length 5 --seed 1234 --output tw_games/custom_game.z8

where custom indicates we want to customize the game using the following options: --world-size controls the number of rooms in the world, --nb-objects controls the number of objects that can be interacted with (excluding doors) and --quest-length controls the minimum number of commands that is required to type in order to win the game. Once done, the game custom_game.z8 will be saved in the tw_games/ folder.

Playing a game (terminal)

To play a game, one can use the tw-play script. For instance, the command to play the game generated in the previous section would be

tw-play tw_games/custom_game.z8

Note: Only Z-machine's games (*.z1 through .z8) and Glulx's games (.ulx) are supported.

To visualize the game state while playing, use the --viewer [port] option.

tw-play tw_games/custom_game.z8 --viewer

A new browser tab should open and track your progress in the game.

Playing a game (Python + Gym)

Here's how you can interact with a text-based game from within Python using OpenAI's Gym framework.

import gym
import textworld.gym

# Register a text-based game as a new Gym's environment.
env_id = textworld.gym.register_game("tw_games/custom_game.z8",
                                     max_episode_steps=50)

env = gym.make(env_id)  # Start the environment.

obs, infos = env.reset()  # Start new episode.
env.render()

score, moves, done = 0, 0, False
while not done:
    command = input("> ")
    obs, score, done, infos = env.step(command)
    env.render()
    moves += 1

env.close()
print("moves: {}; score: {}".format(moves, score))

Note: To play text-based games without Gym, see Playing text-based games with TextWorld.ipynb

Documentation

For more information about TextWorld, check the documentation.

Visual Studio Code

You can install the textworld-vscode extension that enables syntax highlighting for editing .twl and .twg TextWorld files.

Notebooks

Check the notebooks provided with the framework to see what you can do with it. You will need the Jupyter Notebook to run them. You can install it with

pip install jupyter

Citing TextWorld

If you use TextWorld, please cite the following BibTex:

@Article{cote18textworld,
  author = {Marc-Alexandre C\^ot\'e and
            \'Akos K\'ad\'ar and
            Xingdi Yuan and
            Ben Kybartas and
            Tavian Barnes and
            Emery Fine and
            James Moore and
            Ruo Yu Tao and
            Matthew Hausknecht and
            Layla El Asri and
            Mahmoud Adada and
            Wendy Tay and
            Adam Trischler},
  title = {TextWorld: A Learning Environment for Text-based Games},
  journal = {CoRR},
  volume = {abs/1806.11532},
  year = {2018}
}

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Comments
  • game created with GameMaker doesn't understand 'fridge'

    game created with GameMaker doesn't understand 'fridge'

    Hello, I was trying to create a game with the GameMaker. However, when I create a container named either 'fridge' or 'refrigerator' and I record the quest for the game I get the following message: You can't see any such thing. But it actually appears on the quest:

    -= Kitchen =-
    You arrive in a kitchen. A typical kind of place. I guess you better just go and
    list everything you see here.
    
    You can make out a refrigerator. You bend down to tie your shoe. When you stand
    up, you notice a stove. The stove is usual. On the stove you make out a keycard.
    

    If I leave like that when I run the game to play it that element is replaced with other name such as 'Microsoft box' or 'formless chest':

    -= Kitchen =-
    You've entered a kitchen.
    
    You can make out a safe. Hmmm... what else, what else? You make out a closed
    formless chest. You can make out a stove. The stove is usual. On the stove you
    can make out a cuboid passkey and an American limited edition keycard.
    
    

    Do you know what could be causing this problem?

    Thank you in advance,

    opened by gari-marcos 27
  • Can we obtain the game map in a data format?

    Can we obtain the game map in a data format?

    Hi, I've found out the --overview and --save-overview option which can generate an image representation of the generated game map with the locations and the inventory/objective. Is there a way to obtain the generated game graph/map? Which contains the different rooms and the connection label between the rooms? For example, Kitchen and a connection west to room..etc. in a text/JSON/graph format etc.. something other than an image..

    Or maybe there is someplace in the repo. from where I can obtain this information? Thanks.

    opened by ankitvad 12
  • Negation of a state in defining a new command

    Negation of a state in defining a new command

    While defining a new command in the logic file, is it possible to mention that certain state cannot be satisfied? For example, I have a game scenario where, you can ask a information to a person. The question can be asked until the person gives the answer. When the person has given the information, you cannot ask the question again. So, I have defined a predicate "asked(pr)", which represents the state when the question has been asked already. And the rule is "ask/pr(pr)" which will be available only when the question was not asked before. So how can I add not "asked(pr)" state in the rule definition?

    opened by sultanalnahian 10
  • Install errors with TextWorld 1.10

    Install errors with TextWorld 1.10

    I ran into another build issue installing TextWorld 1.10 (the version pushed to PyPI earlier today).

    To replicate in a clean Conda environment on macOS:

    brew install libffi curl git
    conda create --name textworld python=3.7
    conda activate textworld
    pip install textworld
    

    This fails with the following error:

    $ pip install textworld
    Collecting textworld
      Using cached https://files.pythonhosted.org/packages/57/db/d819321f11211f3ecdfd618031260e0d5bc474eb0d4c49127f042dfad0c2/textworld-1.1.0.tar.gz
    Collecting numpy>=1.13.1 (from textworld)
      Using cached https://files.pythonhosted.org/packages/46/e4/4a0cc770e4bfb34b4e10843805fef67b9a94027e59162a586c776f35c5bb/numpy-1.16.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
    Collecting tqdm>=4.17.1 (from textworld)
      Using cached https://files.pythonhosted.org/packages/76/4c/103a4d3415dafc1ddfe6a6624333971756e2d3dd8c6dc0f520152855f040/tqdm-4.30.0-py2.py3-none-any.whl
    Collecting cffi>=1.0.0 (from textworld)
      Using cached https://files.pythonhosted.org/packages/0b/ba/32835c9965d8a0090723e1d0b47373365525c4bd08c807b5efdc9fecbc99/cffi-1.11.5-cp37-cp37m-macosx_10_9_x86_64.whl
    Collecting networkx>=2 (from textworld)
    Collecting pyyaml>=3.12 (from textworld)
    Collecting urwid>=2.0.1 (from textworld)
    Collecting more_itertools (from textworld)
      Using cached https://files.pythonhosted.org/packages/a4/a6/42f17d065bda1fac255db13afc94c93dbfb64393eae37c749b4cb0752fc7/more_itertools-5.0.0-py3-none-any.whl
    Collecting tatsu>=4.3.0 (from textworld)
      Using cached https://files.pythonhosted.org/packages/4a/2a/73ab41b283bdad217bbcd58751662d7edcb650c3dc810c8caa58f2fdcf49/TatSu-4.3.0-py2.py3-none-any.whl
    Collecting hashids>=1.2.0 (from textworld)
    Collecting jericho>=1.1.5 (from textworld)
    Collecting pybars3>=0.9.3 (from textworld)
    Collecting flask>=1.0.2 (from textworld)
      Using cached https://files.pythonhosted.org/packages/7f/e7/08578774ed4536d3242b14dacb4696386634607af824ea997202cd0edb4b/Flask-1.0.2-py2.py3-none-any.whl
    Collecting selenium>=3.12.0 (from textworld)
      Using cached https://files.pythonhosted.org/packages/80/d6/4294f0b4bce4de0abf13e17190289f9d0613b0a44e5dd6a7f5ca98459853/selenium-3.141.0-py2.py3-none-any.whl
    Collecting greenlet==0.4.13 (from textworld)
    Collecting gevent==1.3.5 (from textworld)
    Collecting pillow>=5.1.0 (from textworld)
      Using cached https://files.pythonhosted.org/packages/c9/ed/27cc92e99b9ccaa0985a66133baeea7e8a3371d3c04cfa353aaa3b81aac1/Pillow-5.4.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
    Collecting pydot>=1.2.4 (from textworld)
      Using cached https://files.pythonhosted.org/packages/33/d1/b1479a770f66d962f545c2101630ce1d5592d90cb4f083d38862e93d16d2/pydot-1.4.1-py2.py3-none-any.whl
    Collecting prompt_toolkit<2.1.0,>=2.0.0 (from textworld)
      Using cached https://files.pythonhosted.org/packages/65/c2/e676da701cda11b32ff42eceb44aa7d8934b597d604bb5e94c0283def064/prompt_toolkit-2.0.8-py3-none-any.whl
    Collecting gym==0.10.4 (from textworld)
    Collecting pycparser (from cffi>=1.0.0->textworld)
    Collecting decorator>=4.3.0 (from networkx>=2->textworld)
      Using cached https://files.pythonhosted.org/packages/f1/cd/7c8240007e9716b14679bc217a1baefa4432aa30394f7e2ec40a52b1a708/decorator-4.3.2-py2.py3-none-any.whl
    Collecting six<2.0.0,>=1.0.0 (from more_itertools->textworld)
      Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
    Collecting PyMeta3>=0.5.1 (from pybars3>=0.9.3->textworld)
    Collecting Werkzeug>=0.14 (from flask>=1.0.2->textworld)
      Using cached https://files.pythonhosted.org/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl
    Collecting itsdangerous>=0.24 (from flask>=1.0.2->textworld)
      Using cached https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl
    Collecting Jinja2>=2.10 (from flask>=1.0.2->textworld)
      Using cached https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl
    Collecting click>=5.1 (from flask>=1.0.2->textworld)
      Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
    Collecting urllib3 (from selenium>=3.12.0->textworld)
      Using cached https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl
    Collecting pyparsing>=2.1.4 (from pydot>=1.2.4->textworld)
      Using cached https://files.pythonhosted.org/packages/de/0a/001be530836743d8be6c2d85069f46fecf84ac6c18c7f5fb8125ee11d854/pyparsing-2.3.1-py2.py3-none-any.whl
    Collecting wcwidth (from prompt_toolkit<2.1.0,>=2.0.0->textworld)
      Using cached https://files.pythonhosted.org/packages/7e/9f/526a6947247599b084ee5232e4f9190a38f398d7300d866af3ab571a5bfe/wcwidth-0.1.7-py2.py3-none-any.whl
    Collecting requests>=2.0 (from gym==0.10.4->textworld)
      Using cached https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl
    Collecting pyglet>=1.2.0 (from gym==0.10.4->textworld)
      Using cached https://files.pythonhosted.org/packages/1c/fc/dad5eaaab68f0c21e2f906a94ddb98175662cc5a654eee404d59554ce0fa/pyglet-1.3.2-py2.py3-none-any.whl
    Collecting MarkupSafe>=0.23 (from Jinja2>=2.10->flask>=1.0.2->textworld)
      Using cached https://files.pythonhosted.org/packages/96/52/eef455862764cb6d6c136aa52c7f9fc4e7c1c644790a7107b1244a2b8a53/MarkupSafe-1.1.0-cp37-cp37m-macosx_10_6_intel.whl
    Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.0->gym==0.10.4->textworld)
      Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
    Collecting idna<2.9,>=2.5 (from requests>=2.0->gym==0.10.4->textworld)
      Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
    Requirement already satisfied: certifi>=2017.4.17 in /Users/leon/miniconda3/envs/textworld/lib/python3.7/site-packages (from requests>=2.0->gym==0.10.4->textworld) (2018.11.29)
    Collecting future (from pyglet>=1.2.0->gym==0.10.4->textworld)
    Building wheels for collected packages: textworld
      Building wheel for textworld (setup.py) ... error
      Complete output from command /Users/leon/miniconda3/envs/textworld/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-wheel-c2qxr8sz --python-tag cp37:
      running bdist_wheel
      running build
      running build_py
      + echo 'Running setup.sh...'
      Running setup.sh...
      ++ uname -s
      + unameOut=Darwin
      + case "${unameOut}" in
      + machine=Mac
      + cd textworld/thirdparty/
      + '[' '!' -e I7_6M62_Linux_all.tar.gz ']'
      + echo 'Downloading Inform7 CLI'
      Downloading Inform7 CLI
      + curl -LO http://inform7.com/download/content/6M62/I7_6M62_Linux_all.tar.gz
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      100 22.1M  100 22.1M    0     0  8956k      0  0:00:02  0:00:02 --:--:-- 8956k
      + '[' Mac == Mac ']'
      + '[' '!' -e I7-6M62-OSX.dmg ']'
      + echo 'Downloading Inform7 for Mac'
      Downloading Inform7 for Mac
      + curl -LO http://inform7.com/download/content/6M62/I7-6M62-OSX.dmg
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      100 27.4M  100 27.4M    0     0  8716k      0  0:00:03  0:00:03 --:--:-- 8718k
      + '[' '!' -d inform7-6M62 ']'
      + echo 'Installing Inform7 CLI'
      Installing Inform7 CLI
      + cd inform7-6M62/
      + ./install-inform7.sh --prefix /private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/textworld/thirdparty/inform7-6M62
      + cd ..
      + rm -f inform7-6M62/share/inform7/Internal/I6T/Actions.i6t
      + cp inform7/share/inform7/Internal/I6T/Actions.i6t inform7-6M62/share/inform7/Internal/I6T/Actions.i6t
      + '[' Mac == Mac ']'
      + '[' -e inform7-6M62 ']'
      + echo 'Mounting Inform for Mac'
      Mounting Inform for Mac
      + hdiutil attach ./I7-6M62-OSX.dmg
      Checksumming Protective Master Boot Record (MBR : 0)…
      Protective Master Boot Record (MBR :: verified CRC32 $252B40D3
      Checksumming GPT Header (Primary GPT Header : 1)…
       GPT Header (Primary GPT Header : 1): verified CRC32 $677934B8
      Checksumming GPT Partition Data (Primary GPT Table : 2)…
      GPT Partition Data (Primary GPT Tabl: verified CRC32 $116B510C
      Checksumming  (Apple_Free : 3)…
                          (Apple_Free : 3): verified CRC32 $00000000
      Checksumming disk image (Apple_HFS : 4)…
                disk image (Apple_HFS : 4): verified CRC32 $057BB535
      Checksumming  (Apple_Free : 5)…
                          (Apple_Free : 5): verified CRC32 $00000000
      Checksumming GPT Partition Data (Backup GPT Table : 6)…
      GPT Partition Data (Backup GPT Table: verified CRC32 $116B510C
      Checksumming GPT Header (Backup GPT Header : 7)…
        GPT Header (Backup GPT Header : 7): verified CRC32 $676DD2DA
      verified CRC32 $6521C609
      /dev/disk2            GUID_partition_scheme
      /dev/disk2s1          Apple_HFS                       /Volumes/Inform
      + echo 'Copying Mac compiled inform files'
      Copying Mac compiled inform files
      ++ pwd
      + current_dir=/private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/textworld/thirdparty
      + cd /Volumes/Inform/Inform.app/Contents/MacOS
      + cp cBlorb inform6 Inform intest ni /private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/textworld/thirdparty/inform7-6M62/share/inform7/Compilers/
      + cp ./git /private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/textworld/thirdparty/inform7-6M62/share/inform7/Interpreters/dumb-git
      + cp ./glulxe /private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/textworld/thirdparty/inform7-6M62/share/inform7/Interpreters/dumb-glulxe
      + cd /private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/textworld/thirdparty
      + echo 'Unmounting Inform for Mac'
      Unmounting Inform for Mac
      + hdiutil detach /Volumes/Inform/
      "disk2" ejected.
      + '[' '!' -d frotz ']'
      + cd frotz/
      + make -B dumb
      gcc -O2  -o src/common/buffer.o -c src/common/buffer.c
      gcc -O2  -o src/common/err.o -c src/common/err.c
      gcc -O2  -o src/common/fastmem.o -c src/common/fastmem.c
      gcc -O2  -o src/common/files.o -c src/common/files.c
      gcc -O2  -o src/common/hotkey.o -c src/common/hotkey.c
      gcc -O2  -o src/common/input.o -c src/common/input.c
      gcc -O2  -o src/common/main.o -c src/common/main.c
      gcc -O2  -o src/common/math.o -c src/common/math.c
      gcc -O2  -o src/common/object.o -c src/common/object.c
      gcc -O2  -o src/common/process.o -c src/common/process.c
      gcc -O2  -o src/common/quetzal.o -c src/common/quetzal.c
      gcc -O2  -o src/common/random.o -c src/common/random.c
      gcc -O2  -o src/common/redirect.o -c src/common/redirect.c
      gcc -O2  -o src/common/screen.o -c src/common/screen.c
      gcc -O2  -o src/common/sound.o -c src/common/sound.c
      gcc -O2  -o src/common/stream.o -c src/common/stream.c
      gcc -O2  -o src/common/table.o -c src/common/table.c
      gcc -O2  -o src/common/text.o -c src/common/text.c
      gcc -O2  -o src/common/variable.o -c src/common/variable.c
    
      Archiving common code...
      /usr/bin/ar rc src/frotz_common.a src/common/buffer.o src/common/err.o src/common/fastmem.o src/common/files.o src/common/hotkey.o src/common/input.o src/common/main.o src/common/math.o src/common/object.o src/common/process.o src/common/quetzal.o src/common/random.o src/common/redirect.o src/common/screen.o src/common/sound.o src/common/stream.o src/common/table.o src/common/text.o src/common/variable.o
      /usr/bin/ranlib src/frotz_common.a
    
      gcc -O2 -o src/dumb/dumb_init.o -c src/dumb/dumb_init.c
      gcc -O2 -o src/dumb/dumb_input.o -c src/dumb/dumb_input.c
      src/dumb/dumb_input.c:129:39: warning: implicit conversion from 'int' to 'char' changes value from 142 to -114 [-Wconstant-conversion]
            case '0': *dest++ = ZC_FKEY_MIN + 9; break;
                              ~ ~~~~~~~~~~~~^~~
      src/dumb/dumb_input.c:252:32: warning: passing 'zchar *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
              dumb_discard_old_input(strlen(continued_line_chars));
                                            ^~~~~~~~~~~~~~~~~~~~
      /usr/include/string.h:82:28: note: passing argument to parameter '__s' here
      size_t   strlen(const char *__s);
                                  ^
      src/dumb/dumb_input.c:267:14: warning: field precision should have type 'int', but argument has type 'long' [-Wformat]
                printf("%.*s", next_page - current_page, current_page);
                        ~~^~   ~~~~~~~~~~~~~~~~~~~~~~~~
      src/dumb/dumb_input.c:375:10: warning: passing 'zchar *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
        strcat(buf, read_line_buffer);
               ^~~
      /usr/include/secure/_string.h:131:27: note: expanded from macro 'strcat'
                      __builtin___strcat_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                              ^~~~
      4 warnings generated.
      gcc -O2 -o src/dumb/dumb_output.o -c src/dumb/dumb_output.c
      gcc -O2 -o src/dumb/dumb_pic.o -c src/dumb/dumb_pic.c
    
      Archiving dumb interface code...
      /usr/bin/ar rc src/frotz_dumb.a src/dumb/dumb_init.o src/dumb/dumb_input.o src/dumb/dumb_output.o src/dumb/dumb_pic.o
      /usr/bin/ranlib src/frotz_dumb.a
    
      gcc -o dfrotz src/frotz_common.a src/frotz_dumb.a
      ld: warning: ignoring file src/frotz_dumb.a, file was built for archive which is not the architecture being linked (x86_64): src/frotz_dumb.a
      ld: warning: ignoring file src/frotz_common.a, file was built for archive which is not the architecture being linked (x86_64): src/frotz_common.a
      Undefined symbols for architecture x86_64:
        "_main", referenced from:
           implicit entry/start for main executable
      ld: symbol(s) not found for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      make: *** [frotz-dumb] Error 1
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/setup.py", line 67, in <module>
          'nose==1.3.7',
        File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
          return distutils.core.setup(**attrs)
        File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/distutils/core.py", line 148, in setup
          dist.run_commands()
        File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/distutils/dist.py", line 966, in run_commands
          self.run_command(cmd)
        File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 188, in run
          self.run_command('build')
        File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/setup.py", line 37, in run
          _pre_install(None)
        File "/private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/setup.py", line 18, in _pre_install
          check_call(['./setup.sh'], shell=True, cwd=os.getcwd())
        File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/subprocess.py", line 347, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['./setup.sh']' returned non-zero exit status 2.
    
      ----------------------------------------
      Failed building wheel for textworld
      Running setup.py clean for textworld
    Failed to build textworld
    Installing collected packages: numpy, tqdm, pycparser, cffi, decorator, networkx, pyyaml, urwid, six, more-itertools, tatsu, hashids, jericho, PyMeta3, pybars3, Werkzeug, itsdangerous, MarkupSafe,Jinja2, click, flask, urllib3, selenium, greenlet, gevent, pillow, pyparsing, pydot, wcwidth, prompt-toolkit, chardet, idna, requests, future, pyglet, gym, textworld
      Running setup.py install for textworld ... error
        Complete output from command /Users/leon/miniconda3/envs/textworld/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-record-5kd705kj/install-record.txt --single-version-externally-managed --compile:
        running install
        Running post install task
        + echo 'Running setup.sh...'
        Running setup.sh...
        ++ uname -s
        + unameOut=Darwin
        + case "${unameOut}" in
        + machine=Mac
        + cd textworld/thirdparty/
        + '[' '!' -e I7_6M62_Linux_all.tar.gz ']'
        + '[' '!' -d inform7-6M62 ']'
        + echo 'Installing Inform7 CLI'
        Installing Inform7 CLI
        + cd inform7-6M62/
        + ./install-inform7.sh --prefix /private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/textworld/thirdparty/inform7-6M62
        + cd ..
        + rm -f inform7-6M62/share/inform7/Internal/I6T/Actions.i6t
        + cp inform7/share/inform7/Internal/I6T/Actions.i6t inform7-6M62/share/inform7/Internal/I6T/Actions.i6t
        + '[' Mac == Mac ']'
        + '[' -e inform7-6M62 ']'
        + echo 'Mounting Inform for Mac'
        Mounting Inform for Mac
        + hdiutil attach ./I7-6M62-OSX.dmg
        expected CRC32 $6521C609
        /dev/disk2                  GUID_partition_scheme
        /dev/disk2s1                Apple_HFS                       /Volumes/Inform
        + echo 'Copying Mac compiled inform files'
        Copying Mac compiled inform files
        ++ pwd
        + current_dir=/private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/textworld/thirdparty
        + cd /Volumes/Inform/Inform.app/Contents/MacOS
        + cp cBlorb inform6 Inform intest ni /private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/textworld/thirdparty/inform7-6M62/share/inform7/Compilers/
        + cp ./git /private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/textworld/thirdparty/inform7-6M62/share/inform7/Interpreters/dumb-git
        + cp ./glulxe /private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/textworld/thirdparty/inform7-6M62/share/inform7/Interpreters/dumb-glulxe
        + cd /private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/textworld/thirdparty
        + echo 'Unmounting Inform for Mac'
        Unmounting Inform for Mac
        + hdiutil detach /Volumes/Inform/
        "disk2" ejected.
        + '[' '!' -d frotz ']'
        + cd frotz/
        + make -B dumb
        gcc -O2  -o src/common/buffer.o -c src/common/buffer.c
        gcc -O2  -o src/common/err.o -c src/common/err.c
        gcc -O2  -o src/common/fastmem.o -c src/common/fastmem.c
        gcc -O2  -o src/common/files.o -c src/common/files.c
        gcc -O2  -o src/common/hotkey.o -c src/common/hotkey.c
        gcc -O2  -o src/common/input.o -c src/common/input.c
        gcc -O2  -o src/common/main.o -c src/common/main.c
        gcc -O2  -o src/common/math.o -c src/common/math.c
        gcc -O2  -o src/common/object.o -c src/common/object.c
        gcc -O2  -o src/common/process.o -c src/common/process.c
        gcc -O2  -o src/common/quetzal.o -c src/common/quetzal.c
        gcc -O2  -o src/common/random.o -c src/common/random.c
        gcc -O2  -o src/common/redirect.o -c src/common/redirect.c
        gcc -O2  -o src/common/screen.o -c src/common/screen.c
        gcc -O2  -o src/common/sound.o -c src/common/sound.c
        gcc -O2  -o src/common/stream.o -c src/common/stream.c
        gcc -O2  -o src/common/table.o -c src/common/table.c
        gcc -O2  -o src/common/text.o -c src/common/text.c
        gcc -O2  -o src/common/variable.o -c src/common/variable.c
    
        Archiving common code...
        /usr/bin/ar rc src/frotz_common.a src/common/buffer.o src/common/err.o src/common/fastmem.o src/common/files.o src/common/hotkey.o src/common/input.o src/common/main.o src/common/math.o src/common/object.o src/common/process.o src/common/quetzal.o src/common/random.o src/common/redirect.o src/common/screen.o src/common/sound.o src/common/stream.o src/common/table.o src/common/text.o src/common/variable.o
        /usr/bin/ranlib src/frotz_common.a
    
        gcc -O2 -o src/dumb/dumb_init.o -c src/dumb/dumb_init.c
        gcc -O2 -o src/dumb/dumb_input.o -c src/dumb/dumb_input.c
        src/dumb/dumb_input.c:129:39: warning: implicit conversion from 'int' to 'char' changes value from 142 to -114 [-Wconstant-conversion]
              case '0': *dest++ = ZC_FKEY_MIN + 9; break;
                                ~ ~~~~~~~~~~~~^~~
        src/dumb/dumb_input.c:252:32: warning: passing 'zchar *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign]
                dumb_discard_old_input(strlen(continued_line_chars));
                                              ^~~~~~~~~~~~~~~~~~~~
        /usr/include/string.h:82:28: note: passing argument to parameter '__s' here
        size_t   strlen(const char *__s);
                                    ^
        src/dumb/dumb_input.c:267:14: warning: field precision should have type 'int', but argument has type 'long' [-Wformat]
                  printf("%.*s", next_page - current_page, current_page);
                          ~~^~   ~~~~~~~~~~~~~~~~~~~~~~~~
        src/dumb/dumb_input.c:375:10: warning: passing 'zchar *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
          strcat(buf, read_line_buffer);
                 ^~~
        /usr/include/secure/_string.h:131:27: note: expanded from macro 'strcat'
                        __builtin___strcat_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
                                                ^~~~
        4 warnings generated.
        gcc -O2 -o src/dumb/dumb_output.o -c src/dumb/dumb_output.c
        gcc -O2 -o src/dumb/dumb_pic.o -c src/dumb/dumb_pic.c
    
        Archiving dumb interface code...
        /usr/bin/ar rc src/frotz_dumb.a src/dumb/dumb_init.o src/dumb/dumb_input.o src/dumb/dumb_output.o src/dumb/dumb_pic.o
        /usr/bin/ranlib src/frotz_dumb.a
    
        gcc -o dfrotz src/frotz_common.a src/frotz_dumb.a
        ld: warning: ld: warning: ignoring file src/frotz_common.a, file was built for archive which is not the architecture being linked (x86_64): src/frotz_common.a
        ignoring file src/frotz_dumb.a, file was built for archive which is not the architecture being linked (x86_64): src/frotz_dumb.a
        Undefined symbols for architecture x86_64:
          "_main", referenced from:
             implicit entry/start for main executable
        ld: symbol(s) not found for architecture x86_64
        clang: error: linker command failed with exit code 1 (use -v to see invocation)
        make: *** [frotz-dumb] Error 1
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/setup.py", line 67, in <module>
            'nose==1.3.7',
          File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
            return distutils.core.setup(**attrs)
          File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/distutils/core.py", line 148, in setup
            dist.run_commands()
          File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/distutils/dist.py", line 966, in run_commands
            self.run_command(cmd)
          File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/distutils/dist.py", line 985, in run_command
            cmd_obj.run()
          File "/private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/setup.py", line 24, in run
            msg="Running post install task")
          File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/distutils/cmd.py", line 335, in execute
            util.execute(func, args, msg, dry_run=self.dry_run)
          File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/distutils/util.py", line 286, in execute
            func(*args)
          File "/private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/setup.py", line 18, in _pre_install
            check_call(['./setup.sh'], shell=True, cwd=os.getcwd())
          File "/Users/leon/miniconda3/envs/textworld/lib/python3.7/subprocess.py", line 347, in check_call
            raise CalledProcessError(retcode, cmd)
        subprocess.CalledProcessError: Command '['./setup.sh']' returned non-zero exit status 2.
    
        ----------------------------------------
    Command "/Users/leon/miniconda3/envs/textworld/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-record-5kd705kj/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/8r/mj5p4vvj4wj1dbl7bz7gj1hc0000gn/T/pip-install-yfs_da44/textworld/
    

    Looks like this is a different error from #121.

    bug 
    opened by leonoverweel 10
  • Hotfix winning conditions

    Hotfix winning conditions

    The win_condition property as part of the generator.game.Game class (found in textworld/generator/game.py) was calling the wrong member variable for the quests. This PR fixes this by calling [Quest].win_events, not [Quest].winning_conditions as it previously was.

    Further, mirrored the win_condition property to create the analogous fail_condition property, if that info is ever needed by the user.

    Lastly, renamed win_condition -> win_conditions and fail_condition -> fail_conditions to more accurately represent their return values, which are a list of conditions (which are in fact, generator.game.Events)

    Note (Sanity Check): winning_conditions isn't a member variable that exists, and only appears in this one file in the whole code base.

    ⏵ grep -r winning_conditions --include=\*.py
    textworld/generator/game.py:        return [q.winning_conditions for q in self.quests]
    
    opened by MathieuTuli 9
  • Disable Inform7 debugging commands by default

    Disable Inform7 debugging commands by default

    This PR makes sure we cannot use the Inform7 testing commands by default. One can enable them by setting the environment variable TEXTWORLD_I6_DEBUG=True.

    This PR adds a modified version of Actions.i6t so we can still get the Inform7 action events that are used for our state tracking.

    opened by MarcCote 9
  • Missing dependency: git

    Missing dependency: git

    In the requirements list for the programs you need to have installed, git is missing. This might be not that obvious untill you try to put a docker container together to run this and fail on the very last part, where it tries to git clone frotz.

    Just as an idea: how about you provide a docker-image already setup with the neccessary requirements such that users can immediately start it?

    enhancement 
    opened by firstdeathmaker 7
  • Optional and repeatable quest

    Optional and repeatable quest

    Hello, I am wondering if there is a function or a flag to make a quest repeatable (same rewards given when the conditions are met) and optional (doesn’t need to be completed to complete the game)?

    opened by lanhoang712 6
  • Run z-machine games in parallel

    Run z-machine games in parallel

    Hi, is there any method to run multiple z-machine games (e.g. zork1.z5) in parallel. For games generated by tw-make this can be done via textworld.gym.make_batch, but how can I achieve this on z-machine games?

    bug doc 
    opened by YunqiuXu 6
  • Accessing oracle policy commands for tw-cooking games

    Accessing oracle policy commands for tw-cooking games

    Hey,

    I'm unable to access oracle policy commands for tw-cooking games which were introduced a couple of months ago: https://github.com/microsoft/TextWorld/pull/261

    I generated a game with:

    tw-make tw-cooking --recipe 3 --take 3 --cook --cut --open --go 12 --split train --output tw_games/tw-game.z8 --seed 11985

    and tried to play it with:

    tw-play --hint tw_games/tw-game.z8

    but oracle policy commands are not displayed.

    Am I doing something wrong with the game generation or the play command?

    opened by vmicheli 5
  • tw-extract walkthroughs creating empty file

    tw-extract walkthroughs creating empty file

    Hello, I am trying to run the tw-extract command and it is working properly with every subcommand except walkthroughs. When executing it, it is creating an empty file. I think I have everything installed properly. Thanks in advance.

    opened by gari-marcos 5
  • Translation Request

    Translation Request

    Hi, I'm a japanese graduate student who major in Reinforcement Learning, and interesting in TextWorld which is a text-based learning environment for Reinforcement Learning agent. I would like to translate the documentation to Japanese to speread this repository out to japanese people who may have some attention on reinforcement learning and natural language processing. I am looking forward to your good response. Thank you!!

    doc 
    opened by sataketatsuya 1
  • Using Action-based to create repeatable reward only when the action is executed

    Using Action-based to create repeatable reward only when the action is executed

    Hi @MarcCote we have a follow-up question on issue #296. Is there a way to make the reward repeatable but only occur once with the action? The problem when I tested the "eat apple", "take apple" approach is that the reward keeps occurring as long as the apple is in the inventory (i.e. until "drop apple"). We want the quest to be repeatable so that the agent is rewarded with each time it takes the apple, but only with the action "take". Is there a way to do that?

    bug 
    opened by lanhoang712 1
  • please add observation and action spaces

    please add observation and action spaces

    this is a key component of the gym API

    here's a custom space for strings (license: MIT, author: Bion Howard)

    class String(gym.Space):
        def __init__(
                    self,
                    length=None,
                    letters=LETTERS,
                    min_length=1,
                    max_length=280):
            self.min_length = min_length
            self.max_length = max_length
            self.letters = letters
            self.length = length
    
        def sample(self):
            length = self.length if self.length else random.randint(self.min_length, self.max_length)
            s = ''
            for i in range(length):
                letter = random.choice(self.letters)
                s += letter
            return s
    
        def contains(self, x):
            is_a_string = isinstance(x, str)
            correct_length = self.min_length <= len(x) <= self.max_length
            correct_letters = all([l in self.letters for l in x])
            return is_a_string and correct_length and correct_letters
        
        def __repr__(self):
            return f"String(min_length={self.min_length},length={self.length},max_length={self.max_length},letters={self.letters})"
    
    opened by bionicles 6
  • Description of logic files

    Description of logic files

    This is the first phase of the Game Design Tutorial, which basically dedicates to describe the logic of the game and creation of the logic files. Please let me know if you have any comments or editing notes about this document.

    doc 
    opened by HakiRose 2
Releases(1.5.3)
Owner
Microsoft
Open source projects and samples from Microsoft
Microsoft
Sandbox for training deep learning networks

Deep learning networks This repo is used to research convolutional networks primarily for computer vision tasks. For this purpose, the repo contains (

Oleg Sémery 2.7k Jan 1, 2023
Lux AI environment interface for RLlib multi-agents

Lux AI interface to RLlib MultiAgentsEnv For Lux AI Season 1 Kaggle competition. LuxAI repo RLlib-multiagents docs Kaggle environments repo Please let

Jaime 12 Nov 7, 2022
An example project demonstrating how the Autonomous Learning Library can be used to build new reinforcement learning agents.

About This repository shows how Autonomous Learning Library can be used to build new reinforcement learning agents. In particular, it contains a model

Chris Nota 5 Aug 30, 2022
Trading and Backtesting environment for training reinforcement learning agent or simple rule base algo.

TradingGym TradingGym is a toolkit for training and backtesting the reinforcement learning algorithms. This was inspired by OpenAI Gym and imitated th

Yvictor 1.1k Jan 2, 2023
Misc YOLOL scripts for use in the Starbase space sandbox videogame

starbase-misc Misc YOLOL scripts for use in the Starbase space sandbox videogame. Each directory contains standalone YOLOL scripts. They don't really

null 4 Oct 17, 2021
ManiSkill-Learn is a framework for training agents on SAPIEN Open-Source Manipulation Skill Challenge (ManiSkill Challenge), a large-scale learning-from-demonstrations benchmark for object manipulation.

ManiSkill-Learn ManiSkill-Learn is a framework for training agents on SAPIEN Open-Source Manipulation Skill Challenge, a large-scale learning-from-dem

Hao Su's Lab, UCSD 48 Dec 30, 2022
Trading environnement for RL agents, backtesting and training.

TradzQAI Trading environnement for RL agents, backtesting and training. Live session with coinbasepro-python is finaly arrived ! Available sessions: L

Tony Denion 164 Oct 30, 2022
A lightweight Python-based 3D network multi-agent simulator. Uses a cell-based congestion model. Calculates risk, loudness and battery capacities of the agents. Suitable for 3D network optimization tasks.

AMAZ3DSim AMAZ3DSim is a lightweight python-based 3D network multi-agent simulator. It uses a cell-based congestion model. It calculates risk, battery

Daniel Hirsch 13 Nov 4, 2022
The Hailo Model Zoo includes pre-trained models and a full building and evaluation environment

Hailo Model Zoo The Hailo Model Zoo provides pre-trained models for high-performance deep learning applications. Using the Hailo Model Zoo you can mea

Hailo 50 Dec 7, 2022
Predicting path with preference based on user demonstration using Maximum Entropy Deep Inverse Reinforcement Learning in a continuous environment

Preference-Planning-Deep-IRL Introduction Check my portfolio post Dependencies Gym stable-baselines3 PyTorch Usage Take Demonstration python3 record.

Tianyu Li 9 Oct 26, 2022
Train robotic agents to learn pick and place with deep learning for vision-based manipulation in PyBullet.

Ravens is a collection of simulated tasks in PyBullet for learning vision-based robotic manipulation, with emphasis on pick and place. It features a Gym-like API with 10 tabletop rearrangement tasks, each with (i) a scripted oracle that provides expert demonstrations (for imitation learning), and (ii) reward functions that provide partial credit (for reinforcement learning).

Google Research 367 Jan 9, 2023
Reinforcement Learning with Q-Learning Algorithm on gym's frozen lake environment implemented in python

Reinforcement Learning with Q Learning Algorithm Q learning algorithm is trained on the gym's frozen lake environment. Libraries Used gym Numpy tqdm P

null 1 Nov 10, 2021
FuseDream: Training-Free Text-to-Image Generationwith Improved CLIP+GAN Space OptimizationFuseDream: Training-Free Text-to-Image Generationwith Improved CLIP+GAN Space Optimization

FuseDream This repo contains code for our paper (paper link): FuseDream: Training-Free Text-to-Image Generation with Improved CLIP+GAN Space Optimizat

XCL 191 Dec 31, 2022
Multi-agent reinforcement learning algorithm and environment

Multi-agent reinforcement learning algorithm and environment [en/cn] Pytorch implements multi-agent reinforcement learning algorithms including IQL, Q

万鲲鹏 7 Sep 20, 2022
DeepMind Alchemy task environment: a meta-reinforcement learning benchmark

The DeepMind Alchemy environment is a meta-reinforcement learning benchmark that presents tasks sampled from a task distribution with deep underlying structure.

DeepMind 188 Dec 25, 2022
CowHerd is a partially-observed reinforcement learning environment

CowHerd is a partially-observed reinforcement learning environment, where the player walks around an area and is rewarded for milking cows. The cows try to escape and the player can place fences to help capture them. The implementation of CowHerd is based on the Crafter environment.

Danijar Hafner 6 Mar 6, 2022
Reinforcement learning models in ViZDoom environment

DoomNet DoomNet is a ViZDoom agent trained by reinforcement learning. The agent is a neural network that outputs a probability of actions given only p

Andrey Kolishchak 126 Dec 9, 2022
The Environment I built to study Reinforcement Learning + Pokemon Showdown

pokemon-showdown-rl-environment The Environment I built to study Reinforcement Learning + Pokemon Showdown Been a while since I ran this. Think it is

null 3 Jan 16, 2022