microsoft / TextWorld

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

[Frotz / GitGlulx / Gym / (Jeriocho) ] - Question, Bug, Feature Request? #326

Closed ai-nikolai closed 11 months ago

ai-nikolai commented 1 year ago

Question & Comments:

  1. The documentation speaks about custom Envs and references the FroetzEnvironment, however, it does not seem to be in the source code anymore: https://textworld.readthedocs.io/en/stable/notes/custom_env.html a. Particularly it references: from textworld.envs import FrotzEnvironment

  2. How can one load a Z-Machine game using textworld and gym. Particularly, is something like this possible, or what is necessary for this to be possible:

    # Register a text-based game as a new Gym's environment.
    env_id = textworld.gym.register_game("zork1.z5")
    env = gym.make(env_id)  # Start the environment.
  3. How would one use the inbuild GitGlulxEnv or JeriochoEnv to register a game with gym?

  4. Which type of games are compatible with GitGlulxEnv and JeriochoEnv (e.g. a source repository of compatible game files)

@MarcCote

MarcCote commented 1 year ago
  1. Thanks for reporting. That page is indeed outdated. Can you tell me where you find the link to it?
  2. This notebook has an example of how to load a Jericho game. With gym, your code snippet does work for me. Do you get any error?
  3. Not sure I understand your question here. Is it the same as the one above?
  4. The list of supported games by Jericho can be found here: https://jericho-py.readthedocs.io/en/latest/tutorial_quick.html#acquire-games
ai-nikolai commented 1 year ago

Thanks for clarifying.

  1. To be honest I don't remember how I got onto that page - perhaps a Search Engine Search got me there.
  2. Actually I tried as well and it works (I guess I assumed it wouldn't based on the Doc page).
  3. Yes, same question (I guess they all work out of the box with gym?).
  4. Thanks, very useful.
MarcCote commented 1 year ago

I guess they all work out of the box with gym?

Yes that's the plan.