示例#1
0
 def __init__(self, centerBinEdges, simscript='./mock_rlRunExperiment.pl',
         resetscript='./mock_rlResetExperiment.pl'):
     Environment.__init__(self)
     self.centerBinEdges = centerBinEdges
     self.data = []
     self.actions = []
     self.numErrors = 0
     self.simscript = simscript 
     self.resetscript = resetscript
     self.discreteStates = True
     self.discreteActions = True
     self.numActions = 2
     self.numSensors = len(sensorValues)
     if self.centerBinEdges is None:
         self.numSensorBins = 1
     else:
         self.numSensorBins = len(self.centerBinEdges[0]) + 1
示例#2
0
 def __init__(self,
              centerBinEdges,
              simscript='./mock_rlRunExperiment.pl',
              resetscript='./mock_rlResetExperiment.pl'):
     Environment.__init__(self)
     self.centerBinEdges = centerBinEdges
     self.data = []
     self.actions = []
     self.numErrors = 0
     self.simscript = simscript
     self.resetscript = resetscript
     self.discreteStates = True
     self.discreteActions = True
     self.numActions = 2
     self.numSensors = len(sensorValues)
     if self.centerBinEdges is None:
         self.numSensorBins = 1
     else:
         self.numSensorBins = len(self.centerBinEdges[0]) + 1
示例#3
0
    def __init__(self, gymRawEnv):
        Environment.__init__(self)

        observationSpace = gymRawEnv.observation_space
        if type(observationSpace) == Discrete:
            self.outdim = 1
            self.discreteStates = True
            self.numStates = observationSpace.n

        actionSpace = gymRawEnv.action_space
        if type(actionSpace) == Discrete:
            self.indim = 1
            self.discreteActions = True
            self.numActions = actionSpace.n

        self.env = gymRawEnv
        self.observation = None
        self.reward = 0
        self.cumReward = 0
        self.done = True
        self.info = None
        self.transform = None
        self.doCumulative = False
        self.doRender = False
示例#4
0
文件: bicycle.py 项目: avain/pybrain
 def __init__(self):
     Environment.__init__(self)
     self.reset()
     self.actions = [0.0, 0.0]
     self._save_wheel_contact_trajectories = False
示例#5
0
文件: bicycle.py 项目: wsgan001/AI
 def __init__(self):
     Environment.__init__(self)
     self.reset()
     self.actions = [0.0, 0.0]
     self._save_wheel_contact_trajectories = False