Introduction
Reinforcement Learning (RL) traditionally depends on meticulously defined reward functions. However, crafting these functions is often difficult, particularly for tasks involving high-dimensional inputs like pixels or goals that are hard to formalize in code. While "Preference Learning"—where humans compare clips of agent behavior—offers an alternative, it frequently suffers from poor sample complexity. Humans often spend time comparing irrelevant or equally poor behaviors because they lack direct control over the agent's exploration. This paper introduces an interactive framework that allows non-technical users to design complex agent behaviors by constructing a hierarchy of "behavioral primitives."
Methodology: Building Behavioral Primitives
The proposed system enables users to "steer" the learning process through an iterative three-component workflow.
- Defining Goal States: The user reviews videos of the agent (initially exhibiting random behavior) and labels specific frames as "interesting" or desirable (e.g., the lander being level). A neural network discriminator is then trained to recognize these states.
- Training Behavioral Primitives: Using the discriminator's output as a reward signal, the system employs Proximal Policy Optimization (PPO) to train a "primitive" policy. This policy is designed to consistently reach the identified goal state, such as a "stabilize" behavior.
- Demonstration via Primitives: The user then performs the task by selecting from these primitives as high-level actions. The interface provides previews (rollouts) of what each primitive would do from the current state, allowing the user to choose the most effective path forward.
This architecture is extensible; once a complex behavior is mastered through human demonstration, it can be integrated back into the library as a new primitive for even more sophisticated tasks.
Key Results
The framework was evaluated using the Lunar Lander environment from OpenAI Gym. The system was trained using approximately 400 human-labeled frames per goal state and just 8 human-demonstrated episodes.
The results demonstrate significant improvements in both performance and human efficiency:
- High Success Rate: The resulting policy achieved a successful landing rate of over 90%.
- Human Efficiency: The entire training process required only 15 minutes of human interaction and 90 minutes of total compute time.
- Comparison to Baselines: Standard preference learning (DRLHP) succeeded in only one out of three runs within the same human time constraints, often failing to progress beyond basic hovering. Imitation learning (DAgger) was more robust but frequently resulted in crashes or missed targets.
Discussion and Future Work
A key insight from this research is the value of the human as an "architect" rather than just a labeler. By constructing the agent's behavioral vocabulary, exploration becomes much more efficient. Furthermore, showing "short-term futures" via rollouts reduces cognitive load and enables more precise demonstrations.
However, some challenges remain. Surprisingly, combining behavioral cloning with preference learning led to worse performance than preference learning alone, suggesting a need for better integration of these signals. Additionally, current primitives operate on fixed timesteps; future work will explore variable-timescale primitives that terminate based on environmental conditions. Finally, while effective in 2D environments, scaling this approach to 3D tasks with abstract goals remains an open research question.
Summary updated