:-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/Pendulum_Prediction.e',70). :- call_pel_directive(translate(unskipped, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.pel')). :-include(library('ec_planner/ec_test_incl')). :-expects_dialect(ecalc). :- call_pel_directive(translate(begining, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.pel')). % load foundations/Root.e :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',1). :- call_pel_directive(load('foundations/Root.e')). % load foundations/DEC.e :- call_pel_directive(load('foundations/DEC.e')). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',4). % sort object sort(object). % sort agent: object subsort(agent,object). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',6). % sort physobj: object subsort(physobj,object). % sort location sort(location). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',9). % agent James t(agent,james). % physobj Coin t(physobj,coin). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',11). % location L1,L2,L3,L4 t(location,l1). t(location,l2). t(location,l3). t(location,l4). % fluent At(object,location) :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',13). fluent(at_loc(object,location)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',15). % fluent Holding(agent,physobj) fluent(holding(agent,physobj)). % event PickUp(agent,physobj) event(pickUp(agent,physobj)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',17). % event SetDown(agent,physobj) event(setDown(agent,physobj)). % event Move(agent,location,location) event(move(agent,location,location)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',20). % range time 0 9 :- call_pel_directive(range(time, 0, 9)). % range offset 1 1 :- call_pel_directive(range(offset, 1, 1)). %; state constraints % [agent,location,physobj,time] % (HoldsAt(At(agent,location),time) & % HoldsAt(Holding(agent,physobj),time) -> % HoldsAt(At(physobj,location),time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',25). holds_at(at_loc(Agent, Location), Time), holds_at(holding(Agent, Physobj), Time) -> holds_at(at_loc(Physobj, Location), Time). % [object,location1,location2,time] % (HoldsAt(At(object,location1),time) & % HoldsAt(At(object,location2),time) -> % location1=location2). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',31). holds_at(at_loc(Object, Location1), Time), holds_at(at_loc(Object, Location2), Time) -> Location1=Location2. %; effect axioms % [agent,location1,location2,time] % (Initiates(Move(agent,location1,location2),At(agent,location2),time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',37). initiates_at(move(Agent,Location1,Location2), at_loc(Agent,Location2), Time). % [agent,location1,location2,time] % (Terminates(Move(agent,location1,location2),At(agent,location1),time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',41). terminates_at(move(Agent,Location1,Location2), at_loc(Agent,Location1), Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',43). % [agent,physobj,time] % (Initiates(PickUp(agent,physobj),Holding(agent,physobj),time)). initiates_at(pickUp(Agent,Physobj), holding(Agent,Physobj), Time). % [agent,physobj,time] % (Terminates(SetDown(agent,physobj),Holding(agent,physobj),time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',47). terminates_at(setDown(Agent,Physobj), holding(Agent,Physobj), Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',49). %; preconditions % [agent,location1,location2,time] % (Happens(Move(agent,location1,location2),time) -> % HoldsAt(At(agent,location1),time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',51). happens_at(move(Agent, Location1, Location2), Time) -> holds_at(at_loc(Agent, Location1), Time). % [agent,physobj,time] % (Happens(PickUp(agent,physobj),time) -> % {location}% (HoldsAt(At(agent,location),time) & % HoldsAt(At(physobj,location),time))). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',56). exists([Location], (happens_at(pickUp(Agent, Physobj), Time)->holds_at(at_loc(Agent, Location), Time), holds_at(at_loc(Physobj, Location), Time))). %; releases % [agent,physobj,location,time] % (Releases(PickUp(agent,physobj),At(physobj,location),time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',62). releases_at(pickUp(Agent,Physobj), at_loc(Physobj,Location), Time). % [agent,physobj,location,time] % (HoldsAt(At(agent,location),time) -> % Initiates(SetDown(agent,physobj),At(physobj,location),time)). holds_at(at_loc(Agent, Location), Time) -> initiates_at(setDown(Agent, Physobj), at_loc(Physobj, Location), Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',70). % !HoldsAt(Holding(James,Coin),0). holds_at(not(holding(james,coin)),0). % HoldsAt(At(Coin,L4),0). holds_at(at_loc(coin,l4),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',72). % HoldsAt(At(James,L1),0). holds_at(at_loc(james,l1),0). % Happens(Move(James,L1,L2),0). happens_at(move(james,l1,l2),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',74). % Happens(Move(James,L2,L3),1). happens_at(move(james,l2,l3),1). % Happens(Move(James,L3,L4),2). happens_at(move(james,l3,l4),2). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',76). % Happens(PickUp(James,Coin),3). happens_at(pickUp(james,coin),3). % Happens(Move(James,L4,L3),4). happens_at(move(james,l4,l3),4). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',78). % Happens(Move(James,L3,L2),5). happens_at(move(james,l3,l2),5). % Happens(SetDown(James,Coin),6). happens_at(setDown(james,coin),6). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',80). % Happens(Move(James,L2,L3),7). happens_at(move(james,l2,l3),7). % Happens(Move(James,L3,L4),8). happens_at(move(james,l3,l4),8). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.e',84). % completion Happens :- call_pel_directive(completion(happens_at)). %; End of file. :- call_pel_directive(translate(ending, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/PickUp.pel')).