1:-include(library('ec_planner/ec_test_incl')). 2:-expects_dialect(pfc). 3 % loading(always,'examples/Shanahan1997/Yale.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%; @article{HanksMcDermott:1987, 15%; author = "Steve Hanks and Drew V. McDermott", 16%; year = "1987", 17%; title = "Nonmonotonic logic and temporal projection", 18%; journal = "Artificial Intelligence", 19%; volume = "33", 20%; number = "3", 21%; pages = "379--412", 22%; } 23%; 24%; \fullciteA[pp. 322--323]{Shanahan:1997} 25%; 26%; @book{Shanahan:1997, 27%; author = "Murray Shanahan", 28%; year = "1997", 29%; title = "Solving the Frame Problem", 30%; address = "Cambridge, MA", 31%; publisher = "MIT Press", 32%; } 33%; 34%; deduction 35%; 36%; modifications from Shanahan's formulation: 37%; InitiallyP -> HoldsAt 38%; timestamps 39%; added [time] Terminates(Shoot(),Loaded(),time). 40%; 41 42% option showpred off 43:- set_ec_option(showpred, off). 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 Sneeze() 60 % event(sneeze()). 61==> mpred_prop(sneeze(),event). 62==> meta_argtypes(sneeze()). 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 75% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1997/Yale.e:49 76% [time] 77 % Initiates(Load(),Loaded(),time). 78axiom(initiates(load(), loaded(), Time), 79 []). 80 81 82% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1997/Yale.e:50 83% [time] 84 % HoldsAt(Loaded(),time) -> Terminates(Shoot(),Alive(),time). 85axiom(terminates(shoot(), alive(), Time), 86 [holds_at(loaded(), Time)]). 87 88 89% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1997/Yale.e:51 90% [time] 91 % Terminates(Shoot(),Loaded(),time). 92axiom(terminates(shoot(), loaded(), Time), 93 []). 94 95 96% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1997/Yale.e:53 97% HoldsAt(Alive(),0). 98axiom(initially(alive()), 99 []). 100 101 102% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1997/Yale.e:54 103% !HoldsAt(Loaded(),0). 104 % not(initially(loaded())). 105axiom(not(initially(loaded())), 106 []). 107 108 109% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1997/Yale.e:55 110% Happens(Load(),0). 111axiom(happens(load(), t), 112 [is_time(0)]). 113 114 115% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1997/Yale.e:56 116% Happens(Sneeze(),1). 117axiom(happens(sneeze(), start), 118 [is_time(1), b(t, start), ignore(t+1=start)]). 119 120 121% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1997/Yale.e:57 122% Happens(Shoot(),2). 123axiom(happens(shoot(), t2), 124 [is_time(2), b(t, t2), ignore(t+2=t2)]). 125 126% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1997/Yale.e:59 127% completion Happens 128% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1997/Yale.e:60 129==> completion(happens). 130 131% range time 0 3 132% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1997/Yale.e:62 133==> range(time,0,3). 134 135% range offset 1 1 136% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Shanahan1997/Yale.e:63 137==> range(offset,1,1). 138%; End of file.