def getAction(self): """ activates the module with the last observation and stores the result as last action. """ # get greedy action action = LearningAgent.getAction(self) # explore by chance if random.random() < self.epsilon: action = array([random.randint(self.module.numActions)]) # reduce epsilon self.epsilon *= self.epsilondecay return action