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

Doubt Regarding rollout() function #24

Open
vyasakash231 opened this issue May 26, 2024 · 0 comments
Open

Doubt Regarding rollout() function #24

vyasakash231 opened this issue May 26, 2024 · 0 comments

Comments

@vyasakash231
Copy link

vyasakash231 commented May 26, 2024

In the rollout() function, at https://github.com/rail-berkeley/rlkit/blob/master/rlkit/samplers/rollout_functions.py
A condition is given that if done is True, then terminal will also turn true.

    terminal = False
    if done:
        # terminal=False if TimeLimit caused termination
        if not env_info.pop('TimeLimit.truncated', False):
            terminal = True
    terminals.append(terminal)
    dones.append(done)
    actions.append(a)
    next_observations.append(next_o)
    raw_next_obs.append(next_o)
    agent_infos.append(agent_info)
    env_infos.append(env_info)
    path_length += 1
    if done:
        break

Now, in all of the .json files, it was specified that ignore_done=True, which means done is always false.

  "eval_environment_kwargs": {
    "control_freq": 20,
    "controller": "OSC_POSE",
    "env_name": "Lift",
    "hard_reset": false,
    "horizon": 500,
    "ignore_done": true,
    "reward_scale": 1.0,
    "robots": [
      "Sawyer"
    ]
  },
  "expl_environment_kwargs": {
    "control_freq": 20,
    "controller": "OSC_POSE",
    "env_name": "Lift",
    "hard_reset": false,
    "horizon": 500,
    "ignore_done": true,
    "reward_scale": 1.0,
    "robots": [
      "Sawyer"
    ]

Can anyone please explain this part?

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