Python baselines.common.schedules.LinearSchedule() Examples

The following are 1 code examples of baselines.common.schedules.LinearSchedule(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module baselines.common.schedules , or try the search function .
Example #1
Source File: replay_buffers.py    From qmap with MIT License 6 votes vote down vote up
def __init__(self, size, alpha, epsilon, timesteps, initial_p, final_p):
        super(DoublePrioritizedReplayBuffer, self).__init__(size)
        assert alpha > 0
        self._alpha = alpha
        self._epsilon = epsilon
        self._beta_schedule = LinearSchedule(timesteps, initial_p=initial_p, final_p=final_p)
        it_capacity = 1
        while it_capacity < size:
            it_capacity *= 2

        self._it_sum = SumSegmentTree(it_capacity)
        self._it_min = MinSegmentTree(it_capacity)
        self._max_priority = 1.0

        self._it_sum2 = SumSegmentTree(it_capacity)
        self._it_min2 = MinSegmentTree(it_capacity)
        self._max_priority2 = 1.0