Skip to content

Stacked hierarchical attention for text-based games

License

Notifications You must be signed in to change notification settings

YunqiuXu/SHA-KG

Repository files navigation

SHA-KG

SHA-KG_arch

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

Dependencies

  • 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

Game environment

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

How to train

  • Modify the port number for redis (default 6381) and corenlp (default 9010) in env.py, openie.py and vec_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.

Citation

@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}
}

Acknowledgement

We thank rajammanabrolu/KG-A2C for providing the excellent codebase.

License

MIT License

About

Stacked hierarchical attention for text-based games

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages