Inductive Logic Programming for Heuristic Search

Published in Accepted at both IJCLR 2025 (5th International Joint Conference on Learning & Reasoning) and the ICAPS 2025 Workshop on Planning and Reinforcement Learning (PRL), 2025

This paper learns cost-to-go heuristic functions as logic programs, combining interpretable symbolic structure with effective A* search performance.

Why it matters

  • Heuristic search depends on accurate cost-to-go functions to efficiently solve pathfinding problems.
  • Deep neural network heuristics are not explainable, making knowledge extraction difficult.
  • It has not been shown how to learn heuristic functions represented as logic programs.
  • Explainable heuristics could enable structured knowledge discovery from domains such as puzzles, robotics, or chemistry.
  • Learning heuristics directly as logic programs may combine interpretability with search effectiveness.

What we did

  • Propose an algorithm to learn cost-to-go heuristic functions as logic programs using dynamic programming and ILP.
  • Use A* search (multi-step lookahead) to compute updated heuristic values instead of one-step Bellman updates.
  • Represent the heuristic as a dictionary mapping cost-to-go values to learned logic programs.
  • Introduce predicate reuse, where rules learned for smaller depths are reused to learn deeper cost-to-go rules.
  • Evaluate on the 8-puzzle (181,440 solvable states), showing improved accuracy with larger samples (for example, median R² up to 0.6925 with 2,000 states) and up to 100% optimal solutions when used with A* (Table I).
Figure showing R² and MSE trends versus number of sampled states, with and without predicate reuse.
Figure 1. Heuristic accuracy improves as the number of sampled states increases, and predicate reuse consistently improves performance.

As shown in Figure 1, increasing the number of sampled states improves R² and reduces MSE, with predicate reuse yielding more accurate heuristics in most settings.

How it works

  • Represent the heuristic as a dictionary mapping cost-to-go values to logic programs.
  • Use A* to compute updated path costs for sampled states (multi-step lookahead).
  • Convert updated values into positive and negative ILP examples for a target cost-to-go.
  • Learn a logic program for each depth using Popper.
  • Reuse previously learned clauses as background knowledge to build higher-cost rules.

Key contributions

  • Introduce an algorithm to learn heuristic functions as logic programs via dynamic programming and ILP.
  • Propose predicate reuse to incrementally construct deeper cost-to-go rules.
  • Show that increasing sample size improves heuristic accuracy (for example, median R² up to 0.6925 with 2,000 states).
  • Demonstrate that learned heuristics achieve up to 100% optimal solutions under A* search (Table I).
States (hour/s)Predicate ReuseLenNodesSecsNodes/SecSolved (%)Optimal (%)
181440 (1 hour)Yes17.27118.33155.581.0290.0100.0
181440 (0.5 hours)No17.731357.49117.6111.6598.0100.0
181440 (1 hour)No17.731332.29132.5910.2198.0100.0
181440 (2 hours)No17.73560.1897.546.0098.0100.0
181440 (4 hours)No17.73499.61111.394.5398.0100.0
181440 (8 hours)No17.73347.7691.183.8998.0100.0
181440 (120 hours)No17.92112.2890.431.33100.0100.0
Table I. Learned logic heuristics guide A* to high optimal solve rates.

Table I shows that the learned heuristic achieves up to 100% optimal solutions (learned for 181,440 states).

Recommended citation: Rojina Panta*, Vedant Khandelwal*, Celeste Veronese, Amit Sheth, Daniele Meli, and Forest Agostinelli. (2025). "Inductive Logic Programming for Heuristic Search." Accepted at both IJCLR 2025 (5th International Joint Conference on Learning & Reasoning) and the ICAPS 2025 Workshop on Planning and Reinforcement Learning (PRL). (* Equal contribution)
Download Paper | Download Slides