Giter VIP home page Giter VIP logo

sha-kg's Introduction

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

sha-kg's People

Contributors

yunqiuxu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.