Multi-Passage Reading Comprehension Deep Q-Network
About this repository
This repository contains the source code of the EMNLP 2020 paper Interactive Fiction Game Playing as Multi-Paragraph Reading Comprehension with Reinforcement Learning.
To get started with the framework, install the following dependencies:
- Python 3.7
- PyTorch (>=1.4.0)
- Jericho (2.4.3 or 2.4.2)
- spaCy (2.2.3)
Set up interactive fiction games simulator
The code base is built for Jericho 2.4.3 and 2.4.2. To install Jericho 2.4.2, run:
pip install jericho==2.4.2
The game roms are in the roms folder.
Training the models for interactive fiction games
- Prepare and pre-process the glove word embeddings.
1.2 Pre-process the glove word embeddings; run:
or download the processed embeddings from here.
- Train the models for interactive fiction games. For example, to train on the game Zork1, run:
python train.py --batch_size 64 --env_id "zork1.z5"