def act(self, location, population, params, master):
    '\n\t\tMove end effector to the given location\n\t\t'
    valid = True
    past = self.current
    self.current = location
    if (((population % self.config['record_iterations']) == 0) and master):
        print('Recording')
        try:
            self.arm.ikine(location)
            timestamp = datetime.now().strftime('%m-%d-%Y_%H-%M-%S')
            training_path = (self.training_directory + '/records/')
            try:
                os.makedirs(training_path)
            except OSError as e:
                if (e.errno != errno.EEXIST):
                    raise
            record_path = (((training_path + 'pop_') + str(population)) + '.npy')
            video_path = (((training_path + 'pop_') + str(population)) + '.mp4')
            self.arm.save_path(record_path)
            self.env.animate(duration=5.0, save_path=video_path)
            np.save(((training_path + 'net_') + str(population)), params)
        except ValueError as e:
            valid = False
            logging.warn('Could not solve IK for position: {}'.format(location[0]))
    return valid
Move end effector to the given location
def act(self, location, population, params, master):
    '\n\t\t\n\t\t'
    valid = True
    past = self.current
    self.current = location
    if (((population % self.config['record_iterations']) == 0) and master):
        print('Recording')
        try:
            self.arm.ikine(location)
            timestamp = datetime.now().strftime('%m-%d-%Y_%H-%M-%S')
            training_path = (self.training_directory + '/records/')
            try:
                os.makedirs(training_path)
            except OSError as e:
                if (e.errno != errno.EEXIST):
                    raise
            record_path = (((training_path + 'pop_') + str(population)) + '.npy')
            video_path = (((training_path + 'pop_') + str(population)) + '.mp4')
            self.arm.save_path(record_path)
            self.env.animate(duration=5.0, save_path=video_path)
            np.save(((training_path + 'net_') + str(population)), params)
        except ValueError as e:
            valid = False
            logging.warn('Could not solve IK for position: {}'.format(location[0]))
    return valid