Differences between revisions 17 and 66 (spanning 49 versions)
Revision 17 as of 2010-12-06 09:33:34
Size: 4533
Editor: ErezKarpas
Comment:
Revision 66 as of 2023-10-12 12:14:59
Size: 5142
Editor: GabiRoeger
Comment: Remove link to deleted page ObtainingAndRunningFastDownward
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
Running the planner is a three-step process as explained in Section 3 (pp. 202-203) of the [[http://www.jair.org/papers/paper1705.html|JAIR paper on Fast Downward]]. The following instructions show how to run these three steps, in sequence, assuming that the preprocessor and search component have been compiled and that you are currently located in the {{{src}}} directory.

== Translator ==
To run Fast Downward, use the {{{fast-downward.py}}} driver script. At minimum, you need to specify the PDDL input files and search options consisting of a [[Doc/SearchAlgorithm|search algorithm]] with one or more [[Doc/Evaluator|evaluator specification]]s. The driver script has many options to do things like running portfolios, running only the translation component of the planner, using a non-standard build, running a plan validator and various other things. To see the complete list of options, run
Line 10: Line 8:
translate/translate.py [DOMAIN] PROBLEM ./fast-downward.py --help
Line 13: Line 11:
 * `DOMAIN` (filename): PDDL domain file
 * `PROBLEM` (filename): PDDL problem file
If you want to run any of the planners based on Fast Downward that participated in IPC 2011, please also check IpcPlanners.
Line 16: Line 13:
If the domain file is not given, the planner will try to infer a likely name from the problem file name, using the conventions used at the various IPCs. (If in doubt if this will work for you, just try it out.) == Caveats ==
Line 18: Line 15:
Note: Creates a file called output.sas (as well as test.groups, all.groups, ...)
== Preprocessor ==
The '''search options''' are built with flexibility in mind, not ease of use. It is very easy to use option settings that look plausible, yet introduce significant inefficiencies. For example, an invocation like {{{ ./fast-downward.py domain.pddl problem.pddl --search "lazy_greedy([ff()], preferred=[ff()])"}}} looks plausible, yet is hugely inefficient since it will compute the FF heuristic twice per state. See the examples on the PlannerUsage page to see how to call the planner properly. If in doubt, ask.
Line 21: Line 17:
{{{
preprocess/preprocess < OUTPUT.SAS

== Different builds ==

Different builds of Fast Downward (e.g. release vs. debug) are placed in different directories by the build script. Hence, several builds can coexist and {{{fast-downward.py}}} must be told which build to use. By default, the {{{release}}} build is used, which is also the default build produced by {{{build.py}}}. To use a different build, pass {{{--build=<name>}}} to the driver script. The parameter {{{--debug}}} is an alias for {{{--build=debug --validate}}}.

'''Note on IDE projects (Visual Studio, XCode)''': You can use the CMake build system to generate a project for you favourite IDE. These projects are what CMake calls "multi-config generators", i.e., they are created without fixing the build configuration. At build time, the IDE decides whether to do a debug or release build and creates subdirectories in the output folder. Use the full path to the binaries as the value of {{{--build}}} (e.g., {{{--build=path/to/visual/studio/project/bin/Debug/}}}).

== Exit codes ==

The driver exits with 0 if no errors are encountered. Otherwise, it returns the exit code of the first component that failed. The exit codes are documented at ExitCodes.

== LP support ==

Features that use an LP solver have a command-line option `lpsolver` to switch between different solver types. See [[http://issues.fast-downward.org/issue752|issue752]] and [[http://issues.fast-downward.org/issue1076|issue1076]] for a discussion of the relative performance of CPLEX and !SoPlex.

Note that !SoPlex is not a MIP solver, so using it for configurations that require integer variables will result in an error. Please use CPLEX for such cases.


== Examples ==

=== A* search ===

{{{#!highlight bash
# landmark-cut heuristic
 ./fast-downward.py domain.pddl task.pddl --search "astar(lmcut())"

# iPDB heuristic with default settings
 ./fast-downward.py domain.pddl task.pddl --search "astar(ipdb())"

# blind heuristic
 ./fast-downward.py domain.pddl task.pddl --search "astar(blind())"
Line 25: Line 50:
 * `OUTPUT.SAS` (filename): translator output

Note: Creates a file called output

<<Anchor(search)>>
== Search component ==

{{{
search/downward [OPTIONS] --search SEARCH < OUTPUT
}}}

 * `SEARCH` (SearchEngine): configuration of the search algorithm
 * `OUTPUT` (filename): preprocessor output
Options:
 * `--heuristic` [[ReusingHeuristics#predefinition|HEURISTIC_PREDEFINITION]]
   Predefines a heuristic that can afterwards be referenced by the name that is
   specified in the definition.
 * `--random-seed` SEED
   Use random seed SEED


=== Examples ===

A* search:

{{{#!highlight bash
# landmark-cut heuristic (previously configuration "ou")
 ./downward --search "astar(lmcut())" < output

# merge-and-shrink heuristic with default settings (previously configuration "oa50000")
 ./downward --search "astar(mas())" < output

# blind heuristic (previously configuarion "ob")
 ./downward --search "astar(blind())" < output
}}}

Lazy greedy best first search with preferred operators and the queue alternation method:
=== Lazy greedy best-first search with preferred operators and the queue alternation method ===
Line 65: Line 54:
 ./downward --heuristic "hff=ff()" --heuristic "hcea=cea()" \
         --search "lazy_greedy(hff, hcea, preferred=(hff, hcea))" \
            < output
 ./fast-downward.py domain.pddl task.pddl \
   
--evaluator "hff=ff()" --evaluator "hcea=cea()" \
    --search "lazy_greedy([hff, hcea], preferred=[hff, hcea])" \
           
Line 70: Line 60:
 ./downward --heuristic "hff=ff()" \
         --search "lazy_greedy(hff, preferred=(hff))" \
            < output
 ./fast-downward.py domain.pddl task.pddl \
   
--evaluator "hff=ff()" \
    --search "lazy_greedy([hff], preferred=[hff])" \
           
Line 75: Line 66:
 ./downward --heuristic "hcea=cea()" \
         --search "lazy_greedy(hcea, preferred=(hcea))" \
            < output
 ./fast-downward.py domain.pddl task.pddl \
   
--evaluator "hcea=cea()" \
    --search "lazy_greedy([hcea], preferred=[hcea])" \
           
Line 80: Line 72:
The above examples use the new best-first search implementation.
For comparison, the old best-first search implementation is still available:
=== LAMA 2011 ===
Line 83: Line 75:
 ./downward --heuristic "hff=ff()" --heuristic "hcea=cea()" \
            --search "old_greedy(hff, hcea, preferred=(hff, hcea))" \
            < output
 ./fast-downward.py --alias seq-sat-lama-2011 domain.pddl task.pddl
Line 88: Line 78:
If you would like to have another translation from an old-style configuration to the new call-syntax,
please add it here as a TODO.
runs the "LAMA 2011 configuration" of the planner. (Note that this is not really the same as "LAMA 2011" as it participated at IPC 2011 because there have been bug fixes and other changes to the planner since 2011. See IpcPlanners for more information.) To find out which actual search options the LAMA 2011 configuration corresponds to, check the source code of the {{{src/driver/aliases.py}}} module.
Line 91: Line 80:
TODO: I would like to see an example that uses the Lama-FF Synergy feature. I'd be most interested in a configuration that is as close to LAMA as currently possible (i.e., using the LAMA and FF heuristics with synergy in a lazy alternation search with preferred operators for both heuristics, using iterated search with the appropriate set of options). <<Anchor(64bit)>>
== 64-bit mode ==
Line 93: Line 83:
I don't know what iterated search LAMA is performing, but if you describe it in words, I can probably formulate it as a fast downward call. The following would be the call to the old lazy greedy alternation search with LAMA and FF heuristics with synergy, using both heuristics for preferred operators. Older planner versions built the planner in 32-bit mode by default because of lower memory consumption. As part of the meta issue [[http://issues.fast-downward.org/issue213|issue213]] we decreased the memory consumption of 64-bit builds to the point where there should be no difference between 32- and 64-bit builds for most configurations. Therefore, we use the native bitwidth of the operating system since January 2019.
Line 95: Line 85:
{{{
 ./downward --heuristic "hlm,hff=lm_ff_syn()"
            --search "old_greedy(hlm, hff, preferred=(hlm, hff))"
            < output
}}}
== Other questions? ==
Line 101: Line 87:
This is as close to LAMA as we have right now (same search and heuristics, no caching and no +1 to operator cost):

{{{
./downward --heuristic "hlm,hff=lm_ff_syn()"
           --search "iterated(
                              lazy_greedy(hff,hlm,preferred=(hff,hlm)),
                              lazy_wastar(hff,hlm,preferred=(hff,hlm),w=5),
                              lazy_wastar(hff,hlm,preferred=(hff,hlm),w=3),
                              lazy_wastar(hff,hlm,preferred=(hff,hlm),w=2),
                              lazy_wastar(hff,hlm,preferred=(hff,hlm),w=1),
                              repeat_last=true)" < output
}}}
Please get in touch! See the HomePage for various contact options.

Back to HomePage.

Usage

To run Fast Downward, use the fast-downward.py driver script. At minimum, you need to specify the PDDL input files and search options consisting of a search algorithm with one or more evaluator specifications. The driver script has many options to do things like running portfolios, running only the translation component of the planner, using a non-standard build, running a plan validator and various other things. To see the complete list of options, run

./fast-downward.py --help

If you want to run any of the planners based on Fast Downward that participated in IPC 2011, please also check IpcPlanners.

Caveats

The search options are built with flexibility in mind, not ease of use. It is very easy to use option settings that look plausible, yet introduce significant inefficiencies. For example, an invocation like  ./fast-downward.py domain.pddl problem.pddl --search "lazy_greedy([ff()], preferred=[ff()])" looks plausible, yet is hugely inefficient since it will compute the FF heuristic twice per state. See the examples on the PlannerUsage page to see how to call the planner properly. If in doubt, ask.

Different builds

Different builds of Fast Downward (e.g. release vs. debug) are placed in different directories by the build script. Hence, several builds can coexist and fast-downward.py must be told which build to use. By default, the release build is used, which is also the default build produced by build.py. To use a different build, pass --build=<name> to the driver script. The parameter --debug is an alias for --build=debug --validate.

Note on IDE projects (Visual Studio, XCode): You can use the CMake build system to generate a project for you favourite IDE. These projects are what CMake calls "multi-config generators", i.e., they are created without fixing the build configuration. At build time, the IDE decides whether to do a debug or release build and creates subdirectories in the output folder. Use the full path to the binaries as the value of --build (e.g., --build=path/to/visual/studio/project/bin/Debug/).

Exit codes

The driver exits with 0 if no errors are encountered. Otherwise, it returns the exit code of the first component that failed. The exit codes are documented at ExitCodes.

LP support

Features that use an LP solver have a command-line option lpsolver to switch between different solver types. See issue752 and issue1076 for a discussion of the relative performance of CPLEX and SoPlex.

Note that SoPlex is not a MIP solver, so using it for configurations that require integer variables will result in an error. Please use CPLEX for such cases.

Examples

   1 # landmark-cut heuristic
   2  ./fast-downward.py domain.pddl task.pddl --search "astar(lmcut())"
   3 
   4 # iPDB heuristic with default settings
   5  ./fast-downward.py domain.pddl task.pddl --search "astar(ipdb())"
   6 
   7 # blind heuristic
   8  ./fast-downward.py domain.pddl task.pddl --search "astar(blind())"

Lazy greedy best-first search with preferred operators and the queue alternation method

   1 ## using FF heuristic and context-enhanced additive heuristic (previously: "fFyY")
   2  ./fast-downward.py domain.pddl task.pddl \
   3     --evaluator "hff=ff()" --evaluator "hcea=cea()" \
   4     --search "lazy_greedy([hff, hcea], preferred=[hff, hcea])" \
   5            
   6 
   7 ## using FF heuristic (previously: "fF")
   8  ./fast-downward.py domain.pddl task.pddl \
   9     --evaluator "hff=ff()" \
  10     --search "lazy_greedy([hff], preferred=[hff])" \
  11            
  12 
  13 ## using context-enhanced additive heuristic (previously: "yY")
  14  ./fast-downward.py domain.pddl task.pddl \
  15     --evaluator "hcea=cea()" \
  16     --search "lazy_greedy([hcea], preferred=[hcea])" \
  17 

LAMA 2011

 ./fast-downward.py --alias seq-sat-lama-2011 domain.pddl task.pddl

runs the "LAMA 2011 configuration" of the planner. (Note that this is not really the same as "LAMA 2011" as it participated at IPC 2011 because there have been bug fixes and other changes to the planner since 2011. See IpcPlanners for more information.) To find out which actual search options the LAMA 2011 configuration corresponds to, check the source code of the src/driver/aliases.py module.

64-bit mode

Older planner versions built the planner in 32-bit mode by default because of lower memory consumption. As part of the meta issue issue213 we decreased the memory consumption of 64-bit builds to the point where there should be no difference between 32- and 64-bit builds for most configurations. Therefore, we use the native bitwidth of the operating system since January 2019.

Other questions?

Please get in touch! See the HomePage for various contact options.

FastDownward: PlannerUsage (last edited 2023-10-12 12:14:59 by GabiRoeger)