• No results found

2.3 GP on WSN Motes

2.3.3 Distributed Optimization for WSN (DOWSN)

The Distributed Optimization for WSN (DOWSN) framework [59] was developed as an DOWSN

online, distributed optimisation process for WSNs specifically targeted to address online dynamic problems requiring local computations on the motes (e.g. energy-aware routing, localisation, clustering, data fusion, scheduling, security, Quality of Service).

At the core of the framework is an "Algorithms Database" (A-DB) which is populated with a selection of optimisation algorithms. These algorithms are preferably lightweight, memory-efficient (or fixed memory use) algorithms and so were implemented as inlined C macros to achieve a smaller memory overhead (and faster execution time). As a proof of concept, four of these algorithms were implemented: Random Search (RS), Intelligent

Single Particle Optimisation (IPSO), Nonuniform Simulated Annealing (nuSA) and 3 Stage Optimal Memetic Exploration (3SOME)[61]. Due to the simplicity of these optimisers, all

3SOME

except 3SOME required only 2 candidate solutions (as n-dimensional arrays) be held in memory; one for the current best known solution (i.e. elite) and one for the candidate (trial) solution. 3SOME however requires an additional candidate solution in memory for the "initial elite" which is needed for replacements when using the short distance operator (c.f. [61]).

Each mote locally evolves (i.e. in situ evolution by the mote) by selecting an algorithm from the A-DB at each iteration and potentially using the current elite as an input to the optimiser to generate a candidate solution. If the trialled candidate solution demonstrates superior performance to that of the current elite, the elite is replaced and a local search/op- timisation is performed (e.g. gradient descent optimisation). It is important to note that the same optimiser need not be selected each iteration, and this could potentially allow the optimisation process to maintain search diversity or break out of a local optimum. This was subsequently investigated [60] using the COOJA WSN simulation environment on a set of benchmark mathematical problems and interestingly found that employing only one algorithm (3SOME) was better than selecting a multiplicity of algorithms throughout the evolution.

In addition to the local optimisation, DOWSN supports distributed evolutionary search by employing an Island Modelprocess to share elite solutions with neighbouring motes. While elite solutions are broadcast every iteration by each mote, the receiving motes will only probabilistically accept the incoming solution if it is better than the current local elite. The probability of accepting a solution (if it is better than the current elite) is referred to as the imitation rate within this framework. The Island Model was shown to unequivocally speed up the time to evolve a good solution [60]. It also demonstrated that sharing only elites ultimately generated superior solutions which is counter to the expected behaviour of this mechanism as reported by [79]. Interestingly the authors claim, "DOWSN is effi- cient even (and especially) when a small number of nodes is employed", which is possibly due to the fast diffusion of a good solution which would quickly reduce the diversity of so- lutions across the network and therefore narrow the search considerably thereafter (i.e.

premature convergence). Arguably the population on each node is so small (i.e. an elite(s) and 1 candidate solution) that it cannot be regarded as a population per se, but rather as a single candidate solution (albeit with local optimisation) within the population of WSN. Viewed like this, one shouldn’t be surprised that a population-based search outperforms a single-point search and optimisation in the same number of epochs. Additionally, some real-world robustness may be lost by maintaining only the one elite solution. Real-world fitness landscapes are often slightly noisy and/or dynamic such that a candidate solution could stochastically be (incorrectly) evaluated as having superior fitness to the current elite. In this scenario, due to the replacement strategy used by DOWSN, the good solu- tion would be lost and would need to be rediscovered. Nonetheless, the memory footprint of this approach is significantly smaller than population-based metaheuristics, making the framework suitable for implementation on mote-class devices.

Perhaps an even more significant advantage of the minimalistic population size is the potential to easily parameterise how far each mote searches away from its current best known solution into a time-dependant exploration-exploitation parameter. After some time (which could be greatly reduced by the Island Model architecture), the behaviour of all motes within the WSN could evolve to stable, yet good, performance which is ideal for online learning scenarios. In these experiments, mathematical optimisation problems were used as the objective function and the fitness of the WSN was calculated as the average of the final elite fitness value from each of the nodes. It is important to note that the average of the final elite fitness is not an online performance metric since it does not take into consideration the fitness of each evaluated candidate solution during evolution.

DOWSN was implemented on TelosB motes8using the Contiki OS9and demonstrates

in situ, distributed, online optimisation on mote-class devices as aimed. Because it uses an optimisation heuristic however, it may not be suitable for more complex problems that require sense-compute-act behaviour to address them. For these problems, more sophis- ticated algorithms that can map sensory data into time-varying actions would be required (such asGP,NN, Reinforcement Learning).

8See [102] for a detailed description of the TelosB platform

It is not clear how GP could be integrated into the DOWSN framework, however a link can be drawn between DOWSN being a memetic framework and as a GP logic shar- ing memetic concept. As such, the idea of using GP with DOWSN could be worthy of investigation.

Genetic program representations would unlikely be compatible with optimisation rep- resentations and so the A-DB would probably need to be populated with solely GP algo- rithms instead (i.e. a GP-DB). Given the finding that a single algorithm typically outper- formed the multiple algorithms approach [60], it is doubtful that a GP-DB would offer any significant advantage over a single "best-of-breed" GP algorithm. Additionally the local evolution with GP would likely need to maintain a larger population (than a single non- elite) to maintain sufficient genetic diversity in order to realise the benefits expected from the building block hypothesis.