Skip to content
Snippets Groups Projects
Commit bc9e26f5 authored by Oleg Arenz's avatar Oleg Arenz
Browse files

new class for reward functions

parent 4491199f
Branches
No related tags found
No related merge requests found
from rewardFunctions.rewardFunction import RewardFunction
class LinearRewardFunction(RewardFunction):
def __init__(self, weights):
self.setParameters(weights)
def setParameters(self, parameters):
self.weights = parameters
def getReward(self, features):
reward = self.weights.dot(features)
class RewardFunction():
def getReward(self, features):
raise NotImplementedError( "RewardFunction does not provide getReward(self, features)" )
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment