learners package¶
Submodules¶
learners.errors module¶
- class learners.errors.ErrorMessages[source]¶
Bases:
object
- static get(code: ErrorsCodes) str [source]¶
- class learners.errors.Errors[source]¶
Bases:
object
- static create_error(error_code: ErrorsCodes) LearnerResponse [source]¶
learners.learner module¶
- class learners.learner.Learner[source]¶
Bases:
object
- act(entry: ActEntry) LearnerResponse [source]¶
Implement the generic action decision from the state
- train(entry: LearningEntry) LearnerResponse [source]¶
Implement the generic train step from state, action and reward
learners.learner_sarsa_qtable module¶
- class learners.learner_sarsa_qtable.SarsaQTable(actions_n=2, alpha=0.01, beta=0.01, window_size=5, epsilon_start=0.9, epsilon_min=0.1, epsilon_decay=0.99, epsilon_decay_enabled=True, entry_missing_max_attempts=100, parameters_dict=None)[source]¶
Bases:
object
- PARAM_ACTIONS_N = 'actions_n'¶
- PARAM_ALPHA = 'alpha'¶
- PARAM_BETA = 'beta'¶
- PARAM_ENTRY_MISSING_MAX_ATTEMPTS = 'entry_missing_max_attempts'¶
- PARAM_EPSILON_DECAY = 'epsilon_decay'¶
- PARAM_EPSILON_DECAY_ENABLED = 'epsilon_decay_enabled'¶
- PARAM_EPSILON_MIN = 'epsilon_min'¶
- PARAM_EPSILON_START = 'epsilon_start'¶
- PARAM_WINDOW_SIZE = 'window_size'¶
- act(entry: ActEntry) LearnerResponse [source]¶
Returns the action that maximizes the q_sa
- train(entry: LearningEntry) LearnerResponse [source]¶