Beispiel #1
0
    def __init__(self, gymEnvironment):
        """Class constructor.

        Arguments:
        gymEnvironment -- object compatible with interface of GymgymEnvironment class
        """
        Task.__init__(self, gymEnvironment)
Beispiel #2
0
 def performAction(self,action):
     #action is ( (p1.x,p1.y), (p2.x,p2.y) )
     '''
     A filtered mapping towards performAction of 
     the underlying environment.
     '''
     Task.performAction(self,action)
Beispiel #3
0
 def __init__(self, environment):
     '''
     Constructor
     '''
     Task.__init__(self, environment)
     self.__observationArray = [
         0, 0, 0, 0
     ]  # SalientItemDistance, SalientItemDirection, HeadingDirection, BlockedStatus
Beispiel #4
0
 def __init__(self, **args):
     self.setArgs(**args)
     Task.__init__(
         self,
         self.mazeclass(self.topology,
                        self.goal,
                        initPos=self.initPos,
                        stochObs=self.stochObs,
                        stochAction=self.stochAction))
     self.minReward = min(self.bangPenalty, self.defaultPenalty)
     self.reset()
Beispiel #5
0
 def performAction(self, jointAction):
     """ Execute joint action of all agents. """
     Task.performAction(self, jointAction)
Beispiel #6
0
 def __init__(self, environment):
     Task.__init__(self, environment)
Beispiel #7
0
 def performAction(self, action):
     """ Execute one action. """
     Task.performAction(self, action)
     self.addReward()
     self.samples += 1
 def performAction(self, action):
     Task.performAction(self, int(action[0]))
Beispiel #9
0
 def getObservation(self):
     '''
     A filtered mapping to getSample of the underlying environment.
     '''
     return Task.getObservation(self)
Beispiel #10
0
 def __init__(self, **args):
     self.setArgs(**args)
     Task.__init__(self, self.mazeclass(self.topology, self.goal, initPos=self.initPos,
                                        stochObs=self.stochObs, stochAction=self.stochAction))
     self.minReward = min(self.bangPenalty, self.defaultPenalty)
     self.reset()
Beispiel #11
0
 def performAction(self, action):
     Task.performAction(self, int(action[0]))
 def performAction(self, jointAction):
     """ Execute joint action of all agents. """
     Task.performAction(self, jointAction)
 def __init__(self, environment):
     Task.__init__(self,environment)