Skip to content

[NAACL 2021] Reading and Acting while Blindfolded: The Need for Semantics in Text Game Agents

Notifications You must be signed in to change notification settings

princeton-nlp/blindfold-textgame

Repository files navigation

DRRN Model Variants (Hash input, Inverse dynamics) on Text Games

Code for NAACL 2021 paper Reading and Acting while Blindfolded: The Need for Semantics in Text Game Agents.

Project site: https://blindfolded.cs.princeton.edu

Getting Started

  • Install dependencies:
pip install jericho fasttext
  • Run baseline DRRN:
python train.py
  • Run DRRN (hash):
python train.py --hash_rep 1
  • Run DRRN (inv-dy):
python train.py --w_inv 1 --w_act 1 --r_for 1

Use --seed to specify game random seed. -1 means episode-varying seeds (stochastic game mode), otherwise game mode is deterministic.

Zork I is played by default. More games are here and use --rom_path to specify which game to play.

Citation

@inproceedings{yao2021blindfolded,
    title={Reading and Acting while Blindfolded: The Need for Semantics in Text Game Agents},
    author={Yao, Shunyu and Narasimhan, Karthik and Hausknecht, Matthew},
    booktitle={North American Association for Computational Linguistics (NAACL)},
    year={2021}
}

Acknowledgements

The code borrows from TDQN.

For any questions please contact Shunyu Yao <shunyuyao.cs@gmail.com>.

Releases

No releases published

Packages

No packages published

Languages