/** * All rights reserved. Use of this software is permitted for non-commercial * research purposes, and it may be copied only for that use. All copies must * include this copyright message. This software is made available AS IS, and * neither the GIPO team nor the University of Huddersfield make any warranty * about the software or its performance. * * Automatically generated OCl Domain from GIPO Version 1.0 * * Author: Lee McCluskey * Institution: University of Huddersfield * Date created: September 2001 * Date last modified: 2003/06/05 at 02:42:43 PM BST * Description: * Over the summer with thoughts on a walking holiday * I tried to work out the logistics of doing a more or * less circular route over several days. * Using the real experience I've come up with a nice new problem * domain. Its fairly easy and natural to explain, but leads to * planning problems that seem hard for some goal-directed * planners to solve, although the goal space is not very large. * * Imagine you want to walk * with your partner a long clockwise circular route * over several days (e.g. in the "Lake District" in NW England), * and you do one "leg" each day. You want to start at a certain * point and do the walk in one direction, without ever * walking backwards. You have two cars which you must use * to carry your tent/luggage and to carry you and your partner * to the start/end of a leg, if necessary. Driving a car * between any two points is allowed, but walking must * be done with your partner and must start from the * place where you left off. As you will be tired when * you've walked to the end of a leg, you must have * your tent up ready there so you can sleep the * night before you set off to do the next leg * the morning. * * The domain can has some interesting extensions if you * add more couples, cars or if you introduce duration etc. * * This version uses conditional transitions. */ domain_name(hiking). % Sorts sorts(primitive_sorts,[car,person,tent,place,couple]). % Objects objects(car,[car1,car2]). objects(tent,[tent1]). objects(person,[sue,fred]). objects(couple,[couple1]). objects(place,[keswick,helvelyn,fairfield,honister,derwent]). % Predicates predicates([ up(tent,place), down(tent,place), loaded(tent,car,place), in(person,car,place), out(person,place), at(car,place), partners(couple,person,person), walked(couple,place), next(place,place)]). % Object Class Definitions substate_classes(person,Person,[ [out(Person,Place)], [in(Person,Car,Place)]]). substate_classes(couple,Couple,[ [walked(Couple,Place),partners(Couple,Person1,Person2)]]). substate_classes(tent,Tent,[ [up(Tent,Place)], [down(Tent,Place)], [loaded(Tent,Car,Place)]]). substate_classes(car,Car,[ [at(Car,Place)]]). % Atomic Invariants atomic_invariants([ partners(couple1,sue,fred), next(keswick,helvelyn), next(helvelyn,fairfield), next(fairfield,honister), next(honister,derwent)]). % Implied Invariants % Inconsistent Constraints % Operators operator(load(Person,Place,Tent,Car), % prevail [ se(person,Person,[out(Person,Place)])], % necessary [ sc(tent,Tent,[down(Tent,Place)]=>[loaded(Tent,Car,Place)])], % conditional []). operator(unload(Person,Place,Tent,Car), % prevail [ se(person,Person,[out(Person,Place)])], % necessary [ sc(tent,Tent,[loaded(Tent,Car,Place)]=>[down(Tent,Place)])], % conditional []). operator(getin(Car,Place,Person), % prevail [ se(car,Car,[at(Car,Place)])], % necessary [ sc(person,Person,[out(Person,Place)]=>[in(Person,Car,Place)])], % conditional []). operator(getout(Car,Place,Person), % prevail [ se(car,Car,[at(Car,Place)])], % necessary [ sc(person,Person,[in(Person,Car,Place)]=>[out(Person,Place)])], % conditional []). operator(put_down(Person,Place,Tent), % prevail [ se(person,Person,[out(Person,Place)])], % necessary [ sc(tent,Tent,[up(Tent,Place)]=>[down(Tent,Place)])], % conditional []). operator(put_up(Person,Place,Tent), % prevail [ se(person,Person,[out(Person,Place)])], % necessary [ sc(tent,Tent,[down(Tent,Place)]=>[up(Tent,Place)])], % conditional []). operator(drive(Person,Car,Place,Place2), % prevail [], % necessary [ sc(person,Person,[in(Person,Car,Place)]=>[in(Person,Car,Place2)]), sc(car,Car,[at(Car,Place)]=>[at(Car,Place2)])], % conditional [ sc(person,Person2,[in(Person2,Car,Place)]=>[in(Person2,Car,Place2)]), sc(tent,Tent,[loaded(Tent,Car,Place)]=>[loaded(Tent,Car,Place2)])]). operator(walk_together(Tent,Place2,Person1,Place1,Person2,Couple), % prevail [ se(tent,Tent,[up(Tent,Place2)])], % necessary [ sc(person,Person1,[out(Person1,Place1),next(Place1,Place2)]=>[out(Person1,Place2)]), sc(person,Person2,[out(Person2,Place1),ne(Person1,Person2)]=>[out(Person2,Place2)]), sc(couple,Couple,[walked(Couple,Place1),partners(Couple,Person1,Person2)]=>[walked(Couple,Place2)])], % conditional []). % Methods % Domain Tasks planner_task(10, % Goals [ se(couple,couple1,[walked(couple1,helvelyn)])], % INIT States [ ss(car,car1,[at(car1,keswick)]), ss(car,car2,[at(car2,keswick)]), ss(couple,couple1,[walked(couple1,keswick)]), ss(person,sue,[out(sue,keswick)]), ss(person,fred,[out(fred,keswick)]), ss(tent,tent1,[up(tent1,keswick)])]).