Esempio n. 1
0
 def __init__(self, solver):
     Policy.__init__(self, solver)
     self._name = 'FinishTimeFairness_Perf'
     self._isolated_policy = IsolatedPolicy()
     self._cumulative_isolated_time = {}
     self._isolated_throughputs_prev_iteration = {}
     self._num_steps_remaining_prev_iteration = {}
    def __init__(self, *args, **kwargs):
        # where the last action is recorded according
        # to its respective constants
        self.TURN = 2
        self.FORWARD = 1
        self.STOP = 0

        Policy.__init__(self, *args, **kwargs)
    def __init__(self, action_space, *args, **kwargs):
        self.time_steps = 0
        self.num_time_steps = 100

        kwargs['action_space'] = action_space
        Policy.__init__(self, *args, **kwargs)

        self.LEFT = 0
        self.RIGHT = 1
    def __init__(self, action_space, *args, **kwargs):
        # The last action is recorded according to its respective constants
        # these indices should be in order of action space
        self.FORWARD = 0
        self.TURN_RIGHT = 2
        self.TURN_LEFT = 1

        kwargs['action_space'] = action_space
        Policy.__init__(self, *args, **kwargs)
Esempio n. 5
0
    def __init__(self, interface, prog_args):
        Policy.__init__(self, interface)
        global policy
        assert policy is None
        policy = self

        import mainwindow
        self.window = mainwindow.MainWindow(prog_args)
        self.window.browser.set_root(policy.get_interface(policy.root))
    def __init__(self, epsilon, action_space, value_function, feature_indices,
                 *args, **kwargs):
        self.epsilon = epsilon

        self.value = value_function

        kwargs['action_space'] = action_space
        kwargs['value_function'] = value_function
        kwargs['feature_indices'] = feature_indices
        Policy.__init__(self, *args, **kwargs)
Esempio n. 7
0
    def __init__(self, det_policy_data: dict):
        """ Initialization : just inherits from Policy class.
        
            @param    det_policy_data    dict    Classic Policy data input.
        """

        Policy.__init__(self,
                        {s: {
                            a: 1.0
                        }
                         for s, a in det_policy_data.items()})
    def __init__(self, time_scale, action_space, value_function,
                 feature_indices, *args, **kwargs):
        self.TURN = 1
        self.FORWARD = 0

        self.time_scale = time_scale

        kwargs['action_space'] = action_space
        kwargs['value_function'] = value_function
        kwargs['feature_indices'] = feature_indices
        Policy.__init__(self, *args, **kwargs)
    def __init__(self, turn_repeat_percentage, *args, **kwargs):

        # self.forward_percentage = forward_percentage
        self.turn_repeat_percentage = turn_repeat_percentage

        # where the last action is recorded according
        # to its respective constants
        self.TURN = 2
        self.FORWARD = 1
        self.STOP = 0

        Policy.__init__(self, *args, **kwargs)
Esempio n. 10
0
 def __init__(self, solver):
     Policy.__init__(self, solver)
     self._name = 'MaxMinFairness_Perf'
     self._proportional_policy = ProportionalPolicy()
Esempio n. 11
0
 def __init__(self, solver):
     Policy.__init__(self, solver)
     self._name = 'ThroughputNormalizedByCostSum_PackingSLOs'
Esempio n. 12
0
    def __init__(self, action_space, fwd_action_index, *args, **kwargs):
        kwargs['action_space'] = action_space
        Policy.__init__(self, *args, **kwargs)

        self.pi *= 0.0
        self.pi[fwd_action_index] += 1.0
 def __init__(self, priority_reweighting_policies=None):
     WaterFillingAlgorithm.__init__(self, priority_reweighting_policies)
     Policy.__init__(self, solver=None)
     self._name = 'MaxMinFairnessWaterFilling_Perf'
     self._proportional_policy = ProportionalPolicy()