📄 maze.plg
字号:
% allow the addition of new paths as they are found.:-dynamic(path/1).% data describe movements in mazemove(a,b). move(b,c). move(c,d). move(c,e). move(e,f).% The simplest path is a single movementpath([X,Y]):-move(X,Y).% construct more complex paths from simpler paths and movementsgo([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 databaseassert_if_new(Fact):-clause(Fact,true),!; assert(Fact).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -