Introduction
Reinforcement Learning (RL) has shown great promise in solving complex robotic control tasks. However, specifying high-level, time-sensitive requirements remains a significant challenge. While Signal Temporal Logic (STL) provides a powerful framework for expressing such constraints—for example, "visit the charging station every 15 minutes during a 2-hour mission"—its integration with standard RL algorithms is hindered by the "non-Markovian" nature of temporal logic.
The Challenge of Non-Markovian Rewards
In standard RL, the reward depends only on the current state and action. In contrast, satisfying an STL formula depends on the history of states. Previous attempts to address this used a $\tau$-MDP approach, which augments the state space with a sliding window of the last $\tau$ states. This leads to the "curse of history": the state space grows exponentially ($m^\tau$), rendering most real-world tasks computationally intractable.
The F-MDP Framework
To overcome this bottleneck, the authors propose the Flag-augmented MDP (F-MDP). Instead of storing raw state history, F-MDP utilizes a compact set of discrete "flag" variables ($f_i$) that track the partial satisfaction of logic sub-formulas.
- Logic-Based Compression: Flags act as a specialized memory, recording whether goals like "Eventually visit A" or "Always stay in B" have been met. This exploits the fact that the agent only needs to know if a sub-goal was satisfied, not the exact path taken.
- Recursive Update Rules: Flags are updated at each time step based solely on the current state and the previous flag value, maintaining the Markov property without the exponential overhead.
- Smooth Approximation: To facilitate optimization, the authors employ a "log-sum-exp" function to approximate the jagged satisfaction probability of complex logic, making the objective easier for standard Q-learning to solve.
Experimental Evaluation
The F-MDP approach was tested in two primary robotic scenarios to evaluate its efficiency and scalability.
Case Study 1: Reachability
In a 6x6 grid world, an agent must reach a designated target region within a specific time window. Figure 4 illustrates the environment and a successful trajectory learned by the agent using the F-MDP framework.
Case Study 2: Patrolling
This more complex scenario requires the agent to alternate between visiting two distinct regions, A and B, within a set periodicity over a long mission horizon. Figure 1 displays the resulting trajectories, showing how the agent successfully oscillates between the required zones to satisfy the STL objective.
Results and Discussion
The simulations demonstrate significant improvements in computational efficiency and scalability:
- Memory and Speed: In the patrolling task with a horizon of $\tau=5$, F-MDP reduced the state-space from 1,000,000 entries (required by $\tau$-MDP) to just 18,000. Consequently, training time dropped from 290 minutes to 18 minutes.
- Scalability: While the traditional $\tau$-MDP approach failed at a horizon of $\tau=6$ due to memory exhaustion, F-MDP completed the task in 24 minutes.
- Performance: The learned policies achieved a high degree of reliability, with a 99.6% satisfaction rate in reachability tests across 500 test trajectories.
Conclusion
F-MDP provides a tractable path for applying RL to complex temporal logic objectives. By replacing raw history with logic-aware flags, the method achieves polynomial state-space growth relative to the time horizon, enabling the solution of long-horizon tasks that were previously unsolvable. Future work will look toward extending this framework to continuous state spaces and more robust semantics.
Summary updated