1:-include(library('ec_planner/ec_test_incl')). 2:-expects_dialect(pfc). 3 % loading(always,'examples/Shanahan1999/RussianTurkey.e').
4%;
5%; Copyright (c) 2005 IBM Corporation and others.
6%; All rights reserved. This program and the accompanying materials
7%; are made available under the terms of the Common Public License v1.0
8%; which accompanies this distribution, and is available at
9%; http://www.eclipse.org/legal/cpl-v10.html
10%;
11%; Contributors:
12%; IBM - Initial implementation
13%;
14%; @book{Sandewall:1994,
15%; author = "Sandewall, Erik",
16%; year = "1994",
17%; title = "Features and Fluents: The Representation of Knowledge about Dynamical Systems",
18%; volume = "I",
19%; address = "Oxford",
20%; publisher = "Oxford University Press",
21%; }
22%;
23%; @incollection{Shanahan:1999,
24%; author = "Shanahan, Murray",
25%; year = "1999",
26%; title = "The Event Calculus explained",
27%; editor = "Michael J. Wooldridge and Manuela M. Veloso",
28%; booktitle = "Artificial Intelligence Today: Recent Trends and Developments",
29%; series = "Lecture Notes in Computer Science",
30%; volume = "1600",
31%; pages = "409--430",
32%; address = "Berlin",
33%; publisher = "Springer",
34%; }
35%;
36%; model finding
37%;
38%; modifications from Shanahan's formulation:
39%; InitiallyP -> HoldsAt
40%; added [time] Terminates(Shoot(),Loaded(),time).
41%; added !HoldsAt(Loaded(),0) to prune models
42%; timestamps
43%;
44
45% load foundations/Root.e
46
47% load foundations/EC.e
48
49% event Load()
50 % event(load()).
51==> mpred_prop(load(),event).
52==> meta_argtypes(load()).
53
54% event Shoot()
55 % event(shoot()).
56==> mpred_prop(shoot(),event).
57==> meta_argtypes(shoot()).
58
59% event Spin()
60 % event(spin()).
61==> mpred_prop(spin(),event).
62==> meta_argtypes(spin()).
63
64% fluent Loaded()
65 % fluent(loaded()).
66==> mpred_prop(loaded(),fluent).
67==> meta_argtypes(loaded()).
68
69% fluent Alive()
70 % fluent(alive()).
71==> mpred_prop(alive(),fluent).
72==> meta_argtypes(alive()).
73
74
77 78axiom(initiates(load(), loaded(), Time),
79 []).
80
81
84 85axiom(terminates(shoot(), alive(), Time),
86 [holds_at(loaded(), Time)]).
87
88
91 92axiom(releases(spin(), loaded(), Time),
93 []).
94
95
98 99axiom(terminates(shoot(), loaded(), Time),
100 []).
101
102
105axiom(initially(alive()),
106 []).
107
108
111 112axiom(not(initially(loaded())),
113 []).
114
115
118axiom(happens(load(), start),
119 [is_time(1), b(t, start), ignore(t+1=start)]).
120
121
124axiom(happens(spin(), t2),
125 [is_time(2), b(t, t2), ignore(t+2=t2)]).
126
127
130axiom(happens(shoot(), t3),
131 [is_time(3), b(t, t3), ignore(t+3=t3)]).
132
133% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1999/RussianTurkey.e:61
134% completion Happens
135% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1999/RussianTurkey.e:62
136==> completion(happens).
137
138% range time 0 4
139% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1999/RussianTurkey.e:64
140==> range(time,0,4).
141
142% range offset 1 1
143% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1999/RussianTurkey.e:65
144==> range(offset,1,1).