class GraphAgent(ABC):
Known subclasses: rlgt.agents.deep_cross_entropy_agent.DeepCrossEntropyAgent, rlgt.agents.ppo_agent.PPOAgent, rlgt.agents.reinforce_agent.ReinforceAgent
This abstract class encapsulates the concept of a reinforcement learning agent for graph theory applications. Such an agent is intended to solve extremal problems in which a given graph invariant is to be maximized over a finite family of fully colored k-edge-colored looped complete graphs. The agent interacts iteratively with a reinforcement learning environment. The environment encodes the extremal problem, including the state representation, the available actions and the transition dynamics, while the agent is responsible for steering the learning process through successive decisions.
Any concrete subclass must implement the following abstract methods:
reset, which initializes or re-initializes the agent and prepares it to start the learning process; andstep, which performs a single iteration of the learning process.
In addition, any concrete subclass must implement the following abstract properties:
step_count, which returns the number of executed learning iterations;best_score, which returns the best value of the target graph invariant achieved so far; andbest_graph, which returns a graph attaining that best value.
| Method | reset |
This abstract method must be implemented by any concrete subclass. It must initialize the agent and prepare it to begin the learning process. If the agent has been used previously, invoking this method must reset all internal state so that the learning restarts from scratch. |
| Method | step |
This abstract method must be implemented by any concrete subclass. It must perform a single iteration of the learning process, which may involve one or more interactions between the agent and the environment... |
| Property | best |
This abstract property must be implemented by any concrete subclass. It must return a graph attaining the best value of the target graph invariant achieved so far. If at least one learning iteration has been executed, the result must be returned as a ... |
| Property | best |
This abstract property must be implemented by any concrete subclass. It must return the best value of the target graph invariant achieved so far. If at least one learning iteration has been executed, the value is returned as a ... |
| Property | step |
This abstract property must be implemented by any concrete subclass. It must return the number of learning iterations executed so far. If the agent has been initialized, the returned value must be a nonnegative ... |
rlgt.agents.deep_cross_entropy_agent.DeepCrossEntropyAgent, rlgt.agents.ppo_agent.PPOAgent, rlgt.agents.reinforce_agent.ReinforceAgentThis abstract method must be implemented by any concrete subclass. It must initialize the agent and prepare it to begin the learning process. If the agent has been used previously, invoking this method must reset all internal state so that the learning restarts from scratch.
rlgt.agents.deep_cross_entropy_agent.DeepCrossEntropyAgent, rlgt.agents.ppo_agent.PPOAgent, rlgt.agents.reinforce_agent.ReinforceAgentThis abstract method must be implemented by any concrete subclass. It must perform a single iteration of the learning process, which may involve one or more interactions between the agent and the environment. This iteration should update the agent's internal state and improve its policy or decision-making strategy based on the observed outcomes.
rlgt.agents.deep_cross_entropy_agent.DeepCrossEntropyAgent, rlgt.agents.ppo_agent.PPOAgent, rlgt.agents.reinforce_agent.ReinforceAgentThis abstract property must be implemented by any concrete subclass. It must return a graph
attaining the best value of the target graph invariant achieved so far. If at least one
learning iteration has been executed, the result must be returned as a Graph object.
Otherwise, if no iterations have been executed or the agent has not been initialized, the
value None must be returned.
rlgt.agents.deep_cross_entropy_agent.DeepCrossEntropyAgent, rlgt.agents.ppo_agent.PPOAgent, rlgt.agents.reinforce_agent.ReinforceAgentThis abstract property must be implemented by any concrete subclass. It must return the
best value of the target graph invariant achieved so far. If at least one learning
iteration has been executed, the value is returned as a float. If the agent has been
initialized but no iterations have yet been executed, the value −∞ must be returned. If the
agent has not been initialized, the value None must be returned.