Положительно, даже терпентин на что-нибудь полезен

Oct 20, 2024 23:52

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 recursive clause and a "base-case" that terminates the recursion. Both clauses were learned from the single provided example that neither clause suffices to prove on its own.

Note that this is true one-shot learning, from a single example of inputs and outputs of the target program, not examples of programs, and without pre-training on billions of examples or anything silly like that...
Они там и контекстно-свободную грамматику учат, и много другого.

И это не нейронки! ;)

PS
"Терпентин" здесь это Пролог. Оно на Прологе написано.

машинное обучение, Пролог

Previous post Next post
Up