Skip to content
DeepForgeby svx
All problems

Continuous Action Target Entropy

Problem

Return the standard SAC target entropy for a continuous action space: the negative action dimensionality, -action_dim.

Hint

One nat of entropy per action dimension is the usual heuristic target.

Test cases

case 1
in: [1]
expected: -1
case 2
in: [3]
expected: -3
case 3
in: [6]
expected: -6
case 4
in: [0]
expected: 0
Starter codePython
def continuous_target_entropy(action_dim):
    # Your code here
    pass

4 test cases · run your code against them in the editor