This repository contains official implementation for our NeurIPS2020 paper:
Deep Reinforcement Learning with Stacked Hierarchical Attention for Text-based Games
Yunqiu Xu, Meng Fang, Ling Chen, Yali Du, Joey Tianyi Zhou and Chengqi Zhang
- Python 3.7
- pytorch 1.3.1
- gym 0.17.2
- jericho 2.4.0
- networkx 2.4
- redis 3.4.1
- Redis 4.0.14
- Standford CoreNLP 3.9.2
We use man-made games supported by Microsoft's Jericho. Folder roms
contains original z-machine games provided by BYU-PCCL/z-machine-games. Folder data
contains entities and relations pre-defined by rajammanabrolu/KG-A2C
-
Modify the port number for redis (default 6381) and corenlp (default 9010) in
env.py
,openie.py
andvec_env.py
-
Modify the path of corenlp in
train.py
-
Launch redis and corenlp
-
Run the code
python train.py
Different games may have different GPU memory requirement and running time. The game log and model will be saved at the output directory specified in train.py
.
@inproceedings{xu2020neurips,
author = {Xu, Yunqiu and Fang, Meng and Chen, Ling and Du, Yali and Zhou, Joey Tianyi and Zhang, Chengqi},
booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
pages = {16495--16507},
title = {Deep Reinforcement Learning with Stacked Hierarchical Attention for Text-based Games},
volume = {33},
year = {2020}
}
We thank rajammanabrolu/KG-A2C for providing the excellent codebase.