graph LR
Reinforcement_Learning_Agent["Reinforcement Learning Agent"]
Policy_Network_Definition["Policy Network Definition"]
Reinforcement_Learning_Agent -- "uses" --> Policy_Network_Definition
The Reinforcement Learning Core subsystem is primarily encapsulated within the pgportfolio.learn package, specifically focusing on the nnagent.py and network.py modules. These modules contain the core logic for the reinforcement learning agent and its associated neural network.
This component serves as the central orchestrator for the deep reinforcement learning process. It manages the agent's lifecycle, including initialization, the training loop, and the decision-making process based on observed states. It embodies the "learner" aspect of the RL framework, applying the policy to make investment choices.
Related Classes/Methods:
pgportfolio.learn.nnagent.NNAgent:8-213pgportfolio.learn.nnagent.NNAgent:__init__pgportfolio.learn.nnagent.NNAgent:trainpgportfolio.learn.nnagent.NNAgent:__set_loss_functionpgportfolio.learn.nnagent.NNAgent:loss_function6pgportfolio.learn.nnagent.NNAgent:loss_function7pgportfolio.learn.nnagent.NNAgent:decide_by_history
This component is dedicated to defining, constructing, and managing the deep neural network architecture that serves as the policy network for the Reinforcement Learning Agent. It acts as the "model definition" or "architecture builder" within the RL core, providing the structure for the agent's learning capabilities.
Related Classes/Methods: