Mode Declaration
alphaILP adopts mode declaration as a language bias.
Mode Declaration [Muggleton95, Ray07] is one of the common language
biases. We used mode declaration, which is defined as follows. A mode
declaration is either a head declaration
Muggleton, S.: Inverse Entailment and Progol. New Generation Computing, Special issue on Inductive Logic Programming 13(3-4), 245–286 (1995)
Ray, O., Inoue, K.: Mode-directed inverse entailment for full clausal theories. In: Proceedings of the 17th International Conference on Inductive Logic Programming (ILP). Lecture Notes in Computer Science, vol. 4894, pp. 225–238 (2007)
Mode declaration can be implemented using ModeDeclaration
class in
mode_declaration.py
.
For example, to solve Kandinsky patterns, the following mode declarations are defined:
where
Using ModeTerm
and DataType
class,
p_object = ModeTerm('+', DataType('object'))
s_color = ModeTerm('#', DataType('color'))
Then mode declaration ModeDeclaration('body', 1, lang.get_pred_by_name('color'), [p_object, s_color])
alphaILP defines a serch space by having a list of mode declarations to limit the clauses to be accepted as a candidate.