JoeyAndres / rl

Reinforcement Learning library
2 stars 0 forks source link

Specialized for integral states and/or action. #20

Open JoeyAndres opened 7 years ago

JoeyAndres commented 7 years ago

In light of RL-#19, states and action are wrapped in shared_ptr. Specialized for integtral states and/or integral action. E.g. for StateAction<S, A>, we can have

template<>
class StateAction<rl::INT, rl::INT>;
using StateActionII = StateAction<rl::INT, rl::INT>;

template<class A>
class State<rl::INT, A>;
template<class A>
using StateActionIX = StateAction<rl::INT, A>;

template<class S>
class State<S, rl::INT>;
template<class S>
using StateActionXI = StateAction<S, rl::INT>;

As well as for rl::UINT.

This way, we can specialized and remove shared_ptr overhead for integral types.