# Learning programs with magic values

arXiv: https://arxiv.org/abs/2208.03238 · HTML: https://mlsanity.com/paper/2208.03238/

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Builds on 15 of its 53 references that are in the map.
- First posted on arXiv 5 Aug 2022.

## Builds on (most cited first, 15 of 15)

- [Learning Explanatory Rules from Noisy Data](https://mlsanity.com/paper/1711.04574/) (2017)
- [Inductive logic programming at 30: a new introduction](https://mlsanity.com/paper/2008.07912/) (2020)
- [Learning programs by learning from failures](https://mlsanity.com/paper/2005.02259/) (2020)
- [Clingo = ASP + Control: Preliminary Report](https://mlsanity.com/paper/1405.3694/) (2014)
- [Turning 30: New Ideas in Inductive Logic Programming](https://mlsanity.com/paper/2002.11002/) (2020)
- [Making sense of sensory input](https://mlsanity.com/paper/1910.02227/) (2019)
- [Program Synthesis using Conflict-Driven Learning](https://mlsanity.com/paper/1711.08029/) (2017)
- [Synthesizing Datalog Programs Using Numerical Relaxation](https://mlsanity.com/paper/1906.00163/) (2019)
- [Logical reduction of metarules](https://mlsanity.com/paper/1907.10952/) (2019)
- [Inductive general game playing](https://mlsanity.com/paper/1906.09627/) (2019)
- [Learning Higher-Order Programs without Meta-Interpretive Learning](https://mlsanity.com/paper/2112.14603/) (2021)
- [Exploiting Answer Set Programming with External Sources for Meta-Interpretive Learning](https://mlsanity.com/paper/1805.00068/) (2018)
- [Predicate Invention by Learning From Failures](https://mlsanity.com/paper/2104.14426/) (2021)
- [Globally Optimal Symbolic Regression](https://mlsanity.com/paper/1710.10720/) (2017)
- [Learning Logic Programs From Noisy Failures](https://mlsanity.com/paper/2201.03702/) (2021)

## Built on by (most cited first, 2 of 2)

- [Relational program synthesis with numerical reasoning](https://mlsanity.com/paper/2210.00764/) (2022)
- [Satisfiability Modulo Theory Meets Inductive Logic Programming](https://mlsanity.com/paper/2512.12918/) (2025)

## Abstract (arXiv)

A magic value in a program is a constant symbol that is essential for the execution of the program but has no clear explanation for its choice. Learning programs with magic values is difficult for existing program synthesis approaches. To overcome this limitation, we introduce an inductive logic programming approach to efficiently learn programs with magic values. Our experiments on diverse domains, including program synthesis, drug design, and game playing, show that our approach can (i) outperform existing approaches in terms of predictive accuracies and learning times, (ii) learn magic values from infinite domains, such as the value of pi, and (iii) scale to domains with millions of constant symbols.
