Keywords

1 Introduction

Genetic algorithm (GA) is bio-inspired intelligent algorithm abstracted from the human evolving process. Nowadays, the algorithm is known adaptive, heuristic, iterative, and has been applied in solving plenty of practical problems. The performance of GA heavily depends on the values of involved parameters, such as mutation rate and crossover rate of the population. The most intuitive case is that with different values, the convergence which is an important indicator of performance to test the algorithm, will be quite different. High convergence rate does not mean it can search for the best solutions; while sometimes, slower convergence can get better results, but it means spending more time [1].

Due to the instability of the convergence, many researchers are focus on the precocious convergence of GA. It is proposed in [2] the genetic markers to actively avoid convergence to a particular rooted tree structure. This is achieved by maintaining a number of unique genetic markers in the population. After that, the structure fitness sharing (SFS) algorithm proposed in [3, 4] is taken as a possible way to attempt to promote diversity based on tree structure. Motivated by the fitness sharing concept, it uses labels on tree structures to decrease the fitness of structures that are over-represented in the population. Generally speaking, most of the researches solve this problem by optimizing algorithm and intermediate data processing.

Membrane computing, initialed by Gh Paun in 1998 is known as new branch of natural computing [5]. The systems investigated in the framework of membrane computing is called P systems, and plenty of P systems have been developed, including cell-like P systems, tissue P systems and spiking neural P systems [6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]. In this work, we propose a new model inspired from membrane computing models to achieve “fast-slow” convergence rate of GA in the membrane structure. The obtained algorithm is a new candidate in membrane algorithm, and many researchers have done good works on it. Currently, membrane computing has been used in optimization field [31], Systems and Synthetic Biology [21], Troubleshooting [36], economics [37] and linguistics [38]. These experiments demonstrate that applying Membrane Algorithm to optimize Genetic Algorithm is feasible. We developed here a thread control process following the Nested Membrane System [24] to searching optimal solution, where a single GA is used in each membrane and performs as a thread in the program [22]. After one iteration (evolution), the population will produce the best individual. Under the control of the communication rule [23, 36], the efficiency of searching optimal solution gets a big promotion, when the problem has no solving information. It is obtained by the data experimental results that our method performs well in solving 41 benchmark functions by achieving accuracy rate about 96%.

2 Related Technologies

2.1 Genetic Algorithm

Genetic Algorithm (GA) was first proposed by J. Holland in 1975 [26]. It is a type of heuristic random search method inspired by natural selection and genetic mechanism of biological evolution law (survival of the fittest). It contains feature is the direct operating to the structured objects without the delimitation of derivation and continuity of function. It is inherent implicit parallelism and better global optimization and it can automatically obtain and guide optimized searching space for adjusting the search direction.

In general computing process, GA is started with setting the potential solution (population), and a population is consists of genes encoded by a certain number of individuals (individual). It is needed initially to encode individuals for simplify computer operation, such as binary encoding. After producing the first generation of populations, each generation produce more good approximate solution in accordance with the principle of survival of the fittest. In each generation, select individual according to the individual’s fitness size, and then generate a population representative of the new solution set by genetic operators combined with cross and mutation. This process will lead new population to be more adapted to the environment, and the last population of the best individual can be the approximate optimal solution after decoding [25].

2.2 Membrane Computing Inspired Algorithm

Membrane Computing is a new branch of natural computing. It is originated from natural cells, and the structure also builds on the biological cells. The systems investigated in membrane computing are named P systems, which is defined as a series of membrane structures containing chemical substances (limited number), catalyst and rules (including the rules of the reaction, membrane transport rules etc.). It is shown in Fig. 1 the membrane structure of the P systems. Like in real biological cells, when the reactants (sometimes catalyst) are contact with each other, the chemical reaction will occur. Due to the random applications of rules, the calculation will be uncertain, in the other words, the repetition of the same question may lead to multiple solutions. When the computation of the P system is completed, the chemicals exist out of the outermost membrane will reach steady state, which means no reaction will continue.

Fig. 1.
figure 1

Membrane structure.

A membrane algorithm framework consists of three different kinds of components:

  • A number of regions which are separated by nested membranes (Fig. 1).

  • For every region, a subalgorithm and a few tentative solutions of the optimization problem to be solved.

  • Solution transporting mechanisms between adjacent regions.

There are three basic types of membrane system: Cell-like P system, Tissue P system, spiking neural P systems [29, 32, 35]. We consider here a cell-like membrane structure named Nested Membrane System, which is a friendly model for programming. The structure is used by Nishida to solve the TSP problem [30, 31], and have been applied for data optimization [31].

We denote by S a feasible solution of the problem, which is distributed differences in different membranes. The communication rules means that the membrane sends some solutions into the outer membrane which directly contains it. The rule can be written as follows.

$$\begin{aligned} \{a_{max1},a_{max2},\dots ,a_{maxn}\}_{i} - \{\}_{i}a_{max1},a_{max2},\dots ,a_{maxn} \end{aligned}$$
(1)

It is denoted by i the membrane i, and by \(amax_1,amax_2,\dots ,amax_n\) the n best solutions in the region \(1,2,\dots , n\), respectively. The model converges very fast because of the communication between membranes. In terms of realization of membrane computing, some associated simulation software have been released.

3 The Model and Data Experiments

3.1 GA Program

We design a basic GA program to run the dimensional function. In the program, we can set initial conditions to control the convergence rate. Every gene contains the potential solution and the threshold. In order to simplify the crossing and mutation process, encoding process is omitted as in [33].

  • Chromosome: Chromosome and can be called individuals, a certain number of individuals of the population, the number of groups of individuals called population size.

  • Gene: Gene elements include characteristics of the individual genes. In this paper, a set of possible solutions \(S = (x1, x2, x3)\) are designed and each of them is called gene.

  • Fitness: Each individual’s degree of adaptation to the environment is called fitness. In order to reflect the ability to adapt to the chromosome, the introduction of the function of each chromosome in question can be measured. Here, the function is calculated to value in the population of individuals.

  • Select: Select means winning individuals from population, and Selecting operation is based on the population of individual fitness assessment.

  • Cross: Genetic recombinant (plus variation) play a central role in the process of evolution is a genetic recombinant organisms (plus variation). Because of giving up Genes encoding process gene cross is implemented by exchanging a random parameter of two genes.

  • Variation: The basic contents of the gene mutation operator are the value of a population of some individual strings locus for change. Here we use Real value variation.

3.2 Membrane Structure

The nested membrane structure of degree m is selected, which means the number of membrane is m. The value of m is set to be 5 or 6 here, and in each membrane, GA is performed with different mutation and crossover rates. All of the GA run the same function. Because of the lightweight program, we set each GA as a thread [34]. The data communication rule works in neighbor membrane. The communication process looks as follows (current membrane is the middle membrane):

  1. 1.

    Each membrane start GA thread

  2. 2.

    Suspend thread every 50 iteration

  3. 3.

    Monitoring inner membrane

    If (inner membrane has no request for communication):

    1. 3.1

      Compared with the individual of the outer membrane

    2. 3.2

      Suspend outer membrane

    3. 3.3

      Replace the best individual of outer membrane

    4. 3.4

      Reuse thread

    5. 3.5

      Judge the outer membrane to reuse (avoid the thread to be suspended before reaching 50 iteration by inner membrane)

      Else: wait for the inner membrane

  4. 4.

    The best individual in the outmost becomes the output of the algorithm

The individual are modified only when both of the membranes have been suspended. In order to avoid deadlocks, the inner membrane has higher priority than the outer membrane.

3.3 Data Experiments

It is tested the proposed method by solving 41 benchmark functions. In the step of initialization, we created 5 GA and set different initialization information. The iteration is set to be 10000 for each GA. We controlled convergence rates by changing number of individuals, cross rate and variation rate (Table 1).

Table 1. The values of involved parameters in the GA in different regions

The interface of the software is shown in Fig. 2.

Fig. 2.
figure 2

Fast-slow GA framework.

The tested functions are listed in Table 2.

Table 2. The list of tested benchmark functions
Table 3. The values of parameters in tested benchmark functions

It is obtained by the data experimental results that our method performs well in solving benchmark functions by achieving accuracy rate about 96%.

We exam the formulas the help of the model (Table 3).

4 Conclusion

In this paper, a hybrid “fast-slow” convergent framework for genetic algorithm inspired by membrane computing is proposed. Such framework incorporates basic Cell-like P System and GA. Several basic features like compartmentalization, communication among compartments, dynamic membrane structure help GA to combine the convergence. It is tested the proposed method by solving 41 benchmark functions. It is found that our method performs well in solving benchmark functions by achieving accuracy rate about 96%.

Compared with these results, we can find the algorithm show good performance for searching optimal solution. It combines the potential results of different GA and provides a method to solve premature convergence. It also reduces the influence of the initialization to GA. On the other hand, the communication rule can be optimized, and the present paper control the data transmission by making use of thread control inspired by Nested membrane structure.

Membrane algorithms inherit the parallelism of P system. In the further study, the algorithms will be naturally implemented on a parallel hardware. The parallelism is simulated in a common serial machine. The GA in each membrane is not true parallel processing and it is also the difficulty of the application of membrane computing, even if the algorithm running in a cluster, because the communication costs is too high to optimization. So, there are still many improvements to do if the framework in this paper runs on a parallel hardware, such as GPU. We hope other membrane structure such as spiking neural P systems [39] can also be applied if the threads control method is well designed. It is of interests to replace GA in each membrane by some other intelligent algorithms, such as PSO, simulated annealing. As well, some other membrane structures, for instance, star membrane structure, and rooted membrane structure can be expanded to our hybrid framework.