pytorch-soft-actor-critic icon indicating copy to clipboard operation
pytorch-soft-actor-critic copied to clipboard

Action scale and action bias

Open shakenov-chinga opened this issue 5 years ago • 1 comments

Hi guys, You did a great job here! I'm trying to modify algorithms to my need, and I can't quite get two variables in neuron network classes. What are action_scale and action_bias variables, and why do you use it? Could you, please, reference them in the article?

Thanks

shakenov-chinga avatar Feb 20 '20 12:02 shakenov-chinga

Hi, in GaussianPolicy model, x_t sampled from the normal distribution is passed into a tanh for action bounding, in [-1, 1]. But in practice, the action space may be not in [-1, 1], ( [-2, 1] for example ), now the action_scale = 1.5 and action_bias = -0.5, to rescale [-1, 1] to [-2, 1].

gouxiangchen avatar Apr 18 '20 09:04 gouxiangchen