pantheonrl.common.agents.RecordingAgentWrapper
- class RecordingAgentWrapper(realagent)[source]
Bases:
AgentWrapper for an agent that records observation-action pairs.
Users can also use SimultaneousRecorder or TurnBasedRecorder (from wrappers.py) to record the transitions in an environment.
- Parameters:
realagent (Agent) – Agent that defines the behaviour of this actor
Methods
Return an action given an observation.
Return the transitions recorded by this agent.
Simply calls the realagent's update function
- get_action(obs)[source]
Return an action given an observation.
The output is the same as calling get_action on the realagent, but this wrapper also stores the observation-action pair to a buffer
- Parameters:
obs (Observation) – The observation to use
- Returns:
The action to take
- Return type:
ndarray