Running LAMA

Installation

The easiest way of accessing the LAMA planner is to use the command module add /home/TDDC17/www-pub/info/labs/planning/planners.mod, which will include the correct directory in your path. After that, you can run it by just typing the planner's name.

LAMA needs Python to run. If it is not already installed this can be done by executing the command module add prog/python/2.6.0. This will temporarily add the Python module to the environment. To add it permanently, use the command module initadd prog/python/2.6.0.

Questions, Problems and Bugs

If you have problems with any of the planners, please ask your lab assistant. Through the WWW links provided you can find out more about the planning systems, but please, do not contact their authors!

Known Problems

LAMA, like many planners, requires all the arguments to an operator to be different, i.e. an action such as (move A B A) is considered impossible regardless of the domain definition. This can cause a problem in some domains.

Lama does not handle planning with durations.

How LAMA Works

LAMA consists of three separate programs:

  1. the translator (written in Python),
  2. the knowledge compilation module (written in C++), and
  3. the search engine (also written in C++).
To solve a planning task, the three programs are called in sequence; they communicate via text files. The translator transforms the planner input from PDDL into a multi-valued state representation. At this stage a grounding algorithm is used for instantiating operators and axioms these are then fed to invariant synthesis algorithm which determines groups of mutually exclusive facts. These groups are used for determining the order between landmarks. Landmarks are variable assignments that must occur at some point in every solution plan. The knowledge compilation module builds a number of data structures which will be used in the landmark generation and search. It also constructs successor generators that can be used to efficiently determine which actions are applicable in a given state. Also axiom evaluators for efficiently evaluating values of derived state variables are built here.

The search engine uses multi-heuristics to speed up the search process. It makes use of the FF heuristic and also of landmarks. The landmark heuristic measures the distance to a goal by the number of landmarks that still need to be achieved.

Input

LAMA accepts PDDL input, including some parts of ADL: quantified and conditional effects, quantified preconditions and goals and :typing, but not type hierarchies.

Running LAMA

LAMA is started with the command

lama options <domain file> <problem file> <result file>
Where options must contain at least one heuristic. The following options exist:
l: Use the landmark heuristic.
L: Use preferred operators of the landmark heuristic.
f: Use the FF heuristic.
F: Use helpful actions ("preferred operators" of the FF heuristic).
i: Run in iterated mode, keep searching for better solutions.
The options can be combined in any way but lLfF appears to give the best results. Using the i option might give better plans, but may also cause the planner to continue indefinitely. It only stops after having completely exhausted the search space.

Output

Typically, LAMA's output will look like the following:


	Parsing... [0.010s CPU, 0.007s wall-clock]
	Instantiating... 
	...
	Done! [0.100s CPU, 0.116s wall-clock]

	2. Running preprocessor
	Building causal graph...
	...

	3. Running search
	...
	Generated 27 landmarks, of which 3 are disjunctive
	...
	Best heuristic value: 15/12 [expanded 1 state(s)]
	Best heuristic value: 15/11 [expanded 2 state(s)]
	Best heuristic value: 12/11 [expanded 3 state(s)]
	Best heuristic value: 8/10 [expanded 4 state(s)]
	Best heuristic value: 7/8 [expanded 5 state(s)]
	Best heuristic value: 6/6 [expanded 6 state(s)]
	Best heuristic value: 4/4 [expanded 7 state(s)]
	Best heuristic value: 3/3 [expanded 8 state(s)]
	Best heuristic value: 3/2 [expanded 9 state(s)]
	Best heuristic value: 1/1 [expanded 10 state(s)]
	Solution found!
	
	lift hoist0 crate1 pallet0 depot0
	lift hoist1 crate0 pallet1 distributor0
	load hoist0 crate1 truck1 depot0
	drive truck1 depot0 distributor0	
	load hoist1 crate0 truck1 distributor0	
	unload hoist1 crate1 truck1 distributor0
	drop hoist1 crate1 pallet1 distributor0
	drive truck1 distributor0 distributor1
	unload hoist2 crate0 truck1 distributor1
	drop hoist2 crate0 pallet2 distributor1
	Plan length: 10 step(s).
	Expanded 11 state(s).
	Generated 64 state(s).
	Search time: 0.01 seconds
	Total time: 0.09 seconds
    
Using the i option will in addition produce something like:

	Search iteration 2
	Using the following heuristic(s):
	FF heuristic with preferred operators
	Landmark heuristic with preferred operators
	Initializing landmarks count heuristic...
	Conducting weighted A* search, weight is 5, bound is 10.
	Best heuristic value: 15/12 [expanded 1 state(s)]
	Best heuristic value: 15/11 [expanded 2 state(s)]
	Best heuristic value: 12/11 [expanded 3 state(s)]
	Best heuristic value: 8/10 [expanded 4 state(s)]
	Best heuristic value: 7/8 [expanded 5 state(s)]
	Best heuristic value: 6/6 [expanded 6 state(s)]
	Best heuristic value: 4/4 [expanded 7 state(s)]
	Best heuristic value: 3/3 [expanded 8 state(s)]
	Best heuristic value: 3/2 [expanded 9 state(s)]
	Best heuristic value: 1/1 [expanded 10 state(s)]
	Completely explored state space -- no solution!
	Expanded 403 state(s).	
	Generated 4368 state(s).
	Search time: 2.01 seconds
	Total time: 2.1 seconds
    

More about LAMA

Homepage:
http://www.informatik.uni-freiburg.de/~srichter/