vita-epfl / CrowdNav

[ICRA19] Crowd-aware Robot Navigation with Attention-based Deep Reinforcement Learning
MIT License
585 stars 169 forks source link

Questions about action sampling #9

Closed LeeKeyu closed 5 years ago

LeeKeyu commented 5 years ago

Hi, I have some questions about the following code in "build_action_space" function (in cadrl.py,line 82): *speeds = [(np.exp((i + 1) / self.speed_samples) - 1) / (np.e - 1) v_pref for i in range(self.speed_samples)] The comment said the actions were sampled uniformly**. Hence I cannot understand why the speeds are given by exponential function within (0,1]? Thank you very much!

ChanganVR commented 5 years ago

We experimented with both uniform and exponential sampling, the exponential gives slightly better performance. The intuitive reason is that exponential sampling yields samples with smaller speeds, which gives the agent more flexibility to control its actions. For example, when the distance from the goal to the robot is very small, it can stop exactly at the goal position rather than pass it due to the discrete action space.

LeeKeyu commented 5 years ago

Thank you, it makes sense.