Event calculus planner
The event
calculus planner by Murray Shanahan solves event calculus
abduction and planning problems using abductive logic
programming.
-
Download and install SWI-Prolog.
-
Download gensym.pl.
-
Download planner42.txt.
-
Using a text editor, create a file axioms.pl containing
event calculus axioms. A sample axioms file is as follows:
axiom(initiates(wake_up(X),awake(X),T),[]).
axiom(terminates(fall_asleep(X),awake(Y),T),[]).
axiom(initially(neg(awake(nathan))),[]).
abducible(dummy).
executable(wake_up(X)).
executable(fall_asleep(X)).
-
Start Prolog by typing pl.
-
Load the above files by typing the following into Prolog:
load_files(['gensym.pl','planner42.txt','axioms.pl']).
-
Type a goal such as the following into Prolog:
abdemo([holds_at(awake(nathan),t)],R).
Given the above axioms and goal, the planner produces the following plan:
R = [[happens(wake_up(nathan), t1, t1)], [before(t1, t)]]
Commonsense Reasoning home page