Principle:Facebookresearch Habitat lab Agent Implementation
| Knowledge Sources | |
|---|---|
| Domains | Reinforcement_Learning, Software_Architecture |
| Last Updated | 2026-02-15 02:00 GMT |
Overview
The abstract agent interface that defines the contract for all agents interacting with Habitat environments through reset and act methods.
Description
Agent Implementation defines the minimal interface that any agent must satisfy to participate in Habitat evaluation. The `Agent` abstract base class requires two methods: `reset()` (called at episode start to clear internal state) and `act(observations)` (called each step to produce an action). This interface supports agents ranging from random baselines to trained neural network policies.
Usage
Implement the Agent interface when creating any agent for benchmarking, whether it is a simple heuristic, an oracle path follower, or a trained RL policy loaded from checkpoint.
Theoretical Basis
The agent interface follows the standard RL agent contract:
# Abstract agent interface
class Agent(ABC):
def reset(self) -> None:
"""Called at episode start. Clear internal state."""
def act(self, observations) -> action:
"""Given observations, produce an action."""
Implementations range from trivial (random actions) to complex (recurrent neural policies with hidden states).