^{1}

^{*}

^{1}

^{*}

^{1}

^{2}

^{1}

^{3}

This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).

In this paper we present a comparison between six novel approaches to the fundamental problem of cyclic instability in Ambient Intelligence. These approaches are based on different optimization algorithms, Particle Swarm Optimization (PSO), Bee Swarm Optimization (BSO), micro Particle Swarm Optimization (

Any computer system can have errors and Ambient Intelligence is not exempt from them. Cyclical instability is a fundamental problem characterized by the presence of unexpected oscillations caused by the interaction of the rules governing the agents involved [

The problem of cyclical instability in Ambient Intelligence is a problem that has received little attention by the designers of intelligent environments [

In the literature there are several strategies reported based on analyzing the connectivity among the agents due to their rules. The first one the Instability Prevention System INPRES is based on analyzing the topological properties of the Interaction Network. The Interaction Network is the digraph associated to the system and captures the dependencies of the rules between agents. INPRES finds the loops and locks a subset of agents on a loop, preventing them to change their state [

Additionally Action Selection Algorithms map the relationship between agents, rules and selection algorithms, into a simple linear system [

The approach presented in this paper translates the problem of cyclic instability into a problem of intelligent optimization, moving from exhaustive search techniques to metaheuristics searching.

In this paper we compare the results of

The scenarios of intelligent environments are governed by a set of rules, which are directly involved in the unstable behavior, and can lead the system to multiple changes over a period of time. These changes can cause interference with other devices, or unwanted behavior [

The state of a system

The Particle Swarm Optimization (PSO) algorithm was proposed by Kennedy and Everhart [

Knowledge of the environment or adaptation is the importance given to past experiences.

Experience or local memory is the local importance given to best result found.

The experience of its neighbors or neighborhood memory is the importance given to the best result achieved by their neighbors.

The basic PSO algorithm [

_{i}

_{1} is the memory factor of neighborhood,

_{2} is memory factor,

_{1} and _{2} are random numbers in range [0, 1],

_{i}

The PSO algorithm [

_{1}∈

_{2}∈

Initialize particles ' position and velocity randomly;

For

Recalculate best particles position

Select the local best position

For each X

Recalculate particle speed

Recalculate particle position

Binary PSO [

_{ij}

BSO algorithm [

_{1}∈

_{2}∈

Initialize particles' position, velocity and neighborhood randomly;

Reinitialization of

Recalculate best particles position

Select the local best position in the neighborhood

For each

Recalculate particle speed

Recalculate particle position

Perform mutation to each particle with a probability of

Another variant of this algorithm consists in applying the steps in each comparison of a bee with the local best.

In the future we will refer to BSO algorithm with the global best enhancer as BSO1, while BSO algorithm with local the best enhancer will be known as BSO2.

The Artificial Immune System (AIS) [

One of the main functions of the immune system is to keep the body healthy. A variety of harmful microorganisms (called pathogens) can invade the body. Antigens are molecules that are expressed on the surface of pathogens that can be recognized by the immune system and are also able to initiate the immune response to eliminate the pathogen cells [

Artificial immune systems have various types of model (See Algorithm 4). In our case we use the one that implements the clonal selection algorithm, which emulates the process by which the immune system, in the presence of a specific antigen, stimulates only those lymphocytes that are more similar [

The steps of the algorithm are described below:

The genetic algorithm (GA) [

A fairly comprehensive definition of a genetic algorithm is proposed by John Koza [

“It is a highly parallel mathematical algorithm that transforms a set of individual mathematical objects with respect to time using operations patterned according to the Darwinian principle of reproduction and survival of the fittest and after naturally have arisen from a series of genetic operations from which highlights the sexual recombination. Each of these mathematical objects is usually a string of characters (letters or numbers) of fixed length that fits the model of chains of chromosomes and is associated with a certain mathematical function that reflects their ability”.

The GA seeks solutions in the space of a function through simple evolution. In general, the individual fitness of a population tends to reproduce and survive to the next generation, thus improving the next generation. Either way, inferior individuals can, with a certain probability, survive and reproduce. In Algorithm 5, a genetic algorithm is presented in a summary form [

In order to increase performance of the GA the concept of clones and explorers is taken [

The algorithm to implement and explorers clones is shown in the Algorithm 6 [

Count the number of individuals who have the same fitness value than the best individual of current population and calculate

Select the worst

Mutate selected individuals

The Mutual Information Maximization for Input Clustering (MIMIC) [

_{x} p

_{x} p

_{X} p

This algorithm suppose that the different variables have a bivariate dependency described by

The algorithm can be seen in Algorithm 7:

_{k}_{j}h_{l}_{j}_{ik}_{+1}) _{k}_{i}

The Game of Life [

The game of life is a cellular automata created by John Conway [

From the game of life, we have examples of oscillating behavior. From these we take the follow configurations as benchmark.

The settings in

The configuration presented in

The previous scenarios can be considered as simple configurations, as intelligent environments can contain a larger number of devices or agents involved, and the evaluation of the system is crucial to determine whether the proposed solution can work with more complex scenarios. In the following examples we will introduce complex configurations called

In order to solve the problem of cyclic instability using different optimization algorithms we need to minimize the amplitude of the oscillations. In the ideal case this would result in a stable system. Additionally we are interested on affecting the fewest number of agents (agents locked).

In order to test these approaches we used the Game of Life because it is a well know system that possesses proven oscillatory behavior in very simple environment with simple agents and few rules. For the test we consider a Game of Life with open boundary conditions. The open boundary condition in our case is considered cold (in terms of the heat entropy) and all cells outside the grid are considered dead. We enriched the game of life with additional conditions: a list of agents that are allowed to be locked. All techniques can lock them according to their results. This is because priority agents (such as alarms, security systems,

Each solution vector represents the list of blocked agents where the aim is to minimize the

_{i}_{i}_{+1} is the state of the system at the time

The best solution should not only minimize the amplitude of oscillation but also the number of agents locked. In these experiments the percentage of agents that can be locked is included as a parameter. This is important because as this percentage grows the systems becomes more disabled.

In these experiments we consider systems whose adjacency matrix are of 3 × 3, 4 × 4,7 × 7, and 17 × 17. In all the cases the maximum percentage of locked agents set to 20%.

If an algorithm can not find a better solution in terms of the amplitude of the oscillations, no agents will be locked. If a solution is good in terms of the amplitude of the oscillation but the percentage of locked agents is bigger than the maximum permitted, the solution will be penalized by adding a constant value (in our case the value is 10) to the value of the Average Cumulative Oscillation (ACO).

In our experiments we set a parameter of 3,000 functions calls as the measure of success of the algorithms,

For the test performed with PSO and BSO for all test instances we used the parameters shown in

The parameters used for the

The parameters used for AIS are shown in

The parameters used for GA are shown in

For the test performed with MIMIC for all test instances we used the parameters shown in

With the parameters described before, we obtain the results shown in

In order to see the cyclic instability and how it is removed, for each test instance we show the evolution of the system before and after locking. In

In the case of instance 2 (Non-oscillating) shown in

As for instance 3 (Toad), the oscillatory behavior shown in

In the same way as in instance 1(Blinker), instability was eliminated successfully for instance 3 (Toad) as shown in

In

While in the above instances the best values obtained by the techniques are very similar, this trend is no longer maintained for the instance 5 (Pulsar). The is because the size of the instance considerably increases the number of possible combinations.

Most importantly, despite the difference in the results between the various techniques, it was possible to stabilize the system with different combinations of locked agents, showing that depending on the scenario there may be more than one set of locked agents with which the system can become stable. This is showcased by the different results obtained for the instance 4 (Pulsar) in the level of instability (refer to Figure 13), where we can see how quickly the system stabilizes in each of the different configurations achieved by the optimization techniques.

The oscillatory behavior of the instance 5 (10 cell row) is shown in

For the instance 5 (10 cell row), again the number of agents represented is therefore significant. The performance results are similar to those described for instance 4 (Toad) and the best results obtained by the techniques vary with respect to each other. The behavior without oscillation is shown in

Despite the similarity of results of some algorithms based on Table 10, it can be said that the GA was able to obtain smaller values relative to the values of the ACO. But if we take into account the number of locked agents, the algorithms PSO and

From our experiments we found that all the algorithms were able to find a vector of locked agents that prevent the system from oscillating. Additionally, Wilcoxon test showed that GA gave better results but not in terms of time and number of agents locked—rather, PSO and

An important advantage of this proposal compared to others found in the literature is the way by which the system is evaluated, since it only sees the general state of the environment regardless of its topology. Because of this, the evaluation time of the scenarios can be significantly reduced regardless of the number of agents that form part of the system. Additionally, the possibility of a proposal able to work with any scenario can be more clearly distinguished in real time, which helps to improve their operation.

This approach based on the concept of

The authors want to thank Jorge Soria for their comments and suggestions to his work. Leoncio Romero acknowledges the support of the National Council for Science and Technology CONACyT. Additionally, E. Mezura acknowledges the support from CONACyT through project No. 79809.

Blinker.

Non-oscillating.

Toad.

Pulsar.

10 cell row.

Oscillatory behavior of the instance 1 (Blinker).

Instabilities are successfully removed for instance 1 (Blinker) using all algorithms.

Behavior of the instance 2 (Non-oscillating).

Behavior of the instance 2 (Non-oscillating) after locking with all algorithms.

Oscillatory behavior of the instance 3 (Toad).

Instabilities are successfully removed for the instance 3 (Toad) using all algorithms.

Oscillatory behavior of the instance 4 (Pulsar).

Instabilities are successfully removed for the instance 4 (Pulsar) using all algorithms.

Oscillatory behavior of the instance 5 (10 cell row).

Instabilities are successfully removed for the instance 5 (10 cell row) using all algorithms.

Parameters used in PSO and BSO.

Particles | 45 |

1 | |

_{1} |
0.3 |

_{2} |
0.7 |

Parameters of

Particles | 6 |

1 | |

_{1} |
0.3 |

_{2} |
0.7 |

Replacement generation | 100 |

Number of restart particles | 2 |

Mutation Rate | 0.1 |

Parameters of AIS.

Antibodies | 45 |

Antibodies to select | 20 |

New Antibodies | 20 |

Factor Beta | 2 |

Parameters of GA.

Chromosomes | 45 |

Mutation percentage | 0.15 |

Elitism | 0.2 |

Clones percentage | 0.3 |

Scouts percentage | 0.8 |

Parameters used in MIMIC.

Individuals | 100 |

Elitism | 0.5 |

Instance.

_{0} |
_{f} |
||||
---|---|---|---|---|---|

1 (Blinker) | 3 × 3 | 9 | 1.748188027 | 1.7481880270062005 | 0.416164 |

2 (Non-oscillating) | 7 × 7 | 49 | 12.284241189 | 0.0 | 0.196199 |

3 (Toad) | 4 × 4 | 16 | 3.6261349786353887 | 3.6261349786353887 | 0.974857 |

4 (Pulsar) | 17 × 17 | 289 | 54.30350121388617 | 75.43697161100698 | 2.916489 |

5 (10 cell row) | 17 × 17 | 289 | 44.85304503100554 | 50.04149156221928 | 2.23957 |

ACO Results (A).

| ||||
---|---|---|---|---|

PSO | MIMIC | BSO1 | BSO2 | |

1 (Blinker) | 0.0173 | 0.4161648288 | 0.0173 | 0.0173 |

2 (Non-oscillating) | 0.0036684768 | 10.0040328723 | 0.0013180907 | 6.96E–4 |

3 (Toad) | 0.0027436818 | 10.0005786421 | 0.0031827703 | 0.0027436818 |

4 (Pulsar) | 0.0039470374 | 10.000434825 | 0 | 0 |

5 (10 cell row) | 0.0461757189 | 10.040107898 | 1.58E–7 | 0 |

ACO Results (B).

| |||
---|---|---|---|

AIS | GA | ||

1 (Blinker) | 0.0173 | 0.0173 | 0.0173 |

2 (Non-oscillating) | 0.00239 | 4.77E–6 | 4.77E–6 |

3 (Toad) | 0.00253 | 0.00253 | 0.0025307973 |

4 (Pulsar) | 6.12E–4 | 5.24E–13 | 4.3E–4 |

5 (10 cell row) | 0.0472 | 1.60E–10 | 0.0256051082 |

Locked Agents.

| ||||||||
---|---|---|---|---|---|---|---|---|

Allow | PSO | BSO1 | BSO2 | AIS | GA | MIMIC | ||

1 (Blinker) | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |

2 (Non-oscillating) | 9 | 1 | 9 | 8 | 4 | 12 | 8 | 19 |

3 (Toad) | 5 | 3 | 3 | 3 | 3 | 3 | 3 | 9 |

4 (Pulsar) | 57 | 26 | 43 | 56 | 31 | 53 | 28 | 141 |

5 (10 cell row) | 57 | 31 | 38 | 44 | 33 | 57 | 18 | 139 |

Comparison among algorithms based on Wilcoxon test.

| ||||
---|---|---|---|---|

by ACO Value | by # of locked Agents | |||

| ||||

Overcome | Not Overcome | Overcome | Not Overcome | |

PSO | 1 | 5 | 5 | 1 |

BSO1 | 2 | 4 | 3 | 3 |

BSO2 | 3 | 3 | 3 | 3 |

5 | 1 | 6 | 0 | |

AIS | 4 | 2 | 4 | 2 |

GA | 6 | 0 | 1 | 5 |

MIMIC | 0 | 6 | 0 | 6 |