% simple_travel.lp % Gregory Gelfond #const max = 3. step(1..max). max_step(3). #domain step(Step). % objects vehicle(train). #domain vehicle(Vehicle). location(station). position(en_route). position(X) :- location(X). #domain position(Position; Position1; Position2). % fluents fluent(at(Vehicle,Position)). #domain fluent(Fluent). % dynamic causal laws h(at(Vehicle,en_route), Step + 1) :- Step < max, o(depart(Vehicle), Step). % state constraints -h(at(Vehicle,Position1), Step) :- h(at(Vehicle,Position2), Step), neq(Position1, Position2). % axioms of intent o(Action, Step) :- intended(Action, Step), not -o(Action, Step). intended(Action, Step + 1) :- Step < max, intended(Action, Step), -o(Action, Step). % inertia axioms h(Fluent, Step + 1) :- Step < max, h(Fluent, Step), not -h(Fluent, Step + 1). -h(Fluent, Step + 1) :- Step < max, -h(Fluent, Step), not h(Fluent, Step + 1).