Skip to content

Commit

Permalink
Subtract the entropy to encourage exploration.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkDaoust authored Aug 30, 2018
1 parent 949b198 commit e9dbef6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion research/a3c_blogpost/a3c_cartpole.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def compute_loss(self,
policy_loss = tf.nn.sparse_softmax_cross_entropy_with_logits(labels=memory.actions,
logits=logits)
policy_loss *= tf.stop_gradient(advantage)
policy_loss = 0.01 * entropy
policy_loss -= 0.01 * entropy
total_loss = tf.reduce_mean((0.5 * value_loss + policy_loss))
return total_loss

Expand Down

0 comments on commit e9dbef6

Please sign in to comment.