I am doing a Masters project on robotic sensorimotor online learning using reinforcement training methods (Q, sarsa, TD (Ξ»), Actor-Critic, R, etc.). I am currently developing a framework that will use both training with a higher level of training and the management of a lower level robot API.
Since the states depend on the robot sensor and can (will) increase exponentially, I will allocate them in a heap. Since this can create a lot of problems, errors, etc., And since parallelization (i.e. threads) is an aspect of gain training that I want to learn, I'm not sure which smart pointers to use.
Designing my own template / class for a smart pointer will take time and debugging, which I don't have. So, I am wondering if I should use STL auto_ptr ? I see that they have problems used in vectors. Should I use boost::shared_ptr ? States must be divided between many classes and algorithms. Or use boost::ptr_vector ? Since the states will be in the task container class in the vector, is this enough? States must be divided, copied, referenced, serializable, not permanent, thread safe and will not be deleted. In addition, memory space and computation time are important.
What do you recommend as the best smart ptr implementation for such a task?
Thanks!
It looks like I will have to try using boost :: ptr_vector with the State class, and if that turns out to be inefficient, use std :: vector <std :: unique_ptr> and turn on 0X. Thank you all for your answers and suggestions!
source share