📄 maze.bak
字号:
% allow the addition of new paths as they are found.
:-dynamic(path/1).
% data describe movements in maze
move(a,b). move(b,c). move(c,d). move(c,e). move(e,f).
% The simplest path is a single movement
path([X,Y]):-move(X,Y).
% construct more complex paths from simpler paths and movements
go([X,Y|Z]):-path([Y|Z]), move(X,Y),assert_if_new(path([X,Y|Z])), listing(path).
go:-go(Path), fail.
% add Fact to database if it is not already a Clause in the database
assert_if_new(Fact):-clause(Fact,true),!; assert(Fact).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -