Skip to content

Let feature_extractor and extract_fluents callable being resettable. #11

@marfvr

Description

@marfvr

Is your feature request related to a problem? Please describe.

TemporalGoalWrapper.feature_extractor and TemporalGoal.extract_fluents are of type callable.

It is possible to create extractor that depends on more than one state, by keeping memory of the past states:

class my_feature_extractor:
    
    def __init__(self, *args, *kwargs):
        ...

    # this method makes the class callable
    def __call__(self, obs, action):
        ...

wrapper = TemporalGoalWrapper(env, feature_extractor=my_feature_extractor(), ...)

however, the state of the extractor is kept across episodes.

Describe the solution you'd like

TemporalGoalWrapper should call a reset() method of feature_extractor and of every extract_fluents. Of course they might not have a method called reset(), in that case just skip them.

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions