Differences between revisions 1 and 14 (spanning 13 versions)
Revision 1 as of 2014-01-27 10:59:04
Size: 12754
Editor: XmlRpcBot
Comment:
Revision 14 as of 2014-09-02 12:57:09
Size: 21434
Editor: XmlRpcBot
Comment:
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
astar(eval, pathmax=false, mpd=false, cost_type=NORMAL, bound=infinity) astar(eval, pathmax=false, mpd=false, cost_type=NORMAL, bound=infinity, max_time=infinity)
Line 19: Line 19:
 * ''max_time'' (double): maximum time in seconds the search is allowed to run for. The timeout is only checked after each complete search step (usually a node expansion), so the actual runtime can be arbitrarily longer. Therefore, this parameter should not be used for time-limiting experiments. Timed-out searches are treated as failed searches, just like incomplete search algorithms that exhaust their search space.
Line 21: Line 22:
=== Equivalent statements using general eager search ===

{{{
--search astar(evaluator)
}}}

is equivalent to
{{{
--heuristic h=evaluator
--search eager(tiebreaking([sum([g(), h]), h], unsafe_pruning=false),
               reopen_closed=true, pathmax=false, progress_evaluator=sum([g(), h]))
}}}

Line 22: Line 37:
{{{
eager(open, reopen_closed=false, pathmax=false, f_eval=None, preferred=[], cost_type=NORMAL, bound=infinity)
}}}

{{{
eager(open, reopen_closed=false, pathmax=false, f_eval=None, preferred=[], cost_type=NORMAL, bound=infinity, max_time=infinity)
}}}
Line 30: Line 45:
 * ''f_eval'' ([[Doc/ScalarEvaluator|ScalarEvaluator]]): set evaluator for jump statistics
 * ''preferred'' (list of [[Doc/Heuristic|Heuristic]]): use preferred operators of these heuristics
 * ''cost_type'' ({NORMAL, ONE, PLUSONE}): Operator cost adjustment type. No matter what this setting is, axioms will always be considered as actions of cost 0 by the heuristics that treat axioms as actions.
  * {{{NORMAL}}}: all actions are accounted for with their real cost
  * {{{ONE}}}: all actions are accounted for as unit cost
  * {{{PLUSONE}}}: all actions are accounted for as their real cost + 1 (except if all actions have original cost 1, in which case cost 1 is used). This is the behaviour known for the heuristics of the LAMA planner. This is intended to be used by the heuristics, not search engines, but is supported for both.
 * ''bound'' (int): exclusive depth bound on g-values. Cutoffs are always performed according to the real cost, regardless of the cost_type parameter
 * ''f_eval'' ([[Doc/ScalarEvaluator|ScalarEvaluator]]): set evaluator for jump statistics. (Optional; if no evaluator is used, jump statistics will not be displayed.)
 * ''preferred'' (list of [[Doc/Heuristic|Heuristic]]): use preferred operators of these heuristics
 * ''cost_type'' ({NORMAL, ONE, PLUSONE}): Operator cost adjustment type. No matter what this setting is, axioms will always be considered as actions of cost 0 by the heuristics that treat axioms as actions.
  * {{{NORMAL}}}: all actions are accounted for with their real cost
  * {{{ONE}}}: all actions are accounted for as unit cost
  * {{{PLUSONE}}}: all actions are accounted for as their real cost + 1 (except if all actions have original cost 1, in which case cost 1 is used). This is the behaviour known for the heuristics of the LAMA planner. This is intended to be used by the heuristics, not search engines, but is supported for both.
 * ''bound'' (int): exclusive depth bound on g-values. Cutoffs are always performed according to the real cost, regardless of the cost_type parameter
 * ''max_time'' (double): maximum time in seconds the search is allowed to run for. The timeout is only checked after each complete search step (usually a node expansion), so the actual runtime can be arbitrarily longer. Therefore, this parameter should not be used for time-limiting experiments. Timed-out searches are treated as failed searches, just like incomplete search algorithms that exhaust their search space.
Line 39: Line 55:
eager_greedy(evals, preferred=[], boost=0, cost_type=NORMAL, bound=infinity) eager_greedy(evals, preferred=[], boost=0, cost_type=NORMAL, bound=infinity, max_time=infinity)
Line 51: Line 67:
 * ''max_time'' (double): maximum time in seconds the search is allowed to run for. The timeout is only checked after each complete search step (usually a node expansion), so the actual runtime can be arbitrarily longer. Therefore, this parameter should not be used for time-limiting experiments. Timed-out searches are treated as failed searches, just like incomplete search algorithms that exhaust their search space.
Line 55: Line 72:
=== Equivalent statements using general eager search ===

{{{
--heuristic h2=eval2
--search eager_greedy([eval1, h2], preferred=h2, boost=100)
}}}

is equivalent to
{{{
--heuristic h1=eval1 --heuristic h2=eval2
--search eager(alt([single(h1), single(h1, pref_only=true), single(h2),
                    single(h2, pref_only=true)], boost=100),
               preferred=h2)
}}}


----

{{{
--search eager_greedy([eval1, eval2])
}}}

is equivalent to

{{{
--search eager(alt([single(eval1), single(eval2)]))
}}}

----

{{{
--heuristic h1=eval1
--search eager_greedy(h1, preferred=h1)
}}}

is equivalent to

{{{
--heuristic h1=eval1
--search eager(alt([single(h1), single(h1, pref_only=true)]),
               preferred=h1)
}}}

----

{{{
--search eager_greedy(eval1)
}}}

is equivalent to

{{{
--search eager(single(eval1))
}}}
Line 56: Line 128:
{{{
ehc(h, bfs_use_cost=false, preferred_usage=PRUNE_BY_PREFERRED, preferred=[], cost_type=NORMAL, bound=infinity)
}}}

{{{
ehc(h, bfs_use_cost=false, preferred_usage=PRUNE_BY_PREFERRED, preferred=[], cost_type=NORMAL, bound=infinity, max_time=infinity)
}}}
Line 70: Line 142:
 * ''max_time'' (double): maximum time in seconds the search is allowed to run for. The timeout is only checked after each complete search step (usually a node expansion), so the actual runtime can be arbitrarily longer. Therefore, this parameter should not be used for time-limiting experiments. Timed-out searches are treated as failed searches, just like incomplete search algorithms that exhaust their search space.
Line 72: Line 145:
iterated(engine_configs, pass_bound=true, repeat_last=false, continue_on_fail=false, continue_on_solve=true, plan_counter=0, cost_type=NORMAL, bound=infinity) iterated(engine_configs, pass_bound=true, repeat_last=false, continue_on_fail=false, continue_on_solve=true, plan_counter=0, cost_type=NORMAL, bound=infinity, max_time=infinity)
Line 87: Line 160:
 * ''max_time'' (double): maximum time in seconds the search is allowed to run for. The timeout is only checked after each complete search step (usually a node expansion), so the actual runtime can be arbitrarily longer. Therefore, this parameter should not be used for time-limiting experiments. Timed-out searches are treated as failed searches, just like incomplete search algorithms that exhaust their search space.
Line 89: Line 163:
'''Note 2:''' Use heuristic predefinition (see [[ReusingHeuristics|ReusingHeuristics]]) to avoid duplicate preprocessing (e.g. in the merge-and-shrink heuristic) when using the same heuristic multiple times. '''Note 2:''' Running this
{{{
./downward --search "iterated([lazy_wastar(merge_and_shrink(),w=10), lazy_wastar(merge_and_shrink(),w=5), lazy_wastar(merge_and_shrink(),w=3), lazy_wastar(merge_and_shrink(),w=2), lazy_wastar(merge_and_shrink(),w=1)])"
}}}

would perform the preprocessing phase of the merge and shrink heuristic 5 times (once before each iteration).

To avoid this, use heuristic predefinition, which avoids duplicate preprocessing, as follows:
{{{
./downward --heuristic "h=merge_and_shrink()" --search "iterated([lazy_wastar(h,w=10), lazy_wastar(h,w=5), lazy_wastar(h,w=3), lazy_wastar(h,w=2), lazy_wastar(h,w=1)])"
}}}
Line 95: Line 180:
lazy(open, reopen_closed=false, preferred=[], cost_type=NORMAL, bound=infinity) lazy(open, reopen_closed=false, preferred=[], randomize_successors=false, preferred_successors_first=false, cost_type=NORMAL, bound=infinity, max_time=infinity)
Line 102: Line 187:
 * ''cost_type'' ({NORMAL, ONE, PLUSONE}): Operator cost adjustment type. No matter what this setting is, axioms will always be considered as actions of cost 0 by the heuristics that treat axioms as actions.
  * {{{NORMAL}}}: all actions are accounted for with their real cost
  * {{{ONE}}}: all actions are accounted for as unit cost
  * {{{PLUSONE}}}: all actions are accounted for as their real cost + 1 (except if all actions have original cost 1, in which case cost 1 is used). This is the behaviour known for the heuristics of the LAMA planner. This is intended to be used by the heuristics, not search engines, but is supported for both.
 * ''bound'' (int): exclusive depth bound on g-values. Cutoffs are always performed according to the real cost, regardless of the cost_type parameter
 * ''randomize_successors'' (bool): randomize the order in which successors are generated
 * ''preferred_successors_first'' (bool): consider preferred operators first
* ''cost_type'' ({NORMAL, ONE, PLUSONE}): Operator cost adjustment type. No matter what this setting is, axioms will always be considered as actions of cost 0 by the heuristics that treat axioms as actions.
  * {{{NORMAL}}}: all actions are accounted for with their real cost
  * {{{ONE}}}: all actions are accounted for as unit cost
  * {{{PLUSONE}}}: all actions are accounted for as their real cost + 1 (except if all actions have original cost 1, in which case cost 1 is used). This is the behaviour known for the heuristics of the LAMA planner. This is intended to be used by the heuristics, not search engines, but is supported for both.
 * ''bound'' (int): exclusive depth bound on g-values. Cutoffs are always performed according to the real cost, regardless of the cost_type parameter
 * ''max_time'' (double): maximum time in seconds the search is allowed to run for. The timeout is only checked after each complete search step (usually a node expansion), so the actual runtime can be arbitrarily longer. Therefore, this parameter should not be used for time-limiting experiments. Timed-out searches are treated as failed searches, just like incomplete search algorithms that exhaust their search space.
'''Successor ordering:''' When using randomize_successors=true and preferred_successors_first=true, randomization happens before preferred operators are moved to the front.
Line 109: Line 199:
lazy_greedy(evals, preferred=[], reopen_closed=false, boost=1000, cost_type=NORMAL, bound=infinity) lazy_greedy(evals, preferred=[], reopen_closed=false, boost=1000, randomize_successors=false, preferred_successors_first=false, cost_type=NORMAL, bound=infinity, max_time=infinity)
Line 117: Line 207:
 * ''cost_type'' ({NORMAL, ONE, PLUSONE}): Operator cost adjustment type. No matter what this setting is, axioms will always be considered as actions of cost 0 by the heuristics that treat axioms as actions.
  * {{{NORMAL}}}: all actions are accounted for with their real cost
  * {{{ONE}}}: all actions are accounted for as unit cost
  * {{{PLUSONE}}}: all actions are accounted for as their real cost + 1 (except if all actions have original cost 1, in which case cost 1 is used). This is the behaviour known for the heuristics of the LAMA planner. This is intended to be used by the heuristics, not search engines, but is supported for both.
 * ''bound'' (int): exclusive depth bound on g-values. Cutoffs are always performed according to the real cost, regardless of the cost_type parameter
 * ''randomize_successors'' (bool): randomize the order in which successors are generated
 * ''preferred_successors_first'' (bool): consider preferred operators first
* ''cost_type'' ({NORMAL, ONE, PLUSONE}): Operator cost adjustment type. No matter what this setting is, axioms will always be considered as actions of cost 0 by the heuristics that treat axioms as actions.
  * {{{NORMAL}}}: all actions are accounted for with their real cost
  * {{{ONE}}}: all actions are accounted for as unit cost
  * {{{PLUSONE}}}: all actions are accounted for as their real cost + 1 (except if all actions have original cost 1, in which case cost 1 is used). This is the behaviour known for the heuristics of the LAMA planner. This is intended to be used by the heuristics, not search engines, but is supported for both.
 * ''bound'' (int): exclusive depth bound on g-values. Cutoffs are always performed according to the real cost, regardless of the cost_type parameter
 * ''max_time'' (double): maximum time in seconds the search is allowed to run for. The timeout is only checked after each complete search step (usually a node expansion), so the actual runtime can be arbitrarily longer. Therefore, this parameter should not be used for time-limiting experiments. Timed-out searches are treated as failed searches, just like incomplete search algorithms that exhaust their search space.
Line 124: Line 217:
=== Equivalent statements using general lazy search ===

{{{
--heuristic h2=eval2
--search lazy_greedy([eval1, h2], preferred=h2, boost=100)
}}}

is equivalent to
{{{
--heuristic h1=eval1 --heuristic h2=eval2
--search lazy(alt([single(h1), single(h1, pref_only=true), single(h2),
                  single(h2, pref_only=true)], boost=100),
              preferred=h2)
}}}


----

{{{
--search lazy_greedy([eval1, eval2], boost=100)
}}}

is equivalent to

{{{
--search lazy(alt([single(eval1), single(eval2)], boost=100))
}}}

----

{{{
--heuristic h1=eval1
--search lazy_greedy(h1, preferred=h1)
}}}

is equivalent to

{{{
--heuristic h1=eval1
--search lazy(alt([single(h1), single(h1, pref_only=true)], boost=1000),
              preferred=h1)
}}}

----

{{{
--search lazy_greedy(eval1)
}}}

is equivalent to

{{{
--search lazy(single(eval1))
}}}

'''Successor ordering:''' When using randomize_successors=true and preferred_successors_first=true, randomization happens before preferred operators are moved to the front.
Line 125: Line 275:
Line 126: Line 277:
{{{
lazy_wastar(evals, preferred=[], reopen_closed=true, boost=1000, w=1, cost_type=NORMAL, bound=infinity)
}}}

{{{
lazy_wastar(evals, preferred=[], reopen_closed=true, boost=1000, w=1, randomize_successors=false, preferred_successors_first=false, cost_type=NORMAL, bound=infinity, max_time=infinity)
}}}
Line 136: Line 287:
 * ''cost_type'' ({NORMAL, ONE, PLUSONE}): Operator cost adjustment type. No matter what this setting is, axioms will always be considered as actions of cost 0 by the heuristics that treat axioms as actions.
  * {{{NORMAL}}}: all actions are accounted for with their real cost
  * {{{ONE}}}: all actions are accounted for as unit cost
  * {{{PLUSONE}}}: all actions are accounted for as their real cost + 1 (except if all actions have original cost 1, in which case cost 1 is used). This is the behaviour known for the heuristics of the LAMA planner. This is intended to be used by the heuristics, not search engines, but is supported for both.
 * ''bound'' (int): exclusive depth bound on g-values. Cutoffs are always performed according to the real cost, regardless of the cost_type parameter
 * ''randomize_successors'' (bool): randomize the order in which successors are generated
 * ''preferred_successors_first'' (bool): consider preferred operators first
* ''cost_type'' ({NORMAL, ONE, PLUSONE}): Operator cost adjustment type. No matter what this setting is, axioms will always be considered as actions of cost 0 by the heuristics that treat axioms as actions.
  * {{{NORMAL}}}: all actions are accounted for with their real cost
  * {{{ONE}}}: all actions are accounted for as unit cost
  * {{{PLUSONE}}}: all actions are accounted for as their real cost + 1 (except if all actions have original cost 1, in which case cost 1 is used). This is the behaviour known for the heuristics of the LAMA planner. This is intended to be used by the heuristics, not search engines, but is supported for both.
 * ''bound'' (int): exclusive depth bound on g-values. Cutoffs are always performed according to the real cost, regardless of the cost_type parameter
 * ''max_time'' (double): maximum time in seconds the search is allowed to run for. The timeout is only checked after each complete search step (usually a node expansion), so the actual runtime can be arbitrarily longer. Therefore, this parameter should not be used for time-limiting experiments. Timed-out searches are treated as failed searches, just like incomplete search algorithms that exhaust their search space.
Line 142: Line 296:

=== Equivalent statements using general lazy search ===

{{{
--heuristic h1=eval1
--search lazy_wastar([h1, eval2], w=2, preferred=h1,
                     bound=100, boost=500)
}}}

is equivalent to
{{{
--heuristic h1=eval1 --heuristic h2=eval2
--search lazy(alt([single(sum([g(), weight(h1, 2)])),
                   single(sum([g(), weight(h1, 2)]), pref_only=true),
                   single(sum([g(), weight(h2, 2)])),
                   single(sum([g(), weight(h2, 2)]), pref_only=true)],
                  boost=500),
              preferred=h1, reopen_closed=true, bound=100)
}}}


----

{{{
--search lazy_wastar([eval1, eval2], w=2, bound=100)
}}}

is equivalent to

{{{
--search lazy(alt([single(sum([g(), weight(eval1, 2)])),
                   single(sum([g(), weight(eval2, 2)]))],
                  boost=1000),
              reopen_closed=true, bound=100)
}}}

----

{{{
--search lazy_wastar([eval1, eval2], bound=100, boost=0)
}}}

is equivalent to

{{{
--search lazy(alt([single(sum([g(), eval1])),
                   single(sum([g(), eval2]))])
              reopen_closed=true, bound=100)
}}}

----

{{{
--search lazy_wastar(eval1, w=2)
}}}

is equivalent to

{{{
--search lazy(single(sum([g(), weight(eval1, 2)])), reopen_closed=true)
}}}

'''Successor ordering:''' When using randomize_successors=true and preferred_successors_first=true, randomization happens before preferred operators are moved to the front.

A* search (eager)

A* is a special case of eager best first search that uses g+h as f-function. We break ties using the evaluator. Closed nodes are re-opened.

astar(eval, pathmax=false, mpd=false, cost_type=NORMAL, bound=infinity, max_time=infinity)
  • eval (ScalarEvaluator): evaluator for h-value

  • pathmax (bool): use pathmax correction

  • mpd (bool): use multi-path dependence (LM-A*)

  • cost_type ({NORMAL, ONE, PLUSONE}): Operator cost adjustment type. No matter what this setting is, axioms will always be considered as actions of cost 0 by the heuristics that treat axioms as actions.

    • NORMAL: all actions are accounted for with their real cost

    • ONE: all actions are accounted for as unit cost

    • PLUSONE: all actions are accounted for as their real cost + 1 (except if all actions have original cost 1, in which case cost 1 is used). This is the behaviour known for the heuristics of the LAMA planner. This is intended to be used by the heuristics, not search engines, but is supported for both.

  • bound (int): exclusive depth bound on g-values. Cutoffs are always performed according to the real cost, regardless of the cost_type parameter

  • max_time (double): maximum time in seconds the search is allowed to run for. The timeout is only checked after each complete search step (usually a node expansion), so the actual runtime can be arbitrarily longer. Therefore, this parameter should not be used for time-limiting experiments. Timed-out searches are treated as failed searches, just like incomplete search algorithms that exhaust their search space.

mpd option: This option is currently only present for the A* algorithm and not for the more general eager search, because the current implementation of multi-path depedence does not support general open lists.

--search astar(evaluator)

is equivalent to

--heuristic h=evaluator
--search eager(tiebreaking([sum([g(), h]), h], unsafe_pruning=false),
               reopen_closed=true, pathmax=false, progress_evaluator=sum([g(), h]))

eager(open, reopen_closed=false, pathmax=false, f_eval=None, preferred=[], cost_type=NORMAL, bound=infinity, max_time=infinity)
  • open (OpenList): open list

  • reopen_closed (bool): reopen closed nodes

  • pathmax (bool): use pathmax correction

  • f_eval (ScalarEvaluator): set evaluator for jump statistics. (Optional; if no evaluator is used, jump statistics will not be displayed.)

  • preferred (list of Heuristic): use preferred operators of these heuristics

  • cost_type ({NORMAL, ONE, PLUSONE}): Operator cost adjustment type. No matter what this setting is, axioms will always be considered as actions of cost 0 by the heuristics that treat axioms as actions.

    • NORMAL: all actions are accounted for with their real cost

    • ONE: all actions are accounted for as unit cost

    • PLUSONE: all actions are accounted for as their real cost + 1 (except if all actions have original cost 1, in which case cost 1 is used). This is the behaviour known for the heuristics of the LAMA planner. This is intended to be used by the heuristics, not search engines, but is supported for both.

  • bound (int): exclusive depth bound on g-values. Cutoffs are always performed according to the real cost, regardless of the cost_type parameter

  • max_time (double): maximum time in seconds the search is allowed to run for. The timeout is only checked after each complete search step (usually a node expansion), so the actual runtime can be arbitrarily longer. Therefore, this parameter should not be used for time-limiting experiments. Timed-out searches are treated as failed searches, just like incomplete search algorithms that exhaust their search space.

Greedy search (eager)

eager_greedy(evals, preferred=[], boost=0, cost_type=NORMAL, bound=infinity, max_time=infinity)
  • evals (list of ScalarEvaluator): scalar evaluators

  • preferred (list of Heuristic): use preferred operators of these heuristics

  • boost (int): boost value for preferred operator open lists

  • cost_type ({NORMAL, ONE, PLUSONE}): Operator cost adjustment type. No matter what this setting is, axioms will always be considered as actions of cost 0 by the heuristics that treat axioms as actions.

    • NORMAL: all actions are accounted for with their real cost

    • ONE: all actions are accounted for as unit cost

    • PLUSONE: all actions are accounted for as their real cost + 1 (except if all actions have original cost 1, in which case cost 1 is used). This is the behaviour known for the heuristics of the LAMA planner. This is intended to be used by the heuristics, not search engines, but is supported for both.

  • bound (int): exclusive depth bound on g-values. Cutoffs are always performed according to the real cost, regardless of the cost_type parameter

  • max_time (double): maximum time in seconds the search is allowed to run for. The timeout is only checked after each complete search step (usually a node expansion), so the actual runtime can be arbitrarily longer. Therefore, this parameter should not be used for time-limiting experiments. Timed-out searches are treated as failed searches, just like incomplete search algorithms that exhaust their search space.

Open list: In most cases, eager greedy best first search uses an alternation open list with one queue for each evaluator. If preferred operator heuristics are used, it adds an extra queue for each of these evaluators that includes only the nodes that are generated with a preferred operator. If only one evaluator and no preferred operator heuristic is used, the search does not use an alternation open list but a standard open list with only one queue.

Closed nodes: Closed node are not re-opened

Equivalent statements using general eager search

--heuristic h2=eval2
--search eager_greedy([eval1, h2], preferred=h2, boost=100)

is equivalent to

--heuristic h1=eval1 --heuristic h2=eval2
--search eager(alt([single(h1), single(h1, pref_only=true), single(h2), 
                    single(h2, pref_only=true)], boost=100),
               preferred=h2)


--search eager_greedy([eval1, eval2])

is equivalent to

--search eager(alt([single(eval1), single(eval2)]))


--heuristic h1=eval1
--search eager_greedy(h1, preferred=h1)

is equivalent to

--heuristic h1=eval1
--search eager(alt([single(h1), single(h1, pref_only=true)]),
               preferred=h1)


--search eager_greedy(eval1)

is equivalent to

--search eager(single(eval1))

Enforced hill-climbing

ehc(h, bfs_use_cost=false, preferred_usage=PRUNE_BY_PREFERRED, preferred=[], cost_type=NORMAL, bound=infinity, max_time=infinity)
  • h (Heuristic): heuristic

  • bfs_use_cost (bool): use cost for bfs

  • preferred_usage ({PRUNE_BY_PREFERRED, RANK_PREFERRED_FIRST}): preferred operator usage

  • preferred (list of Heuristic): use preferred operators of these heuristics

  • cost_type ({NORMAL, ONE, PLUSONE}): Operator cost adjustment type. No matter what this setting is, axioms will always be considered as actions of cost 0 by the heuristics that treat axioms as actions.

    • NORMAL: all actions are accounted for with their real cost

    • ONE: all actions are accounted for as unit cost

    • PLUSONE: all actions are accounted for as their real cost + 1 (except if all actions have original cost 1, in which case cost 1 is used). This is the behaviour known for the heuristics of the LAMA planner. This is intended to be used by the heuristics, not search engines, but is supported for both.

  • bound (int): exclusive depth bound on g-values. Cutoffs are always performed according to the real cost, regardless of the cost_type parameter

  • max_time (double): maximum time in seconds the search is allowed to run for. The timeout is only checked after each complete search step (usually a node expansion), so the actual runtime can be arbitrarily longer. Therefore, this parameter should not be used for time-limiting experiments. Timed-out searches are treated as failed searches, just like incomplete search algorithms that exhaust their search space.

iterated(engine_configs, pass_bound=true, repeat_last=false, continue_on_fail=false, continue_on_solve=true, plan_counter=0, cost_type=NORMAL, bound=infinity, max_time=infinity)
  • engine_configs (list of ParseTree (this just means the input is parsed at a later point. The real type is probably a search engine.)): list of search engines for each phase

  • pass_bound (bool): use bound from previous search. The bound is the real cost of the plan found before, regardless of the cost_type parameter.

  • repeat_last (bool): repeat last phase of search

  • continue_on_fail (bool): continue search after no solution found

  • continue_on_solve (bool): continue search after solution found

  • plan_counter (int): start enumerating plans with plan_counter + 1

  • cost_type ({NORMAL, ONE, PLUSONE}): Operator cost adjustment type. No matter what this setting is, axioms will always be considered as actions of cost 0 by the heuristics that treat axioms as actions.

    • NORMAL: all actions are accounted for with their real cost

    • ONE: all actions are accounted for as unit cost

    • PLUSONE: all actions are accounted for as their real cost + 1 (except if all actions have original cost 1, in which case cost 1 is used). This is the behaviour known for the heuristics of the LAMA planner. This is intended to be used by the heuristics, not search engines, but is supported for both.

  • bound (int): exclusive depth bound on g-values. Cutoffs are always performed according to the real cost, regardless of the cost_type parameter

  • max_time (double): maximum time in seconds the search is allowed to run for. The timeout is only checked after each complete search step (usually a node expansion), so the actual runtime can be arbitrarily longer. Therefore, this parameter should not be used for time-limiting experiments. Timed-out searches are treated as failed searches, just like incomplete search algorithms that exhaust their search space.

Note 1: We do no cache values between search iterations at the moment. If you perform a LAMA-style iterative search, heuristic values will be computed multiple times. Adding heuristic caching is issue108.

Note 2: Running this

./downward --search "iterated([lazy_wastar(merge_and_shrink(),w=10), lazy_wastar(merge_and_shrink(),w=5), lazy_wastar(merge_and_shrink(),w=3), lazy_wastar(merge_and_shrink(),w=2), lazy_wastar(merge_and_shrink(),w=1)])"

would perform the preprocessing phase of the merge and shrink heuristic 5 times (once before each iteration).

To avoid this, use heuristic predefinition, which avoids duplicate preprocessing, as follows:

./downward --heuristic "h=merge_and_shrink()" --search "iterated([lazy_wastar(h,w=10), lazy_wastar(h,w=5), lazy_wastar(h,w=3), lazy_wastar(h,w=2), lazy_wastar(h,w=1)])"

Note 3: If you reuse the same landmark count heuristic (using heuristic predefinition) between iterations, the path data (that is, landmark status for each visited state) will be saved between iterations.

lazy(open, reopen_closed=false, preferred=[], randomize_successors=false, preferred_successors_first=false, cost_type=NORMAL, bound=infinity, max_time=infinity)
  • open (OpenList): open list

  • reopen_closed (bool): reopen closed nodes

  • preferred (list of Heuristic): use preferred operators of these heuristics

  • randomize_successors (bool): randomize the order in which successors are generated

  • preferred_successors_first (bool): consider preferred operators first

  • cost_type ({NORMAL, ONE, PLUSONE}): Operator cost adjustment type. No matter what this setting is, axioms will always be considered as actions of cost 0 by the heuristics that treat axioms as actions.

    • NORMAL: all actions are accounted for with their real cost

    • ONE: all actions are accounted for as unit cost

    • PLUSONE: all actions are accounted for as their real cost + 1 (except if all actions have original cost 1, in which case cost 1 is used). This is the behaviour known for the heuristics of the LAMA planner. This is intended to be used by the heuristics, not search engines, but is supported for both.

  • bound (int): exclusive depth bound on g-values. Cutoffs are always performed according to the real cost, regardless of the cost_type parameter

  • max_time (double): maximum time in seconds the search is allowed to run for. The timeout is only checked after each complete search step (usually a node expansion), so the actual runtime can be arbitrarily longer. Therefore, this parameter should not be used for time-limiting experiments. Timed-out searches are treated as failed searches, just like incomplete search algorithms that exhaust their search space.

Successor ordering: When using randomize_successors=true and preferred_successors_first=true, randomization happens before preferred operators are moved to the front.

Greedy search (lazy)

lazy_greedy(evals, preferred=[], reopen_closed=false, boost=1000, randomize_successors=false, preferred_successors_first=false, cost_type=NORMAL, bound=infinity, max_time=infinity)
  • evals (list of ScalarEvaluator): scalar evaluators

  • preferred (list of Heuristic): use preferred operators of these heuristics

  • reopen_closed (bool): reopen closed nodes

  • boost (int): boost value for alternation queues that are restricted to preferred operator nodes

  • randomize_successors (bool): randomize the order in which successors are generated

  • preferred_successors_first (bool): consider preferred operators first

  • cost_type ({NORMAL, ONE, PLUSONE}): Operator cost adjustment type. No matter what this setting is, axioms will always be considered as actions of cost 0 by the heuristics that treat axioms as actions.

    • NORMAL: all actions are accounted for with their real cost

    • ONE: all actions are accounted for as unit cost

    • PLUSONE: all actions are accounted for as their real cost + 1 (except if all actions have original cost 1, in which case cost 1 is used). This is the behaviour known for the heuristics of the LAMA planner. This is intended to be used by the heuristics, not search engines, but is supported for both.

  • bound (int): exclusive depth bound on g-values. Cutoffs are always performed according to the real cost, regardless of the cost_type parameter

  • max_time (double): maximum time in seconds the search is allowed to run for. The timeout is only checked after each complete search step (usually a node expansion), so the actual runtime can be arbitrarily longer. Therefore, this parameter should not be used for time-limiting experiments. Timed-out searches are treated as failed searches, just like incomplete search algorithms that exhaust their search space.

Open lists: In most cases, lazy greedy best first search uses an alternation open list with one queue for each evaluator. If preferred operator heuristics are used, it adds an extra queue for each of these evaluators that includes only the nodes that are generated with a preferred operator. If only one evaluator and no preferred operator heuristic is used, the search does not use an alternation open list but a standard open list with only one queue.

--heuristic h2=eval2
--search lazy_greedy([eval1, h2], preferred=h2, boost=100)

is equivalent to

--heuristic h1=eval1 --heuristic h2=eval2
--search lazy(alt([single(h1), single(h1, pref_only=true), single(h2),
                  single(h2, pref_only=true)], boost=100),
              preferred=h2)


--search lazy_greedy([eval1, eval2], boost=100)

is equivalent to

--search lazy(alt([single(eval1), single(eval2)], boost=100))


--heuristic h1=eval1
--search lazy_greedy(h1, preferred=h1)

is equivalent to

--heuristic h1=eval1
--search lazy(alt([single(h1), single(h1, pref_only=true)], boost=1000),
              preferred=h1)


--search lazy_greedy(eval1)

is equivalent to

--search lazy(single(eval1))

Successor ordering: When using randomize_successors=true and preferred_successors_first=true, randomization happens before preferred operators are moved to the front.

(Weighted) A* search (lazy)

Weighted A* is a special case of lazy best first search.

lazy_wastar(evals, preferred=[], reopen_closed=true, boost=1000, w=1, randomize_successors=false, preferred_successors_first=false, cost_type=NORMAL, bound=infinity, max_time=infinity)
  • evals (list of ScalarEvaluator): scalar evaluators

  • preferred (list of Heuristic): use preferred operators of these heuristics

  • reopen_closed (bool): reopen closed nodes

  • boost (int): boost value for preferred operator open lists

  • w (int): heuristic weight

  • randomize_successors (bool): randomize the order in which successors are generated

  • preferred_successors_first (bool): consider preferred operators first

  • cost_type ({NORMAL, ONE, PLUSONE}): Operator cost adjustment type. No matter what this setting is, axioms will always be considered as actions of cost 0 by the heuristics that treat axioms as actions.

    • NORMAL: all actions are accounted for with their real cost

    • ONE: all actions are accounted for as unit cost

    • PLUSONE: all actions are accounted for as their real cost + 1 (except if all actions have original cost 1, in which case cost 1 is used). This is the behaviour known for the heuristics of the LAMA planner. This is intended to be used by the heuristics, not search engines, but is supported for both.

  • bound (int): exclusive depth bound on g-values. Cutoffs are always performed according to the real cost, regardless of the cost_type parameter

  • max_time (double): maximum time in seconds the search is allowed to run for. The timeout is only checked after each complete search step (usually a node expansion), so the actual runtime can be arbitrarily longer. Therefore, this parameter should not be used for time-limiting experiments. Timed-out searches are treated as failed searches, just like incomplete search algorithms that exhaust their search space.

Open lists: In the general case, it uses an alternation open list with one queue for each evaluator h that ranks the nodes by g + w * h. If preferred operator heuristics are used, it adds for each of the evaluators another such queue that only inserts nodes that are generated by preferred operators. In the special case with only one evaluator and no preferred operator heuristics, it uses a single queue that is ranked by g + w * h.

Equivalent statements using general lazy search

--heuristic h1=eval1
--search lazy_wastar([h1, eval2], w=2, preferred=h1,
                     bound=100, boost=500)

is equivalent to

--heuristic h1=eval1 --heuristic h2=eval2
--search lazy(alt([single(sum([g(), weight(h1, 2)])),
                   single(sum([g(), weight(h1, 2)]), pref_only=true),
                   single(sum([g(), weight(h2, 2)])),
                   single(sum([g(), weight(h2, 2)]), pref_only=true)],
                  boost=500),
              preferred=h1, reopen_closed=true, bound=100)


--search lazy_wastar([eval1, eval2], w=2, bound=100)

is equivalent to

--search lazy(alt([single(sum([g(), weight(eval1, 2)])),
                   single(sum([g(), weight(eval2, 2)]))],
                  boost=1000),
              reopen_closed=true, bound=100)


--search lazy_wastar([eval1, eval2], bound=100, boost=0)

is equivalent to

--search lazy(alt([single(sum([g(), eval1])),
                   single(sum([g(), eval2]))])
              reopen_closed=true, bound=100)


--search lazy_wastar(eval1, w=2)

is equivalent to

--search lazy(single(sum([g(), weight(eval1, 2)])), reopen_closed=true)

Successor ordering: When using randomize_successors=true and preferred_successors_first=true, randomization happens before preferred operators are moved to the front.