Automated Vehicle (AV) agents

class RouteRL.environment.agent.MachineAgent(id, start_time, origin, destination, params, action_space_size)[source]

A class that models Autonomous Vehicles (AVs), focusing on their learning mechanisms and decision-making processes for selecting optimal routes.

act(observation) int[source]

Returns the agent’s action (route of choice) based on the current observation from the environment.

get_reward(observation: list[dict]) float[source]

This function calculated the reward of each individual agent, based on the travel time of the agent, the group of agents, the other agents, and all agents.

get_state(observation: list[dict]) list[int][source]

Generates the current state representation based on recent observations of agents navigating from the same origin to the same destination.

learn(action, observation) None[source]

Updates the agent’s knowledge based on the action taken and the resulting observations.