hungry.pro

来自「prolog开发工具」· PRO 代码 · 共 28 行

PRO
28
字号
/*                         HUNGRY.PRO                          */

run1 :-
    warplan([ available(secretary) ],
            [ not_hungry ]).

precond(visit(cafeteria),       [ can_locate(cafeteria)]).
precond(visit(vending_machine), [ can_locate(vending_machine),
                                  have(change)]).
precond(visit(office),          []).
precond(visit(secretary),       [ can_locate(secretary),
                                  available(secretary)]).
precond(visit(colleague),       []).

imposs([hungry,not_hungry]).

del(visit(cafeteria),       hungry).
del(visit(vending_machine), hungry).

add(visit(cafeteria),       not_hungry).
add(visit(colleague),       can_locate(_)).
add(visit(office),          can_locate(_)).
add(visit(office),          have(change)).
add(visit(secretary),       can_locate(_)).
add(visit(secretary),       have(change)).
add(visit(vending_machine), not_hungry).

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?