microsoft / TextWorld

​TextWorld is a sandbox learning environment for the training and evaluation of reinforcement learning (RL) agents on text-based games.
Other
1.23k stars 188 forks source link

A Quick Tutorial on .twl and .twg files? #192

Closed banerjs closed 5 years ago

banerjs commented 5 years ago

Would it be possible to get a quick tutorial on .twg and .twl files? Either in this issue, or preferably as an addition to the documentation? Some details that would be welcome are:

  1. The basic syntax
  2. A how-to for creating a new game domain and/or adding some simple objects and actions
  3. Commands that need to be run in order to (re)parse twg and twl files.

As a motivation for this issue: I have been evaluating the cooking domain in MarcCote/TextWorld:human_study and there appears to be a bug in that domain where prepare meal does not actually change the underlying game facts (and the last_action, etc. of the game state are evaluated to None) even though the meal ends up in the inventory and one can win the game. I can't figure out how to update the twl files in order to fix that problem. (I think meal.twl is the culprit, but running tw-make after updating the file does not seem to be changing anything)

MarcCote commented 5 years ago

Hi @banerjs, we are actually in the middle of adding documentation about that. See PR #186. The documentation is still in pretty rough shape, feel free to comment on that PR directly.

As for the cooking domain, I wouldn't use the human-study branch since its purpose was not to generate games that can be (correctly) played with TextWorld. That said, I'm in the process of cleaning the code that was used for the First TextWorld Competition (https://competitions.codalab.org/competitions/21557). In the meantime, feel free to try this branch https://github.com/MarcCote/TextWorld/tree/competition-v1

banerjs commented 5 years ago

Oh excellent! Thanks a bunch for those pointers: I'll take a look at them now.