Uh oh!
There was an error while loading. Please reload this page.
chaining: Re-generate actions when branching - #35
Conversation
Marc-Alexandre Côté (MarcCote)
left a comment
There was a problem hiding this comment.
I'll test it out now.
| # Some debug checks | ||
| # XXX | ||
| if not self.check_state(new_state): |
There was a problem hiding this comment.
Yep, I agree with moving this after the apply and we can remove the check_state at line 419 I think. I had to do it in #36 since now some (expanded) rules might generate invalid state (e.g. in(box, box'), we are not allowing nested boxes).
There was a problem hiding this comment.
Tavian Barnes (@tavianator) forget what I said about removing the first check_state (line 419). Removing it would cause duplicate in the chains we generate. Let's just remove the assert then.
| backtracks = node.backtracks[:i] | ||
| parent = node.dep_parent | ||
| parents = [] | ||
| while parent.action: |
There was a problem hiding this comment.
Should be while parent and parent.action
This improves the quality of quests that include navigation actions, by re-generating actions after the player has moved into a new room, for example.
587414f to
dd90df1Compare
Marc-Alexandre Côté (MarcCote)
left a comment
There was a problem hiding this comment.
This new code generates better quests. +1
This improves the quality of quests that include navigation actions, by
re-generating actions after the player has moved into a new room, for
example.