D4RL icon indicating copy to clipboard operation
D4RL copied to clipboard

In MuJoCo dataset, how can we figure out the beginning of each episode?

Open wsjeon opened this issue 4 years ago • 1 comments

Hi, I would like to use d4rl dataset for DICE scenarios, where sampling from initial states is required. I thought the termination flag could be helpful at first glance, but I've noticed from #34 that termination=False when an agent reaches the maximum length of episodes.

Is there another recommended method for this issue?

Thanks for your support in advance!

wsjeon avatar Dec 31 '20 23:12 wsjeon

If you're using the MuJoCo datasets, the timeouts flag will be set to true at the end of an episode, so you can use that to find the end of an episode.

You can also use this function to get an iterator through trajectories: https://github.com/rail-berkeley/d4rl/blob/master/d4rl/init.py#L138

justinjfu avatar Jan 08 '21 05:01 justinjfu