• No se han encontrado resultados

SOLICITUD PARA CERTIFICAR LA INSTALACION DEL EQUIPO (INSTRUCTIVO DE LLENADO Y PRESENTACION)

The description of metaheuristic algorithms as a series of instructions or steps shows some similarities between the algorithms, such as TABU and Iterative Im-prover sharing a first found improvement concept. A number of alternative models are presented here for the purposes of (i) showing how metaheuristics are taught and thought about, (ii) illustrating how they operate in a more conceptual way and (iii) finding a model that can form a basis for a practical functional library for metaheuristics.

2.4.1 Navigation of a Graph

A common metaphor for the operation of metaheuristics is that of graph navi-gation7, and one such description can be seen in [37]. The graph that is to be navigated is formed of the candidate solutions, which give the vertices, and the neighbourhoods of solutions which give the edges, such that if one solution is a neighbour of another, then an edge will exist between them in the graph. At each point in the process a metaheuristic will be at one of these vertices or solutions, and will be able to examine the local neighbourhood, before making a decision to move to one of these. In this way the action of decision-making is placed at the heart of the description.

This metaphor provides a way to decompose the description of meta-heuristics into two activities; (i) the construction of the graph and (ii) the navigation of the graph. Given that a graph represents the solution space of a problem that is to be solved, the size of a graph will grow at the same rate (exponentially) as the number of solutions to a problem8. This exponential growth is relative to the number of assignments in the model of the problem, which is the measure of the size of the problem, as described in Section2.1.1.

The use of a lazy language, such as Haskell, aids this division of the model description from the search logic, as has previously been observed [42]. It is a harder task in a traditional imperative language to achieve this, not least because a naive implementation will attempt to allocate and compute the entire search space

7Another metaphor for metaheuristics, similar to that of exploring graphs, which is often used is that of exploring a labyrinth.

8The graphs will also grow exponentially in terms of the edges as problem sizes increase, however the size of the neighbourhoods is usually constrained, to keep the search process at each iteration manageable. This leads to the vertex growth being the key issue, with the increase in edges being a function of the increase in vertices.

abcd_1

bacd_1 acbd_1 abdc_1

abcd_2 bcad_1 badc_1

Figure 2.12: An illustration of part of a repeating tree, representing a search pro-cess.

for a problem, before beginning the search of the data structure. By comparison a lazy language provides a memoized, on demand data structure, that either returns values that are known, or augments the structure as it is explored.

2.4.1.1 Tree representation

The process of navigating a graph of decisions can be implemented directly in declarative languages through the creation of a repeating tree of decisions, where every vertex of the tree carries a solution of the problem, and where the levels of the tree represents time, or number of iterations of the search process. The tree can then be navigated in an equivalent way to the process of exploring the graph of the solution space. Where two vertices share the same solution this approach will cause the recomputation of the solution (Figure 2.12), however this is also true of imperative implementations9.

The use of an infinitely generating tree to represent the search space can be used to allow the expression of some aspects of metaheuristics in terms of trans-formations of the tree. For example a recursive modification of the tree to remove all branches where the local relationship between the parent and child is not im-proving, converts a tree into an improving tree, the basis for Iterative Improvement algorithms as seen in Figure2.13.

The repeating structure of the tree is more usefully employed when dealing the the concept of a TABU filter. This would be a transformation which prunes

9In Haskell it is possible to memoize the function that computes each node of the tree [33].

If this is done then the resulting data structure is just a lazy representation of the graph of the problem, however the longer the program runs for the larger the memory footprint that will be built up. Ultimately this would result in exponential memory use and so may not be practical in all circumstances.

32

(a) An unfiltered tree

(b) The same tree after a filter-ing transformation

Figure 2.13: An illustration of how a Rose tree structure, capturing neighbourhood relationships may be filtered.

branches of the infinitely repeating tree based upon the recent series of solutions used to get to that point. Since one solution may be reached several times, at each point the pruning process can be different, giving a subtly different structure to the tree.

Each level of the tree can also have the order of the child elements rearranged, capturing other aspects of metaheuristics. For example, shuffling every level im-plements stochastic aspects seen in algorithms such as random walk and stochas-tic Iterative Improvement, whereas sorting the trees prepares them for algorithms such as maximal improvement.

The trees can then be explored, or flattened, to yield the solutions of the al-gorithm as a sequence. This approach of generation, transformation and flatten is also seen in other work on search strategies in pure functional languages [47,59].

Using this approach it is now possible to use the tree model of search to express a number of point-based metaheursitics (such as Iterative Improvers, Random Walk and TABU) in a compositional style. A sketch can be seen in Figure2.14.

1. make tree

2. improvement prune 3. sort tree

4. left edge flatten

Figure 2.14: An abstraction of the process of Iterative Improvement through the composition of a series of tree transformations.

2.4.1.2 Limitation

This metaphor for the representation of search spaces as a labyrinth of choices to be navigated by the algorithm is most effective when dealing with the point

based algorithms such as TABU, Iterative Improvement and Simulated Anneal-ing. However the population based methods do not fit the model, operating over multiple solutions and jumping to new solutions through recombination, rather than navigating the labyrinth directly.

It is possible to adapt the tree model of search by replacing the solutions at each vertex of the tree by populations, and the search moves between the pop-ulations of the system, rather than through individual solutions. However find-ing a satisfactory equivalent to the successor relationship for population based method has been difficult. For the point based methods the successors of a node represented a finite and relatively small neighbourhood of the solution. For a population based method, the successors should represent the possible successor populations, which is a neighbourhood of every possible population that could be created through the recombination of the original population. This is at odds with the basis of a genetic algorithm which already incorporates a clever marriage of stochastic elements (the selection of each parent could be any in the population) with the improving component (the selection is biased towards better parents).

This raises many questions such as (i) in what order are the populations generated by the construction process, and (ii) what do transformations of the tree, such as sorting, now mean? The size of this neighbourhood of populations also presents practical difficulties for many of the transformations previously considered such as sorting and selecting, which must now consider combinatorially large neigh-bourhood sizes.

2.4.2 Expansion and Contraction of Decisions

The graph model of metaheuristic operation is not practical for population based methods, but a model of the algorithms as a series of instructions does not clearly identify the underlying patterns of computation being used. The ”expansion and contraction” model is proposed in this Thesis as a more abstract model, one based around the decision-making processes of the algorithms.

Figure 2.15 shows an example of this model when applied to a first found iterative improver. The neighbourhood function increases or expands the options that are available within the metaheuristic. The later transformations then reduce or contract the number of options that are available until a final decision is made.

The process of the algorithm becomes a cycle of enumerating options, reducing these options and finally making specific selections from these options.

34

Figure 2.15: Model of first found iterative improvement as the expansion and contraction of decisions.

This model of metaheuristics can be applied to population based algorithms such as genetic algorithms, where the population provides the initial supply of options, and selections reduce this down until there are two parents. The recom-bination action is then applied to reduce these two into one new solution. The repeated application of this action to a collection gives rise to a new population of options.

This model can also be applied at a finer grain to the process of perturbation, where the perturbation of a solution is modelled as the creation of options and the filtering and selection between these options until a new complete solution is created. This concept will be revisited to in Chapter6.

Documento similar