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

@@ -71,6 +71,10 @@ class DQNAgent(ValueOptimizationAgent):
def __init__(self, agent_parameters, parent: Union['LevelManager', 'CompositeAgent']=None):
super().__init__(agent_parameters, parent)
@property
def is_on_policy(self) -> bool:
return False
def select_actions(self, next_states, q_st_plus_1):
return np.argmax(q_st_plus_1, 1)