-
Notifications
You must be signed in to change notification settings - Fork 191
Closed
Description
Hi, how do you define an action such as to create an action-based event?
I am trying this https://textworld.readthedocs.io/en/stable/textworld.generator.game.html?highlight=event#textworld.generator.game.Event but could not quite figure out how to define an action
For example:
apple = M.new(type='f', name='apple')
eat = Action(name='eat', preconditions=[], postconditions=[M.new_fact("eaten", apple)])
event_1 = Event(actions=[eat], commands='eat the apple')
q1 = Quest(win_events=[event_1]
but this produces an error of AttributeError: 'NoneType' object has no attribute 'items'
Metadata
Metadata
Assignees
Labels
No labels