Introduction
In traditional reinforcement learning (RL), agents typically aim to maximize a simple scalar reward. However, many real-world robotic tasks require satisfying complex specifications, such as "visit region A, then B, while always avoiding C." These requirements are naturally expressed using Linear Temporal Logic (LTL). While methods exist for solving LTL-constrained Markov Decision Processes (MDPs) when transition probabilities are known, they often fail in "black-box" environments where dynamics must be learned from scratch.
This paper introduces a model-based RL framework that extends the Probably Approximately Correct (PAC) learning paradigm to MDPs with LTL constraints. The proposed approach ensures that an agent can learn a near-optimal policy with high confidence using a sample size that grows only polynomially with the environment's size and task complexity.
The LearnAndSynthesize Algorithm
The core of the proposed solution is the LearnAndSynthesize algorithm. It integrates formal verification with PAC-MDP learning through several key steps:
- Automata-Based Control: The LTL specification is first converted into a Deterministic Rabin Automaton (DRA). This automaton is then synchronized with the agent's current model of the environment to form a Product MDP.
- State Classification: The algorithm distinguishes between "known" and "unknown" state-action pairs. A pair is considered known only after it has been visited enough times to estimate its transition probabilities within a specified error bound.
- Optimism Under Uncertainty: To encourage exploration, the algorithm treats unknown states as highly desirable. Specifically, transitions from unknown states are redirected to a virtual "sink state" that is part of an accepting condition in the product MDP. This "optimism in the face of uncertainty" ensures the agent explores unknown regions that might lead to satisfying the LTL goal.
- Iterative Policy Synthesis: The agent follows a $T$-step optimal policy derived from the current model. If it encounters an unknown state, it updates its model and re-synthesizes the policy. Once all reachable states are known, the policy is guaranteed to be $\epsilon$-optimal with probability at least $1-\delta$.
Experimental Evaluation
The authors evaluated LearnAndSynthesize on two primary benchmarks: a small 8-state MDP used as a running example and a more complex 10x10 gridworld simulation. The gridworld features four terrain types—pavement, grass, gravel, and sand—each with distinct slip probabilities. The robot's task was to navigate to specific surveillance cells in a particular order while avoiding hazardous areas.
Key Results and Insights
- Sample Efficiency: In the gridworld scenario, the algorithm successfully identified the environment's dynamics in approximately 155,000 steps. Remarkably, it required only four policy updates for the entire gridworld, demonstrating the efficiency of the model-based approach.
- Convergence and Optimality: For various error tolerances ($\epsilon$ ranging from 0.01 to 0.05), the algorithm consistently converged to the optimal policy. Empirical results showed that the actual error was often much lower than the theoretical PAC bounds.
- Polynomial Complexity: A significant theoretical contribution is the proof that while LTL-to-DRA conversion can be exponential, the learning complexity remains polynomial relative to the size of the resulting DRA.
- Simulation Lemma for LTL: The authors derived a specialized "Simulation Lemma" for $T$-step state values in product MDPs, which bounds how estimation errors in transition probabilities impact the probability of satisfying the LTL goal.
Conclusion and Future Work
The LearnAndSynthesize algorithm provides a provably efficient way to learn complex behaviors in unknown stochastic environments. By combining the PAC-MDP framework with formal LTL synthesis, it bridges the gap between high-level task specification and low-level reinforcement learning.
Future research directions include extending this framework to two-player stochastic games to handle adversarial environments and incorporating Safe RL techniques. While the current algorithm eventually finds a safe policy, ensuring safety during the exploration phase remains a critical challenge for real-world deployment.
Summary updated