prevision_quantum_nn.applications.reinforcement_learning_application
¶
Reinforcement Learning module provides with the class for reinforcement learning applications
Module Contents¶
Classes¶
Reinforcement Learning application. |
-
class
prevision_quantum_nn.applications.reinforcement_learning_application.
ReinforcementLearningApplication
(prefix='qnn', preprocessing_params=None, model_params=None, postprocessing_params=None, rl_learner_type='quantum')¶ Bases:
prevision_quantum_nn.applications.application.Application
Reinforcement Learning application.
-
value_function
¶ (str):type of the value function, can be either state or state_action
-
environment
¶ environment to be solved
- Type
gym.env or custom environment
-
num_acitons
¶ number of possible actions for the agent
- Type
int
-
build
(self)¶ Build the Application (learner, policy).
-
solve
(self, environment, tqdm_verbose=True, render=False)¶ Solves the problem given a certain environment.
- Parameters
environment (gym like env) – environment of RL app
tqdm_verbose (bool) – activates tqdm (optionnal)
render (bool) – activates rendering (optionnal)
-
preprocess_state
(self, state)¶ Preprocess the state.
- Parameters
state (int or state) – state, discrete or continuous
- Returns
- np.array
preprocessed state
- Return type
state
-