⇤ ← Revision 1 as of 2014-01-27 16:33:32
3875
Comment: Merged three pages about OptionSyntax
|
4674
Merged notes and predefinition sections
|
Deletions are marked like this. | Additions are marked like this. |
Line 8: | Line 8: |
=== Meaning of the call syntax documentation === | == Meaning of the call syntax documentation == |
Line 46: | Line 46: |
=== Notes === | == Notes == |
Line 49: | Line 49: |
* not case-sensitive * To get positions and keywords, run {{{ ./downward --help [Name] }}} |
|
Line 51: | Line 56: |
=== Lists === |
== Lists == |
Line 76: | Line 80: |
=== Enumerations === | == Enumerations == |
Line 91: | Line 95: |
=== Misc === * not case-sensitive * every argument can be passed by position or by keyword. The only rule is that no positional arguments appear after the first keyword argument. To get positions and keywords, run {{{ ./downward --help [Name] }}} |
|
Line 98: | Line 96: |
== Predefinitions == | |
Line 99: | Line 98: |
Often an object should be used for several purposes, e.g. a [[Doc/Heuristic|Heuristic]] or a [[Doc/LandmarkGraph|LandmarkGraph]]. The most prevalent use case is a heuristic that is used for both the heuristic estimates and for its preferred operators. In this case, one should predefine the object. |
|
Line 100: | Line 102: |
== Re-using predefined heuristics == | === Heuristic Predefinitions === |
Line 102: | Line 104: |
Often a heuristic instance should be used for several purposes. The most prevalent use case is a heuristic that is used for both the heuristic estimates and for its preferred operators. In this case, one should predefine the heuristic using the search option |
Heuristics can be predefined using the search option |
Line 109: | Line 107: |
== Predefining a heuristic == === Standard case === |
|
Line 114: | Line 108: |
name=heuristic | --heuristic name=heuristic |
Line 119: | Line 113: |
=== Landmark Predefinitions === If a set of landmarks should be used for several purposes, it can be predefined using the search option `--landmarks` (see [[PlannerUsage#search]]) to avoid duplicate work and memory usage. {{{ --landmarks name=landmarks }}} * `name` (string): a name that should denote the set of landmarks * `landmarks` ([[#lmdefinition|LandmarksDefinition]]): the set of landmarks === Predefinition Example === Suppose I want to run GBFS with the lm_count heuristic (the inadmissible version), and then run another GBFS search with an admissible lm_count heuristic, using the h^m landmarks without discovering the landmarks twice. {{{ ./downward --landmarks "lm=lm_hm(m=2)" --search "iterated([ lazy_greedy(lmcount(lm)), lazy_greedy(lmcount(lm,admissible=true))])" < output }}} |
Back to the HomePage.
Option Syntax
The configuration syntax changed slightly in April 2011.
Meaning of the call syntax documentation
All parameters can be specified by keyword or by position. Once a parameter is specified by keyword, the rest of the parameters must be specified by keyword too. Some parameters have default values and are optional. These parameters are documented in the form keyword = defaultvalue.
Consider the following example:
name(p, qs, r, s=v1, t=Enum1)
p (type_p): some explanation
qs (list of type_q): some explanation
r (type_r): some explanation
s (type_s): some explanation
t (Enum): some explanation
- Enum0: some explanation
- Enum1: some explanation
- Enum2: some explanation
Parameters p, qs and r are mandatory. qs is a list parameter. List parameters have to be enclosed in square brackets. An exception are single-element lists, where the brackets can be dropped. For example, let h1, h2, h3 be heuristic specifications, then [h1, h3], [h2] and h2 are examples for a list of heuristic specifications.
Parameters s and t are optional. s has the default value v1 and t the default value Enum1. t is an enumeration parameter and can only take the values listed (here Enum0, Enum1, Enum2). These values may also be passed by number, e.g. here t=Enum1 and t=1 are equivalent.
Some possible calls for this specification (with X and Xi having type_x):
name(P, Q, R): s and v have their default values v1 and Enum1
name(P, [Q], R): equivalent to previous call
name(P, [Q1, Q2], R, t=Enum2): s has its default value v1
name(t=1, r=R, qs=[Q1, Q2], s=S1, p=P) is equivalent to name(P, [Q1, Q2], R, S1, 1)
Notes
Parameters of type bool are specified by strings true or false
Parameters of type int can by specified by "infinity". This means that the parameter will take the value numeric_limits<int>::max(), which is usually equal to 2^31 - 1.
- not case-sensitive
- To get positions and keywords, run
./downward --help [Name]
Lists
List arguments have to be enclosed in square brackets now. E.g.,
./downward --heuristic "hff=ff()" --heuristic "hcea=cea()" \ --search "lazy_greedy([hff, hcea], preferred=[hff, hcea])" \ < output
instead of
./downward --heuristic "hff=ff()" --heuristic "hcea=cea()" \ --search "lazy_greedy(hff, hcea, preferred=(hff, hcea))" \ < output
Single element lists can be given without any brackets, e.g.
./downward --heuristic "hff=ff()" \ --search "lazy_greedy(hff, preferred=hff)" \ < output
Enumerations
Enumeration arguments can now be specified by name or by number (previously only by number), e.g.
selmax([h1,h2], classifier=AODE)
and
selmax([h1,h2], classifier=1)
are equivalent. To get enumeration names (and more), run
./downward --help [Name] //e.g. with Name=selmax
Predefinitions
Often an object should be used for several purposes, e.g. a Heuristic or a LandmarkGraph. The most prevalent use case is a heuristic that is used for both the heuristic estimates and for its preferred operators. In this case, one should predefine the object.
Heuristic Predefinitions
Heuristics can be predefined using the search option --heuristic (see PlannerUsage#search).
--heuristic name=heuristic
name (string): a name that should denote the heuristic
heuristic (HeuristicSpecification): the heuristic
Landmark Predefinitions
If a set of landmarks should be used for several purposes, it can be predefined using the search option --landmarks (see PlannerUsage#search) to avoid duplicate work and memory usage.
--landmarks name=landmarks
name (string): a name that should denote the set of landmarks
landmarks (LandmarksDefinition): the set of landmarks
Predefinition Example
Suppose I want to run GBFS with the lm_count heuristic (the inadmissible version), and then run another GBFS search with an admissible lm_count heuristic, using the h^m landmarks without discovering the landmarks twice.
./downward --landmarks "lm=lm_hm(m=2)" --search "iterated([ lazy_greedy(lmcount(lm)), lazy_greedy(lmcount(lm,admissible=true))])" < output