Recording the rationale that led to this issue:
There are some stumbling blocks with the current code w.r.t. bridging between
different task classes. For example, if the search algorithm uses task t1 and
uses a heuristic that is based on task t2, then the heuristic must be able to
take a state of t1 (provided by the search) and map it to a state in task t2
(used for heuristic computation).
There are some dangers lurking there, e.g. when we want to use the same
heuristic in multiple searches (that might work with different tasks). For our
next steps, we have decided to deal with this as follows:
- For now, only the heuristics work with the new task class and hence
potentially on a transformed view of the "global" task. For now, the search
algorithms keep working on the original unmodified tasks using the GlobalState,
GlobalOperator etc. classes.
- We will grow functionality for bridging between the global task and the task
proxy objects used by the heuristics. For now, we at least need to do two
conversions: converting "global" states to states of the heuristic (for the
input to the heuristic computation) and converting operators/operator IDs used
by the heuristic to "global" operators (for reporting preferred operators).
This will be done by a separate TaskTransformation mechanism. The base heuristic
class will deal with the conversion; the derived heuristic classes do not need
access to the transformation and should not be able to "see" any global states
or global operators.
- The heuristics will receive task transformations as their arguments, not the
resulting transformed tasks themselves.
- These points imply that for now, it won't be possible to nest transformations
(because they always map from the implicit global task to abstract tasks, rather
than mapping between arbitrary potentially transformed tasks). For now, we see
this as a feature rather than a limitation because it helps us change the
heuristics to work on the abstract tasks without having to think about the
complications that can arise if the searches also work on arbitrary unknown
transformed tasks. Once we have collected more experience with the new task
class based on the heuristics, the goal is to also use it elsewhere (e.g. for
the search), but this will be a later step.
|