Giter Club home page Giter Club logo

Comments (4)

pseudo-rnd-thoughts avatar pseudo-rnd-thoughts commented on June 18, 2024 1

Yes, you are completely correct. Thanks for catching this error, I will fix it now

from shimmy.

pseudo-rnd-thoughts avatar pseudo-rnd-thoughts commented on June 18, 2024 1

I think that @ottofabian wished to add access to the control_timestep with

@property
def dt(self):
    return self.model.opt.timestep * self.frame_skip

When he had time

from shimmy.

pseudo-rnd-thoughts avatar pseudo-rnd-thoughts commented on June 18, 2024

@ottofabian Hey, yes these seem like very good suggestions. Could you make a PR that implements both of the suggestions?

from shimmy.

ottofabian avatar ottofabian commented on June 18, 2024

I can do that, but I am currently busy with something else and this will probably take some time.

An another note, is the termination and truncation correctly implemented?
Based on the dm_control code,

   if self._step_count >= self._step_limit:
      discount = 1.0
    else:
      discount = self._task.get_termination(self._physics)

    episode_over = discount is not None

    if episode_over:
      self._reset_next_step = True
      return dm_env.TimeStep(
          dm_env.StepType.LAST, reward, discount, observation)
    else:
      return dm_env.TimeStep(dm_env.StepType.MID, reward, 1.0, observation)

I think it should be reversed, i.e. discount==0 is a termination. For the time limit (aka truncated) the discount is 1.0, 0.0 for failure or final step of finite horizon tasks, such as for LQR, and any other value !=0 when the environment artificially ends the task.
From a consistency perspective, 1.0 also makes more sense given the default value is 1.0 for intermediate and steps.
Some examples and details are also provided in the dm_control documentation.

from shimmy.

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.