mirror of
https://github.com/gryf/coach.git
synced 2025-12-17 19:20:19 +01:00
Enabling-more-agents-for-Batch-RL-and-cleanup (#258)
allowing for the last training batch drawn to be smaller than batch_size + adding support for more agents in BatchRL by adding softmax with temperature to the corresponding heads + adding a CartPole_QR_DQN preset with a golden test + cleanups
This commit is contained in:
@@ -84,7 +84,7 @@ class PALAgent(ValueOptimizationAgent):
|
||||
# calculate TD error
|
||||
TD_targets = np.copy(q_st_online)
|
||||
total_returns = batch.n_step_discounted_rewards()
|
||||
for i in range(self.ap.network_wrappers['main'].batch_size):
|
||||
for i in range(batch.size):
|
||||
TD_targets[i, batch.actions()[i]] = batch.rewards()[i] + \
|
||||
(1.0 - batch.game_overs()[i]) * self.ap.algorithm.discount * \
|
||||
q_st_plus_1_target[i][selected_actions[i]]
|
||||
|
||||
Reference in New Issue
Block a user