示例#1
0
文件: task.py 项目: rwl/pyreto
    def performAction(self, action):
        """ Execute one action.
        """
#        print "ACTION:", action
        self.t += 1
        Task.performAction(self, action)
#        self.addReward()
        self.samples += 1
示例#2
0
 def performAction(self, action):
     """ Execute one action.
     """
     #        print "ACTION:", action
     self.t += 1
     Task.performAction(self, action)
     #        self.addReward()
     self.samples += 1
 def __init__(self, environment=None, groundTruthFile=None):
   Task.__init__(self, environment)
   if groundTruthFile is not None:
     self.groundTruth = cu.loadBoxIndexFile(groundTruthFile)
   self.image = ''
   self.epochRecall = []
   self.epochMaxIoU = []
   self.epochLandmarks = []
示例#4
0
    def performAction(self, action):
        """ The action vector is stripped and the only element is cast to integer and given
            to the super class.
        """

        # print("------ Action: %d ------" % (action))

        Task.performAction(self, int(action[0]))
示例#5
0
 def __init__(self, environment=None, groundTruthFile=None):
     Task.__init__(self, environment)
     if groundTruthFile is not None:
         self.groundTruth = cu.loadBoxIndexFile(groundTruthFile)
     self.image = ''
     self.epochRecall = []
     self.epochMaxIoU = []
     self.epochLandmarks = []
示例#6
0
 def __init__(self, env=ChemotaxisEnv()):
     """
     :key env: (optional) an instance of a ChemotaxisEnv (or a subclass thereof)
     """
     Task.__init__(self, env)
     
     self.actor_limits = [(-10,10), (-10,10)] # limit motor neurons
     self.sensor_limits = [(0,1), (0,1)] # no limit on sensor neurons
示例#7
0
    def performAction(self, action):
        """ The action vector is stripped and the only element is cast to integer and given
            to the super class.
        """

        # print("------ Action: %d ------" % (action))

        Task.performAction(self, int(action[0]))
 def performAction(self, action):
   Task.performAction(self, action)
示例#9
0
 def __init__(self, env):
     Task.__init__(self, env)
     self.last_reward = 0
示例#10
0
 def performAction(self, action):
     Task.performAction(self, int(action[0]))
示例#11
0
 def performAction(self, action):
     Task.performAction(self, action)
示例#12
0
 def __init__(self, environment, groundTruthFile):
     Task.__init__(self, environment)
     self.groundTruth = cu.loadBoxIndexFile(groundTruthFile)
     self.image = ''
     self.prevAction = 0
     self.prevPos = (0, 0, 0)
示例#13
0
 def performAction(self, action):
     """ The action vector is stripped and the only element is cast to integer and given
         to the super class.
     """
     # action = tuple of elements to swap
     Task.performAction(self, action)
 def performAction(self, action):
   #print 'MDPObjectLocalizerTask::performAction(',action,')'
   Task.performAction(self, action)
 def __init__(self, environment, groundTruthFile):
   Task.__init__(self, environment)
   self.groundTruth = cu.loadBoxIndexFile(groundTruthFile)
示例#16
0
 def performAction(self, action):
     """ The action vector is stripped and the only element is cast to integer and given
         to the super class.
     """
     Task.performAction(self, action)
示例#17
0
 def performAction(self, action):
     #print 'MDPObjectLocalizerTask::performAction(',action,')'
     Task.performAction(self, action)
示例#18
0
 def __init__(self, env, living, start_point = (0,0), max_samples = 5000):
     self.start_point = start_point
     self.living = living
     Task.__init__(self, env)
     self.max_samples = max_samples
 def __init__(self, environment, groundTruthFile):
   Task.__init__(self, environment)
   self.groundTruth = cu.loadBoxIndexFile(groundTruthFile)
   self.image = ''
   self.prevAction = 0
   self.prevPos = (0,0,0)
示例#20
0
 def performAction(self, action):
     Task.performAction(self, int(action[0]))
示例#21
0
 def __init__(self, environment, groundTruthFile):
     Task.__init__(self, environment)
     self.groundTruth = cu.loadBoxIndexFile(groundTruthFile)