rail-berkeley / rlkit

Collection of reinforcement learning algorithms
MIT License
2.51k stars 554 forks source link

collect_new_paths in mdppathcollector #138

Open Yuichi-Nakababayashi opened 3 years ago

Yuichi-Nakababayashi commented 3 years ago

I'm using this repository in my research project, I appreciate this project.

I have a question about a function 'collect_nwe_paths' in MdpPathCollector.

I think the condition to break while loop (while num_steps_collected < num_steps:) is not

 if (path_len != max_path_length and not path["terminals"][-1] and discard_incomplete_paths):

but

 if (path_len != max_path_length_this_loop and not path["terminals"][-1] and discard_incomplete_paths):

as this if condition is to tell if collected path should be discarded.

Glad if you could give me a reply.