Added missing parameter
This commit is contained in:
parent
f1a52cf77b
commit
8c78f47c0c
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ class EpsilonGreedySelector(ArgMaxSelector):
|
||||||
# random_act is already implemented in ArgMaxSelector
|
# random_act is already implemented in ArgMaxSelector
|
||||||
# best_act is already implemented in ArgMaxSelector
|
# best_act is already implemented in ArgMaxSelector
|
||||||
def act(self, state):
|
def act(self, state):
|
||||||
action = self.random_act() if np.random.rand() < self.epsilon else self.best_act()
|
action = self.random_act() if np.random.rand() < self.epsilon else self.best_act(state)
|
||||||
if self.epsilon > self.epsilon_min:
|
if self.epsilon > self.epsilon_min:
|
||||||
self.epsilon = self.epsilon * self.epsilon_decay
|
self.epsilon = self.epsilon * self.epsilon_decay
|
||||||
return action
|
return action
|
Loading…
Reference in a new issue