Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temporarily increment State when evaluating potential chunks #10

Open
Logodaedalus opened this issue Feb 6, 2017 · 0 comments
Open

Comments

@Logodaedalus
Copy link
Collaborator

Currently: State is evaluated via wouldMakeMoreTrue function, where it checks to see if any of the chunk effects would satisfy a want, or make incremental progress towards satisfying one

Problems:

  1. This doesn't work if it's evaluating to see if chunk effects make a state in general possible, if those effects doesn't correspond to wishlist wants
  2. If a chunk has a dynamically-chosen choice, and the choice is a patch for another chunk (see code below) it resets the State back before it can determine that the base chunk's effect is making it possible to use that last chunk

Basically, this chunk library will fail to assemble even the first chunk, because the pre-condition on "regrets" (establishFriendBackStory eq true) has already been rolled back by the time the system evaluates it.

[ { "id": "inSpain", "content": "You would not believe how much of this stuff I ate in Spain.", "choices" : [ {"condition": "establishEmmaRegrets eq true"}, ], "conditions": [], "effects": ["set establishFriendBackstory true"] }, { "id": "stilljealous", "choiceLabel": "Still jealous you got to spend six months there.", "request": {"condition": "establishEmmaRegrets eq true"} }, { "id": "regrets", "content": "Oh, come on. Don't beat yourself up. I'm pretty sure you made the right decision.", "conditions" : ["establishFriendBackstory eq true"], "effects": ["decr confidence 1", "set establishEmmaRegrets true"] } ]

Solution: store the state in a tree, and rollback / add to it each time as we're running bestPath?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant