|
bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
|
The ExperienceBuffer class. A buffer based on boost::circular_buffer to accumulate items of type ExperienceType. see for example the A2C algorithm in A2C.h and rl_example_15. More...
#include <experience_buffer.h>


Public Types | |
| typedef ExperienceType | value_type |
| typedef ExperienceType | experience_type |
| typedef boost::circular_buffer< ExperienceType >::iterator | iterator |
| typedef boost::circular_buffer< ExperienceType >::const_iterator | const_iterator |
| typedef boost::circular_buffer< ExperienceType >::reverse_iterator | reverse_iterator |
| typedef boost::circular_buffer< ExperienceType >::const_reverse_iterator | const_reverse_iterator |
Static Public Attributes | |
| static const uint_t | DEFAULT_CAPACITY = 100 |
The ExperienceBuffer class. A buffer based on boost::circular_buffer to accumulate items of type ExperienceType. see for example the A2C algorithm in A2C.h and rl_example_15.
| typedef boost::circular_buffer<ExperienceType>::const_iterator bitrl::utils::ExperienceBuffer< ExperienceType >::const_iterator |
| typedef boost::circular_buffer<ExperienceType>::const_reverse_iterator bitrl::utils::ExperienceBuffer< ExperienceType >::const_reverse_iterator |
| typedef ExperienceType bitrl::utils::ExperienceBuffer< ExperienceType >::experience_type |
| typedef boost::circular_buffer<ExperienceType>::iterator bitrl::utils::ExperienceBuffer< ExperienceType >::iterator |
| typedef boost::circular_buffer<ExperienceType>::reverse_iterator bitrl::utils::ExperienceBuffer< ExperienceType >::reverse_iterator |
| typedef ExperienceType bitrl::utils::ExperienceBuffer< ExperienceType >::value_type |
| bitrl::utils::ExperienceBuffer< ExperienceTp >::ExperienceBuffer | ( | ) |
|
explicit |
| void bitrl::utils::ExperienceBuffer< ExperienceTp >::append | ( | const experience_type & | experience | ) |
append Add the experience item in the buffer
|
inline |
|
inline |
|
inlinenoexcept |
capacity
|
inlinenoexcept |
clear
|
inlinenoexcept |
empty. Returns true if the buffer is empty
|
inline |
|
inline |
| ContainerType bitrl::utils::ExperienceBuffer< ExperienceType >::get | ( | ) | const |
Copy the contents of the buffer to the given container.
| void bitrl::utils::ExperienceBuffer< ExperienceType >::get | ( | ContainerType & | container | ) | const |
Copy the contents of the buffer to the given container.
|
inline |
operator []
| idx |
|
inline |
operator []
| idx |
|
inline |
|
inline |
|
inline |
|
inline |
| void bitrl::utils::ExperienceBuffer< ExperienceTp >::resize | ( | uint_t | new_size, |
| const experience_type & | item = experience_type() |
||
| ) |
Resize the buffer.
| void bitrl::utils::ExperienceBuffer< ExperienceTp >::sample | ( | uint_t | batch_size, |
| BatchTp & | batch, | ||
| uint_t | seed = 42 |
||
| ) | const |
sample. Sample batch_size experiences from the buffer and transfer them in the BatchTp container.
|
inlinenoexcept |
size
|
static |