Safe Reinforcement Learning via Probabilistic Logic Shields
About
Safe Reinforcement learning (Safe RL) aims at learning optimal policies while staying safe. A popular solution to Safe RL is shielding, which uses a logical safety specification to prevent an RL agent from taking unsafe actions. However, traditional shielding techniques are difficult to integrate with continuous, end-to-end deep RL methods. To this end, we introduce Probabilistic Logic Policy Gradient (PLPG). PLPG is a model-based Safe RL technique that uses probabilistic logic programming to model logical safety constraints as differentiable functions. Therefore, PLPG can be seamlessly applied to any policy gradient algorithm while still providing the same convergence guarantees. In our experiments, we show that PLPG learns safer and more rewarding policies compared to other state-of-the-art shielding techniques.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Sudoku Solving | Sudoku 2x2 | Final Reward-0.5 | 14 | |
| N-Queens Problem | N-Queens N=6 | Final Reward1 | 7 | |
| N-Queens Problem | N-Queens N=8 | Final Reward1 | 7 | |
| Graph Coloring | Graph Coloring G3 | Final Reward0.1 | 7 | |
| Visual Sudoku Solving | Visual Sudoku 3x3 | Final Reward-0.4 | 7 | |
| Visual Sudoku Solving | Visual Sudoku 4x4 | Final Reward-0.5 | 7 | |
| Visual Sudoku Solving | Visual Sudoku 5x5 | Final Reward-1.4 | 7 | |
| Graph Coloring | Graph Coloring G1 | Final Reward0.2 | 7 | |
| N-Queens Problem | N-Queens N=4 | Final Reward0.1 | 7 | |
| Sudoku Solving | Sudoku 4x4 | Final Reward-2.2 | 7 |