Friday, 26 August 2022

On the order of executing genetic procedures

The classical approach on genetic algorithm design is to generate an initial population and then in every generation to execute Selection, Crossover and then Mutation; in that particular order. I often place Selection last, after Crossover and Mutation. There are pretty good reasons for following any of the two approaches and the answer to the question of which forms the best strategy is as usually case dependant.

By placing Selection first in order, you actually make a cleaning of the population from weak solutions and then go on with the rest of the procedures. If the population contains lots of invalid or bad solutions without any hope that they will generate a good solution via Crossover or Mutation then this strategy is profitable. But in case the initial population covers a small part of the solution space then starting with Selection limits the possibilities of reaching a goal solution.

Placing Selection last enables the search of a larger part of the solution space and finally choose the best of them. Especially on NP-hard problems where the solution space is large, this strategy enables first the exploration of a wide part of the space and then the cleanup which is a more fruitful strategy.






Tuesday, 21 December 2021

Edge Vector representation

Edge Vector representation is a novel method of representing graphs. It was introduced recently in the paper that I presented in ISCC ’21; also available here. The advantage of this representation is the requirement in memory usage which is minimum, in comparison to competition. Also, encoding a graph in Edge Vector or decoding the graph elements from the representation is efficient with polynomial complexity.

The open source code of the implementation of the method used in the paper may be found in my GtiHUB repository

https://rodispantelis.github.io/EdgeVector/

I believe you will find it useful.

Sunday, 3 October 2021

Designing Genetic Algorithms

Recently I presented a conference paper in ISCC 2021, it is on the Service Function Chain Embedding problem; find it in IEEEexplore or here. The problem is handled efficiently using a genetic algorithm. Here are a few empirical remarks about how to design efficient and effective GAs which I gained from working on this paper.
The issue with designing GAs is that their operation is not sufficiently explained and the efficiency of any GA design is case dependent. Any innovation applied on a GA implementation may work well on a problem and fail on many others.


At first there is the population generation. The objective of a GA is to approximate the goal solution of a problem among all the possible solutions in the solution space of the problem. So, from the members of the population we have to be able to generate the goal solution by applying the genetic procedures on the population. Then the initial population will have to be directed to the part of the solution space that contains the goal and for this reason we have examine whether it is more efficient to generate the population heuristically instead of a randomized generation which is the common practice.


Preserving original chromosomes and best solutions. The procedures of crossover and mutation were originally designed so as to affect the members of the initial population. During crossover, the parent chromosomes generate offspring that may replace them in the population. Also during mutation the genotype of a chromosome is affected and this results the replacement of the original solution that the chromosome represents by a new solution that the mutated chromosome represents. Moreover, the randomized operations of the GA may reject or replace a good solution.
Having these in mind, my proposition is to preserve the best solution generated during a generation regardless of how the new population will be formed. Also the generation of new offspring and new mutated chromosomes should not replace the previous ones. Add the new chromosomes in the population along with the older ones and let the selection procedure decide which will survive in the next generation.


Premature convergence.
There are many reasons for the premature convergence of the population in an undesirable solution. One technique of limiting this phenomenon and achieving a more stable behavior for the algorithm is the multiple execution of the algorithm and the further procedure of all the outputs.  The outputted solutions from all the executions maybe combined so as to generate a probably better solution (this was my approach) or you may just pick the best one for the final output.


Parameter tuning. GAs are multiparametric algorithms and the values of these parameters determine their performance; the parameters are the number of generations, population size, crossover and mutation probabilities. There are two ways to determine the best valuations for these parameters. Either by extensive experimentation or by using an optimization procedure like the one described in my earlier post.

Monday, 21 June 2021

How to tune up the parameters of a multiparametric algorithm

Genetic algorithms are multiparametric procedures. Their operations depend on a variety of parameters these usually are the size of the initial population, the number of generations, probability thresholds that define the crossover and mutation procedures and sometimes heuristics that some developers use. One of the open problems on genetic algorithms is the determination of the optimal values for these parameters. It is also called parameter tuning.
Like genetic algorithms, there are other multiparametric were the determination of the optimal values for their parameters is crucial for their operation. In all the above cases, sensitivity analysis is used for reaching optimality.
As parameter tuning is actually an optimization problem and genetic algorithms are optimization techniques, I thought it would be interesting to build a genetic algorithm for parameter tuning. The result of this work may be found here and it is released as an open source project.
The tuning algorithm examines the program that implements some multiparametric algorithm as a black box. The internal operations of the program are not examined; it only considers the output of the program given some valuation on its parameters. The population of the tuning algorithm consists of set of such valuations. It is an effective approach as I have tested it extensively.
It is a very interesting approach as we do not have to consider the functionality of the program under study, as the tuning algorithm adapts its functionality on the program. And this is the essence of artificial intelligence; the algorithms have to adapt to their subject of study.
When the program under study implements a genetic algorithm then we have a genetic algorithm that tunes up another genetic algorithm, which is a cool idea.
Of course the tuning algorithm is also multiparametric, but in it we do not seek optimality. It is enough to set some high values on its parameters, wait some time until it terminates and compute the optimal values for the program. Then run the program with optimal performance.

 

 https://github.com/rodispantelis/GeneticAlgorithms

Thursday, 15 October 2020

A thesis on virtual network embedding with genetic algorithms

Recently I finished my master thesis which is a study on the problem of virtual network embedding (VNE). It concerns the virtualization of network resources and topologies so as to create a fully functional virtual network embedded in a detacenter, instead of using a physical stand alone network. There are many advantages in this approach as it is much easier to update and maintain virtual devices and links instead of physical ones.

There are many ways to map virtual on physical resources, a relatively small virtual topology may be embedded in many ways in the physical network of a datacenter. The problem of VNE concerns the finding of the ideal mapping so that virtualized network will have the optimal performance.

It is a hard problem to solve so traditional analytical methods are inefficient for its solution. Artificial intelligence methods provide in such cases good and efficient solutions. In the thesis I developed a genetic algorithm that approaches the problem as an optimization problem and provides good practical solutions. 

My thesis is written in Greek and is accessible in the repository of the Hellenic Open University.  A direct download of the paper is possible in this link.