1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-17 11:10:20 +01:00

Add is_on_policy property to agents (#480)

This commit is contained in:
Guy Jacob
2021-05-06 18:02:02 +03:00
committed by GitHub
parent 06bacd9de0
commit 9106b69227
21 changed files with 86 additions and 1 deletions

View File

@@ -120,6 +120,9 @@ class NECAgent(ValueOptimizationAgent):
Episode(discount=self.ap.algorithm.discount,
n_step=self.ap.algorithm.n_step,
bootstrap_total_return_from_old_policy=self.ap.algorithm.bootstrap_total_return_from_old_policy)
@property
def is_on_policy(self) -> bool:
return False
def learn_from_batch(self, batch):
if not self.networks['main'].online_network.output_heads[0].DND.has_enough_entries(self.ap.algorithm.number_of_knn):