def __init__(self, thymioController, commit_sha, debug=False, experimentName='NEAT_task', evaluations=EVALUATIONS, timeStep=0.005, activationFunction='tanh', popSize=POPSIZE, generations=GENERATIONS, solvedAt=1000): TaskEvaluator.__init__(self, thymioController, commit_sha, debug, experimentName, evaluations, timeStep, activationFunction, popSize, generations, solvedAt) self.camera = CameraVisionVectors(False, self.logger) self.ctrl_thread_started = False self.img_thread_started = False self.individuals_evaluated = 0 self.presenceValues = [] self.presence = [] self.prev_presence = [] self.conditionLock = Condition() self.motorLock = Lock() self.presenceValuesReady = False
def __init__( self, thymioController, commit_sha, local_ip, debug=False, experimentName=EXPERIMENT_NAME, evaluations=EVALUATIONS, timeStep=TIME_STEP, activationFunction=ACTIVATION_FUNC, popSize=POPSIZE, generations=GENERATIONS, solvedAt=SOLVED_AT, ): TaskEvaluator.__init__( self, thymioController, commit_sha, local_ip, debug, experimentName, evaluations, timeStep, activationFunction, popSize, generations, solvedAt, ) self.ctrl_thread_started = False self.sensors_max = pr.SENSORS_MAX[local_ip]
def __init__(self, thymioController, commit_sha, debug=False, experimentName=EXPERIMENT_NAME, evaluations=EVALUATIONS, timeStep=0.005, activationFunction='tanh', popSize=POPSIZE, generations=GENERATIONS, solvedAt=1000): TaskEvaluator.__init__(self, thymioController, commit_sha, debug, experimentName, evaluations, timeStep, activationFunction, popSize, generations, solvedAt) self.ctrl_thread_started = False self.hitWallCounter = 0 self.atWall = False self.log_wall_counter(experimentName) print "New obstacle avoidance task"
def __init__(self, thymioController, commit_sha, debug=False, experimentName='NEAT_task', evaluations=EVALUATIONS, timeStep=0.005, activationFunction='tanh', popSize=POPSIZE, generations=GENERATIONS, solvedAt=1000): TaskEvaluator.__init__(self, thymioController, commit_sha, debug, experimentName, evaluations, timeStep, activationFunction, popSize, generations, solvedAt) self.camera = CameraVisionVectors(False, self.logger) self.ctrl_thread_started = False self.img_thread_started = False self.individuals_evaluated = 0
def __init__(self, thymioController, commit_sha, local_ip, debug=False, experimentName=EXPERIMENT_NAME, evaluations=EVALUATIONS, timeStep=TIME_STEP, activationFunction=ACTIVATION_FUNC, popSize=POPSIZE, generations=GENERATIONS, solvedAt=SOLVED_AT): TaskEvaluator.__init__(self, thymioController, commit_sha, local_ip, debug, experimentName, evaluations, timeStep, activationFunction, popSize, generations, solvedAt) self.camera = CameraVisionVectors(False, self.logger) self.ctrl_thread_started = False self.img_thread_started = False self.individuals_evaluated = 0
def evaluate(self, evaluee): global ctrl_client if ctrl_client and not self.ctrl_thread_started: thread.start_new_thread(check_stop, (self,)) self.ctrl_thread_started = True return TaskEvaluator.evaluate(self, evaluee)
def evaluate(self, evaluee): global ctrl_client if ctrl_client and not self.ctrl_thread_started: thread.start_new_thread(check_stop, (self, )) self.ctrl_thread_started = True return TaskEvaluator.evaluate(self, evaluee)
def __init__(self, thymioController, commit_sha, local_ip, debug=False, experimentName=EXPERIMENT_NAME, evaluations=EVALUATIONS, timeStep=TIME_STEP, activationFunction=ACTIVATION_FUNC, popSize=POPSIZE, generations=GENERATIONS, solvedAt=SOLVED_AT): TaskEvaluator.__init__(self, thymioController, commit_sha, local_ip, debug, experimentName, evaluations, timeStep, activationFunction, popSize, generations, solvedAt) self.ctrl_thread_started = False self.sensors_max = pr.SENSORS_MAX[local_ip]
def evaluate(self, evaluee): global ctrl_client if ctrl_client and not self.ctrl_thread_started: thread.start_new_thread(check_stop, (self, )) self.ctrl_thread_started = True result = TaskEvaluator.evaluate(self, evaluee) self.write_wall_log() self.hitWallCounter = 0 self.atWall = False return result
def __init__(self, thymioController, commit_sha, debug=False): TaskEvaluator.__init__(self, thymioController, commit_sha, debug, EXPERIMENT_NAME, EVALUATIONS, TIME_STEP, ACTIVATION_FUNC, POPSIZE, GENERATIONS, SOLVED_AT) self.camera = CameraVisionVectors(False, self.logger) self.ctrl_thread_started = False self.img_thread_started = False self.individuals_evaluated = 0 self.presenceValues = [] self.presence = [] self.prev_presence = [] self.conditionLock = Condition() self.conditionGoalReached = Condition() self.motorLock = Lock() self.presenceValuesReady = False self.proxvalues = [-1, -1] self.goalReached = False self.puckRemoved = False self.hasPuck = False self.puckLostCounter = 0 self.goalReachedWaiter = 0 self.goalReachedCounter = 0
def __init__( self, thymioController, commit_sha, debug=False, experimentName="NEAT_task", evaluations=EVALUATIONS, timeStep=0.005, activationFunction="tanh", popSize=POPSIZE, generations=GENERATIONS, solvedAt=1000, ): TaskEvaluator.__init__( self, thymioController, commit_sha, debug, experimentName, evaluations, timeStep, activationFunction, popSize, generations, solvedAt, ) self.camera = CameraVisionVectors(False, self.logger) self.ctrl_thread_started = False self.img_thread_started = False self.individuals_evaluated = 0 self.presenceValues = [] self.presence = [] self.prev_presence = [] self.conditionLock = Condition() self.motorLock = Lock() self.presenceValuesReady = False