Stable-baselines: [Question] DDPG action space symmetric?

Created on 27 Nov 2018  路  5Comments  路  Source: hill-a/stable-baselines

Hi again,
Why does the action space need to be symmetric in DDPG learning?

question

Most helpful comment

DDPG uses tanh before output (so its output lies in [-1, 1]) and then this output is rescaled.
Because of that, it can only handles symmetric action spaces.

All 5 comments

DDPG uses tanh before output (so its output lies in [-1, 1]) and then this output is rescaled.
Because of that, it can only handles symmetric action spaces.

okay. Is it not possible to just remap; e.g. [-1, 1] --> [0 , 1]?

Well, nothing prevent you from doing that in your env.

@araffin Why not just rescale the agent's actions within the agent code to fit the bounds of the action space? Seems like it would make the agent code more generic.

Any reason that you couldn't just apply a linear transformation?

def rescale_actions(tanh_output, low, high):
    range = high - low
    return tanh_output * range / 2 + (low + (0.5 * range))

yes, I agree with @csaroff , it's cumbersome to do it ourselves

Was this page helpful?
0 / 5 - 0 ratings