我正在尝试从解决约束满足问题的“计算智能书”中编译 csp.pl。我想以此为基础来解决填字游戏生成器。
但是当我尝试运行它给出的代码时
Existence error in user:remove/3
! procedure user:remove/3 does not exist
! goal: user:remove([1,2,3,4],3,_127)
| ?- :-
我认为 remove 不是内置谓词
% select(E,L,L1) selects the first element of
% L that matches E, with L1 being the remaining
% elements.
select(D,Doms,ODoms) :-
remove(D,Doms,ODoms), !.
% choose(E,L,L1) chooses an element of
% L that matches E, with L1 being the remaining
% elements.
choose(D,Doms,ODoms) :-
remove(D,Doms,ODoms).
这是代码的一部分......谁能帮我解决这个问题......代码应该执行,因为在教科书中它声称可以在某些程序上运行..
请帮忙