Skip to content

PrioritizedBuffer

python_motion_planning.local_planner.dqn.PrioritizedBuffer

__init__(max_size, alpha=0.6, beta=0.4)

Priority replay buffer.

push(*experience)

Injecting an experience into the replay buffer.

Parameters:

Name Type Description Default
experience tuple

five-element tuple including state, action, reward, next_state and done flag

()

sample(batch_size)

Sampling a batch of data.

Parameters:

Name Type Description Default
batch_size int

the size of sampling batch

required

updatePriority(idx, td_error)

Updating priorities based on temporal-difference