NeSy MiniHack
Neurosymbolic RL with Probabilistic Logic Shields
Reinforcement learning agents can learn impressive policies, but they often exhibit unsafe behaviour during both training and deployment. In this project, we integrate neurosymbolic AI with reinforcement learning by using probabilistic logic programs as shields to guide the agent towards safe behaviour in MiniHack, a challenging procedurally-generated roguelike environment based on NetHack.
The probabilistic logic shield, written in ProbLog, encodes domain knowledge about dangerous situations (e.g., lava, monsters) and intervenes on the agent’s action selection to prevent unsafe actions. This allows the agent to learn faster and die significantly less during training compared to an unshielded baseline.
This project won the Best Technical Demonstration Award at AAAI 2025.
With Shield (Safe)
Without Shield (Unsafe)
resources
- Code: ML-KULeuven/nesy-minihack
- Video: YouTube demo
- Project page: dtai.cs.kuleuven.be