1:-include(library('ec_planner/ec_test_incl')).    2:-expects_dialect(pfc).    3 %  loading(always,'examples/AkmanEtAl2004/ZooTest4.2.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{Akman:2004,
   15%;   author = "Varol Akman and Selim T. Erdogan and Joohyung Lee and Vladimir Lifschitz and Hudson Turner",
   16%;   year = "2004",
   17%;   title = "Representing the zoo world and the traffic world in the language of the causal calculator",
   18%;   journal = "Artificial Intelligence",
   19%;   volume = "153",
   20%;   pages = "105--140",
   21%; }
   22%;
   23
   24% option encoding 3
   25:- set_ec_option(encoding, 3).   26
   27% load foundations/Root.e
   28
   29% load foundations/EC.e
   30
   31% load examples/AkmanEtAl2004/ZooWorld.e
   32
   33% human Homer
   34==> t(human,homer).
   35
   36% elephant Jumbo
   37==> t(elephant,jumbo).
   38
   39
   40% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:29
   41% Species(Homer)=HumanSpecies.
   42species(homer,humanSpecies).
   43
   44
   45% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:30
   46% Adult(Homer).
   47adult(homer).
   48
   49
   50% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:31
   51% Species(Jumbo)=ElephantSpecies.
   52species(jumbo,elephantSpecies).
   53
   54
   55% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:32
   56% Adult(Jumbo).
   57adult(jumbo).
   58
   59
   60% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:34
   61% !HoldsAt(Opened(GateAO),0).
   62 %  not(initially(opened(gateAO))).
   63axiom(not(initially(opened(gateAO))),
   64    []).
   65% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:35
   66% {position} 
   67
   68
   69% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:35
   70% HoldsAt(Pos(Homer,position),0) & Outside=Loc(position).
   71
   72 /*   exists([Position],
   73              (holds_at(pos(homer, Position), 0), outside=loc(Position))).
   74 */
   75
   76 /*  not(some(Some_Param, '$kolem_Fn_69')) :-
   77       (   not(holds_at(pos(homer, Some_Param), 0))
   78       ;   not(equals(outside, loc(Some_Param)))
   79       ).
   80 */
   81axiom(not(some(Some_Param, '$kolem_Fn_69')),
   82    [not(holds_at(pos(homer, Some_Param), t))]).
   83axiom(not(some(Some_Param, '$kolem_Fn_69')),
   84    [not(equals(outside, loc(Some_Param)))]).
   85
   86 /*  holds_at(pos(homer, Some_Param3), 0) :-
   87       some(Some_Param3, '$kolem_Fn_69').
   88 */
   89axiom(holds_at(pos(homer, Some_Param3), t),
   90    [some(Some_Param3, '$kolem_Fn_69')]).
   91
   92 /*  equals(outside, loc(Some_Param4)) :-
   93       some(Some_Param4, '$kolem_Fn_69').
   94 */
   95axiom(equals(outside, loc(Some_Param4)),
   96    [some(Some_Param4, '$kolem_Fn_69')]).
   97% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:36
   98% {position} 
   99
  100
  101% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:36
  102% HoldsAt(Pos(Jumbo,position),0) & CageA=Loc(position).
  103
  104 /*   exists([Position],
  105              (holds_at(pos(jumbo, Position), 0), cageA=loc(Position))).
  106 */
  107
  108 /*  not(some(Some_Param, '$kolem_Fn_70')) :-
  109       (   not(holds_at(pos(jumbo, Some_Param), 0))
  110       ;   not(equals(cageA, loc(Some_Param)))
  111       ).
  112 */
  113axiom(not(some(Some_Param, '$kolem_Fn_70')),
  114    [not(holds_at(pos(jumbo, Some_Param), t))]).
  115axiom(not(some(Some_Param, '$kolem_Fn_70')),
  116    [not(equals(cageA, loc(Some_Param)))]).
  117
  118 /*  holds_at(pos(jumbo, Some_Param3), 0) :-
  119       some(Some_Param3, '$kolem_Fn_70').
  120 */
  121axiom(holds_at(pos(jumbo, Some_Param3), t),
  122    [some(Some_Param3, '$kolem_Fn_70')]).
  123
  124 /*  equals(cageA, loc(Some_Param4)) :-
  125       some(Some_Param4, '$kolem_Fn_70').
  126 */
  127axiom(equals(cageA, loc(Some_Param4)),
  128    [some(Some_Param4, '$kolem_Fn_70')]).
  129% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:38
  130% {position} 
  131
  132
  133% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:38
  134% HoldsAt(Pos(Homer,position),5) & CageA=Loc(position).
  135
  136 /*   exists([Position],
  137              (holds_at(pos(homer, Position), 5), cageA=loc(Position))).
  138 */
  139
  140 /*  not(some(Some_Param, '$kolem_Fn_71')) :-
  141       (   not(holds_at(pos(homer, Some_Param), 5))
  142       ;   not(equals(cageA, loc(Some_Param)))
  143       ).
  144 */
  145axiom(not(some(Some_Param, '$kolem_Fn_71')),
  146    [not(holds_at(pos(homer, Some_Param), t5)), b(t, t5), ignore(t+5=t5)]).
  147axiom(not(some(Some_Param, '$kolem_Fn_71')),
  148    [not(equals(cageA, loc(Some_Param)))]).
  149
  150 /*  holds_at(pos(homer, Some_Param3), 5) :-
  151       some(Some_Param3, '$kolem_Fn_71').
  152 */
  153axiom(holds_at(pos(homer, Some_Param3), t5),
  154    [some(Some_Param3, '$kolem_Fn_71'), b(t, t5), ignore(t+5=t5)]).
  155
  156 /*  equals(cageA, loc(Some_Param4)) :-
  157       some(Some_Param4, '$kolem_Fn_71').
  158 */
  159axiom(equals(cageA, loc(Some_Param4)),
  160    [some(Some_Param4, '$kolem_Fn_71')]).
  161% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:39
  162% {position} 
  163
  164
  165% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:39
  166% HoldsAt(Pos(Jumbo,position),5) & Outside=Loc(position).
  167
  168 /*   exists([Position],
  169              (holds_at(pos(jumbo, Position), 5), outside=loc(Position))).
  170 */
  171
  172 /*  not(some(Some_Param, '$kolem_Fn_72')) :-
  173       (   not(holds_at(pos(jumbo, Some_Param), 5))
  174       ;   not(equals(outside, loc(Some_Param)))
  175       ).
  176 */
  177axiom(not(some(Some_Param, '$kolem_Fn_72')),
  178    [not(holds_at(pos(jumbo, Some_Param), t5)), b(t, t5), ignore(t+5=t5)]).
  179axiom(not(some(Some_Param, '$kolem_Fn_72')),
  180    [not(equals(outside, loc(Some_Param)))]).
  181
  182 /*  holds_at(pos(jumbo, Some_Param3), 5) :-
  183       some(Some_Param3, '$kolem_Fn_72').
  184 */
  185axiom(holds_at(pos(jumbo, Some_Param3), t5),
  186    [some(Some_Param3, '$kolem_Fn_72'), b(t, t5), ignore(t+5=t5)]).
  187
  188 /*  equals(outside, loc(Some_Param4)) :-
  189       some(Some_Param4, '$kolem_Fn_72').
  190 */
  191axiom(equals(outside, loc(Some_Param4)),
  192    [some(Some_Param4, '$kolem_Fn_72')]).
  193
  194
  195% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:41
  196% [animal,time]
  197 % !HoldsAt(Mounted(Homer,animal),time).
  198 %  not(holds_at(mounted(homer,Animal),Time)).
  199axiom(not(holds_at(mounted(homer, Mounted_Ret), Time2)),
  200    []).
  201
  202
  203% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:43
  204% [human]
  205 % HoldsAt(PosDeterminingFluent(human,1),5).
  206holds_at(posDeterminingFluent(Human,1),5).
  207
  208
  209% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:44
  210% [event,animal]
  211 % !HoldsAt(DoneBy(event,animal),5).
  212 %  not(holds_at(doneBy(Event,Animal),5)).
  213axiom(not(holds_at(doneBy(DoneBy_Param, DoneBy_Ret), t5)),
  214    [b(t, t5), ignore(t+5=t5)]).
  215
  216
  217% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:46
  218%;HoldsAt(Pos(Homer,7),0).
  219%;HoldsAt(Pos(Jumbo,4),0).
  220%;Happens(Move(Jumbo,3),0).
  221%;Happens(Open(Homer,GateAO),0).
  222%;Happens(Move(Homer,4),1).
  223%;Happens(Move(Jumbo,1),1).
  224%;Happens(Move(Jumbo,3),2).
  225%;Happens(Mount(Homer,Jumbo),2).
  226%;Happens(Move(Jumbo,4),3).
  227%;!Happens(Move(Homer,2),3).
  228%;Happens(Move(Jumbo,7),4).
  229%;!Happens(Mount(Homer,Jumbo),3).
  230%;!Happens(Mount(Homer,Jumbo),4).
  231%;[position] !Happens(Move(Homer,position),4).
  232
  233% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:61
  234% range time 0 5
  235% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:62
  236==> range(time,0,5).
  237
  238% range position 1 8
  239% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:63
  240==> range(position,1,8).
  241
  242% range offset 0 0
  243% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:64
  244==> range(offset,0,0).
  245
  246% completion Happens
  247% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/AkmanEtAl2004/ZooTest4.2.e:66
  248==> completion(happens).
  249%; End of file.