Skip to content

YunqiuXu/QWA

Repository files navigation

QWA

Code for paper Perceiving the World: Question-guided Reinforcement Learning for Text-based Games

Yunqiu Xu, Meng Fang, Ling Chen, Yali Du, Joey Tianyi Zhou and Chengqi Zhang


  • An overview of the decision making process:

overview

  • Model architecture:

architecture


Installation

wget "https://bit.ly/2U3Mde2"
  • Datasets for pre-training the task selector and the action validator are provided at this link, other datasets could be downloaded at:
# AP
wget https://aka.ms/twkg/ap.0.2.zip

# RL
wget https://aka.ms/twkg/rl.0.2.zip

Training

  • Modify the paths within the config files, e.g. "word_embedding_path"

  • Action prediction (providing initialization for the encoders):

python train_ap.py config/config_pretrainAP.yaml
  • Task selector (pre-training phase):
python train_vt.py config/config_pretrainVT.yaml
  • Action validator (pre-training phase):
python train_va.py config/config_pretrainVA.yaml
  • Action selector (reinforcement learning phase):
# Medium games
python train_rl_medium.py config/config_trainRL_medium.yaml

# Hard games
python train_rl_hard.py config/config_trainRL_hard.yaml

Citation

@inproceedings{xu-etal-2022-perceiving,
    title = "Perceiving the World: Question-guided Reinforcement Learning for Text-based Games",
    author = "Xu, Yunqiu  and
      Fang, Meng  and
      Chen, Ling  and
      Du, Yali  and
      Zhou, Joey  and
      Zhang, Chengqi",
    booktitle = "Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = may,
    year = "2022",
    address = "Dublin, Ireland",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.acl-long.41",
    doi = "10.18653/v1/2022.acl-long.41",
    pages = "538--560"
}

License

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages