Specification-guided reinforcement learning (RL) translates formal specifications of desired behavior of agents into shaped rewards. This paper introduces SLICR, a significant paradigm shift that advances the state of the art to specification-guided RL in adversarial settings under partial observability. We employ Strategy Logic (SL), which allows explicit quantification over agents' strategies and uses the linear temporal logic (LTL) to specify the agents' objectives and constraints. This enables reasoning not only about how agents should act to satisfy a specification, but also about how they should respond to the strategies and behaviors of other agents. We evaluate SLICR on three popular benchmarks: Predator-Prey, Google Research Football, and our home-grown extension of SMAC-HARD, demonstrating its effectiveness, scalability, and ability to adapt to diverse adversarial strategies.
Figures & tables
Figure 1: Voyage Scenario.
Figure 2: Overview of SLICR . Solid lines apply during training and evaluation; dashed lines apply only during training.
Figure 3: Learning curves for SLICR and LIAM, showing the median and 25th–75th percentiles.
Figure 4
Figure 6: Learning Curve (PP)
SLICR
PP (# Single-Collision)
R2S (# Goal)
R2S-DEF (# Goal)
3m (WR%)
2s3z (WR%)
3s_vs_3z (WR%)
# Prms
S
U
# Prms
S
U
# Prms
S
U
# Prms
S
U
# Prms
S
U
# Prms
S
U
( ∀∗∃∗ )
250K
2765
2749
630K
47
37
630K
40
44
636K
99
89
748K
98
98
645K
100
86
( ∃∗∀∗ )
111K
2239
2369
334K
12
14
334K
24
12
445K
96
87
496K
98
92
451K
98
87
Table 1: Median performance of SLICR across SL fragments using the same inner-LTL specification and training budget. S , U , and WR denote Seen , Unseen , and win rate, respectively.
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
Hyperparameter
PP
GRF
SMAC-HARD
SMAC-HARD (IPPO)
Algorithm
A2C
PPO
PPO
IPPO
LSTM layers
1
1
1
1
LSTM hidden units
128
128
128
128
Hidden layers per actor/critic
2
3
3
3
Units per hidden layer
128
256
256
256
Hidden activation
ReLU
ReLU
ReLU
ReLU
Appendix
Table 2: Hyperparameters of the response function of SLICR . Learning rates refer to the actor–critic optimizer.
Setting
Seen
Unseen
Novel Strategy
ΠTrain :Sampled from 30 IPPO 12 D + 9 I + 9 F ΠTest : 30 fixed teams from IPPO
ΠTrain :Sampled from 30 IPPO 12 D + 9 I + 9 F ΠTest : 21 IPPO + 12 MAPPO
ΠTrain : 4 heuristic + 3 IA2C + 3 MADDPG ΠTest : New Composition from the Training set
Appendix
Table 3: Training and evaluation strategy sets in Predator–Prey. Each team contains three predators. D: direct pursuit; I: interception; F: flanking; S: spreading. Tactic counts denote distinct individual strategies.
Maps
Seen
Unseen
R2S
ΠTrain : 4 LB + 3 MB + 3 PR (IPPO). ΠTest : Same as training.
Table 4: Strategy sets in GRF. LB: low block; MB: medium block; PR: pressing; ZN: zonal. AId denotes a built-in AI task at difficulty d . Seen evaluation uses the training teams. Repeated AI tasks at the same difficulty use separate random streams; difficulty 0.7 is familiar in unseen R2S-4DEF evaluation.
Figure 7: Learning curves for SLICR and LIAM on PP with updated population set of strategies for opponents, showing the median number of single-collision of prey and predator and the 25th–75th percentiles.
Figure 8: Learning curves for SLICR and LIAM on SMAC-HARD, showing the median number of eliminated opponents (universally quantified) and the 25th–75th percentiles.
Figure 9: Learning curves for SLICR and LIAM on SMAC-HARD, showing the median number of eliminated Allied Agents (existentially quantified) and the 25th–75th percentiles.
Figure 10: Learning curves for SLICR ∀∗∃∗ vs. ∃∗∀∗ , showing the median and 25th–75th percentiles.
Figure 11: Performance gains from the shield under different proportions of irrational strategies.
Figure 12: Gain from inner-LTL guidance over shaped rewards on GRF R2S.
Figure 13: Gain from inner-LTL guidance over shaped rewards on 3m .
Figure 14: Gain from inner-LTL guidance over shaped rewards on SMAC-HARD 2s3z .
Reinforcement learning studies how agents learn sequential decisions from rewards and interaction, balancing exploration, performance, safety, and adaptation.
Specification-guided reinforcement learning (RL) provides a principled framework for encoding complex, temporally extended tasks using formal specifications such as linear temporal logic (LTL). While recent methods have shown promising results, their ability to generalize across unseen specifications and diverse environments remains insufficiently understood. In this work, we introduce SpecRLBench, a benchmark designed to evaluate the generalization capabilities of LTL-based specification-guided RL methods. The benchmark spans multiple difficulty levels across navigation and manipulation domains, incorporating both static and dynamic environments, diverse robot dynamics, and varied observation modalities. Through extensive empirical evaluation, we characterize the strengths and limitations of existing approaches and reveal the challenges that emerge as specification and environment complexity increase. SpecRLBench provides a structured platform for systematic comparison and supports the development of more generalizable specification-guided RL methods. Code is available at https://github.com/BU-DEPEND-Lab/SpecRLBench.
One fundamental challenge in reinforcement learning (RL) is enforcing temporal safety constraints, such as satisfying formal specifications. Existing methods often transform logic formulas into automata for state augmentation and reward shaping. However, this approach assumes that automaton construction is both feasible and tractable, which limits its applicability to small specifications and linear temporal logic (LTL). This paper proposes Actor-Predictor, a framework that learns a surrogate representation of logic progress without explicitly constructing an automaton. The predictor continuously estimates whether a partial trajectory will satisfy the formal specification in a later step, and its learned features are provided as auxiliary inputs to the actor, which is then optimized using GRPO and RWR. We show theoretically that, under sufficient predictive accuracy, the learned representation is equivalent to the automaton state. Experiments on grid world and robotic tasks in Isaac Lab demonstrate that Actor-Predictor outperforms automaton-based baselines on LTL-constrained tasks. It also performs well on non-regular formal specifications, such as (anbn), for which finite-automaton-based approaches are not applicable.
Multi-task generalization is an important yet underexplored problem in multi-agent reinforcement learning (MARL). Many real-world applications require multi-agent systems to generalize across complex, temporally extended tasks with diverse inter-agent coordination requirements. We introduce a specification language that combines temporal-logic task specifications with operators for expressing such requirements. We propose SpecMAGIC, a hierarchical framework that leverages the automaton structure of task specifications for subtask decomposition. A centralized high-level planner identifies and allocates compatible subtask sequences across agents, while decentralized low-level policies execute individual subtasks. This enables zero-shot generalization to new tasks by composing reusable subtask policies according to new specifications, without retraining. We establish soundness and probabilistic completeness of the high-level planner. Experiments on multi-agent navigation tasks show that SpecMAGIC substantially outperforms existing approaches on unseen task specifications and maintains strong performance as the number of agents increases.
Zijian Guo, İlker Işık, H. M. Sabbir Ahmad +1
Division of Systems Engineering, Boston University · Department of Electrical and Computer Engineering, Boston University