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

Let feature_extractor and extract_fluents callable being resettable. #11

Open
marcofavorito opened this issue Nov 3, 2019 · 0 comments

Comments

@marcofavorito
Copy link
Member

marcofavorito commented Nov 3, 2019

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

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