Git Product home page Git Product logo

Comments (5)

angel-ayala avatar angel-ayala commented on June 20, 2024

Another thing, I just notice that parameter value is updated on each step.
Is there anyway to do this when the episode ends?

I currently was to do a class and call it in a step callback.

class EpisodicDecay:
    def __init__(self, parameter):
        self.parameter = parameter
        self._init_table = parameter._n_updates.table.copy()
        
    def __call__(self, dataset):
        if dataset[-1][-1]: # episode has ended
            self._init_table += 1
        self.parameter._n_updates.table = self._init_table.copy()

from mushroom-rl.

boris-il-forte avatar boris-il-forte commented on June 20, 2024

You need also to set the numpy seed, as it influences the policy.
If you add torch, you should also set that seed too.

In general, we cannot write a general method to set the seed, as many libraries could use different random generators.
e.g. the enviroment seed method is only for gym enviroments, all the others use default numpy seed.

For the parameter decay, the one that you propose is the only supported way to achieve that behavior. That's exactly one of the use cases of callbacks.

from mushroom-rl.

angel-ayala avatar angel-ayala commented on June 20, 2024

ooh right!
Yes I know how do that, and make sense. Thanks!

And about the episodic decay parameter, that's ok, I can handle that.

Thanks!

from mushroom-rl.

NishanthVAnand avatar NishanthVAnand commented on June 20, 2024

I get NotImplementedError when I try to set seed on some of the envrionments. Any thoughts on how to fix it?

env = PuddleWorld()
env.seed(seed)
 File  "/python3.8/site-packages/mushroom_rl/core/environment.py", line 137, in seed
     raise NotImplementedError
 NotImplementedError

from mushroom-rl.

boris-il-forte avatar boris-il-forte commented on June 20, 2024

see my answer to #78

from mushroom-rl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.