如何使用SWI Prolog在Aleph中获得更复杂的理论?

如何使用SWI Prolog在Aleph中获得更复杂的理论?,prolog,logic,swi-prolog,induction,aleph-ilp,Prolog,Logic,Swi Prolog,Induction,Aleph Ilp,我很想用Aleph得出一个理论,但我的大脑只有一个脑袋和一个身体,实际上我想要更多的身体 我的输入文件是: :- use_module(library(aleph)). :- if(current_predicate(use_rendering/1)). :- use_rendering(prolog). :- endif. :- aleph. :- modeh(*,attr2col(+attribute)). :- modeb(*,type(+attribute,-class)). :- mo

我很想用Aleph得出一个理论,但我的大脑只有一个脑袋和一个身体,实际上我想要更多的身体

我的输入文件是:

:- use_module(library(aleph)).
:- if(current_predicate(use_rendering/1)).
:- use_rendering(prolog).
:- endif.
:- aleph.
:- modeh(*,attr2col(+attribute)).
:- modeb(*,type(+attribute,-class)).
:- modeb(*,attrs(+class,+attribute)).

:-determination(attr2col/1, type/2).
:-determination(attr2col/1, attrs/2).


:-begin_bg.
class(clerk).
class(manager).
attribute(boss).
attribute(notype).
attribute(noattrs).
attrs(manager,boss).
attrs(manager,notype).
type(notype,manager).
type(boss,manager).
:-end_bg.

:-begin_in_pos.
attr2col(boss).
attr2col(notype).
:-end_in_pos.

:-begin_in_neg.
attr2col(clerk).
attr2col(manager).
:-end_in_neg.

:-aleph_read_all.
我的输出是:

attr2col(A) :-
   type(A,B).
我想要的是:

attr2col(A) :- attribute(A), attrs(B,A), type(A,C).
现在只有一具尸体,但我想要三具。
还有一个“属性(A)”,作为一个主体,如何仅用一个变量就可以添加这样的内容呢?

有几件事可以尝试:

  • 为谓词
    属性添加模式声明和确定

  • 在模式声明中尝试+和-的不同组合

  • 检查所需子句主体中的所有文本是否确实需要正确预测结果

  • 干杯/JCR