Skip to content

Conversation

@MarcCote
Copy link
Contributor

This PR follows #42 and contains the second and final modification that will bring support to generate games with multiple subquests. It supersedes the rest of PR #30.

This PR adds support for subquests for different parts of the framework.

  • Inform7 code: adds code for checking the winning conditions of the different subquests, when all conditions are being met increase the score by some amount defined by the reward attribute of Quest objects.
  • Text generation: makes the text generation for quest description more flexible.
  • Game: The objective of the game is now stored in the Game objects. It is generated from the main_quest (a Quest instance) which is created by merging all the subquest dependency trees and extracting a winning policy from the resulting ActionDependencyTree object.
  • Unit tests: some tests needed to be adapted to include the max/min_breadth information. Also, adds more tests for testing the new code.

@MarcCote MarcCote added the enhancement New feature or request label Sep 26, 2018
@MarcCote MarcCote requested a review from tavianator September 26, 2018 12:44
@MarcCote MarcCote mentioned this pull request Sep 26, 2018
Copy link
Contributor

@tavianator tavianator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I made a couple suggestions, up to you if you want to integrate those in this PR or leave it for later.

@tavianator
Copy link
Contributor

Well, also fix this test I guess:

======================================================================
FAIL: test_world2inform7.test_names_disambiguation
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/travis/build/Microsoft/TextWorld/textworld/generator/inform7/tests/test_world2inform7.py", line 165, in test_names_disambiguation
    assert "tasty apple" in game_state.inventory
AssertionError

@MarcCote MarcCote mentioned this pull request Oct 1, 2018
@MarcCote
Copy link
Contributor Author

MarcCote commented Oct 1, 2018

The test is now passing.

@tavianator tavianator merged commit 2fb6b36 into microsoft:master Oct 1, 2018
@MarcCote MarcCote deleted the add_subquests branch October 1, 2018 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants