Exemplo n.º 1
0
 def getSensors(self):
     """ the currently visible state of the world (the observation may be 
         stochastic - repeated calls returning different values)
         @rtype: by default, this is assumed to be a numpy array of doubles
         @note: This function is abstract and has to be implemented.
     """
     abstractMethod()
Exemplo n.º 2
0
 def performAction(self, action):
     """ perform an action on the world that changes it's internal state (maybe stochastically) 
         @param action: an action that should be executed in the Environment, by an agent. 
         @type action: tuple: (agentID, action value)
         @note: This function is abstract and has to be implemented.
     """
     abstractMethod()
Exemplo n.º 3
0
 def performAction(self, action):
     """ perform an action on the world that changes it's internal state (maybe stochastically) 
         @param action: an action that should be executed in the Environment, by an agent. 
         @type action: tuple: (agentID, action value)
         @note: This function is abstract and has to be implemented.
     """
     abstractMethod()
Exemplo n.º 4
0
 def performAction(self, action):
     """ perform an action on the world that changes it's internal state (maybe stochastically) 
         @param action: an action that should be executed in the Environment. 
         @type action: by default, this is assumed to be a numpy array of doubles
         @note: This function is abstract and has to be implemented.
     """
     abstractMethod()
Exemplo n.º 5
0
 def getSensors(self):
     """ the currently visible state of the world (the observation may be 
         stochastic - repeated calls returning different values)
         @rtype: by default, this is assumed to be a numpy array of doubles
         @note: This function is abstract and has to be implemented.
     """
     abstractMethod()
Exemplo n.º 6
0
 def performAction(self, action):
     """ perform an action on the world that changes it's internal state (maybe stochastically) 
         @param action: an action that should be executed in the Environment. 
         @type action: by default, this is assumed to be a numpy array of doubles
         @note: This function is abstract and has to be implemented.
     """
     abstractMethod()
Exemplo n.º 7
0
 def train(self):
     """Train on the current dataset, for a single epoch."""
     abstractMethod()
 def _backwardImplementation(self, outerr, inerr, inbuf):
     abstractMethod()
Exemplo n.º 9
0
 def distributionLength(self):
     abstractMethod()
Exemplo n.º 10
0
 def getActionValues(self, state):
     abstractMethod()
Exemplo n.º 11
0
 def calculateGradient(self):
     abstractMethod()
Exemplo n.º 12
0
 def updater(self, pos, neg, poshb, neghb, posvb, negvb):
     abstractMethod()
Exemplo n.º 13
0
 def mutate(self, **args):
     """ Vary some properties of the underlying module, so that it's behavior 
     changes, (but not too abruptly). """
     abstractMethod()
Exemplo n.º 14
0
 def removeFromEnv(self, env):                   #Called upon removing
     abstractMethod()    
Exemplo n.º 15
0
 def sampler(self, probabilities):
     abstractMethod()
Exemplo n.º 16
0
 def updateState(self, env, dt):                 #dt in seconds
     abstractMethod()        
Exemplo n.º 17
0
 def draw(self, env):
     abstractMethod()
Exemplo n.º 18
0
 def position(self):
     abstractMethod()
Exemplo n.º 19
0
 def color(self):                                #Tuple of r, g, b
     abstractMethod()
Exemplo n.º 20
0
 def _initPhysics(self, *args):                           #Responsibility is on the superclasses to create a shape and body
     abstractMethod()        
Exemplo n.º 21
0
 def __call__(self, *args, **kwargs):
     """ @rtype: float """
     abstractMethod()
Exemplo n.º 22
0
 def updater(self, pos, neg, poshb, neghb, posvb, negvb):
     abstractMethod()
 def _updateWeights(self, state, action, reward, next_state):
     '''
     Expected to update Q-value approximator. 
     '''
     abstractMethod()
Exemplo n.º 24
0
 def _forwardImplementation(self, inbuf, outbuf):
     """Actual forward transformation function. To be overwritten in
     subclasses."""
     abstractMethod()
Exemplo n.º 25
0
 def calculateGradient(self):
     abstractMethod()
 def f(self, x):
     """ The function itself, to be defined by subclasses """
     abstractMethod()
Exemplo n.º 27
0
 def _learnStep(self):
     """ The core method to be implemented by all subclasses. """
     abstractMethod()        
Exemplo n.º 28
0
 def combine(self, classifiers, input):
     """Receives list of trained classifers """
     abstractMethod()
Exemplo n.º 29
0
 def produceOffspring(self):
     """ generate the new generation of offspring, given the current population, and their fitnesses """
     abstractMethod()
Exemplo n.º 30
0
 def _build(self, dataset):
     abstractMethod()
Exemplo n.º 31
0
 def learn(self):
     """ The main method, that invokes a learning step. """
     abstractMethod()
 def _forwardImplementation(self, inbuf, outbuf):
     abstractMethod()
Exemplo n.º 33
0
 def _getCombinedDistribution(self, distributionMatrix, numClassifiers):
     abstractMethod()
Exemplo n.º 34
0
 def initPopulation(self):
     """ initialize the population """
     abstractMethod()
Exemplo n.º 35
0
 def getDistribution(self, input):
     """Returns NumPy array of posterior distributions for each class."""
     abstractMethod()
Exemplo n.º 36
0
 def randomize(self):
     """ Sets all variable parameters to random values. """
     abstractMethod()
Exemplo n.º 37
0
 def isFinished(self):
     """ Is the current episode over? """
     abstractMethod()
Exemplo n.º 38
0
 def f(self, x):
     """ The function itself, to be defined by subclasses """
     abstractMethod()
Exemplo n.º 39
0
 def produceOffspring(self):
     """ generate the new generation of offspring, given the current population, and their fitnesses """
     abstractMethod()
Exemplo n.º 40
0
 def doMove(self, player, action):
     """ the core method to be implemented bu all TwoPlayerGames: 
     what happens when a player performs an action. """
     abstractMethod()
Exemplo n.º 41
0
 def _forwardImplementation(self, inbuf, outbuf):
     """Actual forward transformation function. To be overwritten in 
     subclasses."""
     abstractMethod()
Exemplo n.º 42
0
 def _learnStep(self):
     """ The core method to be implemented by all subclasses. """
     abstractMethod()        
Exemplo n.º 43
0
 def __call__(self, *args, **kwargs):
     """ @rtype: float """
     abstractMethod()
 def _qValues(self, state):
     """ Return vector of probability of policy for all actions, 
     given the state(-features). """
     abstractMethod()
Exemplo n.º 45
0
 def isFinished(self):
     """ Is the current episode over? """
     abstractMethod()
Exemplo n.º 46
0
 def topologyMutate(self):
     abstractMethod()
Exemplo n.º 47
0
 def sampler(self, probabilities):
     abstractMethod()
Exemplo n.º 48
0
 def learn(self):
     """ learn on the current dataset, for a single epoch
         @note: has to be implemented by all subclasses. """
     abstractMethod()
Exemplo n.º 49
0
 def getAction(self):
     """ Return a chosen action.
         :rtype: by default, this is assumed to ba a numpy array of doubles.
         :note: This method is abstract and needs to be implemented.
     """
     abstractMethod()
Exemplo n.º 50
0
 def doMove(self, player, action):
     """ the core method to be implemented bu all TwoPlayerGames: 
     what happens when a player performs an action. """
     abstractMethod()
Exemplo n.º 51
0
 def randomize(self):
     """ randomly set all variable parameters """
     abstractMethod()
Exemplo n.º 52
0
 def updateData(self):
     """ overwrite this class to update whatever data the renderer needs to display the current
         state of the world. """
     abstractMethod()
Exemplo n.º 53
0
 def getAction(self):
     """ return a chosen action.
         @rtype: by default, this is assumed to ba a numpy array of doubles.
         @note: This method is abstract and needs to be implemented.
     """
     abstractMethod()
Exemplo n.º 54
0
 def _render(self):
     """ Here, the render methods are called. This function has to be implemented by subclasses. """
     abstractMethod()
Exemplo n.º 55
0
 def getMaxAction(self, state):
     abstractMethod()
Exemplo n.º 56
0
 def learn(self):
     """ The main method, that invokes a learning step. """
     abstractMethod()
Exemplo n.º 57
0
 def getReward(self):
     """ Compute and return the current reward (i.e. corresponding to the last action performed) """
     return abstractMethod()
Exemplo n.º 58
0
 def initPopulation(self):
     """ initialize the population """
     abstractMethod()