1

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.

franyx
  • 11
  • 1

1 Answers1

1

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.

Tom Dörr
  • 331
  • 1
  • 5
  • 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. – franyx Nov 10 '20 at 10:43