remember method
Implementation
void remember(
List<double> state,
int action,
double reward,
List<double> nextState,
) {
if (_states.length >= memoryCapacity) {
_states.removeAt(0);
_actions.removeAt(0);
_rewards.removeAt(0);
_nextStates.removeAt(0);
}
_states.add(state);
_actions.add(action);
_rewards.add(reward);
_nextStates.add(nextState);
}