Distributed Control using Reinforcement Learning with Temporal-Logic-Based Reward Shaping

Ningyuan Zhang, Wenliang Liu, Călin Belta · DOI

Abstract: We present a computational framework for synthesis of distributed control strategies for a heterogeneous team of robots in a partially observable environment. The goal is to cooperatively satisfy specifications given as Truncated Linear Temporal Logic (TLTL) formulas. Our approach formulates the synthesis problem as a stochastic game and employs a policy graph method to find a control strategy with memory for each agent. We construct the stochastic game on the product between the team transition system and a finite state automaton (FSA) that tracks the satisfaction of the TLTL formula. We use the quantitative semantics of TLTL as the reward of the game, and further reshape it using the FSA to guide and accelerate the learning process. Simulation results demonstrate the efficacy of the proposed solution under demanding task specifications and the effectiveness of reward shaping in significantly accelerating the speed of learning.

Introduction

In real-world applications, robotic teams rarely possess a global view of their environment. Instead, they operate under partial observability, relying on local sensors to make decisions. Coordinating a heterogeneous team to perform complex, multi-stage missions—such as "Service Area A, then Area B, but only if Area C was handled first"—presents a significant challenge for standard Reinforcement Learning (RL).

Typically, RL relies on simple reward signals that are often "sparse," providing feedback only at the end of a long mission. This makes it difficult for agents to identify which specific actions led to success or failure. This paper introduces a framework that bridges formal logic and RL to provide immediate, mathematically grounded feedback to agents operating in a Partially Observable Stochastic Game (POSG).

Methodology

The proposed framework integrates several key components to enable complex logical reasoning within a multi-agent learning environment:

  1. Truncated Linear Temporal Logic (TLTL): Unlike standard Boolean logic, TLTL provides "quantitative semantics" or robustness. This allows the system to measure not just if a goal was satisfied, but how close the agents came to satisfying it.
  2. FSPA-Augmented POSG: The logical task is represented as a Finite State Predicate Automaton (FSPA), which serves as a mission flowchart. By embedding this automaton directly into the environment's state space, the RL algorithm can track mission progress in real-time.
  3. Policy Graphs: To overcome the limitations of partial observability, each agent utilizes a policy graph (a finite state machine with memory). This enables robots to retain information from past observations, which is critical for sequential tasks.
  4. Novel Reward Shaping: The researchers introduced two primary reward terms to guide the agents:
  5. Robustness Reward ($r_\rho$): Quantifies an individual agent's specific contribution to the team's overall progress, addressing the "credit assignment" problem.
  6. Potential Energy Reward ($r_J$): Uses the FSPA to calculate a "distance to completion," providing a continuous gradient that guides agents toward the next logical step in the mission.
The Finite State Predicate Automaton (FSPA) tracks the logical progression of the mission, defining transitions between states based on robot actions and environmental conditions.

Experimental Setup

The framework was evaluated using a custom 5x5 Grid World simulation. The scenario involves two heterogeneous robots ($r_1, r_2$) tasked with servicing three requests ($\sigma_1, \sigma_2, \sigma_3$).

The 5x5 Grid World environment features two robots and three target regions. Region $\sigma_3$ represents a shared task that requires coordination and prerequisite completion of $\sigma_1$ or $\sigma_2$.

The mission logic dictates that $\sigma_3$ is a shared task requiring both robots to be present simultaneously. Furthermore, $\sigma_3$ cannot be completed until either $\sigma_1$ or $\sigma_2$ has been successfully serviced. The performance of the shaped reward approach was benchmarked against a baseline using only sparse rewards and a "memoryless" agent configuration.

Key Insights and Results

The simulation results demonstrate that reward shaping and memory are essential for solving complex logical tasks in partially observable environments:

  • The Necessity of Memory: "Memoryless" agents, which only react to their current immediate view, achieved a 0% success rate. Without the ability to remember previous task completions, they could not progress through the logical sequence.
  • Convergence and Reliability: Using the full suite of reshaped rewards ($r_\rho + r_J$), agents reached the optimal policy in 83.0% of trials, compared to only 70.2% for the sparse reward baseline.
  • Learning Acceleration: The potential energy reward ($r_J$) acted as a directional guide, preventing agents from becoming trapped in locally "good" states that did not lead to mission completion. This significantly reduced variance and allowed agents to identify the most efficient paths much earlier in the training process.
  • Successful Coordination: The agents successfully learned to coordinate on the shared task ($\sigma_3$) only after satisfying the prerequisite conditions, proving that the temporal logic was effectively integrated into their learned behaviors.

Conclusion and Future Work

While the framework shows great promise, the authors identify several areas for future development. The current training process is centralized, which may limit scalability for very large robot swarms. Additionally, the model assumes mostly deterministic transitions; future research will aim to incorporate non-deterministic stochastic games to better reflect the messiness of real-world physics. Finally, exploring more advanced optimization algorithms like Proximal Policy Optimization (PPO) could further stabilize the learning process and prevent agents from missing optimal paths due to large gradient steps.

Summary updated

BibTeX
@misc{zhang2022distributed,
  author = {Ningyuan Zhang and Wenliang Liu and Călin Belta},
  title = {{Distributed Control using Reinforcement Learning with Temporal-Logic-Based Reward Shaping}},
  year = {2022},
  eprint = {2203.04172},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.04172},
}
Figure