agent

agent#

Agent Interface for implementing new agents.

Classes#

class prt_rl.agent.Agent(device: str = 'cpu')[source]#

Base class for all agents in the PRT-RL framework.

act(obs: Tensor, deterministic: bool = False) Tensor[source]#

Perform an action based on the current state.

Parameters:
  • obs (torch.Tensor) – The current observation from the environment.

  • deterministic (bool) – If True, the agent will select actions deterministically.

Returns:

The action to be taken.

Return type:

torch.Tensor