mirror of
https://github.com/gryf/coach.git
synced 2026-04-20 15:11:24 +02:00
Add is_on_policy property to agents (#480)
This commit is contained in:
@@ -77,6 +77,10 @@ class CategoricalDQNAgent(ValueOptimizationAgent):
|
||||
super().__init__(agent_parameters, parent)
|
||||
self.z_values = np.linspace(self.ap.algorithm.v_min, self.ap.algorithm.v_max, self.ap.algorithm.atoms)
|
||||
|
||||
@property
|
||||
def is_on_policy(self) -> bool:
|
||||
return False
|
||||
|
||||
def distribution_prediction_to_q_values(self, prediction):
|
||||
return np.dot(prediction, self.z_values)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user