Louise can learn recursive programs one-shot:
% Single example given:
?- experiment_file:positive_example(list_last/2, E).
E = list_last([a, b, c, d, e, f, g, h|...], i).
?- learn(list_last/2).
list_last(A,B):-tail(A,C),list_last(C,B).
list_last(A,B):-tail(A,C),empty(C),head(A,B).
true.In the example above, the learned program consists of a
(
Read more... )