1
$\begingroup$

I am working on a RL environment that requires both discrete and continuous actions as input from the agent. I currently have a fine implementation of DDPG which I would like to use for the continuous part. But what about the discrete actions? Can DDPG output both a continuous and a discrete action? Or should I rather turn to a different algorithm?

Thank you in advance.

$\endgroup$

1 Answer 1

1
$\begingroup$

How about discretizing the continuous output?

For a binary decision: $$ Binary(x) = \left\{\begin{array}{lr} 0, & \text{for } x < 0.5\\ 1, & \text{for } x \geq 0.5\\ \end{array}\right. $$

For more than two choices you could pass an array of continuous output values into a softmax function and select the maximum as your discrete action.

$\endgroup$
1
  • $\begingroup$ The variable I would like to keep continuous is an angle. Unfortunately, I already have discretised it and it did not help, since the optimum is probably close to some non-trivial angle value. $\endgroup$
    – franyx
    Nov 10, 2020 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.