agent_base
BaseAgent Objects
class BaseAgent(AgentInterface)
BaseAgent class The base agent is a simple implementation of the AgentInterface. It is used to create an agent that only uses a strategy to make decisions.
__init__
def __init__(strategy: StrategyInterface | None,
agent_helper: AgentHelperInterface,
metric_helper: MetricHelperInterface)
Init
Arguments:
strategy
StrategyInterface - The strategy that the agent will use to make decisionsagent_helper
AgentHelperInterface - A helper that provides access to the agent's statemetric_helper
MetricHelperInterface - A helper that provides access to the agent's metrics and functions to log new ones
agent_initialization
def agent_initialization(simulation_state: SimulationStateHelperInterface)
Initialization of the agent
Arguments:
simulation_state
SimulationStateHelperInterface - A helper that provides access to the simulation's state
agent_pre_step
def agent_pre_step(simulation_state: SimulationStateHelperInterface)
Pre step of the agent
Arguments:
simulation_state
SimulationStateHelperInterface - A helper that provides access to the simulation's state
agent_step
def agent_step(environment_helper: EnvironmentHelperInterface,
simulation_state: SimulationStateHelperInterface)
Step of the agent
Arguments:
environment_helper
EnvironmentHelperInterface - A helper that provides access to the environmentsimulation_state
SimulationStateHelperInterface - A helper that provides access to the simulation's state
agent_post_step
def agent_post_step(simulation_state: SimulationStateHelperInterface)
Post step of the agent
Arguments:
simulation_state
SimulationStateHelperInterface - A helper that provides access to the simulation's state
agent_teardown
def agent_teardown(simulation_state: SimulationStateHelperInterface)
Teardown of the agent
Arguments:
simulation_state
SimulationStateHelperInterface - A helper that provides access to the simulation's state